hl-core 0.0.8 → 0.0.9-beta.10

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 (73) hide show
  1. package/api/index.ts +202 -161
  2. package/api/interceptors.ts +23 -17
  3. package/components/Button/Btn.vue +4 -4
  4. package/components/Button/ScrollButtons.vue +2 -2
  5. package/components/Complex/ContentBlock.vue +1 -1
  6. package/components/Complex/MessageBlock.vue +26 -0
  7. package/components/Complex/Page.vue +8 -2
  8. package/components/Complex/WhiteBlock.vue +7 -0
  9. package/components/Dialog/Dialog.vue +9 -39
  10. package/components/Dialog/FamilyDialog.vue +10 -7
  11. package/components/Form/FormBlock.vue +91 -45
  12. package/components/Form/FormSection.vue +5 -2
  13. package/components/Form/FormTextSection.vue +3 -3
  14. package/components/Form/FormToggle.vue +4 -5
  15. package/components/Form/ManagerAttachment.vue +210 -0
  16. package/components/Form/ProductConditionsBlock.vue +70 -16
  17. package/components/Input/Datepicker.vue +45 -0
  18. package/components/Input/EmptyFormField.vue +1 -1
  19. package/components/Input/FileInput.vue +2 -3
  20. package/components/Input/FormInput.vue +31 -7
  21. package/components/Input/PanelInput.vue +7 -2
  22. package/components/Input/RoundedEmptyField.vue +5 -0
  23. package/components/Input/RoundedInput.vue +2 -2
  24. package/components/Input/RoundedSelect.vue +150 -0
  25. package/components/Layout/Drawer.vue +5 -2
  26. package/components/Layout/Header.vue +41 -5
  27. package/components/Layout/Loader.vue +1 -1
  28. package/components/Layout/SettingsPanel.vue +47 -13
  29. package/components/List/ListEmpty.vue +1 -1
  30. package/components/Menu/MenuHover.vue +30 -0
  31. package/components/Menu/MenuNav.vue +30 -14
  32. package/components/Menu/MenuNavItem.vue +10 -7
  33. package/components/Pages/Anketa.vue +68 -47
  34. package/components/Pages/Auth.vue +139 -46
  35. package/components/Pages/ContragentForm.vue +505 -0
  36. package/components/Pages/Documents.vue +11 -11
  37. package/components/Pages/InvoiceInfo.vue +30 -0
  38. package/components/Pages/MemberForm.vue +574 -316
  39. package/components/Pages/ProductAgreement.vue +2 -2
  40. package/components/Pages/ProductConditions.vue +671 -78
  41. package/components/Panel/PanelHandler.vue +309 -0
  42. package/components/Panel/PanelSelectItem.vue +3 -3
  43. package/components/Transitions/SlideTransition.vue +5 -0
  44. package/components/Utilities/Chip.vue +27 -0
  45. package/components/Utilities/IconBorder.vue +17 -0
  46. package/components/Utilities/JsonViewer.vue +27 -0
  47. package/composables/axios.ts +2 -2
  48. package/composables/classes.ts +227 -107
  49. package/composables/constants.ts +31 -51
  50. package/composables/index.ts +106 -2
  51. package/composables/styles.ts +33 -11
  52. package/configs/i18n.ts +15 -0
  53. package/layouts/default.vue +11 -8
  54. package/layouts/full.vue +1 -1
  55. package/locales/ru.json +647 -0
  56. package/nuxt.config.ts +14 -2
  57. package/package.json +35 -12
  58. package/pages/500.vue +4 -4
  59. package/pages/Token.vue +52 -0
  60. package/plugins/helperFunctionsPlugins.ts +11 -6
  61. package/plugins/storePlugin.ts +0 -1
  62. package/plugins/vuetifyPlugin.ts +8 -1
  63. package/store/data.store.ts +2666 -0
  64. package/store/form.store.ts +1 -1
  65. package/store/member.store.ts +164 -52
  66. package/store/rules.ts +193 -0
  67. package/types/enum.ts +83 -0
  68. package/types/env.d.ts +10 -0
  69. package/types/index.ts +279 -8
  70. package/components/Button/BtnIcon.vue +0 -47
  71. package/store/data.store.js +0 -2482
  72. package/store/messages.ts +0 -429
  73. package/store/rules.js +0 -153
package/api/index.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { useAxios } from '@/composables/axios';
2
- import { Value, IDocument } from '@/composables/classes';
1
+ import { MemberCodes } from '../types/enum';
2
+ import { useAxiosInstance } from '../composables/axios';
3
+ import { Value, IDocument } from '../composables/classes';
3
4
  import { AxiosRequestConfig } from 'axios';
4
5
 
5
6
  enum Methods {
@@ -11,27 +12,21 @@ export class ApiClass {
11
12
  private readonly baseURL: string = import.meta.env.VITE_BASE_URL as string;
12
13
  private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
13
14
 
14
- private async axiosCall(config: AxiosRequestConfig) {
15
- const dataStore = useDataStore();
16
- if ((dataStore.isEFO && this.baseURL) || (!dataStore.isEFO && this.baseURL && this.productUrl)) {
17
- const { data } = await useAxios(this.baseURL as string).request(config);
18
- return data;
19
- } else {
20
- console.error('No Axios baseURL or productURL');
21
- return null;
22
- }
15
+ private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
16
+ const { data } = await useAxiosInstance(this.baseURL).request<T>(config);
17
+ return data;
23
18
  }
24
19
 
25
- async loginUser(data: { login: string; password: string; numAttempt: number }): Promise<{ refreshToken: string; accessToken: string }> {
26
- return this.axiosCall({
20
+ async loginUser(data: { login: string; password: string; numAttempt: number }) {
21
+ return await this.axiosCall<{ refreshToken: string; accessToken: string }>({
27
22
  method: Methods.POST,
28
23
  url: '/identity/api/Account/login',
29
24
  data: data,
30
25
  });
31
26
  }
32
27
 
33
- async getNewAccessToken({ refreshToken, accessToken }: { refreshToken: string; accessToken: string }): Promise<{ refreshToken: string; accessToken: string }> {
34
- return this.axiosCall({
28
+ async getNewAccessToken({ refreshToken, accessToken }: { refreshToken: string; accessToken: string }) {
29
+ return await this.axiosCall<{ refreshToken: string; accessToken: string }>({
35
30
  method: Methods.POST,
36
31
  url: '/identity/api/Account/refresh',
37
32
  headers: {
@@ -41,190 +36,225 @@ export class ApiClass {
41
36
  });
42
37
  }
43
38
 
44
- // Страна
45
39
  async getCountries() {
46
- return this.axiosCall({
40
+ return await this.axiosCall<Value[]>({
47
41
  method: Methods.GET,
48
42
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Country',
49
43
  });
50
44
  }
51
45
 
52
- // Страна гражданства
53
46
  async getCitizenshipCountries() {
54
- return this.axiosCall({
47
+ return await this.axiosCall<Value[]>({
55
48
  method: Methods.GET,
56
49
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500012',
57
50
  });
58
51
  }
59
52
 
60
- // Страна налогового резидетства
61
53
  async getTaxCountries() {
62
- return this.axiosCall({
54
+ return await this.axiosCall<Value[]>({
63
55
  method: Methods.GET,
64
56
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500014',
65
57
  });
66
58
  }
67
59
 
68
60
  async getAdditionalTaxCountries() {
69
- return this.axiosCall({
61
+ return await this.axiosCall<Value[]>({
70
62
  method: Methods.GET,
71
63
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=507777',
72
64
  });
73
65
  }
74
66
 
75
- // Область
76
67
  async getStates() {
77
- return this.axiosCall({
68
+ return await this.axiosCall<Value[]>({
78
69
  method: Methods.GET,
79
70
  url: '/Ekk/api/Contragentinsis/DictionaryItems/State',
80
71
  });
81
72
  }
82
73
 
83
- // Регион
84
74
  async getRegions() {
85
- return this.axiosCall({
75
+ return await this.axiosCall<Value[]>({
86
76
  method: Methods.GET,
87
77
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Region',
88
78
  });
89
79
  }
90
80
 
91
- // Город
92
81
  async getCities() {
93
- return this.axiosCall({
82
+ return await this.axiosCall<Value[]>({
94
83
  method: Methods.GET,
95
84
  url: '/Ekk/api/Contragentinsis/DictionaryItems/CityVillage',
96
85
  });
97
86
  }
98
87
 
99
- // Вид населенного пункта
100
88
  async getLocalityTypes() {
101
- return this.axiosCall({
89
+ return await this.axiosCall<Value[]>({
102
90
  method: Methods.GET,
103
91
  url: '/Ekk/api/Contragentinsis/DictionaryItems/LocalityType',
104
92
  });
105
93
  }
106
94
 
107
- // Тип документа
108
95
  async getDocumentTypes() {
109
- return this.axiosCall({
96
+ return await this.axiosCall<Value[]>({
110
97
  method: Methods.GET,
111
98
  url: '/Ekk/api/Contragentinsis/DictionaryItems/DocumentTypePhys',
112
99
  });
113
100
  }
114
101
 
115
- // Кем выдано
116
102
  async getDocumentIssuers() {
117
- return this.axiosCall({
103
+ return await this.axiosCall<Value[]>({
118
104
  method: Methods.GET,
119
105
  url: '/Ekk/api/Contragentinsis/DictionaryItems/DocIssuer',
120
106
  });
121
107
  }
122
108
 
123
- // Признак резидентства
124
109
  async getResidents() {
125
- return this.axiosCall({
110
+ return await this.axiosCall<Value[]>({
126
111
  method: Methods.GET,
127
112
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500011',
128
113
  });
129
114
  }
130
115
 
131
- // Код сектора экономики
132
116
  async getSectorCode() {
133
- return this.axiosCall({
117
+ return await this.axiosCall<Value[]>({
134
118
  method: Methods.GET,
135
119
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500003',
136
120
  });
137
121
  }
138
122
 
139
- // Семейное положение
140
123
  async getFamilyStatuses() {
141
- return this.axiosCall({
124
+ return await this.axiosCall<Value[]>({
142
125
  method: Methods.GET,
143
126
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFamilyStatus',
144
127
  });
145
128
  }
146
129
 
147
- // Степень родства
148
130
  async getRelationTypes() {
149
- return this.axiosCall({
131
+ return await this.axiosCall<Value[]>({
150
132
  method: Methods.GET,
151
133
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Relation',
152
134
  });
153
135
  }
154
136
 
155
- async getContragent(queryData: any) {
156
- return this.axiosCall({
137
+ async getDicAnnuityTypeList() {
138
+ return await this.axiosCall<Value[]>({
157
139
  method: Methods.GET,
158
- url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName${queryData.middleName}`,
140
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicAnnuityType',
159
141
  });
160
142
  }
161
143
 
162
- async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
163
- return this.axiosCall({
144
+ async getCurrencies() {
145
+ return await this.axiosCall<{ eur: number; usd: number }>({
164
146
  method: Methods.GET,
165
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
147
+ url: '/Ekk/api/Currency/GetExchange',
166
148
  });
167
149
  }
168
150
 
169
- async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
170
- return this.axiosCall({
151
+ async getContragent(queryData: GetContragentRequest) {
152
+ return await this.axiosCall<GetContragentResponse>({
171
153
  method: Methods.GET,
172
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
154
+ url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
155
+ });
156
+ }
157
+
158
+ async getInsurancePay() {
159
+ return await this.axiosCall<Value[]>({
160
+ method: Methods.GET,
161
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicBeneficiaryInsurancePay',
162
+ });
163
+ }
164
+
165
+ async getQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
166
+ return await this.axiosCall<AnketaFirst>({
167
+ method: Methods.GET,
168
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
169
+ });
170
+ }
171
+
172
+ async getClientQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
173
+ return await this.axiosCall<AnketaFirst>({
174
+ method: Methods.GET,
175
+ url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
176
+ });
177
+ }
178
+
179
+ async getQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
180
+ return await this.axiosCall<AnketaSecond[]>({
181
+ method: Methods.GET,
182
+ url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
183
+ });
184
+ }
185
+
186
+ async getClientQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
187
+ return await this.axiosCall<AnketaSecond[]>({
188
+ method: Methods.GET,
189
+ url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
173
190
  });
174
191
  }
175
192
 
176
193
  async definedAnswers(filter: string) {
177
- return this.axiosCall({
194
+ return await this.axiosCall({
178
195
  method: Methods.GET,
179
- url: `/ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
196
+ url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
180
197
  });
181
198
  }
182
199
 
183
200
  async setSurvey(surveyData: AnketaFirst) {
184
- return this.axiosCall({
201
+ return await this.axiosCall<string>({
185
202
  method: Methods.POST,
186
203
  data: surveyData,
187
204
  url: `/${this.productUrl}/api/Application/SetAnketa`,
188
205
  });
189
206
  }
190
207
 
191
- async getQuestionRefs(id: string | number): Promise<Value[]> {
192
- return this.axiosCall({
208
+ async getQuestionRefs(id: string | number) {
209
+ return await this.axiosCall<Value[]>({
193
210
  method: Methods.GET,
194
211
  url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${id}`,
195
212
  });
196
213
  }
197
214
 
198
215
  async getProcessIndexRate(processCode: string | number) {
199
- return this.axiosCall({
216
+ return await this.axiosCall({
200
217
  method: Methods.GET,
201
218
  url: `/Arm/api/Dictionary/ProcessIndexRate/${processCode}`,
202
219
  });
203
220
  }
204
221
 
205
222
  async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
206
- return this.axiosCall({
223
+ return await this.axiosCall<AddCoverAnswer[]>({
207
224
  method: Methods.GET,
208
225
  url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
209
226
  });
210
227
  }
211
228
 
212
229
  async getProcessPaymentPeriod(processCode: string | number) {
213
- return this.axiosCall({
230
+ return await this.axiosCall({
214
231
  method: Methods.GET,
215
232
  url: `/Arm/api/Dictionary/ProcessPaymentPeriod/${processCode}`,
216
233
  });
217
234
  }
218
235
 
219
- async getContragentById(id: any) {
220
- return this.axiosCall({
236
+ async getProcessAnnuityPaymentPeriod(processCode: string | number) {
237
+ return await this.axiosCall({
238
+ method: Methods.GET,
239
+ url: `/Arm/api/Dictionary/ProcessAnnuityPaymentPeriod/${processCode}`,
240
+ });
241
+ }
242
+
243
+ async getContragentById(id: number) {
244
+ return await this.axiosCall<GetContragentResponse>({
221
245
  method: Methods.GET,
222
246
  url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
223
247
  });
224
248
  }
225
249
 
226
- async saveContragent(data: any) {
227
- return this.axiosCall({
250
+ async saveContragent(data: {
251
+ contragent: ContragentType;
252
+ questionaries: ContragentQuestionaries[];
253
+ contacts: ContragentContacts[];
254
+ documents: ContragentDocuments[];
255
+ addresses: ContragentAddress[];
256
+ }) {
257
+ return await this.axiosCall<number>({
228
258
  method: Methods.POST,
229
259
  url: `/Ekk/api/Contragentinsis/SaveContragent`,
230
260
  data: data,
@@ -234,7 +264,7 @@ export class ApiClass {
234
264
  async getFile(id: string) {
235
265
  return await this.axiosCall({
236
266
  method: Methods.GET,
237
- url: `/Arm/api/File/DownloadFile/${id}`,
267
+ url: `/File/api/Data/DownloadFile/${id}`,
238
268
  responseType: 'arraybuffer',
239
269
  headers: {
240
270
  'Content-Type': 'application/pdf',
@@ -243,113 +273,112 @@ export class ApiClass {
243
273
  }
244
274
 
245
275
  async getDicFileTypeList() {
246
- return this.axiosCall({
276
+ return await this.axiosCall<Value[]>({
247
277
  method: Methods.GET,
248
278
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
249
279
  });
250
280
  }
251
281
 
252
282
  async getContrAgentData(personId: string | number) {
253
- return this.axiosCall({
283
+ return await this.axiosCall<ContragentQuestionaries[]>({
254
284
  method: Methods.GET,
255
285
  url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
256
286
  });
257
287
  }
258
288
 
259
289
  async getContrAgentContacts(personId: string | number) {
260
- return this.axiosCall({
290
+ return await this.axiosCall<ContragentContacts[]>({
261
291
  method: Methods.GET,
262
292
  url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
263
293
  });
264
294
  }
265
295
 
266
296
  async getContrAgentDocuments(personId: string | number) {
267
- return this.axiosCall({
297
+ return await this.axiosCall<ContragentDocuments[]>({
268
298
  method: Methods.GET,
269
299
  url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
270
300
  });
271
301
  }
272
302
 
273
303
  async getContrAgentAddress(personId: string | number) {
274
- return this.axiosCall({
304
+ return await this.axiosCall<ContragentAddress[]>({
275
305
  method: Methods.GET,
276
306
  url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
277
307
  });
278
308
  }
279
309
 
280
- async getTaskList(data: any): Promise<{ items: TaskListItem[]; totalItems: number }> {
281
- return this.axiosCall({
310
+ async getTaskList(data: any) {
311
+ return await this.axiosCall<{ items: TaskListItem[]; totalItems: number }>({
282
312
  method: Methods.POST,
283
313
  url: `/Arm/api/Bpm/TaskList`,
284
314
  data: data,
285
315
  });
286
316
  }
287
317
 
288
- async getProcessHistory(id: string): Promise<TaskHistory[]> {
289
- return this.axiosCall({
318
+ async getProcessHistory(id: string) {
319
+ return await this.axiosCall<TaskHistory[]>({
290
320
  url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
291
321
  });
292
322
  }
293
323
 
294
- async sendSms(data: { phone: string; template: string; tempFlags: { url: string } }): Promise<void> {
295
- return this.axiosCall({
296
- baseURL: import.meta.env.VITE_SMS_SERVICE as string,
324
+ async registerNumber(data: RegNumberDataType) {
325
+ return await this.axiosCall<string>({
297
326
  method: Methods.POST,
298
- url: '/message',
327
+ url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
299
328
  data: data,
300
329
  });
301
330
  }
302
331
 
303
- async getUserGroups(): Promise<Item[]> {
304
- return this.axiosCall({
305
- method: Methods.GET,
306
- url: '/Arm/api/Bpm/TaskGroups',
332
+ async sendSms(data: SmsDataType) {
333
+ return await this.axiosCall<void>({
334
+ method: Methods.POST,
335
+ url: '/Arm/api/Otp/SmsText',
336
+ data: data,
307
337
  });
308
338
  }
309
339
 
310
- async getDictionaryItems(dictName: string) {
311
- return this.axiosCall({
340
+ async getUserGroups() {
341
+ return await this.axiosCall<Item[]>({
312
342
  method: Methods.GET,
313
- url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
343
+ url: '/Arm/api/Bpm/TaskGroups',
314
344
  });
315
345
  }
316
346
 
317
- async getOtpStatus(data: OtpDataType): Promise<boolean> {
318
- return this.axiosCall({
347
+ async getOtpStatus(data: OtpDataType) {
348
+ return await this.axiosCall<boolean>({
319
349
  method: Methods.POST,
320
350
  url: '/Arm/api/Otp/OtpLifeStatus',
321
351
  data: data,
322
352
  });
323
353
  }
324
354
 
325
- async sendOtp(data: OtpDataType): Promise<SendOtpResponse> {
326
- return this.axiosCall({
355
+ async sendOtp(data: OtpDataType) {
356
+ return await this.axiosCall<SendOtpResponse>({
327
357
  method: Methods.POST,
328
358
  url: '/Arm/api/Otp/Get',
329
359
  data: data,
330
360
  });
331
361
  }
332
362
 
333
- async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }): Promise<SendOtpResponse> {
334
- return this.axiosCall({
363
+ async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }) {
364
+ return await this.axiosCall<SendOtpResponse>({
335
365
  method: Methods.POST,
336
366
  url: '/Arm/api/Otp/Check',
337
367
  data: data,
338
368
  });
339
369
  }
340
370
 
341
- async getProcessList(): Promise<Item[]> {
342
- return this.axiosCall({
371
+ async getProcessList() {
372
+ return await this.axiosCall<Item[]>({
343
373
  method: Methods.GET,
344
374
  url: '/Arm/api/Bpm/ProcessList',
345
- timeout: 10000,
346
375
  });
347
376
  }
348
377
 
349
- async startApplication(data: StartApplicationType): Promise<{
350
- processInstanceId: string;
351
- }> {
352
- return this.axiosCall({
378
+ async startApplication(data: StartApplicationType) {
379
+ return await this.axiosCall<{
380
+ processInstanceId: string;
381
+ }>({
353
382
  method: Methods.POST,
354
383
  url: `/${this.productUrl}/api/Application/StartApplication`,
355
384
  data: data,
@@ -357,20 +386,20 @@ export class ApiClass {
357
386
  }
358
387
 
359
388
  async getApplicationData(id: string) {
360
- return this.axiosCall({
389
+ return await this.axiosCall<any>({
361
390
  url: `/${this.productUrl}/api/Application/applicationData?Id=${id} `,
362
391
  });
363
392
  }
364
393
 
365
394
  async getCalculation(id: string) {
366
- return this.axiosCall({
395
+ return await this.axiosCall<number>({
367
396
  method: Methods.POST,
368
397
  url: `/${this.productUrl}/api/Application/Calculator?processInstanceId=${id}`,
369
398
  });
370
399
  }
371
400
 
372
- async setApplication(data: any) {
373
- return this.axiosCall({
401
+ async setApplication(data: { policyAppDto: PolicyAppDto; addCoversDto: AddCover[] }) {
402
+ return await this.axiosCall<void>({
374
403
  method: Methods.POST,
375
404
  url: `/${this.productUrl}/api/Application/SetApplicationData`,
376
405
  data,
@@ -378,27 +407,18 @@ export class ApiClass {
378
407
  });
379
408
  }
380
409
 
381
- async generatePdfDocument(data: any) {
382
- return await this.axiosCall({
383
- method: Methods.POST,
384
- url: `/Arm/api/Bpm/GeneratePdfDocument`,
385
- responseType: 'blob',
386
- data: data,
387
- });
388
- }
389
-
390
410
  async deleteFile(data: any) {
391
- return this.axiosCall({
411
+ return await this.axiosCall({
392
412
  method: Methods.POST,
393
- url: '/Arm/api/File/DeleteFiles',
413
+ url: '/File/api/Data/DeleteFiles',
394
414
  data: data,
395
415
  });
396
416
  }
397
417
 
398
418
  async uploadFiles(data: any) {
399
- return this.axiosCall({
419
+ return await this.axiosCall({
400
420
  method: Methods.POST,
401
- url: '/Arm/api/File/UploadFiles',
421
+ url: '/File/api/Data/UploadFiles',
402
422
  headers: {
403
423
  'Content-Type': 'multipart/form-data',
404
424
  },
@@ -406,99 +426,106 @@ export class ApiClass {
406
426
  });
407
427
  }
408
428
 
409
- async sendTask(data: any) {
410
- return this.axiosCall({
429
+ async sendTask(data: SendTask) {
430
+ return await this.axiosCall<void>({
411
431
  method: Methods.POST,
412
432
  url: `/${this.productUrl}/api/Application/SendTask`,
413
433
  data: data,
414
434
  });
415
435
  }
416
436
 
417
- async setMember(whichMember: string, data: any) {
418
- return this.axiosCall({
437
+ async setMember(whichMember: keyof typeof MemberCodes, data: any) {
438
+ return await this.axiosCall({
419
439
  method: Methods.POST,
420
440
  url: `/Arm/api/BpmMembers/Set${whichMember}`,
421
441
  data: data,
422
442
  });
423
443
  }
424
444
 
425
- async deleteMember(whichMember: string, id: number | string) {
426
- return this.axiosCall({
445
+ async deleteMember(whichMember: keyof typeof MemberCodes, id: number | string) {
446
+ return await this.axiosCall({
427
447
  method: Methods.POST,
428
448
  url: `/Arm/api/BpmMembers/Delete${whichMember}/${id}`,
429
449
  });
430
450
  }
431
451
 
432
- async getInvoiceData(processInstanceId: string) {
433
- return this.axiosCall({
452
+ async getInvoiceData(processInstanceId: string | number) {
453
+ return await this.axiosCall<EpayResponse>({
434
454
  method: Methods.GET,
435
455
  url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
436
456
  });
437
457
  }
438
458
 
439
- async createInvoice(processInstanceId: string, amount: number | string) {
440
- return this.axiosCall({
459
+ async getProcessHistoryLog(historyId: string) {
460
+ return await this.axiosCall({
461
+ method: Methods.GET,
462
+ url: `/Arm/api/Bpm/ProcessHistoryLog/${historyId}`,
463
+ });
464
+ }
465
+
466
+ async createInvoice(processInstanceId: string | number, amount: number | string) {
467
+ return await this.axiosCall<string>({
441
468
  method: Methods.POST,
442
469
  url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
443
470
  });
444
471
  }
445
472
 
446
- async sendToEpay(processInstanceId: string) {
447
- return this.axiosCall({
473
+ async sendToEpay(processInstanceId: string | number) {
474
+ return await this.axiosCall<EpayShortResponse>({
448
475
  method: Methods.POST,
449
476
  url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
450
477
  });
451
478
  }
452
479
 
453
- async signToDocument(data: any) {
454
- return this.axiosCall({
480
+ async signDocument(data: SignDataType[]) {
481
+ return await this.axiosCall<SignUrlType[]>({
455
482
  method: Methods.POST,
456
- url: '/Arm/api/Bpm/SignDocument',
483
+ url: '/File/api/Document/SignBts',
457
484
  data: data,
458
485
  });
459
486
  }
460
487
 
461
- async getSignedDocList(data: { processInstanceId: string }): Promise<IDocument[]> {
462
- return this.axiosCall({
488
+ async getSignedDocList(data: { processInstanceId: string | number }) {
489
+ return await this.axiosCall<IDocument[]>({
463
490
  method: Methods.POST,
464
- url: '/Arm/api/File/List',
491
+ url: '/File/api/Data/List',
465
492
  data: data,
466
493
  });
467
494
  }
468
495
 
469
- async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
470
- return this.axiosCall({
496
+ async calculateWithoutApplication(data: RecalculationDataType, product: string | undefined | null = this.productUrl) {
497
+ return await this.axiosCall<RecalculationResponseType>({
471
498
  method: Methods.POST,
472
- url: `/${this.productUrl}/api/Application/Calculate`,
499
+ url: `/${product}/api/Application/Calculate`,
473
500
  data: data,
474
501
  });
475
502
  }
476
503
 
477
- async getDefaultCalculationData(): Promise<RecalculationDataType> {
478
- return this.axiosCall({
504
+ async getDefaultCalculationData(product: string | undefined | null = this.productUrl) {
505
+ return await this.axiosCall<RecalculationDataType>({
479
506
  method: Methods.GET,
480
- url: `/${this.productUrl}/api/Application/DefaultCalculatorValues`,
507
+ url: `/${product}/api/Application/DefaultCalculatorValues`,
481
508
  });
482
509
  }
483
510
 
484
511
  async reCalculate(data: any) {
485
- return this.axiosCall({
512
+ return await this.axiosCall({
486
513
  method: Methods.POST,
487
514
  url: `/${this.productUrl}/api/Application/Recalculate`,
488
515
  data: data,
489
516
  });
490
517
  }
491
518
 
492
- async getValidateClientESBD(data: ESBDValidationType): Promise<ESBDResponseType> {
493
- return this.axiosCall({
519
+ async getValidateClientESBD(data: ESBDValidationType) {
520
+ return await this.axiosCall<ESBDResponseType>({
494
521
  method: Methods.POST,
495
522
  url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
496
523
  data: data,
497
524
  });
498
525
  }
499
526
 
500
- async isClaimTask(taskId: string): Promise<boolean> {
501
- return this.axiosCall({
527
+ async isClaimTask(taskId: string) {
528
+ return await this.axiosCall<boolean>({
502
529
  method: Methods.POST,
503
530
  url: '/Arm/api/Bpm/IsClaimTask',
504
531
  params: { TaskId: taskId },
@@ -506,23 +533,23 @@ export class ApiClass {
506
533
  }
507
534
 
508
535
  async claimTask(taskId: string) {
509
- return this.axiosCall({
536
+ return await this.axiosCall({
510
537
  method: Methods.POST,
511
538
  url: '/Arm/api/Bpm/ClaimTaskUser',
512
539
  params: { TaskId: taskId },
513
540
  });
514
541
  }
515
542
 
516
- async getContragentFromGBDFL(data: { iin: string; phoneNumber: string }): Promise<GBDFLResponse> {
517
- return this.axiosCall({
543
+ async getContragentFromGBDFL(data: { iin: string; phoneNumber: string }) {
544
+ return await this.axiosCall<GBDFLResponse>({
518
545
  method: Methods.POST,
519
546
  url: '/externalservices/api/ExternalServices/GetGbdflToken',
520
547
  data: data,
521
548
  });
522
549
  }
523
550
 
524
- async getFamilyInfo(data: { iin: string; phoneNumber: string }): Promise<FamilyInfoGKB> {
525
- return this.axiosCall({
551
+ async getFamilyInfo(data: { iin: string; phoneNumber: string }) {
552
+ return await this.axiosCall<FamilyInfoGKB>({
526
553
  method: Methods.POST,
527
554
  url: '/externalservices/api/ExternalServices/GetFamilyInfoToken',
528
555
  data: data,
@@ -530,11 +557,11 @@ export class ApiClass {
530
557
  }
531
558
 
532
559
  async getProcessTariff(code: number | string = 5) {
533
- return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
560
+ return await this.axiosCall({ url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
534
561
  }
535
562
 
536
563
  async setConfirmation(data: any) {
537
- return this.axiosCall({
564
+ return await this.axiosCall({
538
565
  method: Methods.POST,
539
566
  url: '/Arm/api/UnderwritingCouncil/SetConfirmation',
540
567
  data: data,
@@ -542,39 +569,53 @@ export class ApiClass {
542
569
  }
543
570
 
544
571
  async getUnderwritingCouncilData(id: string | number) {
545
- return this.axiosCall({
572
+ return await this.axiosCall({
546
573
  method: Methods.GET,
547
574
  url: `/Arm/api/UnderwritingCouncil/ApplicationData?Id=${id}`,
548
575
  });
549
576
  }
550
577
 
551
- async sendUnderwritingCouncilTask(data: any) {
552
- return this.axiosCall({
578
+ async sendUnderwritingCouncilTask(data: Partial<SendTask>) {
579
+ return await this.axiosCall<void>({
553
580
  method: Methods.POST,
554
- url: '/arm/api/UnderwritingCouncil/SendTask',
581
+ url: '/Arm/api/UnderwritingCouncil/SendTask',
555
582
  data: data,
556
583
  });
557
584
  }
558
585
 
586
+ async getDictionaryItems(dictName: string) {
587
+ return await this.axiosCall<Value[]>({
588
+ method: Methods.GET,
589
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
590
+ });
591
+ }
592
+
559
593
  async filterManagerByRegion(dictName: string, filterName: string) {
560
- return this.axiosCall({
594
+ return await this.axiosCall<Value[]>({
561
595
  method: Methods.GET,
562
- url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
596
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
563
597
  });
564
598
  }
565
599
 
566
- async setINSISWorkData(data: any) {
567
- return this.axiosCall({
600
+ async setINSISWorkData(data: InsisWorkDataApp) {
601
+ return await this.axiosCall({
568
602
  method: Methods.POST,
569
- url: `/arm/api/Bpm/SetInsisWorkData`,
603
+ url: `/Arm/api/Bpm/SetInsisWorkData`,
570
604
  data: data,
571
605
  });
572
606
  }
573
607
 
574
608
  async searchAgentByName(name: string) {
575
- return this.axiosCall({
609
+ return await this.axiosCall<AgentData[]>({
610
+ method: Methods.GET,
611
+ url: `/Ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
612
+ });
613
+ }
614
+
615
+ async isCourseChanged(processInstanceId: string) {
616
+ return await this.axiosCall<boolean>({
576
617
  method: Methods.GET,
577
- url: `/ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
618
+ url: `/${this.productUrl}/api/Application/IsCourseChanged?processInstanceId=${processInstanceId}`,
578
619
  });
579
620
  }
580
621
  }