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

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 +338 -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 +48 -10
  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 +838 -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 +143 -49
  35. package/composables/constants.ts +44 -0
  36. package/composables/fields.ts +6 -4
  37. package/composables/index.ts +298 -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 +80 -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 +802 -531
  48. package/store/member.store.ts +18 -6
  49. package/store/rules.ts +22 -2
  50. package/types/enum.ts +33 -2
  51. package/types/env.d.ts +2 -2
  52. package/types/form.ts +71 -74
  53. package/types/index.ts +924 -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',
@@ -689,8 +642,15 @@ export class ApiClass {
689
642
  url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
690
643
  });
691
644
  }
645
+
646
+ async filterExecutorByRegion(dictName: string, filterName: string) {
647
+ return await this.axiosCall<Value[]>({
648
+ method: Methods.GET,
649
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
650
+ });
651
+ }
692
652
 
693
- async setINSISWorkData(data: InsisWorkDataApp) {
653
+ async setINSISWorkData(data: Types.InsisWorkDataApp) {
694
654
  return await this.axiosCall({
695
655
  method: Methods.POST,
696
656
  url: `/Arm/api/Bpm/SetInsisWorkData`,
@@ -705,13 +665,31 @@ export class ApiClass {
705
665
  });
706
666
  }
707
667
 
668
+ async getBankByAccountNumber(accountNumber: string) {
669
+ return await this.axiosCall<Value>({
670
+ method: Methods.GET,
671
+ url: `/Ekk/api/ContragentInsis/GetBankByAccountNumber?accountNumber=${accountNumber}`,
672
+ });
673
+ }
674
+
708
675
  async searchAgentByName(name: string, branchCode?: string) {
709
- return await this.axiosCall<AgentData[]>({
676
+ return await this.axiosCall<Types.AgentData[]>({
710
677
  method: Methods.GET,
711
678
  url: `/Ekk/api/ContragentInsis/Agent${branchCode ? 's' : ''}ByName?${branchCode ? `branchCode=${branchCode}&` : ''}fullName=${name}`,
712
679
  });
713
680
  }
714
681
 
682
+ async getContractIdByNumber(insuranceTypeEnum: number, policyNo: string) {
683
+ return await this.axiosCall<number>({
684
+ method: Methods.GET,
685
+ url: `/Ekk/api/PolicyInsis/GetContractIDbyNumber`,
686
+ params: {
687
+ insuranceTypeEnum,
688
+ policyNo,
689
+ },
690
+ });
691
+ }
692
+
715
693
  async isCourseChanged(processInstanceId: string) {
716
694
  return await this.axiosCall<boolean>({
717
695
  method: Methods.GET,
@@ -727,14 +705,14 @@ export class ApiClass {
727
705
  }
728
706
 
729
707
  async getTripInsuranceDaysOptions() {
730
- return await this.axiosCall<TripInsuranceDaysOptions>({
708
+ return await this.axiosCall<Types.TripInsuranceDaysOptions>({
731
709
  method: Methods.GET,
732
710
  url: `/${this.productUrl}/api/Application/TripInsuranceDaysOptions`,
733
711
  });
734
712
  }
735
713
 
736
- async getTripInsuredAmount(data: getTripInsuredAmountRequest) {
737
- return await this.axiosCall<TripInsuranceAmount>({
714
+ async getTripInsuredAmount(data: Types.getTripInsuredAmountRequest) {
715
+ return await this.axiosCall<Types.TripInsuranceAmount>({
738
716
  method: Methods.POST,
739
717
  url: `/${this.productUrl}/api/Application/InsuranceAmountOptions`,
740
718
  data: data,
@@ -766,7 +744,7 @@ export class ApiClass {
766
744
  });
767
745
  }
768
746
 
769
- async getCalculator(data: SetApplicationRequest) {
747
+ async getCalculator(data: Types.SetApplicationRequest) {
770
748
  return await this.axiosCall<number>({
771
749
  method: Methods.POST,
772
750
  url: `/${this.productUrl}/api/Application/Calculator`,
@@ -965,32 +943,8 @@ export class ApiClass {
965
943
  });
966
944
  }
967
945
 
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>({
946
+ async generateShortLink(data: Types.Api.GenerateShortLink.Request) {
947
+ return await this.axiosCall<Types.Api.GenerateShortLink.Response>({
994
948
  url: '/notification/shorteners',
995
949
  baseURL: getStrValuePerEnv('gatewayApiUrl'),
996
950
  method: Methods.POST,
@@ -998,12 +952,13 @@ export class ApiClass {
998
952
  });
999
953
  }
1000
954
 
1001
- async checkOsns(bin: string) {
955
+ async checkOsns(bin: string, date: string) {
1002
956
  return await this.axiosCall<boolean>({
1003
957
  method: Methods.GET,
1004
958
  url: `/${this.productUrl}/api/Application/CheckOSNS`,
1005
959
  params: {
1006
960
  bin,
961
+ date,
1007
962
  },
1008
963
  });
1009
964
  }
@@ -1018,7 +973,7 @@ export class ApiClass {
1018
973
  });
1019
974
  }
1020
975
 
1021
- async getOsrnsToken(data: Api.GBD.Request) {
976
+ async getOsrnsToken(data: Types.Api.GBD.Request) {
1022
977
  return await this.axiosCall({
1023
978
  method: Methods.POST,
1024
979
  url: '/externalservices/api/ExternalServices/GetOsrnsToken',
@@ -1036,28 +991,6 @@ export class ApiClass {
1036
991
  });
1037
992
  }
1038
993
 
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
994
  async startRejectedApplication(data: any) {
1062
995
  return await this.axiosCall({
1063
996
  method: Methods.POST,
@@ -1066,22 +999,15 @@ export class ApiClass {
1066
999
  });
1067
1000
  }
1068
1001
 
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
1002
  async checkSign(id: string) {
1077
- return await this.axiosCall<SignedState>({
1003
+ return await this.axiosCall<Types.SignedState>({
1078
1004
  method: Methods.POST,
1079
1005
  url: `/${this.productUrl}/api/Application/CheckSign/${id}`,
1080
1006
  });
1081
1007
  }
1082
1008
 
1083
1009
  async getWorkPosition(search: string) {
1084
- return await this.axiosCall<Dicts.WorkPosition[]>({
1010
+ return await this.axiosCall<Types.Dicts.WorkPosition[]>({
1085
1011
  method: Methods.POST,
1086
1012
  baseURL: getStrValuePerEnv('efoBaseApi'),
1087
1013
  url: '/dictionary/Dictionary/WorkPosition',
@@ -1089,21 +1015,242 @@ export class ApiClass {
1089
1015
  });
1090
1016
  }
1091
1017
 
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}`,
1018
+ async getParentContractData(policyId: string) {
1019
+ return await this.axiosCall<{ bin: string; name: string }>({
1020
+ method: Methods.GET,
1021
+ url: `/${this.productUrl}/api/Application/GetParentContractData`,
1022
+ params: {
1023
+ policyId,
1024
+ },
1098
1025
  });
1099
1026
  }
1100
1027
 
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}`,
1028
+ async getContractByBin(bin: string) {
1029
+ return await this.axiosCall<Types.GetContractByBinResponse>({
1030
+ method: Methods.GET,
1031
+ url: `/${this.productUrl}/api/Application/getContractByBin`,
1032
+ params: {
1033
+ bin,
1034
+ },
1107
1035
  });
1108
1036
  }
1037
+
1038
+ async checkProActiveService(processInstanceId: string | number, iin: string) {
1039
+ return await this.axiosCall({
1040
+ method: Methods.GET,
1041
+ url: `/${this.productUrl}/api/Application/CheckProActiveService`,
1042
+ params: {
1043
+ processInstanceId,
1044
+ iin,
1045
+ },
1046
+ });
1047
+ }
1048
+
1049
+ async getParentApplication(bin: string) {
1050
+ return await this.axiosCall<any>({
1051
+ method: Methods.GET,
1052
+ url: `/${this.productUrl}/api/Application/GetParentApplication`,
1053
+ params: {
1054
+ bin,
1055
+ },
1056
+ });
1057
+ }
1058
+
1059
+ pensionannuityNew = {
1060
+ base: '/pensionannuityNew',
1061
+ getEnpfRedirectUrl: async (id: string) => {
1062
+ return await this.axiosCall<{ redirectUrl: string }>({
1063
+ method: Methods.POST,
1064
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1065
+ url: `${this.pensionannuityNew.base}/GetEnpfRedirectUrl?id=${id}`,
1066
+ });
1067
+ },
1068
+ setEnpfSharedId: async (sharedId: string, infoId: string, isProd: boolean) => {
1069
+ return await this.axiosCall<void>({
1070
+ method: Methods.POST,
1071
+ baseURL: isProd === false ? getStrValuePerEnv('efoBaseApi').replace('kz/efo', 'kz/test/efo') : getStrValuePerEnv('efoBaseApi'),
1072
+ url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
1073
+ });
1074
+ },
1075
+ calcParentContractSums: async (data: any) => {
1076
+ return await this.axiosCall<void>({
1077
+ method: Methods.POST,
1078
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1079
+ url: `${this.pensionannuityNew.base}/CalcParentContractSums`,
1080
+ data: data,
1081
+ });
1082
+ },
1083
+ reCalculateRefund: async (data: any) => {
1084
+ return await this.axiosCall<void>({
1085
+ method: Methods.POST,
1086
+ baseURL: getStrValuePerEnv('efoBaseApi'),
1087
+ url: `${this.pensionannuityNew.base}/ReCalculateRefund`,
1088
+ data: data,
1089
+ });
1090
+ },
1091
+ };
1092
+
1093
+ externalServices = {
1094
+ base: '/externalservices',
1095
+ getOnlineAccess: async (data: { iinBin: string; documentType: string }) => {
1096
+ return await this.axiosCall<{ code: string; message: string }>({
1097
+ method: Methods.POST,
1098
+ url: `${this.externalServices.base}/api/ExternalServices/GetOnlineAccess`,
1099
+ data: data,
1100
+ });
1101
+ },
1102
+ getDigitalDocuments: async (data: { iin: string; processInstanceId: string; code: string }) => {
1103
+ return await this.axiosCall<void>({
1104
+ method: Methods.POST,
1105
+ url: `${this.externalServices.base}/api/ExternalServices/DigitalDocuments`,
1106
+ data: data,
1107
+ });
1108
+ },
1109
+ updateDigitalDocumentsProfile: async (data: { iinBin: string }) => {
1110
+ return await this.axiosCall<void>({
1111
+ method: Methods.POST,
1112
+ url: `${this.externalServices.base}/api/ExternalServices/UpdateDigitalDocumentsProfile`,
1113
+ data: data,
1114
+ });
1115
+ },
1116
+ };
1117
+
1118
+ file = {
1119
+ base: '/File',
1120
+ uploadFilesNew: async (groupId: string, data: any) => {
1121
+ return await this.axiosCall({
1122
+ method: Methods.POST,
1123
+ url: `${this.file.base}/api/GeneralSign/UploadPaper/${groupId}`,
1124
+ headers: {
1125
+ 'Content-Type': 'multipart/form-data',
1126
+ },
1127
+ data: data,
1128
+ });
1129
+ },
1130
+ generalGetFile: async (groupId: string, documentSignType: number) => {
1131
+ return await this.axiosCall<any>({
1132
+ method: Methods.GET,
1133
+ url: `${this.file.base}/api/GeneralSign/Group/${groupId}/${documentSignType} `,
1134
+ responseType: documentSignType === 5 ? 'json' : 'arraybuffer',
1135
+ });
1136
+ },
1137
+ generalSign: async (data: Types.Api.Sign.New.GeneralResponse) => {
1138
+ return await this.axiosCall<Types.Api.Sign.New.Response>({
1139
+ method: Methods.POST,
1140
+ url: `${this.file.base}/api/GeneralSign/Sign`,
1141
+ data: data,
1142
+ });
1143
+ },
1144
+ generateSign: async (data: Types.Api.Sign.New.Request) => {
1145
+ return await this.axiosCall<Types.Api.Sign.New.GeneralResponse[]>({
1146
+ method: Methods.POST,
1147
+ url: `${this.file.base}/api/GeneralSign/GenerateSign`,
1148
+ data: data,
1149
+ });
1150
+ },
1151
+ uploadDigitalCertificateNca: async (groupId: string, data: any) => {
1152
+ return await this.axiosCall<void>({
1153
+ method: Methods.POST,
1154
+ url: `${this.file.base}/api/GeneralSign/UploadNClayer/${groupId}`,
1155
+ headers: {
1156
+ 'Content-Type': 'multipart/form-data',
1157
+ },
1158
+ data: data,
1159
+ });
1160
+ },
1161
+ uploadXml: async (data: any) => {
1162
+ return await this.axiosCall<void>({
1163
+ url: `${this.file.base}/api/GeneralSign/UploadXml`,
1164
+ method: Methods.POST,
1165
+ data: data,
1166
+ });
1167
+ },
1168
+ signXml: async (data: any) => {
1169
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1170
+ url: `${this.file.base}/api/Sign/SignXml`,
1171
+ method: Methods.POST,
1172
+ data: data,
1173
+ });
1174
+ },
1175
+ signBts: async (data: any) => {
1176
+ return await this.axiosCall<Types.ResponseStructure<Types.SignUrlType[]>>({
1177
+ url: `${this.file.base}/api/Sign/SignBts`,
1178
+ method: Methods.POST,
1179
+ data: data,
1180
+ });
1181
+ },
1182
+ getFile: async (id: string) => {
1183
+ return await this.axiosCall({
1184
+ method: Methods.GET,
1185
+ url: `${this.file.base}/api/Data/DownloadFile/${id}`,
1186
+ responseType: 'arraybuffer',
1187
+ headers: {
1188
+ 'Content-Type': 'application/pdf',
1189
+ },
1190
+ });
1191
+ },
1192
+ getFileNew: async (id: string) => {
1193
+ return await this.axiosCall({
1194
+ method: Methods.GET,
1195
+ url: `${this.file.base}/api/GeneralSign/DownloadFile/${id}`,
1196
+ responseType: 'arraybuffer',
1197
+ headers: {
1198
+ 'Content-Type': 'application/pdf',
1199
+ },
1200
+ });
1201
+ },
1202
+ deleteFile: async (data: any) => {
1203
+ return await this.axiosCall<void>({
1204
+ method: Methods.POST,
1205
+ url: `${this.file.base}/api/Data/DeleteFiles`,
1206
+ data: data,
1207
+ });
1208
+ },
1209
+ uploadFiles: async (data: any) => {
1210
+ return await this.axiosCall({
1211
+ method: Methods.POST,
1212
+ url: `${this.file.base}/api/Data/UploadFiles`,
1213
+ headers: {
1214
+ 'Content-Type': 'multipart/form-data',
1215
+ },
1216
+ data: data,
1217
+ });
1218
+ },
1219
+ signDocument: async (data: Types.SignDataType[]) => {
1220
+ return await this.axiosCall<Types.SignUrlType[]>({
1221
+ method: Methods.POST,
1222
+ url: `${this.file.base}/api/Document/SignBts`,
1223
+ data: data,
1224
+ });
1225
+ },
1226
+ signQR: async (data: Types.SignDataType[]) => {
1227
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1228
+ method: Methods.POST,
1229
+ url: `${this.file.base}/api/Sign/SignQr`,
1230
+ data: data,
1231
+ });
1232
+ },
1233
+ generateDocument: async (data: Types.SignDataType) => {
1234
+ return await this.axiosCall<void>({
1235
+ method: Methods.POST,
1236
+ url: `${this.file.base}/api/Document/Generate`,
1237
+ responseType: 'arraybuffer',
1238
+ data: data,
1239
+ });
1240
+ },
1241
+ getSignedDocList: async (data: { processInstanceId: string | number }) => {
1242
+ return await this.axiosCall<IDocument[]>({
1243
+ method: Methods.POST,
1244
+ url: `${this.file.base}/api/Data/List`,
1245
+ data: data,
1246
+ });
1247
+ },
1248
+ setActualEnpf: async (data: { processId: string; isOnlineEnpfAgreement: boolean }) => {
1249
+ return await this.axiosCall<void>({
1250
+ method: Methods.POST,
1251
+ url: `${this.file.base}/api/GeneralSign/SetActualEnpfAgreement`,
1252
+ data: data,
1253
+ });
1254
+ },
1255
+ };
1109
1256
  }