hl-core 0.0.10-beta.2 → 0.0.10-beta.21

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 (42) hide show
  1. package/api/base.api.ts +221 -195
  2. package/components/Complex/TextBlock.vue +2 -0
  3. package/components/Dialog/Dialog.vue +7 -1
  4. package/components/Dialog/FamilyDialog.vue +2 -0
  5. package/components/Form/DigitalDocument.vue +52 -0
  6. package/components/Form/DynamicForm.vue +1 -0
  7. package/components/Form/FormData.vue +1 -0
  8. package/components/Form/ManagerAttachment.vue +2 -4
  9. package/components/Input/DynamicInput.vue +2 -0
  10. package/components/Input/FormInput.vue +2 -0
  11. package/components/Input/OtpInput.vue +25 -0
  12. package/components/Input/PanelInput.vue +1 -0
  13. package/components/Input/RoundedInput.vue +2 -0
  14. package/components/Input/RoundedSelect.vue +4 -0
  15. package/components/Input/SwitchInput.vue +2 -0
  16. package/components/Input/TextInput.vue +2 -0
  17. package/components/Layout/Drawer.vue +2 -0
  18. package/components/Pages/Anketa.vue +165 -166
  19. package/components/Pages/Auth.vue +2 -0
  20. package/components/Pages/ContragentForm.vue +1 -0
  21. package/components/Pages/Documents.vue +237 -6
  22. package/components/Pages/MemberForm.vue +204 -56
  23. package/components/Pages/ProductConditions.vue +153 -74
  24. package/components/Panel/PanelHandler.vue +231 -105
  25. package/components/Transitions/Animation.vue +2 -0
  26. package/components/Utilities/Chip.vue +2 -0
  27. package/components/Utilities/JsonViewer.vue +1 -2
  28. package/composables/classes.ts +102 -41
  29. package/composables/fields.ts +6 -4
  30. package/composables/index.ts +220 -7
  31. package/composables/styles.ts +8 -24
  32. package/configs/pwa.ts +1 -7
  33. package/locales/ru.json +11 -4
  34. package/nuxt.config.ts +10 -13
  35. package/package.json +13 -12
  36. package/plugins/head.ts +1 -1
  37. package/store/data.store.ts +235 -357
  38. package/store/member.store.ts +3 -2
  39. package/tsconfig.json +3 -0
  40. package/types/enum.ts +17 -2
  41. package/types/form.ts +71 -75
  42. package/types/index.ts +889 -877
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
- import { Value, IDocument, CountryValue } from '../composables/classes';
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,17 +299,6 @@ export class ApiClass {
298
299
  });
299
300
  }
300
301
 
301
- async getFile(id: string) {
302
- return await this.axiosCall({
303
- method: Methods.GET,
304
- url: `/File/api/Data/DownloadFile/${id}`,
305
- responseType: 'arraybuffer',
306
- headers: {
307
- 'Content-Type': 'application/pdf',
308
- },
309
- });
310
- }
311
-
312
302
  async getDicFileTypeList() {
313
303
  return await this.axiosCall<Value[]>({
314
304
  method: Methods.GET,
@@ -317,35 +307,35 @@ export class ApiClass {
317
307
  }
318
308
 
319
309
  async getContrAgentData(personId: string | number) {
320
- return await this.axiosCall<ContragentQuestionaries[]>({
310
+ return await this.axiosCall<Types.ContragentQuestionaries[]>({
321
311
  method: Methods.GET,
322
312
  url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
323
313
  });
324
314
  }
325
315
 
326
316
  async getContrAgentContacts(personId: string | number) {
327
- return await this.axiosCall<ContragentContacts[]>({
317
+ return await this.axiosCall<Types.ContragentContacts[]>({
328
318
  method: Methods.GET,
329
319
  url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
330
320
  });
331
321
  }
332
322
 
333
323
  async getContrAgentDocuments(personId: string | number) {
334
- return await this.axiosCall<ContragentDocuments[]>({
324
+ return await this.axiosCall<Types.ContragentDocuments[]>({
335
325
  method: Methods.GET,
336
326
  url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
337
327
  });
338
328
  }
339
329
 
340
330
  async getContrAgentAddress(personId: string | number) {
341
- return await this.axiosCall<ContragentAddress[]>({
331
+ return await this.axiosCall<Types.ContragentAddress[]>({
342
332
  method: Methods.GET,
343
333
  url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
344
334
  });
345
335
  }
346
336
 
347
337
  async getTaskList(data: any) {
348
- return await this.axiosCall<{ items: TaskListItem[]; totalItems: number }>({
338
+ return await this.axiosCall<{ items: Types.TaskListItem[]; totalItems: number }>({
349
339
  method: Methods.POST,
350
340
  url: `/Arm/api/Bpm/TaskList`,
351
341
  data: data,
@@ -353,13 +343,13 @@ export class ApiClass {
353
343
  }
354
344
 
355
345
  async getProcessHistory(id: string) {
356
- return await this.axiosCall<TaskHistory[]>({
346
+ return await this.axiosCall<Types.TaskHistory[]>({
357
347
  method: Methods.GET,
358
348
  url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
359
349
  });
360
350
  }
361
351
 
362
- async registerNumber(data: RegNumberDataType) {
352
+ async registerNumber(data: Types.RegNumberDataType) {
363
353
  return await this.axiosCall<string>({
364
354
  method: Methods.POST,
365
355
  url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
@@ -367,7 +357,7 @@ export class ApiClass {
367
357
  });
368
358
  }
369
359
 
370
- async sendSms(data: SmsDataType) {
360
+ async sendSms(data: Types.SmsDataType) {
371
361
  return await this.axiosCall<void>({
372
362
  method: Methods.POST,
373
363
  url: '/Arm/api/Otp/SmsText',
@@ -376,13 +366,13 @@ export class ApiClass {
376
366
  }
377
367
 
378
368
  async getUserGroups() {
379
- return await this.axiosCall<Item[]>({
369
+ return await this.axiosCall<Types.Item[]>({
380
370
  method: Methods.GET,
381
371
  url: '/Arm/api/Bpm/TaskGroups',
382
372
  });
383
373
  }
384
374
 
385
- async getOtpStatus(data: OtpDataType) {
375
+ async getOtpStatus(data: Types.OtpDataType) {
386
376
  return await this.axiosCall<boolean>({
387
377
  method: Methods.POST,
388
378
  url: '/Arm/api/Otp/OtpLifeStatus',
@@ -390,8 +380,8 @@ export class ApiClass {
390
380
  });
391
381
  }
392
382
 
393
- async sendOtp(data: OtpDataType) {
394
- return await this.axiosCall<SendOtpResponse>({
383
+ async sendOtp(data: Types.OtpDataType) {
384
+ return await this.axiosCall<Types.SendOtpResponse>({
395
385
  method: Methods.POST,
396
386
  url: '/Arm/api/Otp/Get',
397
387
  data: data,
@@ -399,7 +389,7 @@ export class ApiClass {
399
389
  }
400
390
 
401
391
  async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }) {
402
- return await this.axiosCall<SendOtpResponse>({
392
+ return await this.axiosCall<Types.SendOtpResponse>({
403
393
  method: Methods.POST,
404
394
  url: '/Arm/api/Otp/Check',
405
395
  data: data,
@@ -407,7 +397,7 @@ export class ApiClass {
407
397
  }
408
398
 
409
399
  async getProcessList() {
410
- return await this.axiosCall<Item[]>({
400
+ return await this.axiosCall<Types.Item[]>({
411
401
  method: Methods.GET,
412
402
  url: '/Arm/api/Bpm/ProcessList',
413
403
  });
@@ -431,7 +421,7 @@ export class ApiClass {
431
421
  }
432
422
 
433
423
  async getGovernmentPremiums(id: string) {
434
- return await this.axiosCall<GovPremiums>({
424
+ return await this.axiosCall<Types.GovPremiums>({
435
425
  method: Methods.POST,
436
426
  url: `/${this.productUrl}/api/Application/getGovernmentPremiums?processInstanceId=${id} `,
437
427
  });
@@ -444,7 +434,7 @@ export class ApiClass {
444
434
  });
445
435
  }
446
436
 
447
- async setApplication(data: SetApplicationRequest) {
437
+ async setApplication(data: Types.SetApplicationRequest) {
448
438
  return await this.axiosCall<void>({
449
439
  method: Methods.POST,
450
440
  url: `/${this.productUrl}/api/Application/SetApplicationData`,
@@ -452,26 +442,7 @@ export class ApiClass {
452
442
  });
453
443
  }
454
444
 
455
- async deleteFile(data: any) {
456
- return await this.axiosCall<void>({
457
- method: Methods.POST,
458
- url: '/File/api/Data/DeleteFiles',
459
- data: data,
460
- });
461
- }
462
-
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,
471
- });
472
- }
473
-
474
- async sendTask(data: SendTask) {
445
+ async sendTask(data: Types.SendTask) {
475
446
  return await this.axiosCall<void>({
476
447
  method: Methods.POST,
477
448
  url: `/${this.productUrl}/api/Application/SendTask`,
@@ -502,7 +473,7 @@ export class ApiClass {
502
473
  }
503
474
 
504
475
  async getInvoiceData(processInstanceId: string | number) {
505
- return await this.axiosCall<EpayResponse>({
476
+ return await this.axiosCall<Types.EpayResponse>({
506
477
  method: Methods.GET,
507
478
  url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
508
479
  });
@@ -523,47 +494,14 @@ export class ApiClass {
523
494
  }
524
495
 
525
496
  async sendToEpay(processInstanceId: string | number) {
526
- return await this.axiosCall<EpayShortResponse>({
497
+ return await this.axiosCall<Types.EpayShortResponse>({
527
498
  method: Methods.POST,
528
499
  url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
529
500
  });
530
501
  }
531
502
 
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>({
503
+ async calculateWithoutApplication(data: Types.RecalculationDataType, product: string | undefined | null = this.productUrl) {
504
+ return await this.axiosCall<Types.RecalculationResponseType>({
567
505
  method: Methods.POST,
568
506
  url: `/${product}/api/Application/Calculate`,
569
507
  data: data,
@@ -571,7 +509,7 @@ export class ApiClass {
571
509
  }
572
510
 
573
511
  async getDefaultCalculationData(product: string | undefined | null = this.productUrl) {
574
- return await this.axiosCall<RecalculationDataType>({
512
+ return await this.axiosCall<Types.RecalculationDataType>({
575
513
  method: Methods.GET,
576
514
  url: `/${product}/api/Application/DefaultCalculatorValues`,
577
515
  });
@@ -585,8 +523,8 @@ export class ApiClass {
585
523
  });
586
524
  }
587
525
 
588
- async getValidateClientESBD(data: ESBDValidationType) {
589
- return await this.axiosCall<ESBDResponseType>({
526
+ async getValidateClientESBD(data: Types.ESBDValidationType) {
527
+ return await this.axiosCall<Types.ESBDResponseType>({
590
528
  method: Methods.POST,
591
529
  url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
592
530
  data: data,
@@ -616,16 +554,16 @@ export class ApiClass {
616
554
  });
617
555
  }
618
556
 
619
- async getContragentFromGBDFL(data: Api.GBD.Request) {
620
- return await this.axiosCall<Api.GBD.Response>({
557
+ async getContragentFromGBDFL(data: Types.Api.GBD.Request) {
558
+ return await this.axiosCall<Types.Api.GBD.Response>({
621
559
  method: Methods.POST,
622
560
  url: '/externalservices/api/ExternalServices/GetGbdflToken',
623
561
  data: data,
624
562
  });
625
563
  }
626
564
 
627
- async getFamilyInfo(data: Api.GBD.Request) {
628
- return await this.axiosCall<Api.GKB.Response>({
565
+ async getFamilyInfo(data: Types.Api.GBD.Request) {
566
+ return await this.axiosCall<Types.Api.GKB.Response>({
629
567
  method: Methods.POST,
630
568
  url: '/externalservices/api/ExternalServices/GetFamilyInfoToken',
631
569
  data: data,
@@ -633,7 +571,7 @@ export class ApiClass {
633
571
  }
634
572
 
635
573
  async getKgd(data: { iinBin: string }, timeout: number = 30000) {
636
- return await this.axiosCall<Api.KGD.Response>({
574
+ return await this.axiosCall<Types.Api.KGD.Response>({
637
575
  method: Methods.POST,
638
576
  url: '/externalservices/api/ExternalServices/GetKgd',
639
577
  data: data,
@@ -641,7 +579,7 @@ export class ApiClass {
641
579
  });
642
580
  }
643
581
 
644
- async getGbdUl(data: Api.GBD.UlRequest) {
582
+ async getGbdUl(data: Types.Api.GBD.UlRequest) {
645
583
  return await this.axiosCall({
646
584
  method: Methods.POST,
647
585
  url: '/integration/api/External/GetGbdUl',
@@ -668,7 +606,7 @@ export class ApiClass {
668
606
  });
669
607
  }
670
608
 
671
- async sendUnderwritingCouncilTask(data: Partial<SendTask>) {
609
+ async sendUnderwritingCouncilTask(data: Partial<Types.SendTask>) {
672
610
  return await this.axiosCall<void>({
673
611
  method: Methods.POST,
674
612
  url: '/Arm/api/UnderwritingCouncil/SendTask',
@@ -690,7 +628,7 @@ export class ApiClass {
690
628
  });
691
629
  }
692
630
 
693
- async setINSISWorkData(data: InsisWorkDataApp) {
631
+ async setINSISWorkData(data: Types.InsisWorkDataApp) {
694
632
  return await this.axiosCall({
695
633
  method: Methods.POST,
696
634
  url: `/Arm/api/Bpm/SetInsisWorkData`,
@@ -706,7 +644,7 @@ export class ApiClass {
706
644
  }
707
645
 
708
646
  async searchAgentByName(name: string, branchCode?: string) {
709
- return await this.axiosCall<AgentData[]>({
647
+ return await this.axiosCall<Types.AgentData[]>({
710
648
  method: Methods.GET,
711
649
  url: `/Ekk/api/ContragentInsis/Agent${branchCode ? 's' : ''}ByName?${branchCode ? `branchCode=${branchCode}&` : ''}fullName=${name}`,
712
650
  });
@@ -727,14 +665,14 @@ export class ApiClass {
727
665
  }
728
666
 
729
667
  async getTripInsuranceDaysOptions() {
730
- return await this.axiosCall<TripInsuranceDaysOptions>({
668
+ return await this.axiosCall<Types.TripInsuranceDaysOptions>({
731
669
  method: Methods.GET,
732
670
  url: `/${this.productUrl}/api/Application/TripInsuranceDaysOptions`,
733
671
  });
734
672
  }
735
673
 
736
- async getTripInsuredAmount(data: getTripInsuredAmountRequest) {
737
- return await this.axiosCall<TripInsuranceAmount>({
674
+ async getTripInsuredAmount(data: Types.getTripInsuredAmountRequest) {
675
+ return await this.axiosCall<Types.TripInsuranceAmount>({
738
676
  method: Methods.POST,
739
677
  url: `/${this.productUrl}/api/Application/InsuranceAmountOptions`,
740
678
  data: data,
@@ -766,7 +704,7 @@ export class ApiClass {
766
704
  });
767
705
  }
768
706
 
769
- async getCalculator(data: SetApplicationRequest) {
707
+ async getCalculator(data: Types.SetApplicationRequest) {
770
708
  return await this.axiosCall<number>({
771
709
  method: Methods.POST,
772
710
  url: `/${this.productUrl}/api/Application/Calculator`,
@@ -965,32 +903,8 @@ export class ApiClass {
965
903
  });
966
904
  }
967
905
 
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>({
906
+ async generateShortLink(data: Types.Api.GenerateShortLink.Request) {
907
+ return await this.axiosCall<Types.Api.GenerateShortLink.Response>({
994
908
  url: '/notification/shorteners',
995
909
  baseURL: getStrValuePerEnv('gatewayApiUrl'),
996
910
  method: Methods.POST,
@@ -998,12 +912,13 @@ export class ApiClass {
998
912
  });
999
913
  }
1000
914
 
1001
- async checkOsns(bin: string) {
915
+ async checkOsns(bin: string, date: string) {
1002
916
  return await this.axiosCall<boolean>({
1003
917
  method: Methods.GET,
1004
918
  url: `/${this.productUrl}/api/Application/CheckOSNS`,
1005
919
  params: {
1006
920
  bin,
921
+ date,
1007
922
  },
1008
923
  });
1009
924
  }
@@ -1018,7 +933,7 @@ export class ApiClass {
1018
933
  });
1019
934
  }
1020
935
 
1021
- async getOsrnsToken(data: Api.GBD.Request) {
936
+ async getOsrnsToken(data: Types.Api.GBD.Request) {
1022
937
  return await this.axiosCall({
1023
938
  method: Methods.POST,
1024
939
  url: '/externalservices/api/ExternalServices/GetOsrnsToken',
@@ -1036,28 +951,6 @@ export class ApiClass {
1036
951
  });
1037
952
  }
1038
953
 
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
954
  async startRejectedApplication(data: any) {
1062
955
  return await this.axiosCall({
1063
956
  method: Methods.POST,
@@ -1066,22 +959,15 @@ export class ApiClass {
1066
959
  });
1067
960
  }
1068
961
 
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
962
  async checkSign(id: string) {
1077
- return await this.axiosCall<SignedState>({
963
+ return await this.axiosCall<Types.SignedState>({
1078
964
  method: Methods.POST,
1079
965
  url: `/${this.productUrl}/api/Application/CheckSign/${id}`,
1080
966
  });
1081
967
  }
1082
968
 
1083
969
  async getWorkPosition(search: string) {
1084
- return await this.axiosCall<Dicts.WorkPosition[]>({
970
+ return await this.axiosCall<Types.Dicts.WorkPosition[]>({
1085
971
  method: Methods.POST,
1086
972
  baseURL: getStrValuePerEnv('efoBaseApi'),
1087
973
  url: '/dictionary/Dictionary/WorkPosition',
@@ -1089,21 +975,161 @@ export class ApiClass {
1089
975
  });
1090
976
  }
1091
977
 
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}`,
1098
- });
1099
- }
1100
-
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}`,
1107
- });
1108
- }
978
+ pensionannuityNew = {
979
+ base: '/pensionannuityNew',
980
+ getEnpfRedirectUrl: async (id: string) => {
981
+ return await this.axiosCall<{ redirectUrl: string }>({
982
+ method: Methods.POST,
983
+ baseURL: getStrValuePerEnv('efoBaseApi'),
984
+ url: `${this.pensionannuityNew.base}/GetEnpfRedirectUrl?id=${id}`,
985
+ });
986
+ },
987
+ setEnpfSharedId: async (sharedId: string, infoId: string) => {
988
+ return await this.axiosCall<void>({
989
+ method: Methods.POST,
990
+ baseURL: getStrValuePerEnv('efoBaseApi'),
991
+ url: `${this.pensionannuityNew.base}/SetEnpfSharedId/${sharedId}/${infoId}`,
992
+ });
993
+ },
994
+ };
995
+
996
+ externalServices = {
997
+ base: '/externalservices',
998
+ onlineAccess: async (data: { iinBin: string; documentType: string }) => {
999
+ return await this.axiosCall<void>({
1000
+ method: Methods.POST,
1001
+ url: `${this.externalServices.base}/api/ExternalServices/GetOnlineAccess`,
1002
+ data: data,
1003
+ });
1004
+ },
1005
+ digitalDocuments: async (data: { iin: string; processInstanceId: string; code: string }) => {
1006
+ return await this.axiosCall<void>({
1007
+ method: Methods.POST,
1008
+ url: `${this.externalServices.base}/api/ExternalServices/DigitalDocuments`,
1009
+ data: data,
1010
+ });
1011
+ },
1012
+ };
1013
+
1014
+ file = {
1015
+ base: '/File',
1016
+ uploadFilesNew: async (groupId: string, data: any) => {
1017
+ return await this.axiosCall({
1018
+ method: Methods.POST,
1019
+ url: `${this.file.base}/api/GeneralSign/UploadPaper/${groupId}`,
1020
+ headers: {
1021
+ 'Content-Type': 'multipart/form-data',
1022
+ },
1023
+ data: data,
1024
+ });
1025
+ },
1026
+ generalGetFile: async (groupId: string, documentSignType: number) => {
1027
+ return await this.axiosCall<any>({
1028
+ method: Methods.GET,
1029
+ url: `${this.file.base}/api/GeneralSign/Group/${groupId}/${documentSignType} `,
1030
+ responseType: documentSignType === 5 ? 'json' : 'arraybuffer',
1031
+ });
1032
+ },
1033
+ generalSign: async (data: Types.Api.Sign.New.GeneralResponse) => {
1034
+ return await this.axiosCall<Types.Api.Sign.New.Response>({
1035
+ method: Methods.POST,
1036
+ url: `${this.file.base}/api/GeneralSign/Sign`,
1037
+ data: data,
1038
+ });
1039
+ },
1040
+ generateSign: async (data: Types.Api.Sign.New.Request) => {
1041
+ return await this.axiosCall<Types.Api.Sign.New.GeneralResponse[]>({
1042
+ method: Methods.POST,
1043
+ url: `${this.file.base}/api/GeneralSign/GenerateSign`,
1044
+ data: data,
1045
+ });
1046
+ },
1047
+ uploadDigitalCertificateNca: async (groupId: string, data: any) => {
1048
+ return await this.axiosCall<void>({
1049
+ method: Methods.POST,
1050
+ url: `${this.file.base}/api/GeneralSign/UploadNClayer/${groupId}`,
1051
+ headers: {
1052
+ 'Content-Type': 'multipart/form-data',
1053
+ },
1054
+ data: data,
1055
+ });
1056
+ },
1057
+ uploadXml: async (data: any) => {
1058
+ return await this.axiosCall<void>({
1059
+ url: `${this.file.base}/api/GeneralSign/UploadXml`,
1060
+ method: Methods.POST,
1061
+ data: data,
1062
+ });
1063
+ },
1064
+ signXml: async (data: any) => {
1065
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1066
+ url: `${this.file.base}/api/Sign/SignXml`,
1067
+ method: Methods.POST,
1068
+ data: data,
1069
+ });
1070
+ },
1071
+ signBts: async (data: any) => {
1072
+ return await this.axiosCall<Types.ResponseStructure<Types.SignUrlType[]>>({
1073
+ url: `${this.file.base}/api/Sign/SignBts`,
1074
+ method: Methods.POST,
1075
+ data: data,
1076
+ });
1077
+ },
1078
+ getFile: async (id: string) => {
1079
+ return await this.axiosCall({
1080
+ method: Methods.GET,
1081
+ url: `${this.file.base}/api/Data/DownloadFile/${id}`,
1082
+ responseType: 'arraybuffer',
1083
+ headers: {
1084
+ 'Content-Type': 'application/pdf',
1085
+ },
1086
+ });
1087
+ },
1088
+ deleteFile: async (data: any) => {
1089
+ return await this.axiosCall<void>({
1090
+ method: Methods.POST,
1091
+ url: `${this.file.base}/api/Data/DeleteFiles`,
1092
+ data: data,
1093
+ });
1094
+ },
1095
+ uploadFiles: async (data: any) => {
1096
+ return await this.axiosCall({
1097
+ method: Methods.POST,
1098
+ url: `${this.file.base}/api/Data/UploadFiles`,
1099
+ headers: {
1100
+ 'Content-Type': 'multipart/form-data',
1101
+ },
1102
+ data: data,
1103
+ });
1104
+ },
1105
+ signDocument: async (data: Types.SignDataType[]) => {
1106
+ return await this.axiosCall<Types.SignUrlType[]>({
1107
+ method: Methods.POST,
1108
+ url: `${this.file.base}/api/Document/SignBts`,
1109
+ data: data,
1110
+ });
1111
+ },
1112
+ signQR: async (data: Types.SignDataType[]) => {
1113
+ return await this.axiosCall<Types.ResponseStructure<any>>({
1114
+ method: Methods.POST,
1115
+ url: `${this.file.base}/api/Sign/SignQr`,
1116
+ data: data,
1117
+ });
1118
+ },
1119
+ generateDocument: async (data: Types.SignDataType) => {
1120
+ return await this.axiosCall<void>({
1121
+ method: Methods.POST,
1122
+ url: `${this.file.base}/api/Document/Generate`,
1123
+ responseType: 'arraybuffer',
1124
+ data: data,
1125
+ });
1126
+ },
1127
+ getSignedDocList: async (data: { processInstanceId: string | number }) => {
1128
+ return await this.axiosCall<IDocument[]>({
1129
+ method: Methods.POST,
1130
+ url: `${this.file.base}/api/Data/List`,
1131
+ data: data,
1132
+ });
1133
+ },
1134
+ };
1109
1135
  }