hl-core 0.0.10-beta.7 → 0.0.10-beta.70

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.
Files changed (49) hide show
  1. package/README.md +0 -2
  2. package/api/base.api.ts +425 -134
  3. package/api/interceptors.ts +162 -62
  4. package/components/Dialog/Dialog.vue +5 -1
  5. package/components/Dialog/DigitalDocumentsDialog.vue +129 -0
  6. package/components/Dialog/FamilyDialog.vue +15 -4
  7. package/components/Form/DigitalDocument.vue +52 -0
  8. package/components/Form/FormSource.vue +30 -0
  9. package/components/Form/ManagerAttachment.vue +85 -11
  10. package/components/Form/ProductConditionsBlock.vue +12 -6
  11. package/components/Input/Datepicker.vue +5 -0
  12. package/components/Input/FileInput.vue +1 -1
  13. package/components/Input/FormInput.vue +7 -0
  14. package/components/Input/OtpInput.vue +25 -0
  15. package/components/Input/RoundedInput.vue +2 -0
  16. package/components/Input/RoundedSelect.vue +2 -0
  17. package/components/Input/TextAreaField.vue +71 -0
  18. package/components/Input/TextHint.vue +13 -0
  19. package/components/Layout/SettingsPanel.vue +2 -1
  20. package/components/Menu/MenuNav.vue +2 -1
  21. package/components/Pages/Anketa.vue +207 -176
  22. package/components/Pages/Auth.vue +10 -3
  23. package/components/Pages/ContragentForm.vue +24 -18
  24. package/components/Pages/Documents.vue +488 -66
  25. package/components/Pages/MemberForm.vue +1009 -268
  26. package/components/Pages/ProductConditions.vue +1424 -273
  27. package/components/Panel/PanelHandler.vue +329 -126
  28. package/components/Utilities/Chip.vue +1 -1
  29. package/components/Utilities/JsonViewer.vue +1 -2
  30. package/composables/classes.ts +136 -20
  31. package/composables/constants.ts +168 -1
  32. package/composables/index.ts +467 -9
  33. package/composables/styles.ts +8 -24
  34. package/configs/i18n.ts +2 -0
  35. package/configs/pwa.ts +1 -7
  36. package/layouts/clear.vue +1 -1
  37. package/layouts/default.vue +2 -2
  38. package/layouts/full.vue +1 -1
  39. package/locales/kz.json +1239 -0
  40. package/locales/ru.json +133 -21
  41. package/nuxt.config.ts +8 -6
  42. package/package.json +14 -13
  43. package/plugins/head.ts +7 -1
  44. package/plugins/helperFunctionsPlugins.ts +1 -0
  45. package/store/data.store.ts +1080 -552
  46. package/store/member.store.ts +19 -8
  47. package/store/rules.ts +75 -8
  48. package/types/enum.ts +52 -2
  49. package/types/index.ts +143 -6
package/api/base.api.ts CHANGED
@@ -137,6 +137,13 @@ export class ApiClass {
137
137
  });
138
138
  }
139
139
 
140
+ async getEkkDisabilityGroup() {
141
+ return await this.axiosCall<Value[]>({
142
+ method: Methods.GET,
143
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500153',
144
+ });
145
+ }
146
+
140
147
  async getFamilyStatuses() {
141
148
  return await this.axiosCall<Value[]>({
142
149
  method: Methods.GET,
@@ -182,7 +189,7 @@ export class ApiClass {
182
189
  async getContragent(queryData: Types.GetContragentRequest) {
183
190
  return await this.axiosCall<Types.GetContragentResponse>({
184
191
  method: Methods.GET,
185
- url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
192
+ url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}&BirthDate=${queryData.birthDate ?? ''}`,
186
193
  });
187
194
  }
188
195
 
@@ -221,6 +228,13 @@ export class ApiClass {
221
228
  });
222
229
  }
223
230
 
231
+ async getQuestionListSecondById(surveyType: string, processInstanceId: string | number, insuredId: number | string, id: string) {
232
+ return await this.axiosCall<Types.AnketaSecond[]>({
233
+ method: Methods.GET,
234
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}/${id}`,
235
+ });
236
+ }
237
+
224
238
  async definedAnswers(filter: string) {
225
239
  return await this.axiosCall({
226
240
  method: Methods.GET,
@@ -278,6 +292,13 @@ export class ApiClass {
278
292
  });
279
293
  }
280
294
 
295
+ async getProcessDividendPeriods(processCode: string | number) {
296
+ return await this.axiosCall<Value[]>({
297
+ method: Methods.GET,
298
+ url: `/Arm/api/Dictionary/ProcessDividendPeriod/${processCode}`,
299
+ });
300
+ }
301
+
281
302
  async getContragentById(id: number) {
282
303
  return await this.axiosCall<Types.GetContragentResponse>({
283
304
  method: Methods.GET,
@@ -299,21 +320,23 @@ export class ApiClass {
299
320
  });
300
321
  }
301
322
 
302
- async getFile(id: string) {
303
- return await this.axiosCall({
323
+ async getDicFileTypeList() {
324
+ return await this.axiosCall<Value[]>({
304
325
  method: Methods.GET,
305
- url: `/File/api/Data/DownloadFile/${id}`,
306
- responseType: 'arraybuffer',
307
- headers: {
308
- 'Content-Type': 'application/pdf',
309
- },
326
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
310
327
  });
311
328
  }
312
329
 
313
- async getDicFileTypeList() {
330
+ async getProgramType() {
314
331
  return await this.axiosCall<Value[]>({
315
332
  method: Methods.GET,
316
- url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
333
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicProgramType',
334
+ });
335
+ }
336
+ async getSource() {
337
+ return await this.axiosCall<Value[]>({
338
+ method: Methods.GET,
339
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicSource',
317
340
  });
318
341
  }
319
342
 
@@ -353,6 +376,10 @@ export class ApiClass {
353
376
  });
354
377
  }
355
378
 
379
+ async getMainParts() {
380
+ return this.axiosCall<Types.BpmMenuItem[]>({ method: Methods.GET, url: '/Arm/api/Bpm/MenuItem' });
381
+ }
382
+
356
383
  async getProcessHistory(id: string) {
357
384
  return await this.axiosCall<Types.TaskHistory[]>({
358
385
  method: Methods.GET,
@@ -414,12 +441,14 @@ export class ApiClass {
414
441
  });
415
442
  }
416
443
 
417
- async startApplication(data: any) {
444
+ async startApplication(data: any, processCodeEnum?: number) {
445
+ const params = processCodeEnum !== undefined ? { processCodeEnum } : undefined;
418
446
  return await this.axiosCall<{
419
447
  processInstanceId: string;
420
448
  }>({
421
449
  method: Methods.POST,
422
450
  url: `/${this.productUrl}/api/Application/StartApplication`,
451
+ params: params,
423
452
  data: data,
424
453
  });
425
454
  }
@@ -453,25 +482,6 @@ export class ApiClass {
453
482
  });
454
483
  }
455
484
 
456
- async deleteFile(data: any) {
457
- return await this.axiosCall<void>({
458
- method: Methods.POST,
459
- url: '/File/api/Data/DeleteFiles',
460
- data: data,
461
- });
462
- }
463
-
464
- async uploadFiles(data: any) {
465
- return await this.axiosCall({
466
- method: Methods.POST,
467
- url: '/File/api/Data/UploadFiles',
468
- headers: {
469
- 'Content-Type': 'multipart/form-data',
470
- },
471
- data: data,
472
- });
473
- }
474
-
475
485
  async sendTask(data: Types.SendTask) {
476
486
  return await this.axiosCall<void>({
477
487
  method: Methods.POST,
@@ -486,7 +496,32 @@ export class ApiClass {
486
496
  url: `/${this.productUrl}/api/Application/CheckBeneficiariesInActualPolicy?iin=${iin}`,
487
497
  });
488
498
  }
499
+ async checkBeneficiariesActualPolicy(id: string) {
500
+ return await this.axiosCall<boolean>({
501
+ method: Methods.GET,
502
+ url: `/${this.productUrl}/api/Application/checkBeneficiariesActualPolicy?processInstanceId=${id}`,
503
+ });
504
+ }
505
+ async isRecalculate(id: string | number) {
506
+ return await this.axiosCall<boolean>({
507
+ method: Methods.GET,
508
+ url: `/${this.productUrl}/api/Application/IsRecalculate?processInstanceId=${id}`,
509
+ });
510
+ }
489
511
 
512
+ async availableToAccureStartEducationalCapital(id: string | number) {
513
+ return await this.axiosCall<any>({
514
+ method: Methods.GET,
515
+ url: `/${this.productUrl}/api/Application/AvailableToAccureStartEducationalCapital?processInstanceId=${id}`,
516
+ });
517
+ }
518
+ async checkCurrencyDate(id: string | number) {
519
+ return await this.axiosCall<boolean>({
520
+ method: Methods.GET,
521
+ url: '/Arm/api/Bpm/CheckCurrencyDate',
522
+ params: { processInstanceId: id },
523
+ });
524
+ }
490
525
  async setMember(whichMember: keyof typeof MemberCodes, data: any) {
491
526
  return await this.axiosCall({
492
527
  method: Methods.POST,
@@ -506,6 +541,7 @@ export class ApiClass {
506
541
  return await this.axiosCall<Types.EpayResponse>({
507
542
  method: Methods.GET,
508
543
  url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
544
+ params: { silent: true },
509
545
  });
510
546
  }
511
547
 
@@ -527,54 +563,26 @@ export class ApiClass {
527
563
  return await this.axiosCall<Types.EpayShortResponse>({
528
564
  method: Methods.POST,
529
565
  url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
566
+ data: {},
530
567
  });
531
568
  }
532
569
 
533
- async signDocument(data: Types.SignDataType[]) {
534
- return await this.axiosCall<Types.SignUrlType[]>({
535
- method: Methods.POST,
536
- url: '/File/api/Document/SignBts',
537
- data: data,
538
- });
539
- }
540
-
541
- async signQR(data: Types.SignDataType[]) {
542
- return await this.axiosCall<Types.ResponseStructure<any>>({
543
- method: Methods.POST,
544
- url: '/File/api/Sign/SignQr',
545
- data: data,
546
- });
547
- }
548
-
549
- async generateDocument(data: Types.SignDataType) {
550
- return await this.axiosCall<void>({
551
- method: Methods.POST,
552
- url: '/File/api/Document/Generate',
553
- responseType: 'arraybuffer',
554
- data: data,
555
- });
556
- }
557
-
558
- async getSignedDocList(data: { processInstanceId: string | number }) {
559
- return await this.axiosCall<IDocument[]>({
560
- method: Methods.POST,
561
- url: '/File/api/Data/List',
562
- data: data,
563
- });
564
- }
565
-
566
- async calculateWithoutApplication(data: Types.RecalculationDataType, product: string | undefined | null = this.productUrl) {
570
+ async calculateWithoutApplication(data: Types.RecalculationDataType, product: string | undefined | null = this.productUrl, processCodeEnum?: number) {
571
+ const params = processCodeEnum !== undefined ? { processCodeEnum } : undefined;
567
572
  return await this.axiosCall<Types.RecalculationResponseType>({
568
573
  method: Methods.POST,
569
574
  url: `/${product}/api/Application/Calculate`,
575
+ params: params,
570
576
  data: data,
571
577
  });
572
578
  }
573
579
 
574
- async getDefaultCalculationData(product: string | undefined | null = this.productUrl) {
580
+ async getDefaultCalculationData(product: string | undefined | null = this.productUrl, processCodeEnum?: number) {
581
+ const params = processCodeEnum !== undefined ? { processCodeEnum } : undefined;
575
582
  return await this.axiosCall<Types.RecalculationDataType>({
576
583
  method: Methods.GET,
577
584
  url: `/${product}/api/Application/DefaultCalculatorValues`,
585
+ params: params,
578
586
  });
579
587
  }
580
588
 
@@ -617,6 +625,14 @@ export class ApiClass {
617
625
  });
618
626
  }
619
627
 
628
+ async checkExistProcess(iin: string, processCode: number) {
629
+ return await this.axiosCall<string>({
630
+ method: Methods.GET,
631
+ url: '/Arm/api/Bpm/CheckExistProcess',
632
+ params: { iin, processCode },
633
+ });
634
+ }
635
+
620
636
  async getContragentFromGBDFL(data: Types.Api.GBD.Request) {
621
637
  return await this.axiosCall<Types.Api.GBD.Response>({
622
638
  method: Methods.POST,
@@ -650,10 +666,6 @@ export class ApiClass {
650
666
  });
651
667
  }
652
668
 
653
- async getProcessTariff(code: number | string = 5) {
654
- return await this.axiosCall({ method: Methods.GET, url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
655
- }
656
-
657
669
  async setConfirmation(data: any) {
658
670
  return await this.axiosCall({
659
671
  method: Methods.POST,
@@ -691,6 +703,13 @@ export class ApiClass {
691
703
  });
692
704
  }
693
705
 
706
+ async filterExecutorByRegion(dictName: string, filterName: string) {
707
+ return await this.axiosCall<Value[]>({
708
+ method: Methods.GET,
709
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
710
+ });
711
+ }
712
+
694
713
  async setINSISWorkData(data: Types.InsisWorkDataApp) {
695
714
  return await this.axiosCall({
696
715
  method: Methods.POST,
@@ -706,6 +725,13 @@ export class ApiClass {
706
725
  });
707
726
  }
708
727
 
728
+ async getBankByAccountNumber(accountNumber: string) {
729
+ return await this.axiosCall<Value>({
730
+ method: Methods.GET,
731
+ url: `/Ekk/api/ContragentInsis/GetBankByAccountNumber?accountNumber=${accountNumber}`,
732
+ });
733
+ }
734
+
709
735
  async searchAgentByName(name: string, branchCode?: string) {
710
736
  return await this.axiosCall<Types.AgentData[]>({
711
737
  method: Methods.GET,
@@ -713,6 +739,17 @@ export class ApiClass {
713
739
  });
714
740
  }
715
741
 
742
+ async getGlobalIdByNumber(insuranceTypeEnum: number, policyNo: string) {
743
+ return await this.axiosCall<number>({
744
+ method: Methods.GET,
745
+ url: `/Ekk/api/PolicyInsis/GetGlobalIDbyNumber`,
746
+ params: {
747
+ insuranceTypeEnum,
748
+ policyNo,
749
+ },
750
+ });
751
+ }
752
+
716
753
  async isCourseChanged(processInstanceId: string) {
717
754
  return await this.axiosCall<boolean>({
718
755
  method: Methods.GET,
@@ -815,10 +852,10 @@ export class ApiClass {
815
852
  });
816
853
  }
817
854
 
818
- async saveInsuredList(processInstanceId: string | number, data: any) {
855
+ async saveInsuredList(processInstanceId: string | number, newInsureds: boolean, data: any) {
819
856
  return await this.axiosCall({
820
857
  method: Methods.POST,
821
- url: `/${this.productUrl}/api/Application/saveInsuredList/?processInstanceId=${processInstanceId}`,
858
+ url: `/${this.productUrl}/api/Application/saveInsuredList/?processInstanceId=${processInstanceId}&newInsureds=${newInsureds}`,
822
859
  data: data,
823
860
  });
824
861
  }
@@ -831,6 +868,20 @@ export class ApiClass {
831
868
  });
832
869
  }
833
870
 
871
+ async getInsuredsData(processInstanceId: string | number) {
872
+ return await this.axiosCall<Types.ClientV2[]>({
873
+ method: Methods.GET,
874
+ url: `/${this.productUrl}/api/Application/GetInsuredsData/?processInstanceId=${processInstanceId}`,
875
+ });
876
+ }
877
+
878
+ async getCloseDate() {
879
+ return await this.axiosCall<string>({
880
+ method: Methods.GET,
881
+ url: `/${this.productUrl}/api/Application/GetCloseDate`,
882
+ });
883
+ }
884
+
834
885
  async getProcessGfot(processCode: string | number) {
835
886
  return await this.axiosCall<Value[]>({
836
887
  method: Methods.GET,
@@ -966,30 +1017,6 @@ export class ApiClass {
966
1017
  });
967
1018
  }
968
1019
 
969
- async uploadXml(data: any) {
970
- return await this.axiosCall<void>({
971
- url: `/File/api/Document/UploadXml`,
972
- method: Methods.POST,
973
- data: data,
974
- });
975
- }
976
-
977
- async signXml(data: any) {
978
- return await this.axiosCall<Types.ResponseStructure<any>>({
979
- url: `/File/api/Sign/SignXml`,
980
- method: Methods.POST,
981
- data: data,
982
- });
983
- }
984
-
985
- async signBts(data: any) {
986
- return await this.axiosCall<Types.ResponseStructure<Types.SignUrlType[]>>({
987
- url: `/File/api/Sign/SignBts`,
988
- method: Methods.POST,
989
- data: data,
990
- });
991
- }
992
-
993
1020
  async generateShortLink(data: Types.Api.GenerateShortLink.Request) {
994
1021
  return await this.axiosCall<Types.Api.GenerateShortLink.Response>({
995
1022
  url: '/notification/shorteners',
@@ -999,12 +1026,13 @@ export class ApiClass {
999
1026
  });
1000
1027
  }
1001
1028
 
1002
- async checkOsns(bin: string) {
1029
+ async checkOsns(bin: string, date: string) {
1003
1030
  return await this.axiosCall<boolean>({
1004
1031
  method: Methods.GET,
1005
1032
  url: `/${this.productUrl}/api/Application/CheckOSNS`,
1006
1033
  params: {
1007
1034
  bin,
1035
+ date,
1008
1036
  },
1009
1037
  });
1010
1038
  }
@@ -1037,28 +1065,6 @@ export class ApiClass {
1037
1065
  });
1038
1066
  }
1039
1067
 
1040
- async uploadDigitalCertifijcate(data: any) {
1041
- return await this.axiosCall<any>({
1042
- method: Methods.POST,
1043
- url: '/File/api/Document/UploadDigitalCertifijcate',
1044
- headers: {
1045
- 'Content-Type': 'multipart/form-data',
1046
- },
1047
- data: data,
1048
- });
1049
- }
1050
-
1051
- async uploadDigitalCertificatePensionAnnuityNew(data: any) {
1052
- return await this.axiosCall<any>({
1053
- method: Methods.POST,
1054
- url: '/File/api/Document/UploadDigitalCertificatePensionAnnuityNew',
1055
- headers: {
1056
- 'Content-Type': 'multipart/form-data',
1057
- },
1058
- data: data,
1059
- });
1060
- }
1061
-
1062
1068
  async startRejectedApplication(data: any) {
1063
1069
  return await this.axiosCall({
1064
1070
  method: Methods.POST,
@@ -1067,13 +1073,6 @@ export class ApiClass {
1067
1073
  });
1068
1074
  }
1069
1075
 
1070
- async getDocumentsByEdsXmlId(edsXmlId: string) {
1071
- return await this.axiosCall<Types.ResponseStructure<any>>({
1072
- method: Methods.GET,
1073
- url: `/File/api/Sign/GetDocumentsByEdsXmlId/${edsXmlId}`,
1074
- });
1075
- }
1076
-
1077
1076
  async checkSign(id: string) {
1078
1077
  return await this.axiosCall<Types.SignedState>({
1079
1078
  method: Methods.POST,
@@ -1090,21 +1089,313 @@ export class ApiClass {
1090
1089
  });
1091
1090
  }
1092
1091
 
1093
- async getEnpfRedirectUrl(id: string) {
1094
- return await this.axiosCall<{ redirectUrl: string }>({
1092
+ async acceptDeclaration(insuredId: string, accept: boolean) {
1093
+ return await this.axiosCall<boolean>({
1094
+ method: Methods.POST,
1095
+ url: `/${this.productUrl}/api/Application/AcceptDeclaration`,
1096
+ params: {
1097
+ insuredId,
1098
+ accept,
1099
+ },
1100
+ });
1101
+ }
1102
+
1103
+ async getParentContractData(policyId: string) {
1104
+ return await this.axiosCall<{ bin: string; name: string }>({
1105
+ method: Methods.GET,
1106
+ url: `/${this.productUrl}/api/Application/GetParentContractData`,
1107
+ params: {
1108
+ policyId,
1109
+ },
1110
+ });
1111
+ }
1112
+
1113
+ async getContractByBin(bin: string) {
1114
+ return await this.axiosCall<Types.GetContractByBinResponse>({
1115
+ method: Methods.GET,
1116
+ url: `/${this.productUrl}/api/Application/getContractByBin`,
1117
+ params: {
1118
+ bin,
1119
+ },
1120
+ });
1121
+ }
1122
+
1123
+ async setIsNotCalculated(processInstanceId: string | number) {
1124
+ return await this.axiosCall<boolean>({
1095
1125
  method: Methods.POST,
1096
- // TODO
1097
- baseURL: 'https://products.halyklife.kz/test/efo/api',
1098
- url: `/pensionannuityNew/GetEnpfRedirectUrl?id=${id}`,
1126
+ url: `/${this.productUrl}/api/Application/SetIsNotCalculated`,
1127
+ params: {
1128
+ processInstanceId,
1129
+ },
1130
+ });
1131
+ }
1132
+
1133
+ async checkProActiveService(processInstanceId: string | number, iin: string) {
1134
+ return await this.axiosCall({
1135
+ method: Methods.GET,
1136
+ url: `/${this.productUrl}/api/Application/CheckProActiveService`,
1137
+ params: {
1138
+ processInstanceId,
1139
+ iin,
1140
+ },
1141
+ });
1142
+ }
1143
+
1144
+ async getParentApplication(bin: string) {
1145
+ return await this.axiosCall<any>({
1146
+ method: Methods.GET,
1147
+ url: `/${this.productUrl}/api/Application/GetParentApplication`,
1148
+ params: {
1149
+ bin,
1150
+ },
1099
1151
  });
1100
1152
  }
1101
1153
 
1102
- async setEnpfSharedId(sharedId: string, infoId: string) {
1154
+ async saveDocumentIssuer(name: string, insisId: number) {
1103
1155
  return await this.axiosCall<void>({
1104
1156
  method: Methods.POST,
1105
- // TODO
1106
- baseURL: 'https://products.halyklife.kz/test/efo/api',
1107
- url: `/pensionannuityNew/SetEnpfSharedId/${sharedId}/${infoId}`,
1157
+ baseURL: getStrValuePerEnv('efoBaseApiLocal'),
1158
+ url: `/documentparsingservice/SaveDocumentIssuer`,
1159
+ data: {
1160
+ name,
1161
+ insisId,
1162
+ },
1108
1163
  });
1109
1164
  }
1165
+
1166
+ pensionannuityNew = {
1167
+ base: '/pensionannuityNew',
1168
+ getEnpfRedirectUrl: async (id: string) => {
1169
+ return await this.axiosCall<{ redirectUrl: string }>({
1170
+ method: Methods.POST,
1171
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1172
+ url: `${this.pensionannuityNew.base}/GetEnpfRedirectUrl?id=${id}`,
1173
+ });
1174
+ },
1175
+ setEnpfSharedId: async (sharedId: string, infoId: string, isProd: boolean) => {
1176
+ return await this.axiosCall<void>({
1177
+ method: Methods.POST,
1178
+ baseURL: isProd === false ? getStrValuePerEnv('efoBaseApi').replace('kz/efo', 'kz/test/efo') : getStrValuePerEnv('efoBaseApi'),
1179
+ url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
1180
+ });
1181
+ },
1182
+ calcParentContractSums: async (data: any) => {
1183
+ return await this.axiosCall<void>({
1184
+ method: Methods.POST,
1185
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1186
+ url: `${this.pensionannuityNew.base}/CalcParentContractSums`,
1187
+ data: data,
1188
+ });
1189
+ },
1190
+ reCalculateRefund: async (data: any) => {
1191
+ return await this.axiosCall<void>({
1192
+ method: Methods.POST,
1193
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1194
+ url: `${this.pensionannuityNew.base}/ReCalculateRefund`,
1195
+ data: data,
1196
+ });
1197
+ },
1198
+ getDividendSchedule: async (processInstanceId: string | number) => {
1199
+ return await this.axiosCall<{
1200
+ scheduleDividend: Value[] | null;
1201
+ scheduleDividend2: Value[] | null;
1202
+ }>({
1203
+ method: Methods.GET,
1204
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1205
+ url: `${this.pensionannuityNew.base}/GetDividendSchedule`,
1206
+ params: { processInstanceId: processInstanceId },
1207
+ });
1208
+ },
1209
+ setOppvCount: async (processInstanceId: string, data: any) => {
1210
+ return await this.axiosCall<{ oppvCount: number; errocCode: number; errorMsg: string }>({
1211
+ method: Methods.POST,
1212
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1213
+ url: `${this.pensionannuityNew.base}/SetOppvCount`,
1214
+ headers: {
1215
+ 'Content-Type': 'multipart/form-data',
1216
+ },
1217
+ params: { processInstanceId },
1218
+ data: data,
1219
+ });
1220
+ },
1221
+ resetApplicationData: async (processInstanceId: string | number) => {
1222
+ return await this.axiosCall<void>({
1223
+ method: Methods.POST,
1224
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1225
+ url: `${this.pensionannuityNew.base}/ResetApplicationData`,
1226
+ params: { processInstanceId },
1227
+ });
1228
+ },
1229
+ };
1230
+
1231
+ externalServices = {
1232
+ base: '/externalservices',
1233
+ getOnlineAccess: async (data: { iinBin: string; documentType: string }) => {
1234
+ return await this.axiosCall<{ code: string; message: string }>({
1235
+ method: Methods.POST,
1236
+ url: `${this.externalServices.base}/api/ExternalServices/GetOnlineAccess`,
1237
+ data: data,
1238
+ });
1239
+ },
1240
+ getOnlineChildAccess: async (data: { iinBin: string; documentType?: string; methodName?: string; childId?: string }) => {
1241
+ return await this.axiosCall<{ code: string; message: string; children: any[] }>({
1242
+ method: Methods.POST,
1243
+ url: `${this.externalServices.base}/api/ExternalServices/GetOnlineChildAccess`,
1244
+ data: data,
1245
+ });
1246
+ },
1247
+ getDigitalDocuments: async (data: { iin: string; code: string; processInstanceId?: string }) => {
1248
+ return await this.axiosCall<{ parsingResponseContent: string; digitalDocuments: any }>({
1249
+ method: Methods.POST,
1250
+ url: `${this.externalServices.base}/api/ExternalServices/DigitalDocuments`,
1251
+ data: data,
1252
+ });
1253
+ },
1254
+ updateDigitalDocumentsProfile: async (data: { iinBin: string }) => {
1255
+ return await this.axiosCall<void>({
1256
+ method: Methods.POST,
1257
+ url: `${this.externalServices.base}/api/ExternalServices/UpdateDigitalDocumentsProfile`,
1258
+ data: data,
1259
+ });
1260
+ },
1261
+ };
1262
+
1263
+ file = {
1264
+ base: '/File',
1265
+ uploadFilesNew: async (groupId: string, data: any) => {
1266
+ return await this.axiosCall({
1267
+ method: Methods.POST,
1268
+ url: `${this.file.base}/api/GeneralSign/UploadPaper/${groupId}`,
1269
+ headers: {
1270
+ 'Content-Type': 'multipart/form-data',
1271
+ },
1272
+ data: data,
1273
+ });
1274
+ },
1275
+ generalGetDoc: async (groupId: string, documentSignType: number) => {
1276
+ return await this.axiosCall<any>({
1277
+ method: Methods.GET,
1278
+ url: `${this.file.base}/api/GeneralSign/Group/${groupId}/${documentSignType} `,
1279
+ responseType: documentSignType === 5 ? 'json' : 'arraybuffer',
1280
+ });
1281
+ },
1282
+ generalSign: async (data: Types.Api.Sign.New.GeneralResponse) => {
1283
+ return await this.axiosCall<Types.Api.Sign.New.Response>({
1284
+ method: Methods.POST,
1285
+ url: `${this.file.base}/api/GeneralSign/Sign`,
1286
+ data: data,
1287
+ });
1288
+ },
1289
+ generateSign: async (data: Types.Api.Sign.New.Request) => {
1290
+ return await this.axiosCall<Types.Api.Sign.New.GeneralResponse[]>({
1291
+ method: Methods.POST,
1292
+ url: `${this.file.base}/api/GeneralSign/GenerateSign`,
1293
+ data: data,
1294
+ });
1295
+ },
1296
+ uploadDigitalCertificateNca: async (groupId: string, data: any) => {
1297
+ return await this.axiosCall<void>({
1298
+ method: Methods.POST,
1299
+ url: `${this.file.base}/api/GeneralSign/UploadNClayer/${groupId}`,
1300
+ headers: {
1301
+ 'Content-Type': 'multipart/form-data',
1302
+ },
1303
+ data: data,
1304
+ });
1305
+ },
1306
+ uploadXml: async (data: any) => {
1307
+ return await this.axiosCall<void>({
1308
+ url: `${this.file.base}/api/GeneralSign/UploadXml`,
1309
+ method: Methods.POST,
1310
+ data: data,
1311
+ });
1312
+ },
1313
+ signXml: async (data: any) => {
1314
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1315
+ url: `${this.file.base}/api/Sign/SignXml`,
1316
+ method: Methods.POST,
1317
+ data: data,
1318
+ });
1319
+ },
1320
+ signBts: async (data: any) => {
1321
+ return await this.axiosCall<Types.ResponseStructure<Types.SignUrlType[]>>({
1322
+ url: `${this.file.base}/api/Sign/SignBts`,
1323
+ method: Methods.POST,
1324
+ data: data,
1325
+ });
1326
+ },
1327
+ getDoc: async (id: string) => {
1328
+ return await this.axiosCall({
1329
+ method: Methods.GET,
1330
+ url: `${this.file.base}/api/Data/DownloadFile/${id}`,
1331
+ responseType: 'arraybuffer',
1332
+ headers: {
1333
+ 'Content-Type': 'application/pdf',
1334
+ },
1335
+ });
1336
+ },
1337
+ getDocNew: async (id: string) => {
1338
+ return await this.axiosCall({
1339
+ method: Methods.GET,
1340
+ url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
1341
+ responseType: 'arraybuffer',
1342
+ headers: {
1343
+ 'Content-Type': 'application/pdf',
1344
+ },
1345
+ });
1346
+ },
1347
+ deleteFile: async (data: any) => {
1348
+ return await this.axiosCall<void>({
1349
+ method: Methods.POST,
1350
+ url: `${this.file.base}/api/Data/DeleteFiles`,
1351
+ data: data,
1352
+ });
1353
+ },
1354
+ uploadFiles: async (data: any) => {
1355
+ return await this.axiosCall({
1356
+ method: Methods.POST,
1357
+ url: `${this.file.base}/api/Data/UploadFiles`,
1358
+ headers: {
1359
+ 'Content-Type': 'multipart/form-data',
1360
+ },
1361
+ data: data,
1362
+ });
1363
+ },
1364
+ signDocument: async (data: Types.SignDataType[]) => {
1365
+ return await this.axiosCall<Types.SignUrlType[]>({
1366
+ method: Methods.POST,
1367
+ url: `${this.file.base}/api/Document/SignBts`,
1368
+ data: data,
1369
+ });
1370
+ },
1371
+ signQR: async (data: Types.SignDataType[]) => {
1372
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1373
+ method: Methods.POST,
1374
+ url: `${this.file.base}/api/Sign/SignQr`,
1375
+ data: data,
1376
+ });
1377
+ },
1378
+ generateDocument: async (data: Types.SignDataType) => {
1379
+ return await this.axiosCall<void>({
1380
+ method: Methods.POST,
1381
+ url: `${this.file.base}/api/Document/Generate`,
1382
+ responseType: 'arraybuffer',
1383
+ data: data,
1384
+ });
1385
+ },
1386
+ getSignedDocList: async (data: { processInstanceId: string | number | undefined }) => {
1387
+ return await this.axiosCall<IDocument[]>({
1388
+ method: Methods.POST,
1389
+ url: `${this.file.base}/api/Data/List`,
1390
+ data: data,
1391
+ });
1392
+ },
1393
+ setActualEnpf: async (data: { processId: string; isOnlineEnpfAgreement: boolean }) => {
1394
+ return await this.axiosCall<void>({
1395
+ method: Methods.POST,
1396
+ url: `${this.file.base}/api/GeneralSign/SetActualEnpfAgreement`,
1397
+ data: data,
1398
+ });
1399
+ },
1400
+ };
1110
1401
  }