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

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.
@@ -254,6 +254,7 @@
254
254
  import { DocumentItem, Value } from '../../composables/classes';
255
255
  import { HubConnectionBuilder } from '@microsoft/signalr';
256
256
  import { uuid } from 'vue-uuid';
257
+ import type { Api, SignUrlType } from '../../types';
257
258
 
258
259
  export default defineComponent({
259
260
  emits: ['task'],
@@ -6,6 +6,8 @@
6
6
  </template>
7
7
 
8
8
  <script setup lang="ts">
9
+ import type { Utils } from '../../types';
10
+
9
11
  defineProps({
10
12
  type: {
11
13
  type: String as PropType<Utils.VuetifyAnimations>,
@@ -5,6 +5,8 @@
5
5
  </template>
6
6
 
7
7
  <script lang="ts">
8
+ import type { ChipComponent } from '../../types';
9
+
8
10
  export default defineComponent({
9
11
  props: {
10
12
  chip: {
@@ -1,6 +1,7 @@
1
1
  import { Statuses, StoreMembers, MemberAppCodes } from '../types/enum';
2
2
  import { formatDate } from '.';
3
3
  import type { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
4
+ import type * as Types from '../types';
4
5
 
5
6
  type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
6
7
 
@@ -17,7 +18,7 @@ class MenuItemConfig {
17
18
  disabled?: ComputedRef;
18
19
  color?: string;
19
20
  show?: ComputedRef;
20
- chip?: ChipComponent;
21
+ chip?: Types.ChipComponent;
21
22
 
22
23
  constructor(
23
24
  id: any = null,
@@ -32,7 +33,7 @@ class MenuItemConfig {
32
33
  disabled?: ComputedRef,
33
34
  color?: string,
34
35
  show?: ComputedRef,
35
- chip?: ChipComponent,
36
+ chip?: Types.ChipComponent,
36
37
  ) {
37
38
  this.id = id;
38
39
  this.title = title;
@@ -383,11 +384,11 @@ export class Contragent extends Person {
383
384
 
384
385
  export class Member extends Person {
385
386
  response?: {
386
- contragent?: ContragentType;
387
- questionnaires?: ContragentQuestionaries[];
388
- contacts?: ContragentContacts[];
389
- documents?: ContragentDocuments[];
390
- addresses?: ContragentAddress[];
387
+ contragent?: Types.ContragentType;
388
+ questionnaires?: Types.ContragentQuestionaries[];
389
+ contacts?: Types.ContragentContacts[];
390
+ documents?: Types.ContragentDocuments[];
391
+ addresses?: Types.ContragentAddress[];
391
392
  };
392
393
  verifyType: any;
393
394
  verifyDate: any;
@@ -451,12 +452,12 @@ export class Member extends Person {
451
452
  _phonePattern: RegExp;
452
453
  _emailPattern: RegExp;
453
454
  gotFromInsis: boolean | null;
454
- gosPersonData: Api.GBD.Person | null;
455
+ gosPersonData: Types.Api.GBD.Person | null;
455
456
  parsedDocument: any;
456
457
  hasAgreement: boolean | null;
457
458
  otpTokenId: string | null;
458
459
  otpCode: string | null;
459
- documentsList: ContragentDocuments[];
460
+ documentsList: Types.ContragentDocuments[];
460
461
  isInsuredUnderage?: boolean = false;
461
462
  bankInfo: BankInfoClass;
462
463
  transferContractCompany: Value;
@@ -928,7 +929,7 @@ export class MemberSettings {
928
929
  }
929
930
 
930
931
  export class DataStoreClass {
931
- projectConfig: Utils.ProjectConfig | null;
932
+ projectConfig: Types.Utils.ProjectConfig | null;
932
933
  // IMP Контроллер фич
933
934
  controls: {
934
935
  // Cтавит значения по дефолту полям
@@ -973,7 +974,7 @@ export class DataStoreClass {
973
974
  };
974
975
  iframeLoading: boolean;
975
976
  hasLayoutMargins: boolean;
976
- readonly product: Projects | null;
977
+ readonly product: Types.Projects | null;
977
978
  readonly parentProduct: 'efo' | 'auletti';
978
979
  showNav: boolean;
979
980
  showDisabledMessage: boolean;
@@ -1016,7 +1017,7 @@ export class DataStoreClass {
1016
1017
  historyTotalItems: number;
1017
1018
  isColumnAsc = { ...InitialColumns() };
1018
1019
  idleKey: number;
1019
- processList: Item[] | null;
1020
+ processList: Types.Item[] | null;
1020
1021
  countries: Value[];
1021
1022
  citizenshipCountries: Value[];
1022
1023
  taxCountries: Value[];
@@ -1053,18 +1054,18 @@ export class DataStoreClass {
1053
1054
  processPaymentPeriod: Value[];
1054
1055
  dicAnnuityTypeList: Value[];
1055
1056
  processAnnuityPaymentPeriod: Value[];
1056
- taskList: TaskListItem[];
1057
- processHistory: TaskHistory[];
1058
- contragentList: ContragentType[];
1057
+ taskList: Types.TaskListItem[];
1058
+ processHistory: Types.TaskHistory[];
1059
+ contragentList: Types.ContragentType[];
1059
1060
  contragentFormKey: string;
1060
1061
  processCode: number | null;
1061
1062
  groupCode: string;
1062
- userGroups: Item[];
1063
+ userGroups: Types.Item[];
1063
1064
  onMainPage: boolean;
1064
1065
  SaleChanellPolicy: Value[];
1065
1066
  RegionPolicy: Value[];
1066
1067
  ManagerPolicy: Value[];
1067
- AgentData: AgentData[];
1068
+ AgentData: Types.AgentData[];
1068
1069
  riskGroup: Value[];
1069
1070
  DicCoverTypePeriod: Value[];
1070
1071
  currencies: {
@@ -1148,7 +1149,7 @@ export class DataStoreClass {
1148
1149
  this.ManagerPolicy = [];
1149
1150
  this.AgentData = [];
1150
1151
  this.DicCoverTypePeriod = [];
1151
- this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Projects) : null;
1152
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Types.Projects) : null;
1152
1153
  this.parentProduct = import.meta.env.VITE_PARENT_PRODUCT ? import.meta.env.VITE_PARENT_PRODUCT : 'efo';
1153
1154
  this.showNav = true;
1154
1155
  this.showDisabledMessage = false;
@@ -1300,10 +1301,10 @@ export class FormStoreClass {
1300
1301
  isUploadedSignedContract: boolean;
1301
1302
  signedContractFormData: any;
1302
1303
  lfb: {
1303
- clients: ClientV2[];
1304
+ clients: Types.ClientV2[];
1304
1305
  policyholder: PolicyholderClass;
1305
1306
  hasAccidentIncidents: boolean;
1306
- accidentIncidents: AccidentIncidents[];
1307
+ accidentIncidents: Types.AccidentIncidents[];
1307
1308
  policyholderActivities: PolicyholderActivity[];
1308
1309
  beneficialOwners: BeneficialOwner[];
1309
1310
  beneficialOwnersIndex: number;
@@ -1312,11 +1313,11 @@ export class FormStoreClass {
1312
1313
  insuredFile: any;
1313
1314
  isPanelInside: boolean;
1314
1315
  };
1315
- additionalInsuranceTerms: AddCover[];
1316
- additionalInsuranceTermsWithout: AddCover[];
1317
- signUrls: SignUrlType[];
1316
+ additionalInsuranceTerms: Types.AddCover[];
1317
+ additionalInsuranceTermsWithout: Types.AddCover[];
1318
+ signUrls: Types.SignUrlType[];
1318
1319
  epayLink: string | null;
1319
- invoiceData: EpayResponse | null;
1320
+ invoiceData: Types.EpayResponse | null;
1320
1321
  affilationResolution: {
1321
1322
  id: string | number | null;
1322
1323
  processInstanceId: string | number | null;
@@ -1329,19 +1330,19 @@ export class FormStoreClass {
1329
1330
  date: string | null;
1330
1331
  };
1331
1332
  signedDocumentList: IDocument[];
1332
- surveyByHealthBase: AnketaFirst | null;
1333
- surveyByHealthBasePolicyholder: AnketaFirst | null;
1334
- surveyByCriticalBase: AnketaFirst | null;
1335
- surveyByCriticalBasePolicyholder: AnketaFirst | null;
1333
+ surveyByHealthBase: Types.AnketaFirst | null;
1334
+ surveyByHealthBasePolicyholder: Types.AnketaFirst | null;
1335
+ surveyByCriticalBase: Types.AnketaFirst | null;
1336
+ surveyByCriticalBasePolicyholder: Types.AnketaFirst | null;
1336
1337
  definedAnswersId: {
1337
1338
  surveyByHealthBase: any;
1338
1339
  surveyByCriticalBase: any;
1339
1340
  surveyByHealthBasePolicyholder: any;
1340
1341
  surveyByCriticalBasePolicyholder: any;
1341
1342
  };
1342
- birthInfos: Api.GKB.BirthInfo[];
1343
+ birthInfos: Types.Api.GKB.BirthInfo[];
1343
1344
  SaleChanellPolicy: Value;
1344
- AgentData: AgentData;
1345
+ AgentData: Types.AgentData;
1345
1346
  RegionPolicy: Value;
1346
1347
  ManagerPolicy: Value;
1347
1348
  isDisabled: {
@@ -1380,9 +1381,9 @@ export class FormStoreClass {
1380
1381
  spokesmanApp?: any;
1381
1382
  isTask?: boolean | null;
1382
1383
  createDate?: string | null;
1383
- policyAppDto?: PolicyAppDto;
1384
- insisWorkDataApp?: InsisWorkDataApp;
1385
- addCoverDto?: AddCover[];
1384
+ policyAppDto?: Types.PolicyAppDto;
1385
+ insisWorkDataApp?: Types.InsisWorkDataApp;
1386
+ addCoverDto?: Types.AddCover[];
1386
1387
  };
1387
1388
  policyholderForm: Member;
1388
1389
  policyholderFormKey: StoreMembers.policyholderForm;
@@ -1649,7 +1650,7 @@ export class GroupMember extends PhysGroupClass {
1649
1650
  activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1650
1651
  beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1651
1652
  authoritedPerson: PhysGroupClass;
1652
- insuredPolicyData: InsuredPolicyType;
1653
+ insuredPolicyData: Types.InsuredPolicyType;
1653
1654
 
1654
1655
  constructor() {
1655
1656
  super();
@@ -1,6 +1,8 @@
1
1
  import { i18n } from '../configs/i18n';
2
- import { FieldTypes } from '../types/form';
2
+ import { FieldTypes, type InputBase, type InputType } from '../types/form';
3
3
  import { type ComputedRefWithControl } from '@vueuse/core';
4
+ import type { Utils } from '../types';
5
+ import type * as Types from '../types/form';
4
6
 
5
7
  const t = i18n.t;
6
8
 
@@ -37,14 +39,14 @@ export const FieldBase = ({
37
39
  fetchFrom,
38
40
  }) as InputBase;
39
41
 
40
- export const TextInput = ({ ...rest }: Partial<TextInput>): TextInput => {
42
+ export const TextInput = ({ ...rest }: Partial<Types.TextInput>): Types.TextInput => {
41
43
  return {
42
44
  ...FieldBase(rest),
43
45
  type: FieldTypes.TEXT,
44
46
  };
45
47
  };
46
48
 
47
- export const SwitchInput = ({ ...rest }: Partial<SwitchInput>): SwitchInput => {
49
+ export const SwitchInput = ({ ...rest }: Partial<Types.SwitchInput>): Types.SwitchInput => {
48
50
  return {
49
51
  ...FieldBase(rest),
50
52
  type: FieldTypes.SWITCH,
@@ -55,7 +57,7 @@ export const SwitchInput = ({ ...rest }: Partial<SwitchInput>): SwitchInput => {
55
57
  };
56
58
  };
57
59
 
58
- export const NumberInput = ({ ...rest }: Partial<NumberInput>): NumberInput => {
60
+ export const NumberInput = ({ ...rest }: Partial<Types.NumberInput>): Types.NumberInput => {
59
61
  return {
60
62
  ...FieldBase(rest),
61
63
  type: FieldTypes.NUMBER,
@@ -4,6 +4,7 @@ import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
5
  import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
6
  import { PolicyholderClass } from '../composables/classes';
7
+ import type { EnvModes, NestedKeyOf, ResponseStructure } from '../types';
7
8
 
8
9
  export const useEnv = () => {
9
10
  return {
@@ -473,7 +474,7 @@ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
473
474
  test: 'http://aml-dev.halyklife.nb/api',
474
475
  },
475
476
  };
476
- return valuesPerEnv[which][import.meta.env.VITE_MODE];
477
+ return valuesPerEnv[which][import.meta.env.VITE_MODE as EnvModes];
477
478
  };
478
479
 
479
480
  export const getMainPageRoute = () => {
package/nuxt.config.ts CHANGED
@@ -32,13 +32,8 @@ export default defineNuxtConfig({
32
32
  ],
33
33
  },
34
34
 
35
- future: {
36
- typescriptBundlerResolution: false,
37
- },
38
-
39
- vue: {
40
- propsDestructure: true,
41
- },
35
+ vue: { propsDestructure: true },
36
+ future: { typescriptBundlerResolution: false },
42
37
 
43
38
  components: [{ path: './components', prefix: 'Base', pathPrefix: false }],
44
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.4",
3
+ "version": "0.0.10-beta.6",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1,13 +1,14 @@
1
1
  import { defineStore } from 'pinia';
2
2
  import { rules } from './rules';
3
3
  import { i18n } from '../configs/i18n';
4
- import { Toast, Types, Positions, ToastOptions } from './toast';
4
+ import { Toast, Types as ToastTypes, Positions, ToastOptions } from './toast';
5
5
  import { isValidGUID, yearEnding, jwtDecode, ErrorHandler, getKeyWithPattern, getNumber, getAgeByBirthDate } from '../composables';
6
6
  import { DataStoreClass, DocumentItem, Member, Value, CountryValue, PolicyholderActivity, BeneficialOwner, PolicyholderClass } from '../composables/classes';
7
7
  import { ApiClass } from '../api';
8
8
  import { useFormStore } from './form.store';
9
9
  import { AxiosError } from 'axios';
10
10
  import { PostActions, StoreMembers, Roles, Statuses, MemberCodes, MemberAppCodes, Enums } from '../types/enum';
11
+ import type * as Types from '../types';
11
12
  //@ts-ignore
12
13
  import { NCALayerClient } from 'ncalayer-js-client';
13
14
 
@@ -17,7 +18,7 @@ export const useDataStore = defineStore('data', {
17
18
  t: i18n.t,
18
19
  rules: rules,
19
20
  toast: Toast,
20
- toastTypes: Types,
21
+ toastTypes: ToastTypes,
21
22
  toastPositions: Positions,
22
23
  isValidGUID: isValidGUID,
23
24
  router: useRouter(),
@@ -30,7 +31,7 @@ export const useDataStore = defineStore('data', {
30
31
  showToaster: (type: 'success' | 'error' | 'warning' | 'info', msg: string, timeout?: number) =>
31
32
  Toast.useToast()(msg, {
32
33
  ...ToastOptions,
33
- type: Types[type.toUpperCase() as keyof typeof Types],
34
+ type: ToastTypes[type.toUpperCase() as keyof typeof ToastTypes],
34
35
  timeout: type === 'error' ? 6000 : typeof timeout === 'number' ? timeout : ToastOptions.timeout,
35
36
  }),
36
37
  }),
@@ -383,7 +384,7 @@ export const useDataStore = defineStore('data', {
383
384
  return false;
384
385
  }
385
386
  },
386
- async resetSelected(route: RouteType) {
387
+ async resetSelected(route: Types.RouteType) {
387
388
  this.settings.open = false;
388
389
  this.rightPanel.open = false;
389
390
  this.panel.open = false;
@@ -488,7 +489,7 @@ export const useDataStore = defineStore('data', {
488
489
  if (Number(id) === 0) return;
489
490
  this.isLoading = load;
490
491
  try {
491
- const member = whichIndex === null ? this.formStore[whichForm as SingleMember] : this.formStore[whichForm as MultipleMember][whichIndex];
492
+ const member = whichIndex === null ? this.formStore[whichForm as Types.SingleMember] : this.formStore[whichForm as Types.MultipleMember][whichIndex];
492
493
  const contragentResponse = await this.api.getContragentById(id);
493
494
  if (contragentResponse.totalItems > 0) {
494
495
  await this.serializeContragentData(member, contragentResponse.items[0]);
@@ -501,7 +502,7 @@ export const useDataStore = defineStore('data', {
501
502
  this.isLoading = false;
502
503
  }
503
504
  },
504
- async serializeContragentData(member: Member, contragent: ContragentType) {
505
+ async serializeContragentData(member: Member, contragent: Types.ContragentType) {
505
506
  const [questionairesResponse, contactsResponse, documentsResponse, addressResponse] = await Promise.allSettled([
506
507
  this.api.getContrAgentData(contragent.id),
507
508
  this.api.getContrAgentContacts(contragent.id),
@@ -533,7 +534,7 @@ export const useDataStore = defineStore('data', {
533
534
  },
534
535
  parseContragent(
535
536
  member: Member,
536
- user: { personalData: ContragentType; data?: ContragentQuestionaries[]; contacts?: ContragentContacts[]; documents?: ContragentDocuments[]; address?: ContragentAddress[] },
537
+ user: { personalData: Types.ContragentType; data?: Types.ContragentQuestionaries[]; contacts?: Types.ContragentContacts[]; documents?: Types.ContragentDocuments[]; address?: Types.ContragentAddress[] },
537
538
  ) {
538
539
  member.verifyType = user.personalData.verifyType;
539
540
  member.verifyDate = user.personalData.verifyDate;
@@ -615,7 +616,7 @@ export const useDataStore = defineStore('data', {
615
616
  });
616
617
  }
617
618
  },
618
- searchFromList(member: Member, searchIt: ContragentQuestionaries) {
619
+ searchFromList(member: Member, searchIt: Types.ContragentQuestionaries) {
619
620
  const getQuestionariesData = () => {
620
621
  switch (searchIt.questId) {
621
622
  case '500003':
@@ -723,7 +724,7 @@ export const useDataStore = defineStore('data', {
723
724
  }
724
725
  }
725
726
  try {
726
- const contragentData: ContragentType = {
727
+ const contragentData: Types.ContragentType = {
727
728
  id: Number(user.id),
728
729
  type: Number(user.type),
729
730
  iin: user.iin!.replace(/-/g, ''),
@@ -753,7 +754,7 @@ export const useDataStore = defineStore('data', {
753
754
  countryOfTaxResidency,
754
755
  signOfResidency,
755
756
  }))(user);
756
- const questionariesData: ContragentQuestionaries[] = Object.values(userQuestionnaires).map(question => {
757
+ const questionariesData: Types.ContragentQuestionaries[] = Object.values(userQuestionnaires).map(question => {
757
758
  let questName = '';
758
759
  let questionId = parseInt(question.ids as string).toString();
759
760
  if (questionId === '500003') {
@@ -821,7 +822,7 @@ export const useDataStore = defineStore('data', {
821
822
  }
822
823
 
823
824
  const userResponseContacts = 'response' in user && user.response && 'contacts' in user.response && user.response.contacts ? user.response.contacts : null;
824
- const contactsData: ContragentContacts[] = [];
825
+ const contactsData: Types.ContragentContacts[] = [];
825
826
  if (!!user.phoneNumber) {
826
827
  contactsData.push({
827
828
  contragentId: Number(user.id),
@@ -863,7 +864,7 @@ export const useDataStore = defineStore('data', {
863
864
 
864
865
  const documentsData = user.documentsList;
865
866
  const hasAlreadyDocument = documentsData.findIndex(i => i.type === user.documentType.ids && i.number === user.documentNumber);
866
- const userDocument: ContragentDocuments = {
867
+ const userDocument: Types.ContragentDocuments = {
867
868
  contragentId: Number(user.id),
868
869
  id: hasAlreadyDocument !== -1 ? documentsData[hasAlreadyDocument].id : 0,
869
870
  description: null,
@@ -888,7 +889,7 @@ export const useDataStore = defineStore('data', {
888
889
 
889
890
  const checkForNull = (value: any) => (value ? value : '');
890
891
  const userResponseAddress = 'response' in user && user.response && 'addresses' in user.response && user.response.addresses ? user.response.addresses : null;
891
- const addressData: ContragentAddress[] = [];
892
+ const addressData: Types.ContragentAddress[] = [];
892
893
  addressData.push({
893
894
  id: userResponseAddress !== null ? userResponseAddress[0].id : 0,
894
895
  contragentId: Number(user.id),
@@ -1085,8 +1086,8 @@ export const useDataStore = defineStore('data', {
1085
1086
  },
1086
1087
  getConditionsData() {
1087
1088
  const conditionsData: {
1088
- policyAppDto: PolicyAppDto;
1089
- addCoversDto: AddCover[];
1089
+ policyAppDto: Types.PolicyAppDto;
1090
+ addCoversDto: Types.AddCover[];
1090
1091
  } = {
1091
1092
  policyAppDto: {
1092
1093
  id: this.formStore.applicationData?.policyAppDto?.id,
@@ -1214,7 +1215,7 @@ export const useDataStore = defineStore('data', {
1214
1215
  }
1215
1216
  return this.formStore.definedAnswersId[whichSurvey];
1216
1217
  },
1217
- async setSurvey(data: AnketaFirst) {
1218
+ async setSurvey(data: Types.AnketaFirst) {
1218
1219
  try {
1219
1220
  this.isLoading = true;
1220
1221
  const anketaToken = await this.api.setSurvey(data);
@@ -1228,7 +1229,7 @@ export const useDataStore = defineStore('data', {
1228
1229
  },
1229
1230
  async setINSISWorkData(loading: boolean = true) {
1230
1231
  if (!this.formStore.applicationData.insisWorkDataApp) return;
1231
- const data: InsisWorkDataApp = {
1232
+ const data: Types.InsisWorkDataApp = {
1232
1233
  id: this.formStore.applicationData.insisWorkDataApp.id,
1233
1234
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
1234
1235
  agentId: Number(this.formStore.AgentData.agentId),
@@ -1872,7 +1873,7 @@ export const useDataStore = defineStore('data', {
1872
1873
  return;
1873
1874
  }
1874
1875
  const signDate = formatDate(this.formStore.productConditionsForm.signDate);
1875
- const calculationData: RecalculationDataType & PolicyAppDto = {
1876
+ const calculationData: Types.RecalculationDataType & Types.PolicyAppDto = {
1876
1877
  signDate: signDate ? signDate.toISOString() : undefined,
1877
1878
  birthDate: this.formStore.productConditionsForm.birthDate ? formatDate(this.formStore.productConditionsForm.birthDate)!.toISOString() : undefined,
1878
1879
  gender: Number(this.formStore.productConditionsForm.gender.id),
@@ -2018,7 +2019,7 @@ export const useDataStore = defineStore('data', {
2018
2019
  async calculatePrice(taskId?: string) {
2019
2020
  this.isLoading = true;
2020
2021
  try {
2021
- const priceForm: SetApplicationRequest = {};
2022
+ const priceForm: Types.SetApplicationRequest = {};
2022
2023
  priceForm.insuredAmountId = this.formStore.productConditionsForm.calculatorForm.amount.id;
2023
2024
  priceForm.age = this.formStore.productConditionsForm.calculatorForm.age;
2024
2025
  priceForm.lifeTripCountries = this.formStore.productConditionsForm.calculatorForm.countries!.map(item => item.id as string);
@@ -2065,7 +2066,7 @@ export const useDataStore = defineStore('data', {
2065
2066
  async startApplication(member: Member, processCode?: number) {
2066
2067
  if (!member.iin) return false;
2067
2068
  try {
2068
- const data: StartApplicationType = {
2069
+ const data: Types.StartApplicationType = {
2069
2070
  clientId: member.id,
2070
2071
  iin: member.iin.replace(/-/g, ''),
2071
2072
  longName: member.longName ?? '',
@@ -2356,7 +2357,7 @@ export const useDataStore = defineStore('data', {
2356
2357
  async deleteTask(taskId: string) {
2357
2358
  this.isLoading = true;
2358
2359
  try {
2359
- const data: SendTask = {
2360
+ const data: Types.SendTask = {
2360
2361
  taskId: taskId,
2361
2362
  decision: 'rejectclient',
2362
2363
  comment: 'Клиент отказался',
@@ -2480,7 +2481,7 @@ export const useDataStore = defineStore('data', {
2480
2481
  console.log(err);
2481
2482
  }
2482
2483
  },
2483
- setMembersField(whichForm: SingleMember, whichMember: keyof typeof MemberAppCodes) {
2484
+ setMembersField(whichForm: Types.SingleMember, whichMember: keyof typeof MemberAppCodes) {
2484
2485
  this.formStore[whichForm].familyStatus = this.findObject('familyStatuses', 'id', this.formStore.applicationData[whichMember].familyStatusId);
2485
2486
  this.formStore[whichForm].signOfIPDL = this.findObject(
2486
2487
  'ipdl',
@@ -2507,7 +2508,7 @@ export const useDataStore = defineStore('data', {
2507
2508
  this.formStore.applicationData.pensionApp.transferContractCompany = transferCompany ? transferCompany : new Value();
2508
2509
  }
2509
2510
  },
2510
- setMembersFieldIndex(whichForm: MultipleMember, whichMember: keyof typeof MemberAppCodes, index: number) {
2511
+ setMembersFieldIndex(whichForm: Types.MultipleMember, whichMember: keyof typeof MemberAppCodes, index: number) {
2511
2512
  if ('familyStatus' in this.formStore[whichForm][index]) {
2512
2513
  this.formStore[whichForm][index].familyStatus = this.findObject('familyStatuses', 'id', this.formStore.applicationData[whichMember][index].familyStatusId);
2513
2514
  }
@@ -2543,7 +2544,7 @@ export const useDataStore = defineStore('data', {
2543
2544
  if (this.formStore.signUrls.length) {
2544
2545
  return this.formStore.signUrls;
2545
2546
  }
2546
- const prepareSignDocuments = (): SignDataType[] => {
2547
+ const prepareSignDocuments = (): Types.SignDataType[] => {
2547
2548
  switch (this.formStore.applicationData.statusCode) {
2548
2549
  case 'ContractSignedFrom':
2549
2550
  return [
@@ -2758,7 +2759,7 @@ export const useDataStore = defineStore('data', {
2758
2759
  try {
2759
2760
  this.isButtonsLoading = true;
2760
2761
  this.formStore.needToScanSignedContract = true;
2761
- const data: SignDataType = {
2762
+ const data: Types.SignDataType = {
2762
2763
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
2763
2764
  name: 'Contract',
2764
2765
  format: 'pdf',
@@ -2814,7 +2815,7 @@ export const useDataStore = defineStore('data', {
2814
2815
  const formattedData = formatDate(this.formStore.finCenterData.date);
2815
2816
  if (!formattedData) return;
2816
2817
  this.isLoading = true;
2817
- const data: RegNumberDataType = {
2818
+ const data: Types.RegNumberDataType = {
2818
2819
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
2819
2820
  regNumber: String(this.formStore.finCenterData.regNumber),
2820
2821
  date: formattedData.toISOString(),
@@ -2829,7 +2830,7 @@ export const useDataStore = defineStore('data', {
2829
2830
  },
2830
2831
  async sendSMS(type: 'SignUrl' | 'PayUrl', phoneNumber: string, text: string) {
2831
2832
  if (!type || !phoneNumber || !text) return;
2832
- const smsData: SmsDataType = {
2833
+ const smsData: Types.SmsDataType = {
2833
2834
  iin: this.formStore.applicationData.clientApp.iin,
2834
2835
  phoneNumber: formatPhone(phoneNumber),
2835
2836
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
@@ -2895,7 +2896,7 @@ export const useDataStore = defineStore('data', {
2895
2896
  }
2896
2897
  this.isLoading = false;
2897
2898
  },
2898
- async getValidateClientESBD(data: ESBDValidationType) {
2899
+ async getValidateClientESBD(data: Types.ESBDValidationType) {
2899
2900
  try {
2900
2901
  return await this.api.getValidateClientESBD(data);
2901
2902
  } catch (err) {
@@ -2903,7 +2904,7 @@ export const useDataStore = defineStore('data', {
2903
2904
  return ErrorHandler(err);
2904
2905
  }
2905
2906
  },
2906
- validateMultipleMembers(localKey: MultipleMember, applicationKey: keyof typeof this.formStore.applicationData, text: string) {
2907
+ validateMultipleMembers(localKey: Types.MultipleMember, applicationKey: keyof typeof this.formStore.applicationData, text: string) {
2907
2908
  if (this.formStore[localKey].length === this.formStore.applicationData[applicationKey].length) {
2908
2909
  if (this.formStore[localKey].length !== 0 && this.formStore.applicationData[applicationKey].length !== 0) {
2909
2910
  const localMembers = [...this.formStore[localKey]].sort((a, b) => Number(a.id) - Number(b.id));
@@ -3299,7 +3300,7 @@ export const useDataStore = defineStore('data', {
3299
3300
  this.isLoading = false;
3300
3301
  return false;
3301
3302
  }
3302
- const { person } = parseXML(gbdResponse.content, true, 'person') as { person: Api.GBD.Person };
3303
+ const { person } = parseXML(gbdResponse.content, true, 'person') as { person: Types.Api.GBD.Person };
3303
3304
  const { responseInfo } = parseXML(gbdResponse.content, true, 'responseInfo');
3304
3305
  if (member.gosPersonData !== null && member.gosPersonData.iin !== member.iin!.replace(/-/g, '')) {
3305
3306
  member.resetMember(false);
@@ -3316,7 +3317,7 @@ export const useDataStore = defineStore('data', {
3316
3317
  this.isLoading = false;
3317
3318
  }
3318
3319
  },
3319
- async saveInStoreUserGBDFL(person: Api.GBD.Person, member: Member) {
3320
+ async saveInStoreUserGBDFL(person: Types.Api.GBD.Person, member: Member) {
3320
3321
  member.firstName = person.name;
3321
3322
  member.lastName = person.surname;
3322
3323
  member.middleName = person.patronymic ? person.patronymic : '';
@@ -3601,7 +3602,7 @@ export const useDataStore = defineStore('data', {
3601
3602
  }
3602
3603
  this.isLoading = false;
3603
3604
  },
3604
- async saveAccidentIncidents(data: AccidentIncidents[]) {
3605
+ async saveAccidentIncidents(data: Types.AccidentIncidents[]) {
3605
3606
  try {
3606
3607
  const dataCopy = JSON.parse(JSON.stringify(data));
3607
3608
  for (const incident of dataCopy) {
@@ -3832,7 +3833,7 @@ export const useDataStore = defineStore('data', {
3832
3833
  return ErrorHandler(err);
3833
3834
  }
3834
3835
  },
3835
- async generateShortLink(url: string, template?: Api.GenerateShortLink.Templates) {
3836
+ async generateShortLink(url: string, template?: Types.Api.GenerateShortLink.Templates) {
3836
3837
  try {
3837
3838
  const response = await this.api.generateShortLink({
3838
3839
  link: url,
@@ -5,6 +5,7 @@ import { ErrorHandler } from '../composables';
5
5
  import { AxiosError } from 'axios';
6
6
  import { Member } from '../composables/classes';
7
7
  import { MemberAppCodes, MemberCodes, StoreMembers } from '../types/enum';
8
+ import type { MultipleMember, SendOtpResponse } from '../types';
8
9
 
9
10
  export const useMemberStore = defineStore('members', {
10
11
  state: () => ({
package/types/env.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /// <reference types="vite/client" />
2
2
 
3
- export interface ImportMetaEnv {
3
+ interface ImportMetaEnv {
4
4
  readonly VITE_MODE: EnvModes;
5
5
  readonly VITE_PRODUCT?: Projects;
6
6
  readonly VITE_PARENT_PRODUCT?: 'efo' | 'auletti';
7
7
  readonly VITE_COMMIT_VERSION?: string;
8
8
  }
9
9
 
10
- export interface ImportMeta {
10
+ interface ImportMeta {
11
11
  readonly env: ImportMetaEnv;
12
12
  }