hl-core 0.0.9-beta.5 → 0.0.9-beta.51
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.
- package/api/base.api.ts +1042 -0
- package/api/index.ts +2 -620
- package/api/interceptors.ts +53 -14
- package/components/Button/Btn.vue +2 -2
- package/components/Complex/MessageBlock.vue +2 -2
- package/components/Complex/Page.vue +1 -1
- package/components/Dialog/Dialog.vue +60 -15
- package/components/Form/DynamicForm.vue +100 -0
- package/components/Form/FormBlock.vue +12 -3
- package/components/Form/FormData.vue +110 -0
- package/components/Form/FormSection.vue +3 -3
- package/components/Form/FormToggle.vue +25 -5
- package/components/Form/ManagerAttachment.vue +150 -86
- package/components/Form/ProductConditionsBlock.vue +59 -6
- package/components/Input/Datepicker.vue +43 -7
- package/components/Input/DynamicInput.vue +23 -0
- package/components/Input/FileInput.vue +25 -5
- package/components/Input/FormInput.vue +7 -4
- package/components/Input/Monthpicker.vue +34 -0
- package/components/Input/PanelInput.vue +5 -1
- package/components/Input/RoundedEmptyField.vue +5 -0
- package/components/Input/RoundedSelect.vue +18 -0
- package/components/Input/SwitchInput.vue +64 -0
- package/components/Input/TextInput.vue +160 -0
- package/components/Layout/Drawer.vue +17 -4
- package/components/Layout/Header.vue +23 -2
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +13 -7
- package/components/Menu/InfoMenu.vue +35 -0
- package/components/Menu/MenuNav.vue +17 -2
- package/components/Pages/Anketa.vue +140 -52
- package/components/Pages/Auth.vue +50 -9
- package/components/Pages/ContragentForm.vue +124 -50
- package/components/Pages/Documents.vue +179 -29
- package/components/Pages/InvoiceInfo.vue +1 -1
- package/components/Pages/MemberForm.vue +605 -116
- package/components/Pages/ProductAgreement.vue +1 -8
- package/components/Pages/ProductConditions.vue +1055 -183
- package/components/Panel/PanelHandler.vue +583 -46
- package/components/Panel/PanelSelectItem.vue +17 -2
- package/components/Panel/RightPanelCloser.vue +7 -0
- package/components/Transitions/Animation.vue +28 -0
- package/components/Utilities/Qr.vue +44 -0
- package/composables/axios.ts +1 -0
- package/composables/classes.ts +456 -8
- package/composables/constants.ts +114 -2
- package/composables/fields.ts +328 -0
- package/composables/index.ts +270 -19
- package/composables/styles.ts +29 -16
- package/layouts/default.vue +48 -3
- package/locales/ru.json +547 -14
- package/package.json +28 -24
- package/pages/Token.vue +1 -12
- package/plugins/vuetifyPlugin.ts +2 -0
- package/store/data.store.ts +1463 -275
- package/store/extractStore.ts +17 -0
- package/store/form.store.ts +13 -1
- package/store/member.store.ts +1 -1
- package/store/rules.ts +83 -5
- package/types/enum.ts +61 -0
- package/types/env.d.ts +1 -0
- package/types/form.ts +94 -0
- package/types/index.ts +259 -23
package/api/base.api.ts
ADDED
|
@@ -0,0 +1,1042 @@
|
|
|
1
|
+
import { MemberCodes, Methods } from '../types/enum';
|
|
2
|
+
import { useAxiosInstance } from '../composables/axios';
|
|
3
|
+
import { Value, IDocument, CountryValue } from '../composables/classes';
|
|
4
|
+
|
|
5
|
+
export class ApiClass {
|
|
6
|
+
private readonly baseURL: string = import.meta.env.VITE_BASE_URL as string;
|
|
7
|
+
private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
|
|
8
|
+
|
|
9
|
+
private async axiosCall<T>(config: AxiosRequestLocalConfig): Promise<T> {
|
|
10
|
+
const { data } = await useAxiosInstance(this.baseURL).request<T>(config);
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async loginUser(data: { login: string; password: string; numAttempt: number }) {
|
|
15
|
+
return await this.axiosCall<{ refreshToken: string; accessToken: string }>({
|
|
16
|
+
method: Methods.POST,
|
|
17
|
+
url: '/identity/api/Account/login',
|
|
18
|
+
data: data,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async getNewAccessToken({ refreshToken, accessToken }: { refreshToken: string; accessToken: string }) {
|
|
23
|
+
return await this.axiosCall<{ refreshToken: string; accessToken: string }>({
|
|
24
|
+
method: Methods.POST,
|
|
25
|
+
url: '/identity/api/Account/refresh',
|
|
26
|
+
headers: {
|
|
27
|
+
'X-Refresh-Token': refreshToken,
|
|
28
|
+
'X-Access-Token': accessToken,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async getCountries() {
|
|
34
|
+
return await this.axiosCall<Value[]>({
|
|
35
|
+
method: Methods.GET,
|
|
36
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Country',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async getCitizenshipCountries() {
|
|
41
|
+
return await this.axiosCall<Value[]>({
|
|
42
|
+
method: Methods.GET,
|
|
43
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500012',
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async getTaxCountries() {
|
|
48
|
+
return await this.axiosCall<Value[]>({
|
|
49
|
+
method: Methods.GET,
|
|
50
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500014',
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async getAdditionalTaxCountries() {
|
|
55
|
+
return await this.axiosCall<Value[]>({
|
|
56
|
+
method: Methods.GET,
|
|
57
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=507777',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async getStates() {
|
|
62
|
+
return await this.axiosCall<Value[]>({
|
|
63
|
+
method: Methods.GET,
|
|
64
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/State',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async getRegions() {
|
|
69
|
+
return await this.axiosCall<Value[]>({
|
|
70
|
+
method: Methods.GET,
|
|
71
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Region',
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async getCities() {
|
|
76
|
+
return await this.axiosCall<Value[]>({
|
|
77
|
+
method: Methods.GET,
|
|
78
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/CityVillage',
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async getLocalityTypes() {
|
|
83
|
+
return await this.axiosCall<Value[]>({
|
|
84
|
+
method: Methods.GET,
|
|
85
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/LocalityType',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async getDocumentTypes() {
|
|
90
|
+
return await this.axiosCall<Value[]>({
|
|
91
|
+
method: Methods.GET,
|
|
92
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/DocumentTypePhys',
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async getDocumentIssuers() {
|
|
97
|
+
return await this.axiosCall<Value[]>({
|
|
98
|
+
method: Methods.GET,
|
|
99
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/DocIssuer',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async getResidents() {
|
|
104
|
+
return await this.axiosCall<Value[]>({
|
|
105
|
+
method: Methods.GET,
|
|
106
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500011',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
async getSectorCode() {
|
|
111
|
+
return await this.axiosCall<Value[]>({
|
|
112
|
+
method: Methods.GET,
|
|
113
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500003',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async getEconomicActivityType() {
|
|
118
|
+
return await this.axiosCall<Value[]>({
|
|
119
|
+
method: Methods.GET,
|
|
120
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500024',
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async getFamilyStatuses() {
|
|
125
|
+
return await this.axiosCall<Value[]>({
|
|
126
|
+
method: Methods.GET,
|
|
127
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFamilyStatus',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async getRelationTypes() {
|
|
132
|
+
return await this.axiosCall<Value[]>({
|
|
133
|
+
method: Methods.GET,
|
|
134
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Relation',
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async getBanks() {
|
|
139
|
+
return await this.axiosCall<Value[]>({
|
|
140
|
+
method: Methods.GET,
|
|
141
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/Bank',
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async getInsuranceCompanies() {
|
|
146
|
+
return await this.axiosCall<Value[]>({
|
|
147
|
+
method: Methods.GET,
|
|
148
|
+
url: '/Ekk/api/Contragentinsis/DictionaryItems/InsCompany',
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async getDicAnnuityTypeList() {
|
|
153
|
+
return await this.axiosCall<Value[]>({
|
|
154
|
+
method: Methods.GET,
|
|
155
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicAnnuityType',
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async getCurrencies() {
|
|
160
|
+
return await this.axiosCall<{ eur: number; usd: number }>({
|
|
161
|
+
method: Methods.GET,
|
|
162
|
+
url: '/Ekk/api/Currency/GetExchange',
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
async getContragent(queryData: GetContragentRequest) {
|
|
167
|
+
return await this.axiosCall<GetContragentResponse>({
|
|
168
|
+
method: Methods.GET,
|
|
169
|
+
url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
async getInsurancePay() {
|
|
174
|
+
return await this.axiosCall<Value[]>({
|
|
175
|
+
method: Methods.GET,
|
|
176
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicBeneficiaryInsurancePay',
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
async getQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
|
|
181
|
+
return await this.axiosCall<AnketaFirst>({
|
|
182
|
+
method: Methods.GET,
|
|
183
|
+
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async getClientQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
|
|
188
|
+
return await this.axiosCall<AnketaFirst>({
|
|
189
|
+
method: Methods.GET,
|
|
190
|
+
url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
async getQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
|
|
195
|
+
return await this.axiosCall<AnketaSecond[]>({
|
|
196
|
+
method: Methods.GET,
|
|
197
|
+
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async getClientQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string) {
|
|
202
|
+
return await this.axiosCall<AnketaSecond[]>({
|
|
203
|
+
method: Methods.GET,
|
|
204
|
+
url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
async definedAnswers(filter: string) {
|
|
209
|
+
return await this.axiosCall({
|
|
210
|
+
method: Methods.GET,
|
|
211
|
+
url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
async setSurvey(surveyData: AnketaFirst) {
|
|
216
|
+
return await this.axiosCall<string>({
|
|
217
|
+
method: Methods.POST,
|
|
218
|
+
data: surveyData,
|
|
219
|
+
url: `/${this.productUrl}/api/Application/SetAnketa`,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
async getQuestionRefs(id: string | number) {
|
|
224
|
+
return await this.axiosCall<Value[]>({
|
|
225
|
+
method: Methods.GET,
|
|
226
|
+
url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${id}`,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
async getProcessIndexRate(processCode: string | number) {
|
|
231
|
+
return await this.axiosCall({
|
|
232
|
+
method: Methods.GET,
|
|
233
|
+
url: `/Arm/api/Dictionary/ProcessIndexRate/${processCode}`,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
|
|
238
|
+
return await this.axiosCall<AddCoverAnswer[]>({
|
|
239
|
+
method: Methods.GET,
|
|
240
|
+
url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
async getProcessCoverTypePeriod(processCode: string | number, questionId: string) {
|
|
245
|
+
return await this.axiosCall<AddCoverAnswer[]>({
|
|
246
|
+
method: Methods.GET,
|
|
247
|
+
url: `/Arm/api/Dictionary/GetProcessCoverTypePeriod/${processCode}/${questionId}`,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
async getProcessPaymentPeriod(processCode: string | number) {
|
|
252
|
+
return await this.axiosCall({
|
|
253
|
+
method: Methods.GET,
|
|
254
|
+
url: `/Arm/api/Dictionary/ProcessPaymentPeriod/${processCode}`,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
async getProcessAnnuityPaymentPeriod(processCode: string | number) {
|
|
259
|
+
return await this.axiosCall({
|
|
260
|
+
method: Methods.GET,
|
|
261
|
+
url: `/Arm/api/Dictionary/ProcessAnnuityPaymentPeriod/${processCode}`,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
async getContragentById(id: number) {
|
|
266
|
+
return await this.axiosCall<GetContragentResponse>({
|
|
267
|
+
method: Methods.GET,
|
|
268
|
+
url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
async saveContragent(data: {
|
|
273
|
+
contragent: ContragentType;
|
|
274
|
+
questionaries: ContragentQuestionaries[];
|
|
275
|
+
contacts: ContragentContacts[];
|
|
276
|
+
documents: ContragentDocuments[];
|
|
277
|
+
addresses: ContragentAddress[];
|
|
278
|
+
}) {
|
|
279
|
+
return await this.axiosCall<number>({
|
|
280
|
+
method: Methods.POST,
|
|
281
|
+
url: `/Ekk/api/Contragentinsis/SaveContragent`,
|
|
282
|
+
data: data,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
async getFile(id: string) {
|
|
287
|
+
return await this.axiosCall({
|
|
288
|
+
method: Methods.GET,
|
|
289
|
+
url: `/File/api/Data/DownloadFile/${id}`,
|
|
290
|
+
responseType: 'arraybuffer',
|
|
291
|
+
headers: {
|
|
292
|
+
'Content-Type': 'application/pdf',
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
async getDicFileTypeList() {
|
|
298
|
+
return await this.axiosCall<Value[]>({
|
|
299
|
+
method: Methods.GET,
|
|
300
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async getContrAgentData(personId: string | number) {
|
|
305
|
+
return await this.axiosCall<ContragentQuestionaries[]>({
|
|
306
|
+
method: Methods.GET,
|
|
307
|
+
url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
async getContrAgentContacts(personId: string | number) {
|
|
312
|
+
return await this.axiosCall<ContragentContacts[]>({
|
|
313
|
+
method: Methods.GET,
|
|
314
|
+
url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
async getContrAgentDocuments(personId: string | number) {
|
|
319
|
+
return await this.axiosCall<ContragentDocuments[]>({
|
|
320
|
+
method: Methods.GET,
|
|
321
|
+
url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
async getContrAgentAddress(personId: string | number) {
|
|
326
|
+
return await this.axiosCall<ContragentAddress[]>({
|
|
327
|
+
method: Methods.GET,
|
|
328
|
+
url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
async getTaskList(data: any) {
|
|
333
|
+
return await this.axiosCall<{ items: TaskListItem[]; totalItems: number }>({
|
|
334
|
+
method: Methods.POST,
|
|
335
|
+
url: `/Arm/api/Bpm/TaskList`,
|
|
336
|
+
data: data,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
async getProcessHistory(id: string) {
|
|
341
|
+
return await this.axiosCall<TaskHistory[]>({
|
|
342
|
+
method: Methods.GET,
|
|
343
|
+
url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
async registerNumber(data: RegNumberDataType) {
|
|
348
|
+
return await this.axiosCall<string>({
|
|
349
|
+
method: Methods.POST,
|
|
350
|
+
url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
|
|
351
|
+
data: data,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
async sendSms(data: SmsDataType) {
|
|
356
|
+
return await this.axiosCall<void>({
|
|
357
|
+
method: Methods.POST,
|
|
358
|
+
url: '/Arm/api/Otp/SmsText',
|
|
359
|
+
data: data,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
async getUserGroups() {
|
|
364
|
+
return await this.axiosCall<Item[]>({
|
|
365
|
+
method: Methods.GET,
|
|
366
|
+
url: '/Arm/api/Bpm/TaskGroups',
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
async getOtpStatus(data: OtpDataType) {
|
|
371
|
+
return await this.axiosCall<boolean>({
|
|
372
|
+
method: Methods.POST,
|
|
373
|
+
url: '/Arm/api/Otp/OtpLifeStatus',
|
|
374
|
+
data: data,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
async sendOtp(data: OtpDataType) {
|
|
379
|
+
return await this.axiosCall<SendOtpResponse>({
|
|
380
|
+
method: Methods.POST,
|
|
381
|
+
url: '/Arm/api/Otp/Get',
|
|
382
|
+
data: data,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }) {
|
|
387
|
+
return await this.axiosCall<SendOtpResponse>({
|
|
388
|
+
method: Methods.POST,
|
|
389
|
+
url: '/Arm/api/Otp/Check',
|
|
390
|
+
data: data,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
async getProcessList() {
|
|
395
|
+
return await this.axiosCall<Item[]>({
|
|
396
|
+
method: Methods.GET,
|
|
397
|
+
url: '/Arm/api/Bpm/ProcessList',
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
async startApplication(data: any) {
|
|
402
|
+
return await this.axiosCall<{
|
|
403
|
+
processInstanceId: string;
|
|
404
|
+
}>({
|
|
405
|
+
method: Methods.POST,
|
|
406
|
+
url: `/${this.productUrl}/api/Application/StartApplication`,
|
|
407
|
+
data: data,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
async getApplicationData(id: string) {
|
|
412
|
+
return await this.axiosCall<any>({
|
|
413
|
+
method: Methods.GET,
|
|
414
|
+
url: `/${this.productUrl}/api/Application/applicationData?Id=${id} `,
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
async getGovernmentPremiums(id: string) {
|
|
419
|
+
return await this.axiosCall<GovPremiums>({
|
|
420
|
+
method: Methods.POST,
|
|
421
|
+
url: `/${this.productUrl}/api/Application/getGovernmentPremiums?processInstanceId=${id} `,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
async getCalculation(id: string) {
|
|
426
|
+
return await this.axiosCall<number>({
|
|
427
|
+
method: Methods.POST,
|
|
428
|
+
url: `/${this.productUrl}/api/Application/Calculator?processInstanceId=${id}`,
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
async setApplication(data: SetApplicationRequest) {
|
|
433
|
+
return await this.axiosCall<void>({
|
|
434
|
+
method: Methods.POST,
|
|
435
|
+
url: `/${this.productUrl}/api/Application/SetApplicationData`,
|
|
436
|
+
data,
|
|
437
|
+
responseType: 'blob',
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
async deleteFile(data: any) {
|
|
442
|
+
return await this.axiosCall<void>({
|
|
443
|
+
method: Methods.POST,
|
|
444
|
+
url: '/File/api/Data/DeleteFiles',
|
|
445
|
+
data: data,
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
async uploadFiles(data: any) {
|
|
450
|
+
return await this.axiosCall({
|
|
451
|
+
method: Methods.POST,
|
|
452
|
+
url: '/File/api/Data/UploadFiles',
|
|
453
|
+
headers: {
|
|
454
|
+
'Content-Type': 'multipart/form-data',
|
|
455
|
+
},
|
|
456
|
+
data: data,
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
async sendTask(data: SendTask) {
|
|
461
|
+
return await this.axiosCall<void>({
|
|
462
|
+
method: Methods.POST,
|
|
463
|
+
url: `/${this.productUrl}/api/Application/SendTask`,
|
|
464
|
+
data: data,
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
async checkBeneficiariesInActualPolicy(iin: string) {
|
|
469
|
+
return await this.axiosCall<boolean>({
|
|
470
|
+
method: Methods.GET,
|
|
471
|
+
url: `/${this.productUrl}/api/Application/CheckBeneficiariesInActualPolicy?iin=${iin}`,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
async setMember(whichMember: keyof typeof MemberCodes, data: any) {
|
|
476
|
+
return await this.axiosCall({
|
|
477
|
+
method: Methods.POST,
|
|
478
|
+
url: `/Arm/api/BpmMembers/Set${whichMember}`,
|
|
479
|
+
data: data,
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
async deleteMember(whichMember: keyof typeof MemberCodes, id: number | string) {
|
|
484
|
+
return await this.axiosCall({
|
|
485
|
+
method: Methods.POST,
|
|
486
|
+
url: `/Arm/api/BpmMembers/Delete${whichMember}/${id}`,
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
async getInvoiceData(processInstanceId: string | number) {
|
|
491
|
+
return await this.axiosCall<EpayResponse>({
|
|
492
|
+
method: Methods.GET,
|
|
493
|
+
url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
async getProcessHistoryLog(historyId: string) {
|
|
498
|
+
return await this.axiosCall({
|
|
499
|
+
method: Methods.GET,
|
|
500
|
+
url: `/Arm/api/Bpm/ProcessHistoryLog/${historyId}`,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
async createInvoice(processInstanceId: string | number, amount: number | string) {
|
|
505
|
+
return await this.axiosCall<string>({
|
|
506
|
+
method: Methods.POST,
|
|
507
|
+
url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
async sendToEpay(processInstanceId: string | number) {
|
|
512
|
+
return await this.axiosCall<EpayShortResponse>({
|
|
513
|
+
method: Methods.POST,
|
|
514
|
+
url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
async signDocument(data: SignDataType[]) {
|
|
519
|
+
return await this.axiosCall<SignUrlType[]>({
|
|
520
|
+
method: Methods.POST,
|
|
521
|
+
url: '/File/api/Document/SignBts',
|
|
522
|
+
data: data,
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
async signQR(data: SignDataType[]) {
|
|
527
|
+
return await this.axiosCall({
|
|
528
|
+
method: Methods.POST,
|
|
529
|
+
url: '/File/api/Sign/SignQr',
|
|
530
|
+
data: data,
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
async generateDocument(data: SignDataType) {
|
|
535
|
+
return await this.axiosCall<void>({
|
|
536
|
+
method: Methods.POST,
|
|
537
|
+
url: '/File/api/Document/Generate',
|
|
538
|
+
responseType: 'arraybuffer',
|
|
539
|
+
data: data,
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
async getSignedDocList(data: { processInstanceId: string | number }) {
|
|
544
|
+
return await this.axiosCall<IDocument[]>({
|
|
545
|
+
method: Methods.POST,
|
|
546
|
+
url: '/File/api/Data/List',
|
|
547
|
+
data: data,
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
async calculateWithoutApplication(data: RecalculationDataType, product: string | undefined | null = this.productUrl) {
|
|
552
|
+
return await this.axiosCall<RecalculationResponseType>({
|
|
553
|
+
method: Methods.POST,
|
|
554
|
+
url: `/${product}/api/Application/Calculate`,
|
|
555
|
+
data: data,
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
async getDefaultCalculationData(product: string | undefined | null = this.productUrl) {
|
|
560
|
+
return await this.axiosCall<RecalculationDataType>({
|
|
561
|
+
method: Methods.GET,
|
|
562
|
+
url: `/${product}/api/Application/DefaultCalculatorValues`,
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
async reCalculate(data: any) {
|
|
567
|
+
return await this.axiosCall({
|
|
568
|
+
method: Methods.POST,
|
|
569
|
+
url: `/${this.productUrl}/api/Application/Recalculate`,
|
|
570
|
+
data: data,
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
async getValidateClientESBD(data: ESBDValidationType) {
|
|
575
|
+
return await this.axiosCall<ESBDResponseType>({
|
|
576
|
+
method: Methods.POST,
|
|
577
|
+
url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
|
|
578
|
+
data: data,
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
async isClaimTask(taskId: string) {
|
|
583
|
+
return await this.axiosCall<boolean>({
|
|
584
|
+
method: Methods.POST,
|
|
585
|
+
url: '/Arm/api/Bpm/IsClaimTask',
|
|
586
|
+
params: { TaskId: taskId },
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
async claimTask(taskId: string) {
|
|
591
|
+
return await this.axiosCall({
|
|
592
|
+
method: Methods.POST,
|
|
593
|
+
url: '/Arm/api/Bpm/ClaimTaskUser',
|
|
594
|
+
params: { TaskId: taskId },
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
async checkIIN(iin: string) {
|
|
599
|
+
return await this.axiosCall<boolean>({
|
|
600
|
+
method: Methods.GET,
|
|
601
|
+
url: `/Arm/api/Bpm/CheckIIN?iin=${iin}`,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
async getContragentFromGBDFL(data: { iin: string; phoneNumber: string }) {
|
|
606
|
+
return await this.axiosCall<GBDFLResponse>({
|
|
607
|
+
method: Methods.POST,
|
|
608
|
+
url: '/externalservices/api/ExternalServices/GetGbdflToken',
|
|
609
|
+
data: data,
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
async getFamilyInfo(data: { iin: string; phoneNumber: string }) {
|
|
614
|
+
return await this.axiosCall<FamilyInfoGKB>({
|
|
615
|
+
method: Methods.POST,
|
|
616
|
+
url: '/externalservices/api/ExternalServices/GetFamilyInfoToken',
|
|
617
|
+
data: data,
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
async getKgd(data: { iinBin: string }, timeout: number = 30000) {
|
|
622
|
+
return await this.axiosCall<KGDResponse>({
|
|
623
|
+
method: Methods.POST,
|
|
624
|
+
url: '/externalservices/api/ExternalServices/GetKgd',
|
|
625
|
+
data: data,
|
|
626
|
+
timeout: timeout,
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
async getGbdUl(data: { userName: string; branchName: string; bin: string }) {
|
|
631
|
+
return await this.axiosCall({
|
|
632
|
+
method: Methods.POST,
|
|
633
|
+
url: '/integration/api/External/GetGbdUl',
|
|
634
|
+
data: data,
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
async getProcessTariff(code: number | string = 5) {
|
|
639
|
+
return await this.axiosCall({ method: Methods.GET, url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
async setConfirmation(data: any) {
|
|
643
|
+
return await this.axiosCall({
|
|
644
|
+
method: Methods.POST,
|
|
645
|
+
url: '/Arm/api/UnderwritingCouncil/SetConfirmation',
|
|
646
|
+
data: data,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
async getUnderwritingCouncilData(id: string | number) {
|
|
651
|
+
return await this.axiosCall({
|
|
652
|
+
method: Methods.GET,
|
|
653
|
+
url: `/Arm/api/UnderwritingCouncil/ApplicationData?Id=${id}`,
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
async sendUnderwritingCouncilTask(data: Partial<SendTask>) {
|
|
658
|
+
return await this.axiosCall<void>({
|
|
659
|
+
method: Methods.POST,
|
|
660
|
+
url: '/Arm/api/UnderwritingCouncil/SendTask',
|
|
661
|
+
data: data,
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
async getDictionaryItems(dictName: string) {
|
|
666
|
+
return await this.axiosCall<Value[]>({
|
|
667
|
+
method: Methods.GET,
|
|
668
|
+
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
async filterManagerByRegion(dictName: string, filterName: string) {
|
|
673
|
+
return await this.axiosCall<Value[]>({
|
|
674
|
+
method: Methods.GET,
|
|
675
|
+
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
async setINSISWorkData(data: InsisWorkDataApp) {
|
|
680
|
+
return await this.axiosCall({
|
|
681
|
+
method: Methods.POST,
|
|
682
|
+
url: `/Arm/api/Bpm/SetInsisWorkData`,
|
|
683
|
+
data: data,
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
async checkAccountNumber(iik: string) {
|
|
688
|
+
return await this.axiosCall<boolean>({
|
|
689
|
+
method: Methods.GET,
|
|
690
|
+
url: `/Arm/api/Bpm/CheckAccountNumber?account=${iik}`,
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
async searchAgentByName(name: string, branchCode?: string) {
|
|
695
|
+
return await this.axiosCall<AgentData[]>({
|
|
696
|
+
method: Methods.GET,
|
|
697
|
+
url: `/Ekk/api/ContragentInsis/Agent${branchCode ? 's' : ''}ByName?${branchCode ? `branchCode=${branchCode}&` : ''}fullName=${name}`,
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
async isCourseChanged(processInstanceId: string) {
|
|
702
|
+
return await this.axiosCall<boolean>({
|
|
703
|
+
method: Methods.GET,
|
|
704
|
+
url: `/${this.productUrl}/api/Application/IsCourseChanged?processInstanceId=${processInstanceId}`,
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
async getArmDicts<T>(dict: string) {
|
|
709
|
+
return await this.axiosCall<T>({
|
|
710
|
+
method: Methods.GET,
|
|
711
|
+
url: `/Arm/api/Dictionary/GetDictionaryItems/${dict}`,
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
async getTripInsuranceDaysOptions() {
|
|
716
|
+
return await this.axiosCall<TripInsuranceDaysOptions>({
|
|
717
|
+
method: Methods.GET,
|
|
718
|
+
url: `/${this.productUrl}/api/Application/TripInsuranceDaysOptions`,
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
async getTripInsuredAmount(data: getTripInsuredAmountRequest) {
|
|
723
|
+
return await this.axiosCall<TripInsuranceAmount>({
|
|
724
|
+
method: Methods.POST,
|
|
725
|
+
url: `/${this.productUrl}/api/Application/InsuranceAmountOptions`,
|
|
726
|
+
data: data,
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
async downloadTemplate(fileType: number, processInstanceId?: string | number) {
|
|
730
|
+
return await this.axiosCall({
|
|
731
|
+
method: Methods.GET,
|
|
732
|
+
url: `/${this.productUrl}/api/Application/DownloadTemplate`,
|
|
733
|
+
responseType: 'arraybuffer',
|
|
734
|
+
params: {
|
|
735
|
+
fileType,
|
|
736
|
+
processInstanceId: processInstanceId ?? null,
|
|
737
|
+
},
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
async sendTemplateToEmail(email: string) {
|
|
742
|
+
return await this.axiosCall({
|
|
743
|
+
method: Methods.GET,
|
|
744
|
+
url: `/${this.productUrl}/api/Application/SendTemplateToEmail?emailTo=${email}`,
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
async sendInvoiceToEmail(processInstanceId: string | number, email: string) {
|
|
749
|
+
return await this.axiosCall({
|
|
750
|
+
method: Methods.GET,
|
|
751
|
+
url: `/${this.productUrl}/api/Application/SendInvoiceToEmail?processInstanceId=${processInstanceId}&emailTo=${email}`,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
async getCalculator(data: SetApplicationRequest) {
|
|
756
|
+
return await this.axiosCall<number>({
|
|
757
|
+
method: Methods.POST,
|
|
758
|
+
url: `/${this.productUrl}/api/Application/Calculator`,
|
|
759
|
+
data: data,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
async saveClient(processInstanceId: string | number, clientId: string | null, data: any) {
|
|
764
|
+
return await this.axiosCall({
|
|
765
|
+
method: Methods.POST,
|
|
766
|
+
url: `/${this.productUrl}/api/Application/saveClient/?processInstanceId=${processInstanceId}&clientId=${clientId}`,
|
|
767
|
+
data: data,
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
async saveAccidentIncidents(processInstanceId: string | number, data: any) {
|
|
772
|
+
return await this.axiosCall({
|
|
773
|
+
method: Methods.POST,
|
|
774
|
+
url: `/${this.productUrl}/api/Application/saveAccidentIncidentsList/?processInstance=${processInstanceId}`,
|
|
775
|
+
data: data,
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
async saveClientActivityTypes(clientId: string | number, data: any) {
|
|
780
|
+
return await this.axiosCall({
|
|
781
|
+
method: Methods.POST,
|
|
782
|
+
url: `/${this.productUrl}/api/Application/saveClientAcivityTypes/?clientId=${clientId}`,
|
|
783
|
+
data: data,
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
async saveBeneficialOwnerList(processInstanceId: string | number, data: any) {
|
|
788
|
+
return await this.axiosCall({
|
|
789
|
+
method: Methods.POST,
|
|
790
|
+
url: `/${this.productUrl}/api/Application/saveBeneficialOwnerList/?processInstanceId=${processInstanceId}`,
|
|
791
|
+
data: data,
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
async saveBeneficialOwner(processInstanceId: string | number, benificiaryId: string | null, data: any) {
|
|
796
|
+
return await this.axiosCall<string>({
|
|
797
|
+
method: Methods.POST,
|
|
798
|
+
url: `/${this.productUrl}/api/Application/saveBeneficialOwner/?processInstanceId=${processInstanceId}&benificiaryId=${benificiaryId}`,
|
|
799
|
+
data: data,
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
async saveInsuredList(processInstanceId: string | number, data: any) {
|
|
804
|
+
return await this.axiosCall({
|
|
805
|
+
method: Methods.POST,
|
|
806
|
+
url: `/${this.productUrl}/api/Application/saveInsuredList/?processInstanceId=${processInstanceId}`,
|
|
807
|
+
data: data,
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
async saveInsured(processInstanceId: string | number, insuredId: string | null, data: any) {
|
|
812
|
+
return await this.axiosCall<string>({
|
|
813
|
+
method: Methods.POST,
|
|
814
|
+
url: `/${this.productUrl}/api/Application/saveInsured/?processInstanceId=${processInstanceId}&insuredId=${insuredId}`,
|
|
815
|
+
data: data,
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
async getProcessGfot(processCode: string | number) {
|
|
820
|
+
return await this.axiosCall<Value[]>({
|
|
821
|
+
method: Methods.GET,
|
|
822
|
+
url: `/Arm/api/Dictionary/ProcessGfot/${processCode}`,
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
async getClientData<T>(clientId: string) {
|
|
827
|
+
return await this.axiosCall<T>({
|
|
828
|
+
method: Methods.GET,
|
|
829
|
+
url: `/${this.productUrl}/api/Application/GetClientData`,
|
|
830
|
+
params: {
|
|
831
|
+
clientId,
|
|
832
|
+
},
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
async getInsuredData<T>(insuredId: string) {
|
|
837
|
+
return await this.axiosCall<T>({
|
|
838
|
+
method: Methods.GET,
|
|
839
|
+
url: `/${this.productUrl}/api/Application/GetInsuredData`,
|
|
840
|
+
params: {
|
|
841
|
+
insuredId,
|
|
842
|
+
},
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
async getBeneficiaryData<T>(beneficiaryId: string) {
|
|
847
|
+
return await this.axiosCall<T>({
|
|
848
|
+
method: Methods.GET,
|
|
849
|
+
url: `/${this.productUrl}/api/Application/GetBeneficiaryData`,
|
|
850
|
+
params: {
|
|
851
|
+
beneficiaryId,
|
|
852
|
+
},
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
async getBeneficialOwnerData<T>(beneficiaryId: string) {
|
|
857
|
+
return await this.axiosCall<T>({
|
|
858
|
+
method: Methods.GET,
|
|
859
|
+
url: `/${this.productUrl}/api/Application/GetBeneficialOwnerData`,
|
|
860
|
+
params: {
|
|
861
|
+
beneficiaryId,
|
|
862
|
+
},
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
async saveClientData<T>(clientId: string, data: T) {
|
|
867
|
+
return await this.axiosCall({
|
|
868
|
+
method: Methods.POST,
|
|
869
|
+
url: `/${this.productUrl}/api/Application/SaveClient`,
|
|
870
|
+
params: {
|
|
871
|
+
clientId,
|
|
872
|
+
},
|
|
873
|
+
data: data,
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
async saveInsuredData<T>(processInstanceId: string, insuredId: string, data: T) {
|
|
878
|
+
return await this.axiosCall({
|
|
879
|
+
method: Methods.POST,
|
|
880
|
+
url: `/${this.productUrl}/api/Application/SaveInsured`,
|
|
881
|
+
params: {
|
|
882
|
+
processInstanceId,
|
|
883
|
+
insuredId: insuredId !== '0' ? insuredId : undefined,
|
|
884
|
+
},
|
|
885
|
+
data: data,
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
async saveBeneficiaryData<T>(processInstanceId: string, benificiaryId: string, data: T) {
|
|
890
|
+
return await this.axiosCall({
|
|
891
|
+
method: Methods.POST,
|
|
892
|
+
url: `/${this.productUrl}/api/Application/SaveBenificiary`,
|
|
893
|
+
params: {
|
|
894
|
+
processInstanceId,
|
|
895
|
+
benificiaryId: benificiaryId !== '0' ? benificiaryId : undefined,
|
|
896
|
+
},
|
|
897
|
+
data: data,
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
async saveBeneficialOwnerData<T>(processInstanceId: string, benificiaryId: string, data: T) {
|
|
902
|
+
return await this.axiosCall({
|
|
903
|
+
method: Methods.POST,
|
|
904
|
+
url: `/${this.productUrl}/api/Application/SaveBeneficialOwner`,
|
|
905
|
+
params: {
|
|
906
|
+
processInstanceId,
|
|
907
|
+
benificiaryId: benificiaryId !== '0' ? benificiaryId : undefined,
|
|
908
|
+
},
|
|
909
|
+
data: data,
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
async setApplicationData(data: SetApplicationRequest) {
|
|
914
|
+
return await this.axiosCall({
|
|
915
|
+
method: Methods.POST,
|
|
916
|
+
url: `/${this.productUrl}/api/Application/SetApplicationData`,
|
|
917
|
+
data: data,
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
async calculate(processInstanceId: string) {
|
|
922
|
+
return await this.axiosCall({
|
|
923
|
+
method: Methods.POST,
|
|
924
|
+
url: `/${this.productUrl}/api/Application/Calculator`,
|
|
925
|
+
params: {
|
|
926
|
+
processInstanceId,
|
|
927
|
+
},
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
async calculatePension(id: string, product: string | undefined | null = this.productUrl) {
|
|
932
|
+
return await this.axiosCall<void>({
|
|
933
|
+
method: Methods.POST,
|
|
934
|
+
url: `/${product}/api/Application/Calculate?Id=${id}`,
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
async calculatePremium(data: any) {
|
|
939
|
+
return await this.axiosCall<any>({
|
|
940
|
+
method: Methods.POST,
|
|
941
|
+
url: `/insuranceCalculator/Calculator/calculatePremium`,
|
|
942
|
+
data: data,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
async generatePdfDocument(data: any) {
|
|
947
|
+
return await this.axiosCall<any>({
|
|
948
|
+
method: Methods.POST,
|
|
949
|
+
url: `/Arm/api/Bpm/generatePdfDocument`,
|
|
950
|
+
data: data,
|
|
951
|
+
responseType: 'arraybuffer',
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
async getVariableData(type: number, processCode: number) {
|
|
956
|
+
return await this.axiosCall<any>({
|
|
957
|
+
method: Methods.GET,
|
|
958
|
+
url: `/Arm/api/Dictionary/GetVariableData/${type}/${processCode}`,
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
async getDocument(id: string) {
|
|
963
|
+
return await this.axiosCall<any>({
|
|
964
|
+
method: Methods.POST,
|
|
965
|
+
url: `/${this.productUrl}/api/Application/GetDocument/${id}`,
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
async uploadXml(data: any) {
|
|
970
|
+
return await this.axiosCall<void>({
|
|
971
|
+
url: `/File/api/Document/UploadXml`,
|
|
972
|
+
method: Methods.POST,
|
|
973
|
+
data: data,
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
async signXml(data: any) {
|
|
978
|
+
return await this.axiosCall<any>({
|
|
979
|
+
url: `/File/api/Sign/SignXml`,
|
|
980
|
+
method: Methods.POST,
|
|
981
|
+
data: data,
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
async signBts(data: any) {
|
|
986
|
+
return await this.axiosCall<ResponseStructure<SignUrlType[]>>({
|
|
987
|
+
url: `/File/api/Sign/SignBts`,
|
|
988
|
+
method: Methods.POST,
|
|
989
|
+
data: data,
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
async generateShortLink(data: { link: string; priority: string }) {
|
|
994
|
+
return await this.axiosCall<{
|
|
995
|
+
id: string;
|
|
996
|
+
link: string;
|
|
997
|
+
}>({
|
|
998
|
+
url: '/notification/shorteners',
|
|
999
|
+
baseURL: getStrValuePerEnv('gatewayApiUrl'),
|
|
1000
|
+
method: Methods.POST,
|
|
1001
|
+
data: data,
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
async checkOsns(bin: string) {
|
|
1006
|
+
return await this.axiosCall<boolean>({
|
|
1007
|
+
method: Methods.GET,
|
|
1008
|
+
url: `/${this.productUrl}/api/Application/CheckOSNS`,
|
|
1009
|
+
params: {
|
|
1010
|
+
bin,
|
|
1011
|
+
},
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
async checkOsnsBalance(processInstanceId: string) {
|
|
1016
|
+
return await this.axiosCall<string>({
|
|
1017
|
+
method: Methods.GET,
|
|
1018
|
+
url: `/${this.productUrl}/api/Application/CheckOSNSBalance`,
|
|
1019
|
+
params: {
|
|
1020
|
+
processInstanceId,
|
|
1021
|
+
},
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
async getOsrnsToken(data: { iin: string; phoneNumber: string }) {
|
|
1026
|
+
return await this.axiosCall({
|
|
1027
|
+
method: Methods.POST,
|
|
1028
|
+
url: '/externalservices/api/ExternalServices/GetOsrnsToken',
|
|
1029
|
+
data: data,
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
async checkOutDate(processInstanceId: string) {
|
|
1034
|
+
return await this.axiosCall<boolean>({
|
|
1035
|
+
method: Methods.GET,
|
|
1036
|
+
url: `/${this.productUrl}/api/Application/CheckOutDate`,
|
|
1037
|
+
params: {
|
|
1038
|
+
processInstanceId,
|
|
1039
|
+
},
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
}
|