@hapl/api-queries 1.0.6 → 1.0.7
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/api-queries.cjs.development.js +793 -978
- package/dist/api-queries.cjs.development.js.map +1 -1
- package/dist/api-queries.cjs.production.min.js +1 -1
- package/dist/api-queries.cjs.production.min.js.map +1 -1
- package/dist/api-queries.esm.js +793 -978
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api.d.ts +0 -3
- package/dist/clients/v1/index.d.ts +1 -4
- package/dist/clients/v1/types.d.ts +0 -1
- package/package.json +1 -1
- package/src/clients/v1/api.ts +0 -4
- package/src/clients/v1/index.ts +1 -19
- package/src/clients/v1/types.ts +0 -1
- package/dist/clients/v1/api/payslip/findPayslipById.d.ts +0 -29
- package/dist/clients/v1/api/payslip/findPayslips.d.ts +0 -56
- package/dist/clients/v1/api/payslip/updatePayslip.d.ts +0 -35
- package/dist/clients/v1/types/Payslip.d.ts +0 -61
- package/src/clients/v1/api/payslip/findPayslipById.ts +0 -36
- package/src/clients/v1/api/payslip/findPayslips.ts +0 -54
- package/src/clients/v1/api/payslip/updatePayslip.ts +0 -41
- package/src/clients/v1/types/Payslip.ts +0 -62
package/dist/clients/v1/api.d.ts
CHANGED
|
@@ -139,9 +139,6 @@ export * from './api/leadAssignmentBlock/updateLeadAssignmentBlock';
|
|
|
139
139
|
export * from './api/motivation/findMotivationGlossary';
|
|
140
140
|
export * from './api/motivation/findMotivationStatusByExpertId';
|
|
141
141
|
export * from './api/motivation/сalculateMotivationCommission';
|
|
142
|
-
export * from './api/payslip/findPayslips';
|
|
143
|
-
export * from './api/payslip/findPayslipById';
|
|
144
|
-
export * from './api/payslip/updatePayslip';
|
|
145
142
|
export * from './api/phone/findPhones';
|
|
146
143
|
export * from './api/phone/callbackPhone';
|
|
147
144
|
export * from './api/phone/blockPhone';
|
|
@@ -143,12 +143,9 @@ export declare class Api {
|
|
|
143
143
|
calculateMotivationCommission: (body: api.CalculateMotivationCommissionBody, headers: api.CalculateMotivationCommissionHeaders) => Promise<api.CalculateMotivationCommissionData>;
|
|
144
144
|
findMotivationGlossary: (headers: api.FindMotivationGlossaryHeaders) => Promise<api.FindMotivationGlossaryData>;
|
|
145
145
|
findMotivationStatusByExpertId: (urlParams: api.FindMotivationStatusByExpertIdUrlParams, headers: api.FindMotivationStatusByExpertIdHeaders) => Promise<api.FindMotivationStatusByExpertIdData>;
|
|
146
|
-
findPayslips: (params: api.FindPayslipsParams, headers: api.FindPayslipsHeaders) => Promise<api.FindPayslipsData>;
|
|
147
|
-
findPayslipById: (urlParams: api.FindPayslipByIdUrlParams, headers: api.FindPayslipByIdHeaders) => Promise<api.FindPayslipByIdData>;
|
|
148
|
-
updatePayslip: (urlParams: api.UpdatePayslipUrlParams, body: api.UpdatePayslipBody, headers: api.UpdatePayslipHeaders) => Promise<api.UpdatePayslipData>;
|
|
149
146
|
blockPhone: (urlParams: api.BlockPhoneUrlParams, headers: api.BlockPhoneHeaders) => Promise<api.BlockPhoneData>;
|
|
150
147
|
callbackPhone: (urlParams: api.CallbackPhoneUrlParams, headers: api.CallbackPhoneHeaders) => Promise<api.CallbackPhoneData>;
|
|
151
|
-
findPhones: (params: api.FindPhonesParams, headers: api.
|
|
148
|
+
findPhones: (params: api.FindPhonesParams, headers: api.FindPhonesHeaders) => Promise<api.FindPhonesData>;
|
|
152
149
|
unblockPhone: (urlParams: api.UnblockPhoneUrlParams, headers: api.UnblockPhoneHeaders) => Promise<api.UnblockPhoneData>;
|
|
153
150
|
createPhoneBookContact: (body: api.CreatePhoneBookContactBody, headers: api.CreatePhoneBookContactHeaders) => Promise<api.CreatePhoneBookContactData>;
|
|
154
151
|
findPhoneBookContacts: (params: api.FindPhoneBookContactsParams, headers: api.FindPhoneBookContactsHeaders) => Promise<api.FindPhoneBookContactsData>;
|
|
@@ -38,7 +38,6 @@ export * from './types/Income';
|
|
|
38
38
|
export * from './types/InternalCrossSale';
|
|
39
39
|
export * from './types/LeadAssignmentBlock';
|
|
40
40
|
export * from './types/Motivation';
|
|
41
|
-
export * from './types/Payslip';
|
|
42
41
|
export * from './types/Phone';
|
|
43
42
|
export * from './types/PhoneBookContact';
|
|
44
43
|
export * from './types/PhotoOrder';
|
package/package.json
CHANGED
package/src/clients/v1/api.ts
CHANGED
|
@@ -167,10 +167,6 @@ export * from './api/motivation/findMotivationGlossary';
|
|
|
167
167
|
export * from './api/motivation/findMotivationStatusByExpertId';
|
|
168
168
|
export * from './api/motivation/сalculateMotivationCommission';
|
|
169
169
|
|
|
170
|
-
export * from './api/payslip/findPayslips';
|
|
171
|
-
export * from './api/payslip/findPayslipById';
|
|
172
|
-
export * from './api/payslip/updatePayslip';
|
|
173
|
-
|
|
174
170
|
export * from './api/phone/findPhones';
|
|
175
171
|
export * from './api/phone/callbackPhone';
|
|
176
172
|
export * from './api/phone/blockPhone';
|
package/src/clients/v1/index.ts
CHANGED
|
@@ -875,24 +875,6 @@ export class Api {
|
|
|
875
875
|
return api.findMotivationStatusByExpertIdRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
876
876
|
};
|
|
877
877
|
|
|
878
|
-
// payslip
|
|
879
|
-
|
|
880
|
-
findPayslips = async (params: api.FindPayslipsParams, headers: api.FindPayslipsHeaders) => {
|
|
881
|
-
return api.findPayslipsRequest({ params, headers, baseURL: await this.baseURL });
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
findPayslipById = async (urlParams: api.FindPayslipByIdUrlParams, headers: api.FindPayslipByIdHeaders) => {
|
|
885
|
-
return api.findPayslipByIdRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
updatePayslip = async (
|
|
889
|
-
urlParams: api.UpdatePayslipUrlParams,
|
|
890
|
-
body: api.UpdatePayslipBody,
|
|
891
|
-
headers: api.UpdatePayslipHeaders
|
|
892
|
-
) => {
|
|
893
|
-
return api.updatePayslipRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
894
|
-
};
|
|
895
|
-
|
|
896
878
|
// phone
|
|
897
879
|
|
|
898
880
|
blockPhone = async (urlParams: api.BlockPhoneUrlParams, headers: api.BlockPhoneHeaders) => {
|
|
@@ -903,7 +885,7 @@ export class Api {
|
|
|
903
885
|
return api.callbackPhoneRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
904
886
|
};
|
|
905
887
|
|
|
906
|
-
findPhones = async (params: api.FindPhonesParams, headers: api.
|
|
888
|
+
findPhones = async (params: api.FindPhonesParams, headers: api.FindPhonesHeaders) => {
|
|
907
889
|
return api.findPhonesRequest({ params, headers, baseURL: await this.baseURL });
|
|
908
890
|
};
|
|
909
891
|
|
package/src/clients/v1/types.ts
CHANGED
|
@@ -38,7 +38,6 @@ export * from './types/Income';
|
|
|
38
38
|
export * from './types/InternalCrossSale';
|
|
39
39
|
export * from './types/LeadAssignmentBlock';
|
|
40
40
|
export * from './types/Motivation';
|
|
41
|
-
export * from './types/Payslip';
|
|
42
41
|
export * from './types/Phone';
|
|
43
42
|
export * from './types/PhoneBookContact';
|
|
44
43
|
export * from './types/PhotoOrder';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import { Payslip } from '../../types';
|
|
3
|
-
declare type SuccessData = {
|
|
4
|
-
success: true;
|
|
5
|
-
data: Payslip;
|
|
6
|
-
};
|
|
7
|
-
declare type ErrorData = {
|
|
8
|
-
success: false;
|
|
9
|
-
data: {
|
|
10
|
-
error: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare type ResultData = SuccessData['data'];
|
|
14
|
-
declare type ResultError = ErrorData['data']['error'];
|
|
15
|
-
export declare type FindPayslipByIdUrlParams = {
|
|
16
|
-
id: number;
|
|
17
|
-
};
|
|
18
|
-
export declare type FindPayslipByIdHeaders = {
|
|
19
|
-
'x-auth-hc': string;
|
|
20
|
-
};
|
|
21
|
-
export declare type FindPayslipByIdData = AxiosResponse<ResultData>;
|
|
22
|
-
export declare type FindPayslipByIdError = AxiosError<ResultError>;
|
|
23
|
-
export declare type FindPayslipByIdConfig = {
|
|
24
|
-
baseURL?: string;
|
|
25
|
-
urlParams: FindPayslipByIdUrlParams;
|
|
26
|
-
headers: FindPayslipByIdHeaders;
|
|
27
|
-
};
|
|
28
|
-
export declare function findPayslipByIdRequest({ baseURL, urlParams, headers }: FindPayslipByIdConfig): Promise<FindPayslipByIdData>;
|
|
29
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import { Payslip } from '../../types';
|
|
3
|
-
declare type SuccessData = {
|
|
4
|
-
success: true;
|
|
5
|
-
data: Payslip[];
|
|
6
|
-
pageParams: {
|
|
7
|
-
page: number;
|
|
8
|
-
length: number;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
declare type ErrorData = {
|
|
12
|
-
success: false;
|
|
13
|
-
data: {
|
|
14
|
-
error: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
declare type ResultData = {
|
|
18
|
-
data: SuccessData['data'];
|
|
19
|
-
meta: {
|
|
20
|
-
total: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
declare type ResultError = ErrorData['data']['error'];
|
|
24
|
-
export declare type FindPayslipsParams = {
|
|
25
|
-
filter?: {
|
|
26
|
-
dealId?: string | string[];
|
|
27
|
-
'serviceRequest.id'?: string | string[];
|
|
28
|
-
'serviceRequest.contract.formalId'?: string;
|
|
29
|
-
'serviceRequest.curator.id'?: string;
|
|
30
|
-
'serviceRequest.curator.supervisor.id'?: string;
|
|
31
|
-
closingDate?: string | {
|
|
32
|
-
from?: string;
|
|
33
|
-
to?: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
sorting?: {
|
|
37
|
-
type: 'closingDate';
|
|
38
|
-
direction: 'asc' | 'desc';
|
|
39
|
-
};
|
|
40
|
-
limits?: {
|
|
41
|
-
page?: number;
|
|
42
|
-
count?: number | 'all';
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export declare type FindPayslipsHeaders = {
|
|
46
|
-
'x-auth-hc': string;
|
|
47
|
-
};
|
|
48
|
-
export declare type FindPayslipsData = AxiosResponse<ResultData>;
|
|
49
|
-
export declare type FindPayslipsError = AxiosError<ResultError>;
|
|
50
|
-
export declare type FindPayslipsConfig = {
|
|
51
|
-
baseURL?: string;
|
|
52
|
-
params: FindPayslipsParams;
|
|
53
|
-
headers: FindPayslipsHeaders;
|
|
54
|
-
};
|
|
55
|
-
export declare function findPayslipsRequest({ baseURL, headers, params }: FindPayslipsConfig): Promise<FindPayslipsData>;
|
|
56
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import { Payslip } from '../../types';
|
|
3
|
-
declare type SuccessData = {
|
|
4
|
-
success: true;
|
|
5
|
-
data: Payslip;
|
|
6
|
-
};
|
|
7
|
-
declare type ErrorData = {
|
|
8
|
-
success: false;
|
|
9
|
-
data: {
|
|
10
|
-
error: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare type ResultData = SuccessData['data'];
|
|
14
|
-
declare type ResultError = ErrorData['data']['error'];
|
|
15
|
-
export declare type UpdatePayslipHeaders = {
|
|
16
|
-
'x-auth-hc': string;
|
|
17
|
-
};
|
|
18
|
-
export declare type UpdatePayslipUrlParams = {
|
|
19
|
-
id: number;
|
|
20
|
-
};
|
|
21
|
-
export declare type UpdatePayslipBody = {
|
|
22
|
-
financeAdjustment?: number;
|
|
23
|
-
financeComment?: string;
|
|
24
|
-
ifFinalNotification: boolean;
|
|
25
|
-
};
|
|
26
|
-
export declare type UpdatePayslipData = AxiosResponse<ResultData>;
|
|
27
|
-
export declare type UpdatePayslipError = AxiosError<ResultError>;
|
|
28
|
-
export declare type UpdatePayslipConfig = {
|
|
29
|
-
baseURL?: string;
|
|
30
|
-
body: UpdatePayslipBody;
|
|
31
|
-
urlParams: UpdatePayslipUrlParams;
|
|
32
|
-
headers: UpdatePayslipHeaders;
|
|
33
|
-
};
|
|
34
|
-
export declare function updatePayslipRequest({ baseURL, urlParams, body, headers }: UpdatePayslipConfig): Promise<UpdatePayslipData>;
|
|
35
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export declare type PayslipLevel = {
|
|
2
|
-
number: number;
|
|
3
|
-
revenue: number;
|
|
4
|
-
percent?: number;
|
|
5
|
-
baseCommissionSum?: number;
|
|
6
|
-
bonus?: number;
|
|
7
|
-
};
|
|
8
|
-
export declare type Payslip = {
|
|
9
|
-
serviceRequestId: number;
|
|
10
|
-
advanceDate?: string;
|
|
11
|
-
allRelevantDeals?: number[];
|
|
12
|
-
baseBonusAll?: number;
|
|
13
|
-
baseBonusPercentAll?: number;
|
|
14
|
-
baseComission?: number;
|
|
15
|
-
basePercent?: number;
|
|
16
|
-
chargesComissionAboveTargetPercentAll?: number;
|
|
17
|
-
chargesComissionBelowMinimumAll?: number;
|
|
18
|
-
chargesComissionBelowTargetPercentAll?: number;
|
|
19
|
-
closingDate?: string;
|
|
20
|
-
comissionAboveTargetPercent?: number;
|
|
21
|
-
comissionBelowMinimum?: number;
|
|
22
|
-
comissionBelowTargetPercent?: number;
|
|
23
|
-
createdAt?: string;
|
|
24
|
-
curatorId?: number;
|
|
25
|
-
dealDate?: string;
|
|
26
|
-
dealId?: number;
|
|
27
|
-
dealStatus?: string;
|
|
28
|
-
dealType?: string;
|
|
29
|
-
effectiveBonusAll?: number;
|
|
30
|
-
effectiveBonusPercentAll?: number;
|
|
31
|
-
effectivePercent?: number;
|
|
32
|
-
expectedExpertPayoutDate?: string;
|
|
33
|
-
extraPercent?: number;
|
|
34
|
-
finalBonus?: number;
|
|
35
|
-
finalPrice?: number;
|
|
36
|
-
financeAdjustment?: number;
|
|
37
|
-
financeComment?: string;
|
|
38
|
-
formalId?: string;
|
|
39
|
-
grossRevenue4MAll?: number;
|
|
40
|
-
ifAmnesty?: boolean;
|
|
41
|
-
ifBelowMinimum?: boolean;
|
|
42
|
-
ifFinalNotification?: boolean;
|
|
43
|
-
lawyerId?: number;
|
|
44
|
-
legalCharges?: number;
|
|
45
|
-
levels?: Array<PayslipLevel>;
|
|
46
|
-
mentorId?: number;
|
|
47
|
-
minNetComission?: number;
|
|
48
|
-
negativeAdjustmentFact?: number;
|
|
49
|
-
netComission?: number;
|
|
50
|
-
partnerCommission?: number;
|
|
51
|
-
payslipMeta?: {
|
|
52
|
-
createdAt: string;
|
|
53
|
-
updatedAt?: string;
|
|
54
|
-
};
|
|
55
|
-
plannedCommission?: number;
|
|
56
|
-
signedAt?: string;
|
|
57
|
-
supervisorId?: number;
|
|
58
|
-
targetPercentFrom?: number;
|
|
59
|
-
targetPercentTo?: number;
|
|
60
|
-
traineeAdjustmentFact?: number;
|
|
61
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
|
-
import { Payslip } from '../../types';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
|
-
|
|
5
|
-
type SuccessData = { success: true; data: Payslip };
|
|
6
|
-
type ErrorData = { success: false; data: { error: string } };
|
|
7
|
-
|
|
8
|
-
type ResultData = SuccessData['data'];
|
|
9
|
-
type ResultError = ErrorData['data']['error'];
|
|
10
|
-
|
|
11
|
-
export type FindPayslipByIdUrlParams = { id: number };
|
|
12
|
-
export type FindPayslipByIdHeaders = { 'x-auth-hc': string };
|
|
13
|
-
export type FindPayslipByIdData = AxiosResponse<ResultData>;
|
|
14
|
-
export type FindPayslipByIdError = AxiosError<ResultError>;
|
|
15
|
-
|
|
16
|
-
export type FindPayslipByIdConfig = {
|
|
17
|
-
baseURL?: string;
|
|
18
|
-
urlParams: FindPayslipByIdUrlParams;
|
|
19
|
-
headers: FindPayslipByIdHeaders;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export function findPayslipByIdRequest({ baseURL = DEFAULT_BASE_URL, urlParams, headers }: FindPayslipByIdConfig) {
|
|
23
|
-
return axios
|
|
24
|
-
.get(`/api/payslip/${urlParams.id}`, {
|
|
25
|
-
baseURL,
|
|
26
|
-
headers: { Accept: 'application/json', ...headers },
|
|
27
|
-
transformResponse: [
|
|
28
|
-
...(axios.defaults.transformResponse as AxiosResponseTransformer[]),
|
|
29
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
30
|
-
],
|
|
31
|
-
})
|
|
32
|
-
.then((res: FindPayslipByIdData) => res)
|
|
33
|
-
.catch((err: FindPayslipByIdError) => {
|
|
34
|
-
throw err;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
|
-
import qs from 'qs';
|
|
3
|
-
import { Payslip } from '../../types';
|
|
4
|
-
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
5
|
-
|
|
6
|
-
type SuccessData = { success: true; data: Payslip[]; pageParams: { page: number; length: number } };
|
|
7
|
-
type ErrorData = { success: false; data: { error: string } };
|
|
8
|
-
|
|
9
|
-
type ResultData = { data: SuccessData['data']; meta: { total: number } };
|
|
10
|
-
type ResultError = ErrorData['data']['error'];
|
|
11
|
-
|
|
12
|
-
export type FindPayslipsParams = {
|
|
13
|
-
filter?: {
|
|
14
|
-
dealId?: string | string[];
|
|
15
|
-
'serviceRequest.id'?: string | string[];
|
|
16
|
-
'serviceRequest.contract.formalId'?: string;
|
|
17
|
-
'serviceRequest.curator.id'?: string;
|
|
18
|
-
'serviceRequest.curator.supervisor.id'?: string;
|
|
19
|
-
closingDate?: string | { from?: string; to?: string };
|
|
20
|
-
};
|
|
21
|
-
sorting?: { type: 'closingDate'; direction: 'asc' | 'desc' };
|
|
22
|
-
limits?: { page?: number; count?: number | 'all' };
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type FindPayslipsHeaders = { 'x-auth-hc': string };
|
|
26
|
-
export type FindPayslipsData = AxiosResponse<ResultData>;
|
|
27
|
-
export type FindPayslipsError = AxiosError<ResultError>;
|
|
28
|
-
export type FindPayslipsConfig = {
|
|
29
|
-
baseURL?: string;
|
|
30
|
-
params: FindPayslipsParams;
|
|
31
|
-
headers: FindPayslipsHeaders;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export function findPayslipsRequest({ baseURL = DEFAULT_BASE_URL, headers, params }: FindPayslipsConfig) {
|
|
35
|
-
return axios
|
|
36
|
-
.get('/api/payslip', {
|
|
37
|
-
baseURL,
|
|
38
|
-
params,
|
|
39
|
-
paramsSerializer: params => qs.stringify(params, { arrayFormat: 'brackets' }),
|
|
40
|
-
headers: { Accept: 'application/json', ...headers },
|
|
41
|
-
transformResponse: [
|
|
42
|
-
...(axios.defaults.transformResponse as AxiosResponseTransformer[]),
|
|
43
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
44
|
-
if (!data.success) return data.data.error;
|
|
45
|
-
|
|
46
|
-
return { data: data.data, meta: { total: data.pageParams.length } };
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
})
|
|
50
|
-
.then((res: FindPayslipsData) => res)
|
|
51
|
-
.catch((err: FindPayslipsError) => {
|
|
52
|
-
throw err;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
|
-
import { Payslip } from '../../types';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
|
-
|
|
5
|
-
type SuccessData = { success: true; data: Payslip };
|
|
6
|
-
type ErrorData = { success: false; data: { error: string } };
|
|
7
|
-
|
|
8
|
-
type ResultData = SuccessData['data'];
|
|
9
|
-
type ResultError = ErrorData['data']['error'];
|
|
10
|
-
|
|
11
|
-
export type UpdatePayslipHeaders = { 'x-auth-hc': string };
|
|
12
|
-
export type UpdatePayslipUrlParams = { id: number };
|
|
13
|
-
export type UpdatePayslipBody = {
|
|
14
|
-
financeAdjustment?: number;
|
|
15
|
-
financeComment?: string;
|
|
16
|
-
ifFinalNotification: boolean;
|
|
17
|
-
};
|
|
18
|
-
export type UpdatePayslipData = AxiosResponse<ResultData>;
|
|
19
|
-
export type UpdatePayslipError = AxiosError<ResultError>;
|
|
20
|
-
export type UpdatePayslipConfig = {
|
|
21
|
-
baseURL?: string;
|
|
22
|
-
body: UpdatePayslipBody;
|
|
23
|
-
urlParams: UpdatePayslipUrlParams;
|
|
24
|
-
headers: UpdatePayslipHeaders;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export function updatePayslipRequest({ baseURL = DEFAULT_BASE_URL, urlParams, body, headers }: UpdatePayslipConfig) {
|
|
28
|
-
return axios
|
|
29
|
-
.post(`/api/payslip/${urlParams.id}`, body, {
|
|
30
|
-
baseURL,
|
|
31
|
-
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
32
|
-
transformResponse: [
|
|
33
|
-
...(axios.defaults.transformResponse as AxiosResponseTransformer[]),
|
|
34
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
35
|
-
],
|
|
36
|
-
})
|
|
37
|
-
.then((res: UpdatePayslipData) => res)
|
|
38
|
-
.catch((err: UpdatePayslipError) => {
|
|
39
|
-
throw err;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export type PayslipLevel = {
|
|
2
|
-
number: number;
|
|
3
|
-
revenue: number;
|
|
4
|
-
percent?: number;
|
|
5
|
-
baseCommissionSum?: number;
|
|
6
|
-
bonus?: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export type Payslip = {
|
|
10
|
-
serviceRequestId: number;
|
|
11
|
-
advanceDate?: string;
|
|
12
|
-
allRelevantDeals?: number[];
|
|
13
|
-
baseBonusAll?: number;
|
|
14
|
-
baseBonusPercentAll?: number;
|
|
15
|
-
baseComission?: number;
|
|
16
|
-
basePercent?: number;
|
|
17
|
-
chargesComissionAboveTargetPercentAll?: number;
|
|
18
|
-
chargesComissionBelowMinimumAll?: number;
|
|
19
|
-
chargesComissionBelowTargetPercentAll?: number;
|
|
20
|
-
closingDate?: string;
|
|
21
|
-
comissionAboveTargetPercent?: number;
|
|
22
|
-
comissionBelowMinimum?: number;
|
|
23
|
-
comissionBelowTargetPercent?: number;
|
|
24
|
-
createdAt?: string;
|
|
25
|
-
curatorId?: number;
|
|
26
|
-
dealDate?: string;
|
|
27
|
-
dealId?: number;
|
|
28
|
-
dealStatus?: string;
|
|
29
|
-
dealType?: string;
|
|
30
|
-
effectiveBonusAll?: number;
|
|
31
|
-
effectiveBonusPercentAll?: number;
|
|
32
|
-
effectivePercent?: number;
|
|
33
|
-
expectedExpertPayoutDate?: string;
|
|
34
|
-
extraPercent?: number;
|
|
35
|
-
finalBonus?: number;
|
|
36
|
-
finalPrice?: number;
|
|
37
|
-
financeAdjustment?: number;
|
|
38
|
-
financeComment?: string;
|
|
39
|
-
formalId?: string;
|
|
40
|
-
grossRevenue4MAll?: number;
|
|
41
|
-
ifAmnesty?: boolean;
|
|
42
|
-
ifBelowMinimum?: boolean;
|
|
43
|
-
ifFinalNotification?: boolean;
|
|
44
|
-
lawyerId?: number;
|
|
45
|
-
legalCharges?: number;
|
|
46
|
-
levels?: Array<PayslipLevel>;
|
|
47
|
-
mentorId?: number;
|
|
48
|
-
minNetComission?: number;
|
|
49
|
-
negativeAdjustmentFact?: number;
|
|
50
|
-
netComission?: number;
|
|
51
|
-
partnerCommission?: number;
|
|
52
|
-
payslipMeta?: {
|
|
53
|
-
createdAt: string;
|
|
54
|
-
updatedAt?: string;
|
|
55
|
-
};
|
|
56
|
-
plannedCommission?: number;
|
|
57
|
-
signedAt?: string;
|
|
58
|
-
supervisorId?: number;
|
|
59
|
-
targetPercentFrom?: number;
|
|
60
|
-
targetPercentTo?: number;
|
|
61
|
-
traineeAdjustmentFact?: number;
|
|
62
|
-
};
|