hl-core 0.0.10-beta.4 → 0.0.10-beta.40

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 (53) hide show
  1. package/README.md +0 -2
  2. package/api/base.api.ts +331 -191
  3. package/api/interceptors.ts +3 -5
  4. package/components/Complex/TextBlock.vue +2 -0
  5. package/components/Dialog/Dialog.vue +7 -1
  6. package/components/Dialog/FamilyDialog.vue +2 -0
  7. package/components/Form/DigitalDocument.vue +52 -0
  8. package/components/Form/DynamicForm.vue +1 -0
  9. package/components/Form/FormData.vue +1 -0
  10. package/components/Form/ManagerAttachment.vue +17 -8
  11. package/components/Form/ProductConditionsBlock.vue +12 -6
  12. package/components/Input/Datepicker.vue +5 -0
  13. package/components/Input/DynamicInput.vue +2 -0
  14. package/components/Input/FormInput.vue +7 -0
  15. package/components/Input/OtpInput.vue +25 -0
  16. package/components/Input/PanelInput.vue +1 -0
  17. package/components/Input/RoundedInput.vue +4 -0
  18. package/components/Input/RoundedSelect.vue +4 -0
  19. package/components/Input/SwitchInput.vue +2 -0
  20. package/components/Input/TextAreaField.vue +71 -0
  21. package/components/Input/TextInput.vue +2 -0
  22. package/components/Layout/Drawer.vue +2 -0
  23. package/components/Menu/MenuNav.vue +1 -1
  24. package/components/Pages/Anketa.vue +168 -169
  25. package/components/Pages/Auth.vue +2 -0
  26. package/components/Pages/ContragentForm.vue +2 -1
  27. package/components/Pages/Documents.vue +432 -59
  28. package/components/Pages/MemberForm.vue +334 -160
  29. package/components/Pages/ProductConditions.vue +800 -226
  30. package/components/Panel/PanelHandler.vue +280 -121
  31. package/components/Transitions/Animation.vue +2 -0
  32. package/components/Utilities/Chip.vue +3 -1
  33. package/components/Utilities/JsonViewer.vue +1 -2
  34. package/composables/classes.ts +133 -49
  35. package/composables/constants.ts +43 -0
  36. package/composables/fields.ts +6 -4
  37. package/composables/index.ts +293 -7
  38. package/composables/styles.ts +8 -24
  39. package/configs/pwa.ts +1 -7
  40. package/layouts/clear.vue +1 -1
  41. package/layouts/default.vue +1 -1
  42. package/layouts/full.vue +1 -1
  43. package/locales/ru.json +79 -19
  44. package/nuxt.config.ts +10 -13
  45. package/package.json +12 -12
  46. package/plugins/head.ts +2 -1
  47. package/store/data.store.ts +765 -530
  48. package/store/member.store.ts +18 -6
  49. package/store/rules.ts +22 -2
  50. package/types/enum.ts +32 -2
  51. package/types/env.d.ts +2 -2
  52. package/types/form.ts +71 -74
  53. package/types/index.ts +921 -873
package/api/base.api.ts CHANGED
@@ -1,18 +1,19 @@
1
1
  import { MemberCodes, Methods } from '../types/enum';
2
2
  import { useAxiosInstance } from '../composables/axios';
3
3
  import { Value, IDocument } from '../composables/classes';
4
+ import type * as Types from '../types';
4
5
 
5
6
  export class ApiClass {
6
7
  private readonly baseURL: string = import.meta.env.VITE_BASE_URL as string;
7
8
  private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
8
9
 
9
- private async axiosCall<T>(config: AxiosRequestLocalConfig): Promise<T> {
10
+ private async axiosCall<T>(config: Types.AxiosRequestLocalConfig): Promise<T> {
10
11
  const { data } = await useAxiosInstance(this.baseURL).request<T>(config);
11
12
  return data;
12
13
  }
13
14
 
14
15
  async getProjectConfig() {
15
- return await this.axiosCall<Utils.ProjectConfig>({
16
+ return await this.axiosCall<Types.Utils.ProjectConfig>({
16
17
  method: Methods.GET,
17
18
  baseURL: getStrValuePerEnv('gatewayApiUrl'),
18
19
  url: `/application/front/${import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? `auletti-${import.meta.env.VITE_PRODUCT}` : import.meta.env.VITE_PRODUCT}`,
@@ -178,10 +179,10 @@ export class ApiClass {
178
179
  });
179
180
  }
180
181
 
181
- async getContragent(queryData: GetContragentRequest) {
182
- return await this.axiosCall<GetContragentResponse>({
182
+ async getContragent(queryData: Types.GetContragentRequest) {
183
+ return await this.axiosCall<Types.GetContragentResponse>({
183
184
  method: Methods.GET,
184
- url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
185
+ url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}&BirthDate=${queryData.birthDate ?? ''}`,
185
186
  });
186
187
  }
187
188
 
@@ -193,28 +194,28 @@ export class ApiClass {
193
194
  }
194
195
 
195
196
  async getQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
196
- return await this.axiosCall<AnketaFirst>({
197
+ return await this.axiosCall<Types.AnketaFirst>({
197
198
  method: Methods.GET,
198
199
  url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
199
200
  });
200
201
  }
201
202
 
202
203
  async getClientQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
203
- return await this.axiosCall<AnketaFirst>({
204
+ return await this.axiosCall<Types.AnketaFirst>({
204
205
  method: Methods.GET,
205
206
  url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
206
207
  });
207
208
  }
208
209
 
209
210
  async getQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
210
- return await this.axiosCall<AnketaSecond[]>({
211
+ return await this.axiosCall<Types.AnketaSecond[]>({
211
212
  method: Methods.GET,
212
213
  url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
213
214
  });
214
215
  }
215
216
 
216
217
  async getClientQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
217
- return await this.axiosCall<AnketaSecond[]>({
218
+ return await this.axiosCall<Types.AnketaSecond[]>({
218
219
  method: Methods.GET,
219
220
  url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
220
221
  });
@@ -227,7 +228,7 @@ export class ApiClass {
227
228
  });
228
229
  }
229
230
 
230
- async setSurvey(surveyData: AnketaFirst) {
231
+ async setSurvey(surveyData: Types.AnketaFirst) {
231
232
  return await this.axiosCall<string>({
232
233
  method: Methods.POST,
233
234
  data: surveyData,
@@ -250,14 +251,14 @@ export class ApiClass {
250
251
  }
251
252
 
252
253
  async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
253
- return await this.axiosCall<AddCoverAnswer[]>({
254
+ return await this.axiosCall<Types.AddCoverAnswer[]>({
254
255
  method: Methods.GET,
255
256
  url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
256
257
  });
257
258
  }
258
259
 
259
260
  async getProcessCoverTypePeriod(processCode: string | number, questionId: string) {
260
- return await this.axiosCall<AddCoverAnswer[]>({
261
+ return await this.axiosCall<Types.AddCoverAnswer[]>({
261
262
  method: Methods.GET,
262
263
  url: `/Arm/api/Dictionary/GetProcessCoverTypePeriod/${processCode}/${questionId}`,
263
264
  });
@@ -278,18 +279,18 @@ export class ApiClass {
278
279
  }
279
280
 
280
281
  async getContragentById(id: number) {
281
- return await this.axiosCall<GetContragentResponse>({
282
+ return await this.axiosCall<Types.GetContragentResponse>({
282
283
  method: Methods.GET,
283
284
  url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
284
285
  });
285
286
  }
286
287
 
287
288
  async saveContragent(data: {
288
- contragent: ContragentType;
289
- questionaries: ContragentQuestionaries[];
290
- contacts: ContragentContacts[];
291
- documents: ContragentDocuments[];
292
- addresses: ContragentAddress[];
289
+ contragent: Types.ContragentType;
290
+ questionaries: Types.ContragentQuestionaries[];
291
+ contacts: Types.ContragentContacts[];
292
+ documents: Types.ContragentDocuments[];
293
+ addresses: Types.ContragentAddress[];
293
294
  }) {
294
295
  return await this.axiosCall<number>({
295
296
  method: Methods.POST,
@@ -298,54 +299,50 @@ export class ApiClass {
298
299
  });
299
300
  }
300
301
 
301
- async getFile(id: string) {
302
- return await this.axiosCall({
302
+ async getDicFileTypeList() {
303
+ return await this.axiosCall<Value[]>({
303
304
  method: Methods.GET,
304
- url: `/File/api/Data/DownloadFile/${id}`,
305
- responseType: 'arraybuffer',
306
- headers: {
307
- 'Content-Type': 'application/pdf',
308
- },
305
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
309
306
  });
310
307
  }
311
308
 
312
- async getDicFileTypeList() {
309
+ async getProgramType() {
313
310
  return await this.axiosCall<Value[]>({
314
311
  method: Methods.GET,
315
- url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
312
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicProgramType',
316
313
  });
317
314
  }
318
315
 
319
316
  async getContrAgentData(personId: string | number) {
320
- return await this.axiosCall<ContragentQuestionaries[]>({
317
+ return await this.axiosCall<Types.ContragentQuestionaries[]>({
321
318
  method: Methods.GET,
322
319
  url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
323
320
  });
324
321
  }
325
322
 
326
323
  async getContrAgentContacts(personId: string | number) {
327
- return await this.axiosCall<ContragentContacts[]>({
324
+ return await this.axiosCall<Types.ContragentContacts[]>({
328
325
  method: Methods.GET,
329
326
  url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
330
327
  });
331
328
  }
332
329
 
333
330
  async getContrAgentDocuments(personId: string | number) {
334
- return await this.axiosCall<ContragentDocuments[]>({
331
+ return await this.axiosCall<Types.ContragentDocuments[]>({
335
332
  method: Methods.GET,
336
333
  url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
337
334
  });
338
335
  }
339
336
 
340
337
  async getContrAgentAddress(personId: string | number) {
341
- return await this.axiosCall<ContragentAddress[]>({
338
+ return await this.axiosCall<Types.ContragentAddress[]>({
342
339
  method: Methods.GET,
343
340
  url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
344
341
  });
345
342
  }
346
343
 
347
344
  async getTaskList(data: any) {
348
- return await this.axiosCall<{ items: TaskListItem[]; totalItems: number }>({
345
+ return await this.axiosCall<{ items: Types.TaskListItem[]; totalItems: number }>({
349
346
  method: Methods.POST,
350
347
  url: `/Arm/api/Bpm/TaskList`,
351
348
  data: data,
@@ -353,13 +350,13 @@ export class ApiClass {
353
350
  }
354
351
 
355
352
  async getProcessHistory(id: string) {
356
- return await this.axiosCall<TaskHistory[]>({
353
+ return await this.axiosCall<Types.TaskHistory[]>({
357
354
  method: Methods.GET,
358
355
  url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
359
356
  });
360
357
  }
361
358
 
362
- async registerNumber(data: RegNumberDataType) {
359
+ async registerNumber(data: Types.RegNumberDataType) {
363
360
  return await this.axiosCall<string>({
364
361
  method: Methods.POST,
365
362
  url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
@@ -367,7 +364,7 @@ export class ApiClass {
367
364
  });
368
365
  }
369
366
 
370
- async sendSms(data: SmsDataType) {
367
+ async sendSms(data: Types.SmsDataType) {
371
368
  return await this.axiosCall<void>({
372
369
  method: Methods.POST,
373
370
  url: '/Arm/api/Otp/SmsText',
@@ -376,13 +373,13 @@ export class ApiClass {
376
373
  }
377
374
 
378
375
  async getUserGroups() {
379
- return await this.axiosCall<Item[]>({
376
+ return await this.axiosCall<Types.Item[]>({
380
377
  method: Methods.GET,
381
378
  url: '/Arm/api/Bpm/TaskGroups',
382
379
  });
383
380
  }
384
381
 
385
- async getOtpStatus(data: OtpDataType) {
382
+ async getOtpStatus(data: Types.OtpDataType) {
386
383
  return await this.axiosCall<boolean>({
387
384
  method: Methods.POST,
388
385
  url: '/Arm/api/Otp/OtpLifeStatus',
@@ -390,8 +387,8 @@ export class ApiClass {
390
387
  });
391
388
  }
392
389
 
393
- async sendOtp(data: OtpDataType) {
394
- return await this.axiosCall<SendOtpResponse>({
390
+ async sendOtp(data: Types.OtpDataType) {
391
+ return await this.axiosCall<Types.SendOtpResponse>({
395
392
  method: Methods.POST,
396
393
  url: '/Arm/api/Otp/Get',
397
394
  data: data,
@@ -399,7 +396,7 @@ export class ApiClass {
399
396
  }
400
397
 
401
398
  async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }) {
402
- return await this.axiosCall<SendOtpResponse>({
399
+ return await this.axiosCall<Types.SendOtpResponse>({
403
400
  method: Methods.POST,
404
401
  url: '/Arm/api/Otp/Check',
405
402
  data: data,
@@ -407,7 +404,7 @@ export class ApiClass {
407
404
  }
408
405
 
409
406
  async getProcessList() {
410
- return await this.axiosCall<Item[]>({
407
+ return await this.axiosCall<Types.Item[]>({
411
408
  method: Methods.GET,
412
409
  url: '/Arm/api/Bpm/ProcessList',
413
410
  });
@@ -431,7 +428,7 @@ export class ApiClass {
431
428
  }
432
429
 
433
430
  async getGovernmentPremiums(id: string) {
434
- return await this.axiosCall<GovPremiums>({
431
+ return await this.axiosCall<Types.GovPremiums>({
435
432
  method: Methods.POST,
436
433
  url: `/${this.productUrl}/api/Application/getGovernmentPremiums?processInstanceId=${id} `,
437
434
  });
@@ -444,7 +441,7 @@ export class ApiClass {
444
441
  });
445
442
  }
446
443
 
447
- async setApplication(data: SetApplicationRequest) {
444
+ async setApplication(data: Types.SetApplicationRequest) {
448
445
  return await this.axiosCall<void>({
449
446
  method: Methods.POST,
450
447
  url: `/${this.productUrl}/api/Application/SetApplicationData`,
@@ -452,40 +449,32 @@ export class ApiClass {
452
449
  });
453
450
  }
454
451
 
455
- async deleteFile(data: any) {
452
+ async sendTask(data: Types.SendTask) {
456
453
  return await this.axiosCall<void>({
457
454
  method: Methods.POST,
458
- url: '/File/api/Data/DeleteFiles',
455
+ url: `/${this.productUrl}/api/Application/SendTask`,
459
456
  data: data,
460
457
  });
461
458
  }
462
459
 
463
- async uploadFiles(data: any) {
464
- return await this.axiosCall({
465
- method: Methods.POST,
466
- url: '/File/api/Data/UploadFiles',
467
- headers: {
468
- 'Content-Type': 'multipart/form-data',
469
- },
470
- data: data,
460
+ async checkBeneficiariesInActualPolicy(iin: string) {
461
+ return await this.axiosCall<boolean>({
462
+ method: Methods.GET,
463
+ url: `/${this.productUrl}/api/Application/CheckBeneficiariesInActualPolicy?iin=${iin}`,
471
464
  });
472
465
  }
473
-
474
- async sendTask(data: SendTask) {
475
- return await this.axiosCall<void>({
476
- method: Methods.POST,
477
- url: `/${this.productUrl}/api/Application/SendTask`,
478
- data: data,
466
+ async checkBeneficiariesActualPolicy(id: string) {
467
+ return await this.axiosCall<boolean>({
468
+ method: Methods.GET,
469
+ url: `/${this.productUrl}/api/Application/checkBeneficiariesActualPolicy?processInstanceId=${id}`,
479
470
  });
480
471
  }
481
-
482
- async checkBeneficiariesInActualPolicy(iin: string) {
472
+ async isRecalculate(id: string | number) {
483
473
  return await this.axiosCall<boolean>({
484
474
  method: Methods.GET,
485
- url: `/${this.productUrl}/api/Application/CheckBeneficiariesInActualPolicy?iin=${iin}`,
475
+ url: `/${this.productUrl}/api/Application/IsRecalculate?processInstanceId=${id}`,
486
476
  });
487
477
  }
488
-
489
478
  async setMember(whichMember: keyof typeof MemberCodes, data: any) {
490
479
  return await this.axiosCall({
491
480
  method: Methods.POST,
@@ -502,7 +491,7 @@ export class ApiClass {
502
491
  }
503
492
 
504
493
  async getInvoiceData(processInstanceId: string | number) {
505
- return await this.axiosCall<EpayResponse>({
494
+ return await this.axiosCall<Types.EpayResponse>({
506
495
  method: Methods.GET,
507
496
  url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
508
497
  });
@@ -523,47 +512,15 @@ export class ApiClass {
523
512
  }
524
513
 
525
514
  async sendToEpay(processInstanceId: string | number) {
526
- return await this.axiosCall<EpayShortResponse>({
515
+ return await this.axiosCall<Types.EpayShortResponse>({
527
516
  method: Methods.POST,
528
517
  url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
518
+ data: {},
529
519
  });
530
520
  }
531
521
 
532
- async signDocument(data: SignDataType[]) {
533
- return await this.axiosCall<SignUrlType[]>({
534
- method: Methods.POST,
535
- url: '/File/api/Document/SignBts',
536
- data: data,
537
- });
538
- }
539
-
540
- async signQR(data: SignDataType[]) {
541
- return await this.axiosCall<ResponseStructure<any>>({
542
- method: Methods.POST,
543
- url: '/File/api/Sign/SignQr',
544
- data: data,
545
- });
546
- }
547
-
548
- async generateDocument(data: SignDataType) {
549
- return await this.axiosCall<void>({
550
- method: Methods.POST,
551
- url: '/File/api/Document/Generate',
552
- responseType: 'arraybuffer',
553
- data: data,
554
- });
555
- }
556
-
557
- async getSignedDocList(data: { processInstanceId: string | number }) {
558
- return await this.axiosCall<IDocument[]>({
559
- method: Methods.POST,
560
- url: '/File/api/Data/List',
561
- data: data,
562
- });
563
- }
564
-
565
- async calculateWithoutApplication(data: RecalculationDataType, product: string | undefined | null = this.productUrl) {
566
- return await this.axiosCall<RecalculationResponseType>({
522
+ async calculateWithoutApplication(data: Types.RecalculationDataType, product: string | undefined | null = this.productUrl) {
523
+ return await this.axiosCall<Types.RecalculationResponseType>({
567
524
  method: Methods.POST,
568
525
  url: `/${product}/api/Application/Calculate`,
569
526
  data: data,
@@ -571,7 +528,7 @@ export class ApiClass {
571
528
  }
572
529
 
573
530
  async getDefaultCalculationData(product: string | undefined | null = this.productUrl) {
574
- return await this.axiosCall<RecalculationDataType>({
531
+ return await this.axiosCall<Types.RecalculationDataType>({
575
532
  method: Methods.GET,
576
533
  url: `/${product}/api/Application/DefaultCalculatorValues`,
577
534
  });
@@ -585,8 +542,8 @@ export class ApiClass {
585
542
  });
586
543
  }
587
544
 
588
- async getValidateClientESBD(data: ESBDValidationType) {
589
- return await this.axiosCall<ESBDResponseType>({
545
+ async getValidateClientESBD(data: Types.ESBDValidationType) {
546
+ return await this.axiosCall<Types.ESBDResponseType>({
590
547
  method: Methods.POST,
591
548
  url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
592
549
  data: data,
@@ -616,16 +573,16 @@ export class ApiClass {
616
573
  });
617
574
  }
618
575
 
619
- async getContragentFromGBDFL(data: Api.GBD.Request) {
620
- return await this.axiosCall<Api.GBD.Response>({
576
+ async getContragentFromGBDFL(data: Types.Api.GBD.Request) {
577
+ return await this.axiosCall<Types.Api.GBD.Response>({
621
578
  method: Methods.POST,
622
579
  url: '/externalservices/api/ExternalServices/GetGbdflToken',
623
580
  data: data,
624
581
  });
625
582
  }
626
583
 
627
- async getFamilyInfo(data: Api.GBD.Request) {
628
- return await this.axiosCall<Api.GKB.Response>({
584
+ async getFamilyInfo(data: Types.Api.GBD.Request) {
585
+ return await this.axiosCall<Types.Api.GKB.Response>({
629
586
  method: Methods.POST,
630
587
  url: '/externalservices/api/ExternalServices/GetFamilyInfoToken',
631
588
  data: data,
@@ -633,7 +590,7 @@ export class ApiClass {
633
590
  }
634
591
 
635
592
  async getKgd(data: { iinBin: string }, timeout: number = 30000) {
636
- return await this.axiosCall<Api.KGD.Response>({
593
+ return await this.axiosCall<Types.Api.KGD.Response>({
637
594
  method: Methods.POST,
638
595
  url: '/externalservices/api/ExternalServices/GetKgd',
639
596
  data: data,
@@ -641,7 +598,7 @@ export class ApiClass {
641
598
  });
642
599
  }
643
600
 
644
- async getGbdUl(data: Api.GBD.UlRequest) {
601
+ async getGbdUl(data: Types.Api.GBD.UlRequest) {
645
602
  return await this.axiosCall({
646
603
  method: Methods.POST,
647
604
  url: '/integration/api/External/GetGbdUl',
@@ -649,10 +606,6 @@ export class ApiClass {
649
606
  });
650
607
  }
651
608
 
652
- async getProcessTariff(code: number | string = 5) {
653
- return await this.axiosCall({ method: Methods.GET, url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
654
- }
655
-
656
609
  async setConfirmation(data: any) {
657
610
  return await this.axiosCall({
658
611
  method: Methods.POST,
@@ -668,7 +621,7 @@ export class ApiClass {
668
621
  });
669
622
  }
670
623
 
671
- async sendUnderwritingCouncilTask(data: Partial<SendTask>) {
624
+ async sendUnderwritingCouncilTask(data: Partial<Types.SendTask>) {
672
625
  return await this.axiosCall<void>({
673
626
  method: Methods.POST,
674
627
  url: '/Arm/api/UnderwritingCouncil/SendTask',
@@ -690,7 +643,7 @@ export class ApiClass {
690
643
  });
691
644
  }
692
645
 
693
- async setINSISWorkData(data: InsisWorkDataApp) {
646
+ async setINSISWorkData(data: Types.InsisWorkDataApp) {
694
647
  return await this.axiosCall({
695
648
  method: Methods.POST,
696
649
  url: `/Arm/api/Bpm/SetInsisWorkData`,
@@ -705,13 +658,31 @@ export class ApiClass {
705
658
  });
706
659
  }
707
660
 
661
+ async getBankByAccountNumber(accountNumber: string) {
662
+ return await this.axiosCall<Value>({
663
+ method: Methods.GET,
664
+ url: `/Ekk/api/ContragentInsis/GetBankByAccountNumber?accountNumber=${accountNumber}`,
665
+ });
666
+ }
667
+
708
668
  async searchAgentByName(name: string, branchCode?: string) {
709
- return await this.axiosCall<AgentData[]>({
669
+ return await this.axiosCall<Types.AgentData[]>({
710
670
  method: Methods.GET,
711
671
  url: `/Ekk/api/ContragentInsis/Agent${branchCode ? 's' : ''}ByName?${branchCode ? `branchCode=${branchCode}&` : ''}fullName=${name}`,
712
672
  });
713
673
  }
714
674
 
675
+ async getContractIdByNumber(insuranceTypeEnum: number, policyNo: string) {
676
+ return await this.axiosCall<number>({
677
+ method: Methods.GET,
678
+ url: `/Ekk/api/PolicyInsis/GetContractIDbyNumber`,
679
+ params: {
680
+ insuranceTypeEnum,
681
+ policyNo,
682
+ },
683
+ });
684
+ }
685
+
715
686
  async isCourseChanged(processInstanceId: string) {
716
687
  return await this.axiosCall<boolean>({
717
688
  method: Methods.GET,
@@ -727,14 +698,14 @@ export class ApiClass {
727
698
  }
728
699
 
729
700
  async getTripInsuranceDaysOptions() {
730
- return await this.axiosCall<TripInsuranceDaysOptions>({
701
+ return await this.axiosCall<Types.TripInsuranceDaysOptions>({
731
702
  method: Methods.GET,
732
703
  url: `/${this.productUrl}/api/Application/TripInsuranceDaysOptions`,
733
704
  });
734
705
  }
735
706
 
736
- async getTripInsuredAmount(data: getTripInsuredAmountRequest) {
737
- return await this.axiosCall<TripInsuranceAmount>({
707
+ async getTripInsuredAmount(data: Types.getTripInsuredAmountRequest) {
708
+ return await this.axiosCall<Types.TripInsuranceAmount>({
738
709
  method: Methods.POST,
739
710
  url: `/${this.productUrl}/api/Application/InsuranceAmountOptions`,
740
711
  data: data,
@@ -766,7 +737,7 @@ export class ApiClass {
766
737
  });
767
738
  }
768
739
 
769
- async getCalculator(data: SetApplicationRequest) {
740
+ async getCalculator(data: Types.SetApplicationRequest) {
770
741
  return await this.axiosCall<number>({
771
742
  method: Methods.POST,
772
743
  url: `/${this.productUrl}/api/Application/Calculator`,
@@ -965,32 +936,8 @@ export class ApiClass {
965
936
  });
966
937
  }
967
938
 
968
- async uploadXml(data: any) {
969
- return await this.axiosCall<void>({
970
- url: `/File/api/Document/UploadXml`,
971
- method: Methods.POST,
972
- data: data,
973
- });
974
- }
975
-
976
- async signXml(data: any) {
977
- return await this.axiosCall<ResponseStructure<any>>({
978
- url: `/File/api/Sign/SignXml`,
979
- method: Methods.POST,
980
- data: data,
981
- });
982
- }
983
-
984
- async signBts(data: any) {
985
- return await this.axiosCall<ResponseStructure<SignUrlType[]>>({
986
- url: `/File/api/Sign/SignBts`,
987
- method: Methods.POST,
988
- data: data,
989
- });
990
- }
991
-
992
- async generateShortLink(data: Api.GenerateShortLink.Request) {
993
- return await this.axiosCall<Api.GenerateShortLink.Response>({
939
+ async generateShortLink(data: Types.Api.GenerateShortLink.Request) {
940
+ return await this.axiosCall<Types.Api.GenerateShortLink.Response>({
994
941
  url: '/notification/shorteners',
995
942
  baseURL: getStrValuePerEnv('gatewayApiUrl'),
996
943
  method: Methods.POST,
@@ -998,12 +945,13 @@ export class ApiClass {
998
945
  });
999
946
  }
1000
947
 
1001
- async checkOsns(bin: string) {
948
+ async checkOsns(bin: string, date: string) {
1002
949
  return await this.axiosCall<boolean>({
1003
950
  method: Methods.GET,
1004
951
  url: `/${this.productUrl}/api/Application/CheckOSNS`,
1005
952
  params: {
1006
953
  bin,
954
+ date,
1007
955
  },
1008
956
  });
1009
957
  }
@@ -1018,7 +966,7 @@ export class ApiClass {
1018
966
  });
1019
967
  }
1020
968
 
1021
- async getOsrnsToken(data: Api.GBD.Request) {
969
+ async getOsrnsToken(data: Types.Api.GBD.Request) {
1022
970
  return await this.axiosCall({
1023
971
  method: Methods.POST,
1024
972
  url: '/externalservices/api/ExternalServices/GetOsrnsToken',
@@ -1036,28 +984,6 @@ export class ApiClass {
1036
984
  });
1037
985
  }
1038
986
 
1039
- async uploadDigitalCertifijcate(data: any) {
1040
- return await this.axiosCall<any>({
1041
- method: Methods.POST,
1042
- url: '/File/api/Document/UploadDigitalCertifijcate',
1043
- headers: {
1044
- 'Content-Type': 'multipart/form-data',
1045
- },
1046
- data: data,
1047
- });
1048
- }
1049
-
1050
- async uploadDigitalCertificatePensionAnnuityNew(data: any) {
1051
- return await this.axiosCall<any>({
1052
- method: Methods.POST,
1053
- url: '/File/api/Document/UploadDigitalCertificatePensionAnnuityNew',
1054
- headers: {
1055
- 'Content-Type': 'multipart/form-data',
1056
- },
1057
- data: data,
1058
- });
1059
- }
1060
-
1061
987
  async startRejectedApplication(data: any) {
1062
988
  return await this.axiosCall({
1063
989
  method: Methods.POST,
@@ -1066,22 +992,15 @@ export class ApiClass {
1066
992
  });
1067
993
  }
1068
994
 
1069
- async getDocumentsByEdsXmlId(edsXmlId: string) {
1070
- return await this.axiosCall<ResponseStructure<any>>({
1071
- method: Methods.GET,
1072
- url: `/File/api/Sign/GetDocumentsByEdsXmlId/${edsXmlId}`,
1073
- });
1074
- }
1075
-
1076
995
  async checkSign(id: string) {
1077
- return await this.axiosCall<SignedState>({
996
+ return await this.axiosCall<Types.SignedState>({
1078
997
  method: Methods.POST,
1079
998
  url: `/${this.productUrl}/api/Application/CheckSign/${id}`,
1080
999
  });
1081
1000
  }
1082
1001
 
1083
1002
  async getWorkPosition(search: string) {
1084
- return await this.axiosCall<Dicts.WorkPosition[]>({
1003
+ return await this.axiosCall<Types.Dicts.WorkPosition[]>({
1085
1004
  method: Methods.POST,
1086
1005
  baseURL: getStrValuePerEnv('efoBaseApi'),
1087
1006
  url: '/dictionary/Dictionary/WorkPosition',
@@ -1089,21 +1008,242 @@ export class ApiClass {
1089
1008
  });
1090
1009
  }
1091
1010
 
1092
- async getEnpfRedirectUrl(id: string) {
1093
- return await this.axiosCall<{ redirectUrl: string }>({
1094
- method: Methods.POST,
1095
- // TODO
1096
- baseURL: 'https://products.halyklife.kz/test/efo/api',
1097
- url: `/pensionannuityNew/GetEnpfRedirectUrl?id=${id}`,
1011
+ async getParentContractData(policyId: string) {
1012
+ return await this.axiosCall<{ bin: string; name: string }>({
1013
+ method: Methods.GET,
1014
+ url: `/${this.productUrl}/api/Application/GetParentContractData`,
1015
+ params: {
1016
+ policyId,
1017
+ },
1098
1018
  });
1099
1019
  }
1100
1020
 
1101
- async setEnpfSharedId(sharedId: string, infoId: string) {
1102
- return await this.axiosCall<void>({
1103
- method: Methods.POST,
1104
- // TODO
1105
- baseURL: 'https://products.halyklife.kz/test/efo/api',
1106
- url: `/pensionannuityNew/SetEnpfSharedId/${sharedId}/${infoId}`,
1021
+ async getContractByBin(bin: string) {
1022
+ return await this.axiosCall<Types.GetContractByBinResponse>({
1023
+ method: Methods.GET,
1024
+ url: `/${this.productUrl}/api/Application/getContractByBin`,
1025
+ params: {
1026
+ bin,
1027
+ },
1028
+ });
1029
+ }
1030
+
1031
+ async checkProActiveService(processInstanceId: string | number, iin: string) {
1032
+ return await this.axiosCall({
1033
+ method: Methods.GET,
1034
+ url: `/${this.productUrl}/api/Application/CheckProActiveService`,
1035
+ params: {
1036
+ processInstanceId,
1037
+ iin,
1038
+ },
1039
+ });
1040
+ }
1041
+
1042
+ async getParentApplication(bin: string) {
1043
+ return await this.axiosCall<any>({
1044
+ method: Methods.GET,
1045
+ url: `/${this.productUrl}/api/Application/GetParentApplication`,
1046
+ params: {
1047
+ bin,
1048
+ },
1107
1049
  });
1108
1050
  }
1051
+
1052
+ pensionannuityNew = {
1053
+ base: '/pensionannuityNew',
1054
+ getEnpfRedirectUrl: async (id: string) => {
1055
+ return await this.axiosCall<{ redirectUrl: string }>({
1056
+ method: Methods.POST,
1057
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1058
+ url: `${this.pensionannuityNew.base}/GetEnpfRedirectUrl?id=${id}`,
1059
+ });
1060
+ },
1061
+ setEnpfSharedId: async (sharedId: string, infoId: string, isProd: boolean) => {
1062
+ return await this.axiosCall<void>({
1063
+ method: Methods.POST,
1064
+ baseURL: isProd === false ? getStrValuePerEnv('efoBaseApi').replace('kz/efo', 'kz/test/efo') : getStrValuePerEnv('efoBaseApi'),
1065
+ url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
1066
+ });
1067
+ },
1068
+ calcParentContractSums: async (data: any) => {
1069
+ return await this.axiosCall<void>({
1070
+ method: Methods.POST,
1071
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1072
+ url: `${this.pensionannuityNew.base}/CalcParentContractSums`,
1073
+ data: data,
1074
+ });
1075
+ },
1076
+ reCalculateRefund: async (data: any) => {
1077
+ return await this.axiosCall<void>({
1078
+ method: Methods.POST,
1079
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1080
+ url: `${this.pensionannuityNew.base}/ReCalculateRefund`,
1081
+ data: data,
1082
+ });
1083
+ },
1084
+ };
1085
+
1086
+ externalServices = {
1087
+ base: '/externalservices',
1088
+ getOnlineAccess: async (data: { iinBin: string; documentType: string }) => {
1089
+ return await this.axiosCall<{ code: string; message: string }>({
1090
+ method: Methods.POST,
1091
+ url: `${this.externalServices.base}/api/ExternalServices/GetOnlineAccess`,
1092
+ data: data,
1093
+ });
1094
+ },
1095
+ getDigitalDocuments: async (data: { iin: string; processInstanceId: string; code: string }) => {
1096
+ return await this.axiosCall<void>({
1097
+ method: Methods.POST,
1098
+ url: `${this.externalServices.base}/api/ExternalServices/DigitalDocuments`,
1099
+ data: data,
1100
+ });
1101
+ },
1102
+ updateDigitalDocumentsProfile: async (data: { iinBin: string }) => {
1103
+ return await this.axiosCall<void>({
1104
+ method: Methods.POST,
1105
+ url: `${this.externalServices.base}/api/ExternalServices/UpdateDigitalDocumentsProfile`,
1106
+ data: data,
1107
+ });
1108
+ },
1109
+ };
1110
+
1111
+ file = {
1112
+ base: '/File',
1113
+ uploadFilesNew: async (groupId: string, data: any) => {
1114
+ return await this.axiosCall({
1115
+ method: Methods.POST,
1116
+ url: `${this.file.base}/api/GeneralSign/UploadPaper/${groupId}`,
1117
+ headers: {
1118
+ 'Content-Type': 'multipart/form-data',
1119
+ },
1120
+ data: data,
1121
+ });
1122
+ },
1123
+ generalGetFile: async (groupId: string, documentSignType: number) => {
1124
+ return await this.axiosCall<any>({
1125
+ method: Methods.GET,
1126
+ url: `${this.file.base}/api/GeneralSign/Group/${groupId}/${documentSignType} `,
1127
+ responseType: documentSignType === 5 ? 'json' : 'arraybuffer',
1128
+ });
1129
+ },
1130
+ generalSign: async (data: Types.Api.Sign.New.GeneralResponse) => {
1131
+ return await this.axiosCall<Types.Api.Sign.New.Response>({
1132
+ method: Methods.POST,
1133
+ url: `${this.file.base}/api/GeneralSign/Sign`,
1134
+ data: data,
1135
+ });
1136
+ },
1137
+ generateSign: async (data: Types.Api.Sign.New.Request) => {
1138
+ return await this.axiosCall<Types.Api.Sign.New.GeneralResponse[]>({
1139
+ method: Methods.POST,
1140
+ url: `${this.file.base}/api/GeneralSign/GenerateSign`,
1141
+ data: data,
1142
+ });
1143
+ },
1144
+ uploadDigitalCertificateNca: async (groupId: string, data: any) => {
1145
+ return await this.axiosCall<void>({
1146
+ method: Methods.POST,
1147
+ url: `${this.file.base}/api/GeneralSign/UploadNClayer/${groupId}`,
1148
+ headers: {
1149
+ 'Content-Type': 'multipart/form-data',
1150
+ },
1151
+ data: data,
1152
+ });
1153
+ },
1154
+ uploadXml: async (data: any) => {
1155
+ return await this.axiosCall<void>({
1156
+ url: `${this.file.base}/api/GeneralSign/UploadXml`,
1157
+ method: Methods.POST,
1158
+ data: data,
1159
+ });
1160
+ },
1161
+ signXml: async (data: any) => {
1162
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1163
+ url: `${this.file.base}/api/Sign/SignXml`,
1164
+ method: Methods.POST,
1165
+ data: data,
1166
+ });
1167
+ },
1168
+ signBts: async (data: any) => {
1169
+ return await this.axiosCall<Types.ResponseStructure<Types.SignUrlType[]>>({
1170
+ url: `${this.file.base}/api/Sign/SignBts`,
1171
+ method: Methods.POST,
1172
+ data: data,
1173
+ });
1174
+ },
1175
+ getFile: async (id: string) => {
1176
+ return await this.axiosCall({
1177
+ method: Methods.GET,
1178
+ url: `${this.file.base}/api/Data/DownloadFile/${id}`,
1179
+ responseType: 'arraybuffer',
1180
+ headers: {
1181
+ 'Content-Type': 'application/pdf',
1182
+ },
1183
+ });
1184
+ },
1185
+ getFileNew: async (id: string) => {
1186
+ return await this.axiosCall({
1187
+ method: Methods.GET,
1188
+ url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
1189
+ responseType: 'arraybuffer',
1190
+ headers: {
1191
+ 'Content-Type': 'application/pdf',
1192
+ },
1193
+ });
1194
+ },
1195
+ deleteFile: async (data: any) => {
1196
+ return await this.axiosCall<void>({
1197
+ method: Methods.POST,
1198
+ url: `${this.file.base}/api/Data/DeleteFiles`,
1199
+ data: data,
1200
+ });
1201
+ },
1202
+ uploadFiles: async (data: any) => {
1203
+ return await this.axiosCall({
1204
+ method: Methods.POST,
1205
+ url: `${this.file.base}/api/Data/UploadFiles`,
1206
+ headers: {
1207
+ 'Content-Type': 'multipart/form-data',
1208
+ },
1209
+ data: data,
1210
+ });
1211
+ },
1212
+ signDocument: async (data: Types.SignDataType[]) => {
1213
+ return await this.axiosCall<Types.SignUrlType[]>({
1214
+ method: Methods.POST,
1215
+ url: `${this.file.base}/api/Document/SignBts`,
1216
+ data: data,
1217
+ });
1218
+ },
1219
+ signQR: async (data: Types.SignDataType[]) => {
1220
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1221
+ method: Methods.POST,
1222
+ url: `${this.file.base}/api/Sign/SignQr`,
1223
+ data: data,
1224
+ });
1225
+ },
1226
+ generateDocument: async (data: Types.SignDataType) => {
1227
+ return await this.axiosCall<void>({
1228
+ method: Methods.POST,
1229
+ url: `${this.file.base}/api/Document/Generate`,
1230
+ responseType: 'arraybuffer',
1231
+ data: data,
1232
+ });
1233
+ },
1234
+ getSignedDocList: async (data: { processInstanceId: string | number }) => {
1235
+ return await this.axiosCall<IDocument[]>({
1236
+ method: Methods.POST,
1237
+ url: `${this.file.base}/api/Data/List`,
1238
+ data: data,
1239
+ });
1240
+ },
1241
+ setActualEnpf: async (data: { processId: string; isOnlineEnpfAgreement: boolean }) => {
1242
+ return await this.axiosCall<void>({
1243
+ method: Methods.POST,
1244
+ url: `${this.file.base}/api/GeneralSign/SetActualEnpfAgreement`,
1245
+ data: data,
1246
+ });
1247
+ },
1248
+ };
1109
1249
  }