hl-core 0.0.9-beta.44 → 0.0.9-beta.46

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.
@@ -45,9 +45,12 @@ export const useDataStore = defineStore('data', {
45
45
  }),
46
46
  getters: {
47
47
  isEFO: state => state.product === 'efo',
48
+ isEfoParent: state => state.parentProduct === 'efo',
48
49
  isAML: state => state.product === 'aml',
49
50
  isLKA: state => state.product === 'lka',
50
- isBridge: state => state.product === 'efo' || state.product === 'aml' || state.product === 'lka',
51
+ isAULETTI: state => state.product === 'auletti',
52
+ isAulettiParent: state => state.parentProduct === 'auletti',
53
+ isBridge: state => state.product === 'efo' || state.product === 'aml' || state.product === 'lka' || state.product === 'auletti',
51
54
  isBaiterek: state => state.product === 'baiterek',
52
55
  isBolashak: state => state.product === 'bolashak',
53
56
  isMycar: state => state.product === 'mycar',
@@ -59,6 +62,7 @@ export const useDataStore = defineStore('data', {
59
62
  isDas: state => state.product === 'daskamkorlyk',
60
63
  isPension: state => state.product === 'pensionannuity',
61
64
  isAmulet: state => state.product === 'amuletlife',
65
+ isGns: state => state.product === 'gns',
62
66
  isCalculator: state => state.product === 'calculator',
63
67
  isCheckContract: state => state.product === 'checkcontract',
64
68
  isCheckContragent: state => state.product === 'checkcontragent',
@@ -183,7 +187,7 @@ export const useDataStore = defineStore('data', {
183
187
  return !!isRole;
184
188
  },
185
189
  isInitiator() {
186
- return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager();
190
+ return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti();
187
191
  },
188
192
  isManager() {
189
193
  return this.isRole(constants.roles.Manager);
@@ -209,6 +213,9 @@ export const useDataStore = defineStore('data', {
209
213
  isAgentMycar() {
210
214
  return this.isRole(constants.roles.AgentMycar);
211
215
  },
216
+ isAgentAuletti() {
217
+ return this.isRole(constants.roles.AgentAuletti);
218
+ },
212
219
  isAnalyst() {
213
220
  return this.isRole(constants.roles.Analyst);
214
221
  },
@@ -273,15 +280,10 @@ export const useDataStore = defineStore('data', {
273
280
  }
274
281
  const checkPermission = () => {
275
282
  const hasAccess = this.hasAccess();
276
- if (this.isAML) {
277
- return hasAccess.toAML;
278
- }
279
- if (this.isLKA) {
280
- return hasAccess.toLKA;
281
- }
282
- if (this.isEFO) {
283
- return hasAccess.toEFO;
284
- }
283
+ if (this.isAML) return hasAccess.toAML;
284
+ if (this.isLKA) return hasAccess.toLKA;
285
+ if (this.isEFO) return hasAccess.toEFO;
286
+ if (this.isAULETTI) return hasAccess.toAULETTI;
285
287
  return false;
286
288
  };
287
289
  if (this.controls.onAuth) {
@@ -394,7 +396,7 @@ export const useDataStore = defineStore('data', {
394
396
  this.isLoading = false;
395
397
  }
396
398
  },
397
- async getContragent(member: Member, load: boolean = true) {
399
+ async getContragent(member: Member, load: boolean = true, showToaster: boolean = true) {
398
400
  this.isLoading = load;
399
401
  if (!member.iin) return;
400
402
  try {
@@ -416,7 +418,7 @@ export const useDataStore = defineStore('data', {
416
418
  }
417
419
  member.gotFromInsis = true;
418
420
  } else {
419
- this.showToaster('error', this.t('toaster.notFoundUser'));
421
+ if (showToaster) this.showToaster('error', this.t('toaster.notFoundUser'));
420
422
  }
421
423
  } catch (err) {
422
424
  ErrorHandler(err);
@@ -597,12 +599,12 @@ export const useDataStore = defineStore('data', {
597
599
  const contragent = await this.api.getContragent(queryData);
598
600
  if (contragent.totalItems > 0) {
599
601
  if (contragent.items.length === 1) {
600
- return contragent.items[0].id;
602
+ return contragent.items[0];
601
603
  } else {
602
604
  const sortedByRegistrationDate = contragent.items.sort(
603
605
  (left, right) => new Date(right.registrationDate).getMilliseconds() - new Date(left.registrationDate).getMilliseconds(),
604
606
  );
605
- return sortedByRegistrationDate[0].id;
607
+ return sortedByRegistrationDate[0];
606
608
  }
607
609
  } else {
608
610
  return null;
@@ -640,16 +642,19 @@ export const useDataStore = defineStore('data', {
640
642
  }
641
643
  }
642
644
  this.isLoading = !onlySaveAction;
643
- const hasInsisId = await this.alreadyInInsis(user);
644
- if (typeof hasInsisId === 'number') {
645
- user.id = hasInsisId;
645
+ const hasInsis = await this.alreadyInInsis(user);
646
+ if (!!hasInsis) {
647
+ user.id = hasInsis.id;
646
648
  const [questionairesResponse, contactsResponse, documentsResponse, addressResponse] = await Promise.allSettled([
647
649
  this.api.getContrAgentData(user.id),
648
650
  this.api.getContrAgentContacts(user.id),
649
651
  this.api.getContrAgentDocuments(user.id),
650
652
  this.api.getContrAgentAddress(user.id),
651
653
  ]);
652
- user.response = {};
654
+ if (!user.response) {
655
+ user.response = {};
656
+ user.response.contragent = hasInsis;
657
+ }
653
658
  if (questionairesResponse.status === 'fulfilled' && questionairesResponse.value && questionairesResponse.value.length) {
654
659
  user.response.questionnaires = questionairesResponse.value;
655
660
  }
@@ -675,7 +680,11 @@ export const useDataStore = defineStore('data', {
675
680
  birthDate: user.getDateByKey('birthDate')!,
676
681
  gender: Number(user.gender.id),
677
682
  genderName: user.genderName ? user.genderName : user.gender.nameRu ?? '',
678
- birthPlace: user.birthPlace.nameRu ?? '',
683
+ birthPlace: user.birthPlace.nameRu
684
+ ? user.birthPlace.nameRu
685
+ : 'response' in user && user.response && 'contragent' in user.response && user.response.contragent && user.response.contragent.birthPlace
686
+ ? user.response.contragent.birthPlace
687
+ : '',
679
688
  age: Number(user.age),
680
689
  registrationDate: user.registrationDate,
681
690
  verifyType: user.verifyType,
@@ -1046,9 +1055,10 @@ export const useDataStore = defineStore('data', {
1046
1055
  conditionsData.policyAppDto.paymentPeriod = Number(this.formStore.productConditionsForm.termAnnuityPayments);
1047
1056
  conditionsData.policyAppDto.annuityPaymentPeriodId = (this.formStore.productConditionsForm.periodAnnuityPayment.id as string) ?? undefined;
1048
1057
  }
1049
- if (this.isLifeBusiness) {
1058
+ if (this.isLifeBusiness || this.isGns) {
1050
1059
  conditionsData.policyAppDto.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
1051
- conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
1060
+ conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.fixInsSum));
1061
+ conditionsData.policyAppDto.mainInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
1052
1062
  conditionsData.policyAppDto.agentCommission = Number(this.formStore.productConditionsForm.agentCommission);
1053
1063
  conditionsData.policyAppDto.processDefinitionFgotId = (this.formStore.productConditionsForm.processGfot.id as string) ?? undefined;
1054
1064
  }
@@ -1189,7 +1199,7 @@ export const useDataStore = defineStore('data', {
1189
1199
  if (storageValue && (hasHourKey === false || hasMiniteKey === false || hasModeKey === false || hasValueKey === false)) return true;
1190
1200
  if (
1191
1201
  storageValue &&
1192
- (storageValue.hour !== currentHour || storageValue.minute !== currentMinutePart || storageValue.mode !== import.meta.env.MODE || storageValue.value.length === 0)
1202
+ (storageValue.hour !== currentHour || storageValue.minute !== currentMinutePart || storageValue.mode !== import.meta.env.VITE_MODE || storageValue.value.length === 0)
1193
1203
  )
1194
1204
  return true;
1195
1205
  };
@@ -1206,7 +1216,7 @@ export const useDataStore = defineStore('data', {
1206
1216
  value: response,
1207
1217
  hour: currentHour,
1208
1218
  minute: currentMinutePart,
1209
- mode: import.meta.env.MODE,
1219
+ mode: import.meta.env.VITE_MODE,
1210
1220
  }),
1211
1221
  );
1212
1222
  //@ts-ignore
@@ -1332,7 +1342,7 @@ export const useDataStore = defineStore('data', {
1332
1342
  return this.cities;
1333
1343
  },
1334
1344
  async getCitiesEfo(key?: string, member?: any, parentKey?: string) {
1335
- if (this.isLifeBusiness) {
1345
+ if (this.isLifeBusiness || this.isGns) {
1336
1346
  await this.getFromApi('cities', 'getCities');
1337
1347
  //@ts-ignore
1338
1348
  if (key && member[parentKey][key] && member[parentKey][key].ids !== null) return this.cities.filter(i => i.code === member[parentKey][key].ids);
@@ -1372,7 +1382,7 @@ export const useDataStore = defineStore('data', {
1372
1382
  return await this.getFromApi('economySectorCode', 'getSectorCode');
1373
1383
  },
1374
1384
  async getEconomicActivityType() {
1375
- if (this.isLifeBusiness || this.isDas || this.isUU) return await this.getFromApi('economicActivityType', 'getEconomicActivityType');
1385
+ if (this.isLifeBusiness || this.isGns || this.isDas || this.isUU) return await this.getFromApi('economicActivityType', 'getEconomicActivityType');
1376
1386
  },
1377
1387
  async getFamilyStatuses() {
1378
1388
  return await this.getFromApi('familyStatuses', 'getFamilyStatuses');
@@ -1381,7 +1391,7 @@ export const useDataStore = defineStore('data', {
1381
1391
  return await this.getFromApi('relations', 'getRelationTypes');
1382
1392
  },
1383
1393
  async getBanks() {
1384
- if (this.isLifeBusiness || this.isDas || this.isUU) return await this.getFromApi('banks', 'getBanks');
1394
+ if (this.isLifeBusiness || this.isGns || this.isDas || this.isUU) return await this.getFromApi('banks', 'getBanks');
1385
1395
  },
1386
1396
  async getProcessIndexRate() {
1387
1397
  if (this.processCode) {
@@ -1432,7 +1442,7 @@ export const useDataStore = defineStore('data', {
1432
1442
  return this.gender;
1433
1443
  },
1434
1444
  async getAuthorityBasis() {
1435
- if (this.isDas || this.isLifeBusiness || this.isUU) return await this.getFromApi('authorityBasis', 'getArmDicts', 'DicAuthorityBasis');
1445
+ if (this.isDas || this.isLifeBusiness || this.isGns || this.isUU) return await this.getFromApi('authorityBasis', 'getArmDicts', 'DicAuthorityBasis');
1436
1446
  },
1437
1447
  async getAllFormsData() {
1438
1448
  await Promise.allSettled([
@@ -1790,11 +1800,12 @@ export const useDataStore = defineStore('data', {
1790
1800
  calculationData.paymentPeriod = Number(this.formStore.productConditionsForm.termAnnuityPayments);
1791
1801
  calculationData.annuityPaymentPeriodId = (this.formStore.productConditionsForm.periodAnnuityPayment.id as string) ?? undefined;
1792
1802
  }
1793
- if (this.isLifeBusiness || product === 'lifebusiness') {
1803
+ if (this.isLifeBusiness || product === 'lifebusiness' || this.isGns || product === 'gns') {
1794
1804
  calculationData.clients = this.formStore.lfb.clients;
1795
1805
  calculationData.insrCount = this.formStore.lfb.clients.length;
1796
1806
  calculationData.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
1797
- calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
1807
+ calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.fixInsSum));
1808
+ calculationData.mainInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
1798
1809
  calculationData.agentCommission = Number(this.formStore.productConditionsForm.agentCommission);
1799
1810
  calculationData.processDefinitionFgotId = this.formStore.productConditionsForm.processGfot.id;
1800
1811
  }
@@ -1818,9 +1829,9 @@ export const useDataStore = defineStore('data', {
1818
1829
  this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(calculationResponse.statePremium5);
1819
1830
  this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(calculationResponse.statePremium7);
1820
1831
  }
1821
- if (this.isLifeBusiness || product === 'lifebusiness') {
1822
- this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.mainPremium);
1823
- this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.fixInsSum === 0 ? null : calculationResponse.fixInsSum);
1832
+ if (this.isLifeBusiness || product === 'lifebusiness' || this.isGns || product === 'gns') {
1833
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.mainPremiumWithCommission);
1834
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.mainInsSum === 0 ? null : calculationResponse.mainInsSum);
1824
1835
  this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
1825
1836
  if (calculationResponse.agentCommission) {
1826
1837
  this.formStore.productConditionsForm.agentCommission = calculationResponse.agentCommission;
@@ -1873,7 +1884,7 @@ export const useDataStore = defineStore('data', {
1873
1884
  this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(govPremiums.statePremium5 === null ? null : govPremiums.statePremium5);
1874
1885
  this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(govPremiums.statePremium7 === null ? null : govPremiums.statePremium7);
1875
1886
  }
1876
- if (this.isLifeBusiness) {
1887
+ if (this.isLifeBusiness || this.isGns) {
1877
1888
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
1878
1889
  if (applicationData.insuredApp && applicationData.insuredApp.length) {
1879
1890
  const res = await this.newInsuredList(applicationData.insuredApp);
@@ -2275,7 +2286,7 @@ export const useDataStore = defineStore('data', {
2275
2286
  const sended = await this.sendTask(taskId, action, comment);
2276
2287
  if (!sended) return;
2277
2288
  this.formStore.$reset();
2278
- if (this.isEFO || this.isAML) {
2289
+ if (this.isEFO || this.isAML || this.isAULETTI) {
2279
2290
  await this.router.push({ name: 'Insurance-Product' });
2280
2291
  } else {
2281
2292
  this.sendToParent(constants.postActions.toHomePage, this.t('toaster.successOperation') + 'SUCCESS');
@@ -2293,7 +2304,7 @@ export const useDataStore = defineStore('data', {
2293
2304
  });
2294
2305
  if (!sended) return;
2295
2306
  this.formStore.$reset();
2296
- if (this.isEFO || this.isAML) {
2307
+ if (this.isEFO || this.isAML || this.isAULETTI) {
2297
2308
  await this.router.push({ name: 'Insurance-Product' });
2298
2309
  } else {
2299
2310
  this.sendToParent(constants.postActions.toHomePage, this.t('toaster.successOperation') + 'SUCCESS');
@@ -2976,7 +2987,7 @@ export const useDataStore = defineStore('data', {
2976
2987
  member.resetMember(false);
2977
2988
  }
2978
2989
  member.gosPersonData = person;
2979
- await this.getContragent(member, false);
2990
+ await this.getContragent(member, false, false);
2980
2991
  member.verifyDate = responseInfo.responseDate;
2981
2992
  member.verifyType = 'GBDFL';
2982
2993
  await this.saveInStoreUserGBDFL(person, member);
@@ -3121,21 +3132,14 @@ export const useDataStore = defineStore('data', {
3121
3132
  preparePersonData(data: any) {
3122
3133
  if (data) {
3123
3134
  Object.keys(data).forEach(key => {
3124
- const dataKeys = key as keyof typeof data;
3125
- if (data[dataKeys] === Object(data[dataKeys])) {
3126
- if (!!data[dataKeys]) {
3127
- this.preparePersonData(data[dataKeys]);
3128
- }
3135
+ if (data[key] === Object(data[key]) && !!data[key]) {
3136
+ this.preparePersonData(data[key]);
3129
3137
  } else {
3130
- if (data[dataKeys] !== null) {
3131
- if (dataKeys === 'iin' || dataKeys === 'bin') {
3132
- //@ts-ignore
3133
- data[dataKeys] = data[dataKeys].replace(/-/g, '');
3134
- }
3135
- if (dataKeys === 'phoneNumber') data[dataKeys] = formatPhone(data[dataKeys]);
3136
- if (dataKeys === 'issuedOn' || dataKeys === 'validUntil' || dataKeys === 'birthDate') data[dataKeys] = formatDate(data[dataKeys])?.toISOString() ?? '';
3137
- //@ts-ignore
3138
- if (dataKeys === 'nameRu' && data['ids']) data['id'] = data['ids'];
3138
+ if (data[key] !== null) {
3139
+ if (key === 'iin' || key === 'bin') data[key] = data[key].replace(/-/g, '');
3140
+ if (key === 'phoneNumber') data[key] = formatPhone(data[key]);
3141
+ if (key === 'issuedOn' || key === 'validUntil' || key === 'birthDate') data[key] = formatDate(data[key])?.toISOString() ?? '';
3142
+ if (key === 'nameRu' && data['ids']) data['id'] = data['ids'];
3139
3143
  }
3140
3144
  }
3141
3145
  });
@@ -3146,9 +3150,16 @@ export const useDataStore = defineStore('data', {
3146
3150
  this.preparePersonData(policyholder);
3147
3151
  delete policyholder.clientData.beneficalOwnerQuest;
3148
3152
  delete policyholder.clientData.identityDocument;
3149
- delete policyholder.clientData.authoritedPerson.identityDocument;
3150
3153
  delete policyholder.clientData.activityTypes;
3151
3154
  delete policyholder.clientData.citizenship;
3155
+ delete policyholder.clientData.authoritedPerson.identityDocument;
3156
+ delete policyholder.clientData.authoritedPerson.actualAddress;
3157
+ delete policyholder.clientData.authoritedPerson.bankInfo;
3158
+ delete policyholder.clientData.authoritedPerson.economySectorCode;
3159
+ delete policyholder.clientData.authoritedPerson.legalAddress;
3160
+ delete policyholder.clientData.authoritedPerson.placeOfBirth;
3161
+ delete policyholder.clientData.authoritedPerson.resident;
3162
+ delete policyholder.clientData.authoritedPerson.taxResidentCountry;
3152
3163
  if (!policyholder.clientData.iin) return false;
3153
3164
  try {
3154
3165
  const response = await this.api.startApplication(policyholder);
@@ -3236,10 +3247,11 @@ export const useDataStore = defineStore('data', {
3236
3247
  }
3237
3248
 
3238
3249
  this.formStore.productConditionsForm.agentCommission = applicationData.policyAppDto.agentCommission === 0 ? null : applicationData.policyAppDto.agentCommission;
3250
+ this.formStore.productConditionsForm.fixInsSum = this.getNumberWithSpaces(applicationData.policyAppDto.fixInsSum === 0 ? null : applicationData.policyAppDto.fixInsSum);
3239
3251
  this.formStore.productConditionsForm.coverPeriod = 12;
3240
3252
  this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount === 0 ? null : applicationData.policyAppDto.amount);
3241
3253
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(
3242
- applicationData.policyAppDto.mainPremium === 0 ? null : applicationData.policyAppDto.mainPremium,
3254
+ applicationData.policyAppDto.mainPremiumWithCommission === 0 ? null : applicationData.policyAppDto.mainPremiumWithCommission,
3243
3255
  );
3244
3256
  const paymentPeriod = this.processPaymentPeriod.find(item => item.id == applicationData.policyAppDto.paymentPeriodId);
3245
3257
  this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
@@ -3504,9 +3516,15 @@ export const useDataStore = defineStore('data', {
3504
3516
  return {
3505
3517
  invoiceInfo: this.isAdmin(),
3506
3518
  toLKA: this.isAgent() || this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn(),
3507
- toAML: this.isCompliance() || this.isAdmin() || this.isSupport() || this.isAnalyst(),
3519
+ toAML: this.isCompliance() || this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn(),
3520
+ toAULETTI: this.isAgentAuletti() || this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn(),
3508
3521
  toEFO:
3509
- this.isInitiator() ||
3522
+ this.isManager() ||
3523
+ this.isAgent() ||
3524
+ this.isAgentMycar() ||
3525
+ this.isManagerHalykBank() ||
3526
+ this.isHeadManager() ||
3527
+ this.isServiceManager() ||
3510
3528
  this.isUnderwriter() ||
3511
3529
  this.isAdmin() ||
3512
3530
  this.isCompliance() ||
@@ -3514,7 +3532,8 @@ export const useDataStore = defineStore('data', {
3514
3532
  this.isUpk() ||
3515
3533
  this.isFinCenter() ||
3516
3534
  this.isSupervisor() ||
3517
- this.isSupport(),
3535
+ this.isSupport() ||
3536
+ this.isDrn(),
3518
3537
  };
3519
3538
  },
3520
3539
  },
package/types/enum.ts CHANGED
@@ -42,6 +42,12 @@ export enum Actions {
42
42
 
43
43
  chooseSign = 'chooseSign',
44
44
  chooseSignCustom = 'chooseSignCustom',
45
+
46
+ choosePay = 'choosePay',
47
+ choosePayCustom = 'choosePayCustom',
48
+
49
+ signedScans = 'signedScans',
50
+ signedScansCustom = 'signedScansCustom',
45
51
  }
46
52
 
47
53
  export enum PostActions {
@@ -57,6 +63,7 @@ export enum PostActions {
57
63
  Error401 = 'Error401',
58
64
  Error500 = 'Error500',
59
65
  iframeLoaded = 'iframeLoaded',
66
+ goToProject = 'goToProject',
60
67
  }
61
68
 
62
69
  export enum Roles {
@@ -75,6 +82,7 @@ export enum Roles {
75
82
  ServiceManager = 'ServiceManager',
76
83
  DRNSJ = 'DRNSJ',
77
84
  HeadManager = 'HeadManager',
85
+ AgentAuletti = 'AgentAuletti',
78
86
  }
79
87
 
80
88
  export enum Statuses {
package/types/env.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  interface ImportMetaEnv {
4
4
  readonly VITE_MODE: EnvModes;
5
5
  readonly VITE_PRODUCT?: Projects;
6
+ readonly VITE_PARENT_PRODUCT?: 'efo' | 'auletti';
6
7
  }
7
8
 
8
9
  interface ImportMeta {
package/types/index.ts CHANGED
@@ -6,7 +6,7 @@ import { Methods } from './enum';
6
6
  export {};
7
7
 
8
8
  declare global {
9
- type EnvModes = 'development' | 'test' | 'vercel' | 'production';
9
+ type EnvModes = 'development' | 'test' | 'production';
10
10
  type Projects =
11
11
  | 'aml'
12
12
  | 'baiterek'
@@ -24,9 +24,11 @@ declare global {
24
24
  | 'checkcontragent'
25
25
  | 'daskamkorlyk'
26
26
  | 'amuletlife'
27
+ | 'gns'
27
28
  | 'pensionannuity'
28
29
  | 'dso'
29
- | 'uu';
30
+ | 'uu'
31
+ | 'auletti';
30
32
  type MemberKeys = keyof ReturnType<typeof useFormStore>;
31
33
  type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
32
34
  type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
@@ -59,6 +61,14 @@ declare global {
59
61
  | 'url'
60
62
  | 'week';
61
63
 
64
+ type NestedKeyOf<ObjectType extends object> = {
65
+ [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : Key;
66
+ }[keyof ObjectType & (string | number)];
67
+
68
+ type FinalNestedKeyOf<ObjectType extends object> = {
69
+ [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}.${NestedKeyOf<ObjectType[Key]>}` : Key;
70
+ }[keyof ObjectType & (string | number)];
71
+
62
72
  interface AxiosRequestLocalConfig extends AxiosRequestConfig {
63
73
  method: Methods | keyof typeof Methods;
64
74
  }
@@ -308,6 +318,8 @@ declare global {
308
318
  clients?: ClientV2[];
309
319
  fixInsSum?: number | null;
310
320
  agentCommission?: number | null;
321
+ mainInsSum?: number | null;
322
+ mainPremiumWithCommission?: number;
311
323
  };
312
324
 
313
325
  interface AddCover {
@@ -573,7 +585,7 @@ declare global {
573
585
  tariffId?: string | null;
574
586
  mainPremium?: number | string | null;
575
587
  processDefinitionFgotId?: string | number;
576
- mainInsSum?: number;
588
+ mainInsSum?: number | null;
577
589
  agentCommission?: number | null;
578
590
  };
579
591