octopian-apis 1.0.45 → 1.0.47

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.45",
3
+ "version": "1.0.47",
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": {
@@ -87,18 +87,15 @@ export async function GetMyApprovedCorrespondenceRequests(
87
87
  ToName = attribute.Value;
88
88
  }
89
89
  if (
90
- attribute.AttributeTypeValueTypeName === "Attachment" &&
91
- !attribute.IsRequesterVisible
90
+ attribute.Alias === element.Request.CustomField5
92
91
  ) {
93
- // if(attribute.Value && ReadSASResult?.Result)
94
- // {
95
- // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
96
- // "/" +
97
- // attribute.Value +
98
- // "?" +
99
- // ReadSASResult.Result.split("?")[1];
100
- // }
101
- GeneratedDocument = attribute.Value;
92
+ GeneratedDocument = ReadSASResult?.Result
93
+ ? ReadSASResult.Result.split("?")[0] +
94
+ "/" +
95
+ attribute.Value +
96
+ "?" +
97
+ ReadSASResult.Result.split("?")[1]
98
+ : "";
102
99
  }
103
100
  if (
104
101
  attribute.Alias === "Attachments" &&
@@ -110,16 +107,18 @@ export async function GetMyApprovedCorrespondenceRequests(
110
107
  );
111
108
  for (let attributeGroup of DecodedAttachmentsRecordList) {
112
109
  for (let group of attributeGroup) {
113
- for (let attribute of group.RequestAttributeDtos) {
114
- if (attribute.AttributeTypeValueTypeName === "Attachment") {
110
+ for (let attributeDTO of group.RequestAttributeDtos) {
111
+ if (
112
+ attributeDTO.AttributeTypeValueTypeName === "Attachment"
113
+ ) {
115
114
  Attachments.push({
116
- id: attribute.RequestAttributeId || 0,
117
- name: attribute.Name || "",
118
- type: attribute.Value?.split(".").pop() || "",
115
+ id: attributeDTO.RequestAttributeId || 0,
116
+ name: attributeDTO.ExtendedValue || "",
117
+ type: attributeDTO.Value?.split(".").pop() || "",
119
118
  url: ReadSASResult?.Result
120
119
  ? ReadSASResult.Result.split("?")[0] +
121
120
  "/" +
122
- attribute.Value +
121
+ attributeDTO.Value +
123
122
  "?" +
124
123
  ReadSASResult.Result.split("?")[1]
125
124
  : "",
@@ -276,18 +275,15 @@ export async function GetMyRejectedCorrespondenceRequests(
276
275
  ToName = attribute.Value;
277
276
  }
278
277
  if (
279
- attribute.AttributeTypeValueTypeName === "Attachment" &&
280
- !attribute.IsRequesterVisible
278
+ attribute.Alias === element.Request.CustomField5
281
279
  ) {
282
- // if(attribute.Value && ReadSASResult?.Result)
283
- // {
284
- // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
285
- // "/" +
286
- // attribute.Value +
287
- // "?" +
288
- // ReadSASResult.Result.split("?")[1];
289
- // }
290
- GeneratedDocument = attribute.Value;
280
+ GeneratedDocument = ReadSASResult?.Result
281
+ ? ReadSASResult.Result.split("?")[0] +
282
+ "/" +
283
+ attribute.Value +
284
+ "?" +
285
+ ReadSASResult.Result.split("?")[1]
286
+ : "";
291
287
  }
292
288
  if (
293
289
  attribute.Alias === "Attachments" &&
@@ -299,16 +295,18 @@ export async function GetMyRejectedCorrespondenceRequests(
299
295
  );
300
296
  for (let attributeGroup of DecodedAttachmentsRecordList) {
301
297
  for (let group of attributeGroup) {
302
- for (let attribute of group.RequestAttributeDtos) {
303
- if (attribute.AttributeTypeValueTypeName === "Attachment") {
298
+ for (let attributeDTO of group.RequestAttributeDtos) {
299
+ if (
300
+ attributeDTO.AttributeTypeValueTypeName === "Attachment"
301
+ ) {
304
302
  Attachments.push({
305
- id: attribute.RequestAttributeId || 0,
306
- name: attribute.Name || "",
307
- type: attribute.Value?.split(".").pop() || "",
303
+ id: attributeDTO.RequestAttributeId || 0,
304
+ name: attributeDTO.ExtendedValue || "",
305
+ type: attributeDTO.Value?.split(".").pop() || "",
308
306
  url: ReadSASResult?.Result
309
307
  ? ReadSASResult.Result.split("?")[0] +
310
308
  "/" +
311
- attribute.Value +
309
+ attributeDTO.Value +
312
310
  "?" +
313
311
  ReadSASResult.Result.split("?")[1]
314
312
  : "",
@@ -453,18 +451,15 @@ export async function GetMyDraftCorrespondenceRequests(
453
451
  ToName = attribute.Value;
454
452
  }
455
453
  if (
456
- attribute.AttributeTypeValueTypeName === "Attachment" &&
457
- !attribute.IsRequesterVisible
454
+ attribute.Alias === element.CustomField5
458
455
  ) {
459
- // if(attribute.Value && ReadSASResult?.Result)
460
- // {
461
- // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
462
- // "/" +
463
- // attribute.Value +
464
- // "?" +
465
- // ReadSASResult.Result.split("?")[1];
466
- // }
467
- GeneratedDocument = attribute.Value;
456
+ GeneratedDocument = ReadSASResult?.Result
457
+ ? ReadSASResult.Result.split("?")[0] +
458
+ "/" +
459
+ attribute.Value +
460
+ "?" +
461
+ ReadSASResult.Result.split("?")[1]
462
+ : "";
468
463
  }
469
464
  if (
470
465
  attribute.Alias === "Attachments" &&
@@ -476,16 +471,18 @@ export async function GetMyDraftCorrespondenceRequests(
476
471
  );
477
472
  for (let attributeGroup of DecodedAttachmentsRecordList) {
478
473
  for (let group of attributeGroup) {
479
- for (let attribute of group.RequestAttributeDtos) {
480
- if (attribute.AttributeTypeValueTypeName === "Attachment") {
474
+ for (let attributeDTO of group.RequestAttributeDtos) {
475
+ if (
476
+ attributeDTO.AttributeTypeValueTypeName === "Attachment"
477
+ ) {
481
478
  Attachments.push({
482
- id: attribute.RequestAttributeId || 0,
483
- name: attribute.Name || "",
484
- type: attribute.Value?.split(".").pop() || "",
479
+ id: attributeDTO.RequestAttributeId || 0,
480
+ name: attributeDTO.ExtendedValue || "",
481
+ type: attributeDTO.Value?.split(".").pop() || "",
485
482
  url: ReadSASResult?.Result
486
483
  ? ReadSASResult.Result.split("?")[0] +
487
484
  "/" +
488
- attribute.Value +
485
+ attributeDTO.Value +
489
486
  "?" +
490
487
  ReadSASResult.Result.split("?")[1]
491
488
  : "",
@@ -602,18 +599,15 @@ export async function GetSentCorrespondenceRequests(
602
599
  ToName = attribute.Value;
603
600
  }
604
601
  if (
605
- attribute.AttributeTypeValueTypeName === "Attachment" &&
606
- !attribute.IsRequesterVisible
602
+ attribute.Alias === element.CustomField5
607
603
  ) {
608
- // if(attribute.Value && ReadSASResult?.Result)
609
- // {
610
- // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
611
- // "/" +
612
- // attribute.Value +
613
- // "?" +
614
- // ReadSASResult.Result.split("?")[1];
615
- // }
616
- GeneratedDocument = attribute.Value;
604
+ GeneratedDocument = ReadSASResult?.Result
605
+ ? ReadSASResult.Result.split("?")[0] +
606
+ "/" +
607
+ attribute.Value +
608
+ "?" +
609
+ ReadSASResult.Result.split("?")[1]
610
+ : "";
617
611
  }
618
612
  if (
619
613
  attribute.Alias === "Attachments" &&
@@ -751,18 +745,15 @@ export async function GetCancelledCorrespondenceRequests(
751
745
  ToName = attribute.Value;
752
746
  }
753
747
  if (
754
- attribute.AttributeTypeValueTypeName === "Attachment" &&
755
- !attribute.IsRequesterVisible
748
+ attribute.Alias === element.CustomField5
756
749
  ) {
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;
750
+ GeneratedDocument = ReadSASResult?.Result
751
+ ? ReadSASResult.Result.split("?")[0] +
752
+ "/" +
753
+ attribute.Value +
754
+ "?" +
755
+ ReadSASResult.Result.split("?")[1]
756
+ : "";
766
757
  }
767
758
  if (
768
759
  attribute.Alias === "Attachments" &&
@@ -774,16 +765,18 @@ export async function GetCancelledCorrespondenceRequests(
774
765
  );
775
766
  for (let attributeGroup of DecodedAttachmentsRecordList) {
776
767
  for (let group of attributeGroup) {
777
- for (let attribute of group.RequestAttributeDtos) {
778
- if (attribute.AttributeTypeValueTypeName === "Attachment") {
768
+ for (let attributeDTO of group.RequestAttributeDtos) {
769
+ if (
770
+ attributeDTO.AttributeTypeValueTypeName === "Attachment"
771
+ ) {
779
772
  Attachments.push({
780
- id: attribute.RequestAttributeId || 0,
781
- name: attribute.Name || "",
782
- type: attribute.Value?.split(".").pop() || "",
773
+ id: attributeDTO.RequestAttributeId || 0,
774
+ name: attributeDTO.ExtendedValue || "",
775
+ type: attributeDTO.Value?.split(".").pop() || "",
783
776
  url: ReadSASResult?.Result
784
777
  ? ReadSASResult.Result.split("?")[0] +
785
778
  "/" +
786
- attribute.Value +
779
+ attributeDTO.Value +
787
780
  "?" +
788
781
  ReadSASResult.Result.split("?")[1]
789
782
  : "",
@@ -901,18 +894,15 @@ export async function GetMyClosedCorrespondenceRequests(
901
894
  ToName = attribute.Value;
902
895
  }
903
896
  if (
904
- attribute.AttributeTypeValueTypeName === "Attachment" &&
905
- !attribute.IsRequesterVisible
897
+ attribute.Alias === element.Request.CustomField5
906
898
  ) {
907
- // if(attribute.Value && ReadSASResult?.Result)
908
- // {
909
- // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
910
- // "/" +
911
- // attribute.Value +
912
- // "?" +
913
- // ReadSASResult.Result.split("?")[1];
914
- // }
915
- GeneratedDocument = attribute.Value;
899
+ GeneratedDocument = ReadSASResult?.Result
900
+ ? ReadSASResult.Result.split("?")[0] +
901
+ "/" +
902
+ attribute.Value +
903
+ "?" +
904
+ ReadSASResult.Result.split("?")[1]
905
+ : "";
916
906
  }
917
907
  if (
918
908
  attribute.Alias === "Attachments" &&
@@ -924,16 +914,18 @@ export async function GetMyClosedCorrespondenceRequests(
924
914
  );
925
915
  for (let attributeGroup of DecodedAttachmentsRecordList) {
926
916
  for (let group of attributeGroup) {
927
- for (let attribute of group.RequestAttributeDtos) {
928
- if (attribute.AttributeTypeValueTypeName === "Attachment") {
917
+ for (let attributeDTO of group.RequestAttributeDtos) {
918
+ if (
919
+ attributeDTO.AttributeTypeValueTypeName === "Attachment"
920
+ ) {
929
921
  Attachments.push({
930
- id: attribute.RequestAttributeId || 0,
931
- name: attribute.Name || "",
932
- type: attribute.Value?.split(".").pop() || "",
922
+ id: attributeDTO.RequestAttributeId || 0,
923
+ name: attributeDTO.ExtendedValue || "",
924
+ type: attributeDTO.Value?.split(".").pop() || "",
933
925
  url: ReadSASResult?.Result
934
926
  ? ReadSASResult.Result.split("?")[0] +
935
927
  "/" +
936
- attribute.Value +
928
+ attributeDTO.Value +
937
929
  "?" +
938
930
  ReadSASResult.Result.split("?")[1]
939
931
  : "",
@@ -1204,18 +1196,15 @@ export async function GetMyInboxCorrespondenceRequests(
1204
1196
  ImagePath = attribute.Value;
1205
1197
  }
1206
1198
  if (
1207
- attribute.AttributeTypeValueTypeName === "Attachment" &&
1208
- !attribute.IsRequesterVisible
1199
+ attribute.Alias === element.Request.CustomField5
1209
1200
  ) {
1210
- // if(attribute.Value && ReadSASResult?.Result)
1211
- // {
1212
- // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
1213
- // "/" +
1214
- // attribute.Value +
1215
- // "?" +
1216
- // ReadSASResult.Result.split("?")[1];
1217
- // }
1218
- GeneratedDocument = attribute.Value;
1201
+ GeneratedDocument = ReadSASResult?.Result
1202
+ ? ReadSASResult.Result.split("?")[0] +
1203
+ "/" +
1204
+ attributeDTO.Value +
1205
+ "?" +
1206
+ ReadSASResult.Result.split("?")[1]
1207
+ : "";
1219
1208
  }
1220
1209
  if (
1221
1210
  attribute.Alias === "Attachments" &&
@@ -1227,16 +1216,18 @@ export async function GetMyInboxCorrespondenceRequests(
1227
1216
  );
1228
1217
  for (let attributeGroup of DecodedAttachmentsRecordList) {
1229
1218
  for (let group of attributeGroup) {
1230
- for (let attribute of group.RequestAttributeDtos) {
1231
- if (attribute.AttributeTypeValueTypeName === "Attachment") {
1219
+ for (let attributeDTO of group.RequestAttributeDtos) {
1220
+ if (
1221
+ attributeDTO.AttributeTypeValueTypeName === "Attachment"
1222
+ ) {
1232
1223
  Attachments.push({
1233
- id: attribute.RequestAttributeId || 0,
1234
- name: attribute.Name || "",
1235
- type: attribute.Value?.split(".").pop() || "",
1224
+ id: attributeDTO.RequestAttributeId || 0,
1225
+ name: attributeDTO.ExtendedValue || "",
1226
+ type: attributeDTO.Value?.split(".").pop() || "",
1236
1227
  url: ReadSASResult?.Result
1237
1228
  ? ReadSASResult.Result.split("?")[0] +
1238
1229
  "/" +
1239
- attribute.Value +
1230
+ attributeDTO.Value +
1240
1231
  "?" +
1241
1232
  ReadSASResult.Result.split("?")[1]
1242
1233
  : "",
@@ -17,11 +17,26 @@ export interface RequesterAddRequestInput {
17
17
  StepName: string
18
18
  SequenceNo: number
19
19
  ProviderRoleId: number
20
- PrivilegeLevel?: number
21
- UiviewAlias?: string
20
+ CloseWhenChildCompleted: boolean
21
+ CloseWhenParentCompleted: boolean
22
+ SetWaitingOnStart: boolean
22
23
  IsRequesterVisible: boolean
23
24
  IsProviderVisible: boolean
25
+ IsRejectable: boolean
26
+ IsAssignable: boolean
27
+ ChildSteps: ChildStep[]
24
28
  }
29
+
30
+ export interface ChildStep {
31
+ StepTypeName: string
32
+ StepName: string
33
+ SequenceNo: number
34
+ ProviderRoleId: number
35
+ CloseWhenChildCompleted: boolean
36
+ CloseWhenParentCompleted: boolean
37
+ SetWaitingOnStart: boolean
38
+ }
39
+
25
40
  export interface ClientRequestAttributeDto {
26
41
  IsSystemGenerated: boolean
27
42
  DtoState: number