simpleloan_api 1.1.2 → 1.1.4
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/dist/index.d.mts +188 -12
- package/dist/index.d.ts +188 -12
- package/dist/index.js +14 -8
- package/dist/index.mjs +13 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
|
|
3
|
-
type Mode = 'development' | 'production';
|
|
4
|
-
declare function setMode(newMode: Mode): void;
|
|
5
|
-
declare function getMode(): Mode;
|
|
6
|
-
declare function setToken(newToken: string): void;
|
|
7
|
-
declare function removeToken(): void;
|
|
8
|
-
declare function getToken(): string | null;
|
|
9
|
-
|
|
10
3
|
type ApiResponse<T> = {
|
|
11
4
|
_code: number;
|
|
12
5
|
_message?: string;
|
|
@@ -77,17 +70,184 @@ type LoginResponse = {
|
|
|
77
70
|
token_expires: string;
|
|
78
71
|
};
|
|
79
72
|
|
|
73
|
+
type Akbars = {
|
|
74
|
+
id: number;
|
|
75
|
+
created_at: string;
|
|
76
|
+
salespoint_id: number;
|
|
77
|
+
user_id: number;
|
|
78
|
+
mortgageapp_id: number;
|
|
79
|
+
applicationNumber: string;
|
|
80
|
+
application_type: string;
|
|
81
|
+
salesPointId: string;
|
|
82
|
+
organizationLoadPlaceId: string;
|
|
83
|
+
partnerINN: string;
|
|
84
|
+
dreamRatePartnerINN: null;
|
|
85
|
+
dreamRateVariant: null;
|
|
86
|
+
createBy: null | string;
|
|
87
|
+
loanPeriodInMonth: number;
|
|
88
|
+
totalDealSum: number;
|
|
89
|
+
firstIncome: number;
|
|
90
|
+
typeOfProperty: string;
|
|
91
|
+
programType: null;
|
|
92
|
+
specialOffer: null;
|
|
93
|
+
involvementPlace: string;
|
|
94
|
+
applicationPlace: string;
|
|
95
|
+
ownInsurance: boolean;
|
|
96
|
+
propertyInsurance: null;
|
|
97
|
+
collectiveInsuranceContract: null;
|
|
98
|
+
maternalCapitalSum: null;
|
|
99
|
+
typeOfUseOfMaternityCapital: null;
|
|
100
|
+
typeOfAcquiredProperty: string;
|
|
101
|
+
locationOfAcquiredProperty: string;
|
|
102
|
+
isSpouseCoborrower: boolean;
|
|
103
|
+
dependentsCount: number;
|
|
104
|
+
sumForPersonalGoals: null;
|
|
105
|
+
childrenInformation: null;
|
|
106
|
+
refinancings: null;
|
|
107
|
+
emailRealtor: null;
|
|
108
|
+
OnlineRegistration: null;
|
|
109
|
+
OnlineMortgage: null;
|
|
110
|
+
isRegionWithMillionPopulation: null;
|
|
111
|
+
LeadStatus: null;
|
|
112
|
+
BuyoutOfLastPart: null;
|
|
113
|
+
OwnershipPercentOfPropertyObject: null;
|
|
114
|
+
OrgCode: null;
|
|
115
|
+
RequiredHighRiskSegmentFirstIncomePart: null;
|
|
116
|
+
InsuranceCompany: null;
|
|
117
|
+
DepositType: null;
|
|
118
|
+
CoverageType: null;
|
|
119
|
+
RealEstateKind: null;
|
|
120
|
+
application_status: string;
|
|
121
|
+
stages: {
|
|
122
|
+
can_be_edited: boolean;
|
|
123
|
+
current: AkbarsStages;
|
|
124
|
+
pre_offers: AkbarsOffer;
|
|
125
|
+
offers: AkbarsOffer;
|
|
126
|
+
last_comment: string;
|
|
127
|
+
cancel_date: null;
|
|
128
|
+
confirm_date: null;
|
|
129
|
+
result_app: string;
|
|
130
|
+
result_app_start: string;
|
|
131
|
+
result_app_stop: string;
|
|
132
|
+
result_scans: string;
|
|
133
|
+
result_scans_start: null;
|
|
134
|
+
result_scans_stop: null;
|
|
135
|
+
result_loaner_approving: string;
|
|
136
|
+
result_loaner_approving_start: null;
|
|
137
|
+
result_loaner_approving_stop: null;
|
|
138
|
+
result_pledge_approving: string;
|
|
139
|
+
result_pledge_approving_start: null;
|
|
140
|
+
result_pledge_approving_stop: null;
|
|
141
|
+
result_issuing: string;
|
|
142
|
+
result_issuing_start: null;
|
|
143
|
+
result_issuing_stop: null;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
type AkbarsStages = 'app' | 'app_wait' | 'app_abort' | 'scans' | 'scans_wait' | 'scans_abort' | 'processing' | 'processing_wait' | 'processing_abort' | 'loaner_approving' | 'loaner_approving_wait' | 'loaner_approving_abort' | 'printforms' | 'printforms_wait' | 'printforms_abort' | 'pledge_approving' | 'pledge_approving_wait' | 'pledge_approving_abort' | 'issuing' | 'issuing_wait' | 'issuing_abort' | 'end' | 'cancel' | 'unknown';
|
|
147
|
+
type AkbarsOffer = {
|
|
148
|
+
annuity?: number;
|
|
149
|
+
annuityMaxCreditSum?: number;
|
|
150
|
+
creationDate?: string;
|
|
151
|
+
creditAmount?: number;
|
|
152
|
+
expiryDate?: string;
|
|
153
|
+
firstIncome?: number;
|
|
154
|
+
interestRate?: number;
|
|
155
|
+
loanPeriodInMonth?: number;
|
|
156
|
+
maxCreditSum?: number;
|
|
157
|
+
receivedAt?: string;
|
|
158
|
+
sharePayment?: number;
|
|
159
|
+
status?: string;
|
|
160
|
+
canBeEdited?: boolean;
|
|
161
|
+
};
|
|
162
|
+
type AkbarsDeposit = {
|
|
163
|
+
id: number;
|
|
164
|
+
deposit_status: string;
|
|
165
|
+
comment_lkz: string;
|
|
166
|
+
coverage_type: string;
|
|
167
|
+
real_estate_kind: string;
|
|
168
|
+
};
|
|
169
|
+
type AkbarsDictNames = 'ApplicationType' | 'TypeOfProperty ' | 'ProgramType' | 'SpecialOffer' | 'InvolvementPlace' | 'ApplicationPlace' | 'TypeOfUseOfMaternityCapital' | 'TypeOfAcquiredProperty' | 'LocationOfAcquiredProperty' | 'LeadStatus' | 'InsuranceCompany' | 'Gender' | 'FamilyStatus' | 'Education' | 'Region' | 'AddressType' | 'EmploymentType' | 'IncomeDocumentKind' | 'OrganizationForm' | 'AmountOfEmployees' | 'PositionKind' | 'EmployerBranch' | 'ActivityImplementationDuration' | 'EmployeeCount' | 'AnyAbbAccount' | 'ApplicableTaxSystem' | 'KindPrivatePractice' | 'DepositType' | 'CoverageType' | 'RealEstateKind' | 'DepositDocumentType' | 'DepositStatus';
|
|
170
|
+
type AkbarsDepositScan = {
|
|
171
|
+
id: number;
|
|
172
|
+
app_id: number;
|
|
173
|
+
deposit_id: string;
|
|
174
|
+
scan_type: string;
|
|
175
|
+
send_date: string;
|
|
176
|
+
file: {
|
|
177
|
+
size: number;
|
|
178
|
+
file: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
type AkbarsPrintform = {
|
|
182
|
+
id: number;
|
|
183
|
+
app_id: number;
|
|
184
|
+
file: {
|
|
185
|
+
size: number;
|
|
186
|
+
file: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
type Mortgage = {
|
|
191
|
+
id: number;
|
|
192
|
+
created_at: string;
|
|
193
|
+
salespoint_id: number;
|
|
194
|
+
user_id: number;
|
|
195
|
+
main_customer_id: string;
|
|
196
|
+
customer_applications: {};
|
|
197
|
+
program_id: number;
|
|
198
|
+
apartment_type: string;
|
|
199
|
+
apartment_price: string;
|
|
200
|
+
credit_amount: string;
|
|
201
|
+
credit_term: number;
|
|
202
|
+
down_payment: number;
|
|
203
|
+
monthly_payment: string | null;
|
|
204
|
+
comment: string;
|
|
205
|
+
apartment_region: string;
|
|
206
|
+
apartment_city: string;
|
|
207
|
+
consent_type: string | null;
|
|
208
|
+
preapproval_type: string | null;
|
|
209
|
+
has_maternal_capital: boolean;
|
|
210
|
+
maternal_capital_in_loan_sum: boolean;
|
|
211
|
+
maternal_capital_in_down_payment: boolean;
|
|
212
|
+
maternal_capital_sum: number | null;
|
|
213
|
+
bank_app_status?: MortgageBankAppStatus;
|
|
214
|
+
cancel_date: string | null;
|
|
215
|
+
cancel_reason: string | null;
|
|
216
|
+
version: number;
|
|
217
|
+
customers_ids: string[];
|
|
218
|
+
stages: {
|
|
219
|
+
current: MortgageStages;
|
|
220
|
+
fields: string[];
|
|
221
|
+
};
|
|
222
|
+
is_pledge: boolean;
|
|
223
|
+
pledge_type: string | null;
|
|
224
|
+
pledge_readiness: string | null;
|
|
225
|
+
pledge_object: string | null;
|
|
226
|
+
campaign: string | null;
|
|
227
|
+
};
|
|
228
|
+
type MortgageStages = 'app_create' | 'app_wait' | 'app_ending' | 'app_issued' | 'app_cancel' | 'app_complete_decline' | 'app_complete_accept';
|
|
229
|
+
type MortgageBankNames = 'alfabankbalance' | 'rosbankdom' | 'akbars';
|
|
230
|
+
type MortgageBankAppStatus = {
|
|
231
|
+
id: number;
|
|
232
|
+
bank: MortgageBankNames;
|
|
233
|
+
status: 'bank_note';
|
|
234
|
+
comment: string;
|
|
235
|
+
bank_sum: number;
|
|
236
|
+
bank_term: number;
|
|
237
|
+
status_last_date: number;
|
|
238
|
+
};
|
|
239
|
+
|
|
80
240
|
/** Авторизация */
|
|
81
241
|
declare const useAccountLogin: () => {
|
|
82
242
|
response: vue.Ref<ApiResponse<LoginResponse> | null>;
|
|
83
243
|
pending: vue.Ref<boolean>;
|
|
84
|
-
post(params
|
|
244
|
+
post(params?: PostParams<Login> | undefined): Promise<ApiResponse<LoginResponse> | null>;
|
|
85
245
|
};
|
|
86
246
|
/** Выход */
|
|
87
247
|
declare const useAccountLogout: () => {
|
|
88
248
|
response: vue.Ref<ApiResponse<unknown> | null>;
|
|
89
249
|
pending: vue.Ref<boolean>;
|
|
90
|
-
post(params
|
|
250
|
+
post(params?: PostParams<unknown> | undefined): Promise<ApiResponse<unknown> | null>;
|
|
91
251
|
};
|
|
92
252
|
/** Проверка авторизации */
|
|
93
253
|
declare const useAccountCheckLogin: () => {
|
|
@@ -96,13 +256,22 @@ declare const useAccountCheckLogin: () => {
|
|
|
96
256
|
post(params?: PostParamsWithoutBody): Promise<ApiResponse<LoginResponse> | null>;
|
|
97
257
|
};
|
|
98
258
|
|
|
259
|
+
/** Получение списка залогов */
|
|
260
|
+
declare const useGenerateApplicationAkbarsScans: () => {
|
|
261
|
+
response: vue.Ref<Blob | null>;
|
|
262
|
+
pending: vue.Ref<boolean>;
|
|
263
|
+
post(params: PostParams<{
|
|
264
|
+
mortgageapp_id: number;
|
|
265
|
+
}>): Promise<Blob | null>;
|
|
266
|
+
};
|
|
267
|
+
|
|
99
268
|
/** Получить юзера по id */
|
|
100
269
|
declare const useGetUser: () => {
|
|
101
270
|
response: vue.Ref<ApiResponse<User> | null>;
|
|
102
271
|
pending: vue.Ref<boolean>;
|
|
103
|
-
post(params
|
|
272
|
+
post(params?: PostParams<{
|
|
104
273
|
id: number;
|
|
105
|
-
}>): Promise<ApiResponse<User> | null>;
|
|
274
|
+
}> | undefined): Promise<ApiResponse<User> | null>;
|
|
106
275
|
};
|
|
107
276
|
/** Получить список юзеров */
|
|
108
277
|
declare const useGetUserList: () => {
|
|
@@ -111,4 +280,11 @@ declare const useGetUserList: () => {
|
|
|
111
280
|
post(params?: PostParamsWithoutBody): Promise<ApiResponse<User[]> | null>;
|
|
112
281
|
};
|
|
113
282
|
|
|
114
|
-
|
|
283
|
+
type Mode = 'development' | 'production';
|
|
284
|
+
declare function setMode(newMode: Mode): void;
|
|
285
|
+
declare function getMode(): Mode;
|
|
286
|
+
declare function setToken(newToken: string): void;
|
|
287
|
+
declare function removeToken(): void;
|
|
288
|
+
declare function getToken(): string | null;
|
|
289
|
+
|
|
290
|
+
export { type Akbars, type AkbarsDeposit, type AkbarsDepositScan, type AkbarsDictNames, type AkbarsOffer, type AkbarsPrintform, type AkbarsStages, type Login, type LoginResponse, type Mortgage, type MortgageBankAppStatus, type MortgageBankNames, type MortgageStages, type User, getMode, getToken, removeToken, setMode, setToken, useAccountCheckLogin, useAccountLogin, useAccountLogout, useGenerateApplicationAkbarsScans, useGetUser, useGetUserList };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
|
|
3
|
-
type Mode = 'development' | 'production';
|
|
4
|
-
declare function setMode(newMode: Mode): void;
|
|
5
|
-
declare function getMode(): Mode;
|
|
6
|
-
declare function setToken(newToken: string): void;
|
|
7
|
-
declare function removeToken(): void;
|
|
8
|
-
declare function getToken(): string | null;
|
|
9
|
-
|
|
10
3
|
type ApiResponse<T> = {
|
|
11
4
|
_code: number;
|
|
12
5
|
_message?: string;
|
|
@@ -77,17 +70,184 @@ type LoginResponse = {
|
|
|
77
70
|
token_expires: string;
|
|
78
71
|
};
|
|
79
72
|
|
|
73
|
+
type Akbars = {
|
|
74
|
+
id: number;
|
|
75
|
+
created_at: string;
|
|
76
|
+
salespoint_id: number;
|
|
77
|
+
user_id: number;
|
|
78
|
+
mortgageapp_id: number;
|
|
79
|
+
applicationNumber: string;
|
|
80
|
+
application_type: string;
|
|
81
|
+
salesPointId: string;
|
|
82
|
+
organizationLoadPlaceId: string;
|
|
83
|
+
partnerINN: string;
|
|
84
|
+
dreamRatePartnerINN: null;
|
|
85
|
+
dreamRateVariant: null;
|
|
86
|
+
createBy: null | string;
|
|
87
|
+
loanPeriodInMonth: number;
|
|
88
|
+
totalDealSum: number;
|
|
89
|
+
firstIncome: number;
|
|
90
|
+
typeOfProperty: string;
|
|
91
|
+
programType: null;
|
|
92
|
+
specialOffer: null;
|
|
93
|
+
involvementPlace: string;
|
|
94
|
+
applicationPlace: string;
|
|
95
|
+
ownInsurance: boolean;
|
|
96
|
+
propertyInsurance: null;
|
|
97
|
+
collectiveInsuranceContract: null;
|
|
98
|
+
maternalCapitalSum: null;
|
|
99
|
+
typeOfUseOfMaternityCapital: null;
|
|
100
|
+
typeOfAcquiredProperty: string;
|
|
101
|
+
locationOfAcquiredProperty: string;
|
|
102
|
+
isSpouseCoborrower: boolean;
|
|
103
|
+
dependentsCount: number;
|
|
104
|
+
sumForPersonalGoals: null;
|
|
105
|
+
childrenInformation: null;
|
|
106
|
+
refinancings: null;
|
|
107
|
+
emailRealtor: null;
|
|
108
|
+
OnlineRegistration: null;
|
|
109
|
+
OnlineMortgage: null;
|
|
110
|
+
isRegionWithMillionPopulation: null;
|
|
111
|
+
LeadStatus: null;
|
|
112
|
+
BuyoutOfLastPart: null;
|
|
113
|
+
OwnershipPercentOfPropertyObject: null;
|
|
114
|
+
OrgCode: null;
|
|
115
|
+
RequiredHighRiskSegmentFirstIncomePart: null;
|
|
116
|
+
InsuranceCompany: null;
|
|
117
|
+
DepositType: null;
|
|
118
|
+
CoverageType: null;
|
|
119
|
+
RealEstateKind: null;
|
|
120
|
+
application_status: string;
|
|
121
|
+
stages: {
|
|
122
|
+
can_be_edited: boolean;
|
|
123
|
+
current: AkbarsStages;
|
|
124
|
+
pre_offers: AkbarsOffer;
|
|
125
|
+
offers: AkbarsOffer;
|
|
126
|
+
last_comment: string;
|
|
127
|
+
cancel_date: null;
|
|
128
|
+
confirm_date: null;
|
|
129
|
+
result_app: string;
|
|
130
|
+
result_app_start: string;
|
|
131
|
+
result_app_stop: string;
|
|
132
|
+
result_scans: string;
|
|
133
|
+
result_scans_start: null;
|
|
134
|
+
result_scans_stop: null;
|
|
135
|
+
result_loaner_approving: string;
|
|
136
|
+
result_loaner_approving_start: null;
|
|
137
|
+
result_loaner_approving_stop: null;
|
|
138
|
+
result_pledge_approving: string;
|
|
139
|
+
result_pledge_approving_start: null;
|
|
140
|
+
result_pledge_approving_stop: null;
|
|
141
|
+
result_issuing: string;
|
|
142
|
+
result_issuing_start: null;
|
|
143
|
+
result_issuing_stop: null;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
type AkbarsStages = 'app' | 'app_wait' | 'app_abort' | 'scans' | 'scans_wait' | 'scans_abort' | 'processing' | 'processing_wait' | 'processing_abort' | 'loaner_approving' | 'loaner_approving_wait' | 'loaner_approving_abort' | 'printforms' | 'printforms_wait' | 'printforms_abort' | 'pledge_approving' | 'pledge_approving_wait' | 'pledge_approving_abort' | 'issuing' | 'issuing_wait' | 'issuing_abort' | 'end' | 'cancel' | 'unknown';
|
|
147
|
+
type AkbarsOffer = {
|
|
148
|
+
annuity?: number;
|
|
149
|
+
annuityMaxCreditSum?: number;
|
|
150
|
+
creationDate?: string;
|
|
151
|
+
creditAmount?: number;
|
|
152
|
+
expiryDate?: string;
|
|
153
|
+
firstIncome?: number;
|
|
154
|
+
interestRate?: number;
|
|
155
|
+
loanPeriodInMonth?: number;
|
|
156
|
+
maxCreditSum?: number;
|
|
157
|
+
receivedAt?: string;
|
|
158
|
+
sharePayment?: number;
|
|
159
|
+
status?: string;
|
|
160
|
+
canBeEdited?: boolean;
|
|
161
|
+
};
|
|
162
|
+
type AkbarsDeposit = {
|
|
163
|
+
id: number;
|
|
164
|
+
deposit_status: string;
|
|
165
|
+
comment_lkz: string;
|
|
166
|
+
coverage_type: string;
|
|
167
|
+
real_estate_kind: string;
|
|
168
|
+
};
|
|
169
|
+
type AkbarsDictNames = 'ApplicationType' | 'TypeOfProperty ' | 'ProgramType' | 'SpecialOffer' | 'InvolvementPlace' | 'ApplicationPlace' | 'TypeOfUseOfMaternityCapital' | 'TypeOfAcquiredProperty' | 'LocationOfAcquiredProperty' | 'LeadStatus' | 'InsuranceCompany' | 'Gender' | 'FamilyStatus' | 'Education' | 'Region' | 'AddressType' | 'EmploymentType' | 'IncomeDocumentKind' | 'OrganizationForm' | 'AmountOfEmployees' | 'PositionKind' | 'EmployerBranch' | 'ActivityImplementationDuration' | 'EmployeeCount' | 'AnyAbbAccount' | 'ApplicableTaxSystem' | 'KindPrivatePractice' | 'DepositType' | 'CoverageType' | 'RealEstateKind' | 'DepositDocumentType' | 'DepositStatus';
|
|
170
|
+
type AkbarsDepositScan = {
|
|
171
|
+
id: number;
|
|
172
|
+
app_id: number;
|
|
173
|
+
deposit_id: string;
|
|
174
|
+
scan_type: string;
|
|
175
|
+
send_date: string;
|
|
176
|
+
file: {
|
|
177
|
+
size: number;
|
|
178
|
+
file: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
type AkbarsPrintform = {
|
|
182
|
+
id: number;
|
|
183
|
+
app_id: number;
|
|
184
|
+
file: {
|
|
185
|
+
size: number;
|
|
186
|
+
file: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
type Mortgage = {
|
|
191
|
+
id: number;
|
|
192
|
+
created_at: string;
|
|
193
|
+
salespoint_id: number;
|
|
194
|
+
user_id: number;
|
|
195
|
+
main_customer_id: string;
|
|
196
|
+
customer_applications: {};
|
|
197
|
+
program_id: number;
|
|
198
|
+
apartment_type: string;
|
|
199
|
+
apartment_price: string;
|
|
200
|
+
credit_amount: string;
|
|
201
|
+
credit_term: number;
|
|
202
|
+
down_payment: number;
|
|
203
|
+
monthly_payment: string | null;
|
|
204
|
+
comment: string;
|
|
205
|
+
apartment_region: string;
|
|
206
|
+
apartment_city: string;
|
|
207
|
+
consent_type: string | null;
|
|
208
|
+
preapproval_type: string | null;
|
|
209
|
+
has_maternal_capital: boolean;
|
|
210
|
+
maternal_capital_in_loan_sum: boolean;
|
|
211
|
+
maternal_capital_in_down_payment: boolean;
|
|
212
|
+
maternal_capital_sum: number | null;
|
|
213
|
+
bank_app_status?: MortgageBankAppStatus;
|
|
214
|
+
cancel_date: string | null;
|
|
215
|
+
cancel_reason: string | null;
|
|
216
|
+
version: number;
|
|
217
|
+
customers_ids: string[];
|
|
218
|
+
stages: {
|
|
219
|
+
current: MortgageStages;
|
|
220
|
+
fields: string[];
|
|
221
|
+
};
|
|
222
|
+
is_pledge: boolean;
|
|
223
|
+
pledge_type: string | null;
|
|
224
|
+
pledge_readiness: string | null;
|
|
225
|
+
pledge_object: string | null;
|
|
226
|
+
campaign: string | null;
|
|
227
|
+
};
|
|
228
|
+
type MortgageStages = 'app_create' | 'app_wait' | 'app_ending' | 'app_issued' | 'app_cancel' | 'app_complete_decline' | 'app_complete_accept';
|
|
229
|
+
type MortgageBankNames = 'alfabankbalance' | 'rosbankdom' | 'akbars';
|
|
230
|
+
type MortgageBankAppStatus = {
|
|
231
|
+
id: number;
|
|
232
|
+
bank: MortgageBankNames;
|
|
233
|
+
status: 'bank_note';
|
|
234
|
+
comment: string;
|
|
235
|
+
bank_sum: number;
|
|
236
|
+
bank_term: number;
|
|
237
|
+
status_last_date: number;
|
|
238
|
+
};
|
|
239
|
+
|
|
80
240
|
/** Авторизация */
|
|
81
241
|
declare const useAccountLogin: () => {
|
|
82
242
|
response: vue.Ref<ApiResponse<LoginResponse> | null>;
|
|
83
243
|
pending: vue.Ref<boolean>;
|
|
84
|
-
post(params
|
|
244
|
+
post(params?: PostParams<Login> | undefined): Promise<ApiResponse<LoginResponse> | null>;
|
|
85
245
|
};
|
|
86
246
|
/** Выход */
|
|
87
247
|
declare const useAccountLogout: () => {
|
|
88
248
|
response: vue.Ref<ApiResponse<unknown> | null>;
|
|
89
249
|
pending: vue.Ref<boolean>;
|
|
90
|
-
post(params
|
|
250
|
+
post(params?: PostParams<unknown> | undefined): Promise<ApiResponse<unknown> | null>;
|
|
91
251
|
};
|
|
92
252
|
/** Проверка авторизации */
|
|
93
253
|
declare const useAccountCheckLogin: () => {
|
|
@@ -96,13 +256,22 @@ declare const useAccountCheckLogin: () => {
|
|
|
96
256
|
post(params?: PostParamsWithoutBody): Promise<ApiResponse<LoginResponse> | null>;
|
|
97
257
|
};
|
|
98
258
|
|
|
259
|
+
/** Получение списка залогов */
|
|
260
|
+
declare const useGenerateApplicationAkbarsScans: () => {
|
|
261
|
+
response: vue.Ref<Blob | null>;
|
|
262
|
+
pending: vue.Ref<boolean>;
|
|
263
|
+
post(params: PostParams<{
|
|
264
|
+
mortgageapp_id: number;
|
|
265
|
+
}>): Promise<Blob | null>;
|
|
266
|
+
};
|
|
267
|
+
|
|
99
268
|
/** Получить юзера по id */
|
|
100
269
|
declare const useGetUser: () => {
|
|
101
270
|
response: vue.Ref<ApiResponse<User> | null>;
|
|
102
271
|
pending: vue.Ref<boolean>;
|
|
103
|
-
post(params
|
|
272
|
+
post(params?: PostParams<{
|
|
104
273
|
id: number;
|
|
105
|
-
}>): Promise<ApiResponse<User> | null>;
|
|
274
|
+
}> | undefined): Promise<ApiResponse<User> | null>;
|
|
106
275
|
};
|
|
107
276
|
/** Получить список юзеров */
|
|
108
277
|
declare const useGetUserList: () => {
|
|
@@ -111,4 +280,11 @@ declare const useGetUserList: () => {
|
|
|
111
280
|
post(params?: PostParamsWithoutBody): Promise<ApiResponse<User[]> | null>;
|
|
112
281
|
};
|
|
113
282
|
|
|
114
|
-
|
|
283
|
+
type Mode = 'development' | 'production';
|
|
284
|
+
declare function setMode(newMode: Mode): void;
|
|
285
|
+
declare function getMode(): Mode;
|
|
286
|
+
declare function setToken(newToken: string): void;
|
|
287
|
+
declare function removeToken(): void;
|
|
288
|
+
declare function getToken(): string | null;
|
|
289
|
+
|
|
290
|
+
export { type Akbars, type AkbarsDeposit, type AkbarsDepositScan, type AkbarsDictNames, type AkbarsOffer, type AkbarsPrintform, type AkbarsStages, type Login, type LoginResponse, type Mortgage, type MortgageBankAppStatus, type MortgageBankNames, type MortgageStages, type User, getMode, getToken, removeToken, setMode, setToken, useAccountCheckLogin, useAccountLogin, useAccountLogout, useGenerateApplicationAkbarsScans, useGetUser, useGetUserList };
|
package/dist/index.js
CHANGED
|
@@ -48,11 +48,15 @@ __export(simpleloan_api_exports, {
|
|
|
48
48
|
useAccountCheckLogin: () => useAccountCheckLogin,
|
|
49
49
|
useAccountLogin: () => useAccountLogin,
|
|
50
50
|
useAccountLogout: () => useAccountLogout,
|
|
51
|
+
useGenerateApplicationAkbarsScans: () => useGenerateApplicationAkbarsScans,
|
|
51
52
|
useGetUser: () => useGetUser,
|
|
52
53
|
useGetUserList: () => useGetUserList
|
|
53
54
|
});
|
|
54
55
|
module.exports = __toCommonJS(simpleloan_api_exports);
|
|
55
56
|
|
|
57
|
+
// src/fetch/index.ts
|
|
58
|
+
var import_vue2 = require("vue");
|
|
59
|
+
|
|
56
60
|
// src/settings/index.ts
|
|
57
61
|
var import_vue = require("vue");
|
|
58
62
|
var token = null;
|
|
@@ -74,7 +78,6 @@ function getToken() {
|
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
// src/fetch/index.ts
|
|
77
|
-
var import_vue2 = require("vue");
|
|
78
81
|
function getContent(response) {
|
|
79
82
|
return __async(this, null, function* () {
|
|
80
83
|
const contentType = response.headers.get("Content-Type");
|
|
@@ -106,10 +109,8 @@ function getBody(params) {
|
|
|
106
109
|
_token: getToken()
|
|
107
110
|
});
|
|
108
111
|
}
|
|
109
|
-
function useFetch(url) {
|
|
110
|
-
const response = (0, import_vue2.ref)(
|
|
111
|
-
null
|
|
112
|
-
);
|
|
112
|
+
function useFetch(url, clearResponse) {
|
|
113
|
+
const response = (0, import_vue2.ref)(null);
|
|
113
114
|
const pending = (0, import_vue2.ref)(false);
|
|
114
115
|
const fullUrl = getApiUrl() + url;
|
|
115
116
|
function post(params) {
|
|
@@ -140,10 +141,14 @@ var useAccountLogin = () => useFetch(basePath + "login/");
|
|
|
140
141
|
var useAccountLogout = () => useFetch(basePath + "logout/");
|
|
141
142
|
var useAccountCheckLogin = () => useFetch(basePath + "check_login/");
|
|
142
143
|
|
|
144
|
+
// src/repositories/akbars/index.ts
|
|
145
|
+
var baseUrl = "akbars/";
|
|
146
|
+
var useGenerateApplicationAkbarsScans = () => useFetch(baseUrl + "scans/application/generate/", true);
|
|
147
|
+
|
|
143
148
|
// src/repositories/user/index.ts
|
|
144
|
-
var
|
|
145
|
-
var useGetUser = () => useFetch(
|
|
146
|
-
var useGetUserList = () => useFetch(
|
|
149
|
+
var baseUrl2 = "user/";
|
|
150
|
+
var useGetUser = () => useFetch(baseUrl2 + "get");
|
|
151
|
+
var useGetUserList = () => useFetch(baseUrl2 + "get_list");
|
|
147
152
|
// Annotate the CommonJS export names for ESM import in node:
|
|
148
153
|
0 && (module.exports = {
|
|
149
154
|
getMode,
|
|
@@ -154,6 +159,7 @@ var useGetUserList = () => useFetch(baseUrl + "get_list");
|
|
|
154
159
|
useAccountCheckLogin,
|
|
155
160
|
useAccountLogin,
|
|
156
161
|
useAccountLogout,
|
|
162
|
+
useGenerateApplicationAkbarsScans,
|
|
157
163
|
useGetUser,
|
|
158
164
|
useGetUserList
|
|
159
165
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -19,6 +19,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
// src/fetch/index.ts
|
|
23
|
+
import { ref as ref2 } from "vue";
|
|
24
|
+
|
|
22
25
|
// src/settings/index.ts
|
|
23
26
|
import { ref } from "vue";
|
|
24
27
|
var token = null;
|
|
@@ -40,7 +43,6 @@ function getToken() {
|
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
// src/fetch/index.ts
|
|
43
|
-
import { ref as ref2 } from "vue";
|
|
44
46
|
function getContent(response) {
|
|
45
47
|
return __async(this, null, function* () {
|
|
46
48
|
const contentType = response.headers.get("Content-Type");
|
|
@@ -72,10 +74,8 @@ function getBody(params) {
|
|
|
72
74
|
_token: getToken()
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
|
-
function useFetch(url) {
|
|
76
|
-
const response = ref2(
|
|
77
|
-
null
|
|
78
|
-
);
|
|
77
|
+
function useFetch(url, clearResponse) {
|
|
78
|
+
const response = ref2(null);
|
|
79
79
|
const pending = ref2(false);
|
|
80
80
|
const fullUrl = getApiUrl() + url;
|
|
81
81
|
function post(params) {
|
|
@@ -106,10 +106,14 @@ var useAccountLogin = () => useFetch(basePath + "login/");
|
|
|
106
106
|
var useAccountLogout = () => useFetch(basePath + "logout/");
|
|
107
107
|
var useAccountCheckLogin = () => useFetch(basePath + "check_login/");
|
|
108
108
|
|
|
109
|
+
// src/repositories/akbars/index.ts
|
|
110
|
+
var baseUrl = "akbars/";
|
|
111
|
+
var useGenerateApplicationAkbarsScans = () => useFetch(baseUrl + "scans/application/generate/", true);
|
|
112
|
+
|
|
109
113
|
// src/repositories/user/index.ts
|
|
110
|
-
var
|
|
111
|
-
var useGetUser = () => useFetch(
|
|
112
|
-
var useGetUserList = () => useFetch(
|
|
114
|
+
var baseUrl2 = "user/";
|
|
115
|
+
var useGetUser = () => useFetch(baseUrl2 + "get");
|
|
116
|
+
var useGetUserList = () => useFetch(baseUrl2 + "get_list");
|
|
113
117
|
export {
|
|
114
118
|
getMode,
|
|
115
119
|
getToken,
|
|
@@ -119,6 +123,7 @@ export {
|
|
|
119
123
|
useAccountCheckLogin,
|
|
120
124
|
useAccountLogin,
|
|
121
125
|
useAccountLogout,
|
|
126
|
+
useGenerateApplicationAkbarsScans,
|
|
122
127
|
useGetUser,
|
|
123
128
|
useGetUserList
|
|
124
129
|
};
|