@hapl/api-queries 0.1.136--canary.64.eb3e45e.0 → 0.1.136
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/CHANGELOG.md +24 -0
- package/dist/api-queries.cjs.development.js +128 -0
- 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 +128 -0
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/deal/setDealPrepaymentState/index.d.ts +37 -0
- package/dist/clients/v1/api/deal/setDealRegisteredState/index.d.ts +37 -0
- package/dist/clients/v1/api/deal/setDealSignPlannedState/index.d.ts +36 -0
- package/dist/clients/v1/api/deal/setDealSignedState/index.d.ts +37 -0
- package/dist/clients/v1/api/index.d.ts +4 -0
- package/dist/clients/v1/index.d.ts +4 -0
- package/dist/clients/v1/types/CallProxy.d.ts +3 -3
- package/package.json +1 -1
- package/src/clients/v1/api/deal/setDealPrepaymentState/index.ts +46 -0
- package/src/clients/v1/api/deal/setDealRegisteredState/index.ts +46 -0
- package/src/clients/v1/api/deal/setDealSignPlannedState/index.ts +45 -0
- package/src/clients/v1/api/deal/setDealSignedState/index.ts +46 -0
- package/src/clients/v1/api/index.ts +4 -0
- package/src/clients/v1/index.ts +37 -1
- package/src/clients/v1/types/CallProxy.ts +3 -3
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
declare type SuccessData = {
|
|
4
|
+
success: true;
|
|
5
|
+
data: Partial<Deal> & {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare type ErrorData = {
|
|
10
|
+
success: false;
|
|
11
|
+
data: {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare type ResultData = SuccessData['data'];
|
|
16
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
17
|
+
export declare type SetDealPrepaymentStateUrlParams = {
|
|
18
|
+
id: number;
|
|
19
|
+
};
|
|
20
|
+
export declare type SetDealPrepaymentStateHeaders = {
|
|
21
|
+
'x-auth-hc': string;
|
|
22
|
+
};
|
|
23
|
+
export declare type SetDealPrepaymentStateBody = {
|
|
24
|
+
rollbackReason?: string;
|
|
25
|
+
prepaidAt?: string;
|
|
26
|
+
dealSignPlannedAt?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type SetDealPrepaymentStateData = AxiosResponse<ResultData>;
|
|
29
|
+
export declare type SetDealPrepaymentStateError = AxiosError<ResultError>;
|
|
30
|
+
export declare type SetDealPrepaymentStateConfig = {
|
|
31
|
+
baseURL?: string;
|
|
32
|
+
urlParams: SetDealPrepaymentStateUrlParams;
|
|
33
|
+
headers: SetDealPrepaymentStateHeaders;
|
|
34
|
+
body: SetDealPrepaymentStateBody;
|
|
35
|
+
};
|
|
36
|
+
export declare function setDealPrepaymentStateRequest({ baseURL, urlParams, body, headers, }: SetDealPrepaymentStateConfig): Promise<SetDealPrepaymentStateData>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
declare type SuccessData = {
|
|
4
|
+
success: true;
|
|
5
|
+
data: Partial<Deal> & {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare type ErrorData = {
|
|
10
|
+
success: false;
|
|
11
|
+
data: {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare type ResultData = SuccessData['data'];
|
|
16
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
17
|
+
export declare type SetDealRegisteredStateUrlParams = {
|
|
18
|
+
id: number;
|
|
19
|
+
};
|
|
20
|
+
export declare type SetDealRegisteredStateHeaders = {
|
|
21
|
+
'x-auth-hc': string;
|
|
22
|
+
};
|
|
23
|
+
export declare type SetDealRegisteredStateBody = {
|
|
24
|
+
rollbackReason?: string;
|
|
25
|
+
registeredAt?: string;
|
|
26
|
+
commissionPlannedAt?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type SetDealRegisteredStateData = AxiosResponse<ResultData>;
|
|
29
|
+
export declare type SetDealRegisteredStateError = AxiosError<ResultError>;
|
|
30
|
+
export declare type SetDealRegisteredStateConfig = {
|
|
31
|
+
baseURL?: string;
|
|
32
|
+
urlParams: SetDealRegisteredStateUrlParams;
|
|
33
|
+
headers: SetDealRegisteredStateHeaders;
|
|
34
|
+
body: SetDealRegisteredStateBody;
|
|
35
|
+
};
|
|
36
|
+
export declare function setDealRegisteredStateRequest({ baseURL, urlParams, body, headers, }: SetDealRegisteredStateConfig): Promise<SetDealRegisteredStateData>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
declare type SuccessData = {
|
|
4
|
+
success: true;
|
|
5
|
+
data: Partial<Deal> & {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare type ErrorData = {
|
|
10
|
+
success: false;
|
|
11
|
+
data: {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare type ResultData = SuccessData['data'];
|
|
16
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
17
|
+
export declare type SetDealSignPlannedStateUrlParams = {
|
|
18
|
+
id: number;
|
|
19
|
+
};
|
|
20
|
+
export declare type SetDealSignPlannedStateHeaders = {
|
|
21
|
+
'x-auth-hc': string;
|
|
22
|
+
};
|
|
23
|
+
export declare type SetDealSignPlannedStateBody = {
|
|
24
|
+
rollbackReason?: string;
|
|
25
|
+
dealSignPlannedAt?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare type SetDealSignPlannedStateData = AxiosResponse<ResultData>;
|
|
28
|
+
export declare type SetDealSignPlannedStateError = AxiosError<ResultError>;
|
|
29
|
+
export declare type SetDealSignPlannedStateConfig = {
|
|
30
|
+
baseURL?: string;
|
|
31
|
+
urlParams: SetDealSignPlannedStateUrlParams;
|
|
32
|
+
headers: SetDealSignPlannedStateHeaders;
|
|
33
|
+
body: SetDealSignPlannedStateBody;
|
|
34
|
+
};
|
|
35
|
+
export declare function setDealSignPlannedStateRequest({ baseURL, urlParams, body, headers, }: SetDealSignPlannedStateConfig): Promise<SetDealSignPlannedStateData>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
declare type SuccessData = {
|
|
4
|
+
success: true;
|
|
5
|
+
data: Partial<Deal> & {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare type ErrorData = {
|
|
10
|
+
success: false;
|
|
11
|
+
data: {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare type ResultData = SuccessData['data'];
|
|
16
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
17
|
+
export declare type SetDealSignedStateUrlParams = {
|
|
18
|
+
id: number;
|
|
19
|
+
};
|
|
20
|
+
export declare type SetDealSignedStateHeaders = {
|
|
21
|
+
'x-auth-hc': string;
|
|
22
|
+
};
|
|
23
|
+
export declare type SetDealSignedStateBody = {
|
|
24
|
+
rollbackReason?: string;
|
|
25
|
+
dealSignedAt?: string;
|
|
26
|
+
registerPlannedAt?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type SetDealSignedStateData = AxiosResponse<ResultData>;
|
|
29
|
+
export declare type SetDealSignedStateError = AxiosError<ResultError>;
|
|
30
|
+
export declare type SetDealSignedStateConfig = {
|
|
31
|
+
baseURL?: string;
|
|
32
|
+
urlParams: SetDealSignedStateUrlParams;
|
|
33
|
+
headers: SetDealSignedStateHeaders;
|
|
34
|
+
body: SetDealSignedStateBody;
|
|
35
|
+
};
|
|
36
|
+
export declare function setDealSignedStateRequest({ baseURL, urlParams, body, headers, }: SetDealSignedStateConfig): Promise<SetDealSignedStateData>;
|
|
37
|
+
export {};
|
|
@@ -29,6 +29,10 @@ export * from './deal/deleteDealCategorizedFile';
|
|
|
29
29
|
export * from './deal/findDealCategorizedFiles';
|
|
30
30
|
export * from './deal/terminateDeal';
|
|
31
31
|
export * from './deal/updateDeal';
|
|
32
|
+
export * from './deal/setDealPrepaymentState';
|
|
33
|
+
export * from './deal/setDealRegisteredState';
|
|
34
|
+
export * from './deal/setDealSignPlannedState';
|
|
35
|
+
export * from './deal/setDealSignedState';
|
|
32
36
|
export * from './expert/findExperts';
|
|
33
37
|
export * from './expert/findPublishedExperts';
|
|
34
38
|
export * from './expert/findExpertById';
|
|
@@ -33,6 +33,10 @@ export declare class Api {
|
|
|
33
33
|
deleteDealCategorizedFile: (urlParams: api.DeleteDealCategorizedFileUrlParams, headers: api.DeleteDealCategorizedFileHeaders) => Promise<api.DeleteDealCategorizedFileData>;
|
|
34
34
|
terminateDeal: (urlParams: api.TerminateDealUrlParams, body: api.TerminateDealBody, headers: api.TerminateDealHeaders) => Promise<api.TerminateDealData>;
|
|
35
35
|
updateDeal: (urlParams: api.UpdateDealUrlParams, body: api.UpdateDealBody, headers: api.UpdateDealHeaders) => Promise<api.UpdateDealData>;
|
|
36
|
+
setDealPrepaymentState: (urlParams: api.SetDealPrepaymentStateUrlParams, body: api.SetDealPrepaymentStateBody, headers: api.SetDealPrepaymentStateHeaders) => Promise<api.SetDealPrepaymentStateData>;
|
|
37
|
+
setDealRegisteredState: (urlParams: api.SetDealRegisteredStateUrlParams, body: api.SetDealRegisteredStateBody, headers: api.SetDealRegisteredStateHeaders) => Promise<api.SetDealRegisteredStateData>;
|
|
38
|
+
setDealSignedState: (urlParams: api.SetDealSignedStateUrlParams, body: api.SetDealSignedStateBody, headers: api.SetDealSignedStateHeaders) => Promise<api.SetDealSignedStateData>;
|
|
39
|
+
setDealSignPlannedState: (urlParams: api.SetDealSignPlannedStateUrlParams, body: api.SetDealSignPlannedStateBody, headers: api.SetDealSignPlannedStateHeaders) => Promise<api.SetDealSignPlannedStateData>;
|
|
36
40
|
findExperts: (params: api.FindExpertsParams) => Promise<api.FindExpertsData>;
|
|
37
41
|
findPublishedExperts: (params: api.FindPublishedExpertsParams) => Promise<api.FindPublishedExpertsData>;
|
|
38
42
|
findExpertById: (urlParams: api.FindExpertByIdUrlParams, headers: api.FindExpertByIdHeaders) => Promise<api.FindExpertByIdData>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type CallProxy = {
|
|
2
|
-
|
|
2
|
+
createdAt: string;
|
|
3
3
|
expert: {
|
|
4
4
|
id: number;
|
|
5
5
|
};
|
|
@@ -7,10 +7,10 @@ export declare type CallProxy = {
|
|
|
7
7
|
id: number;
|
|
8
8
|
number: string;
|
|
9
9
|
};
|
|
10
|
+
expiresAt: string;
|
|
11
|
+
id: number;
|
|
10
12
|
purposePhone: {
|
|
11
13
|
id: number;
|
|
12
14
|
number: string;
|
|
13
15
|
};
|
|
14
|
-
createdAt: string;
|
|
15
|
-
expiresAt: string;
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: Partial<Deal> & { id: number } };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type SetDealPrepaymentStateUrlParams = { id: number };
|
|
11
|
+
export type SetDealPrepaymentStateHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type SetDealPrepaymentStateBody = {
|
|
13
|
+
rollbackReason?: string;
|
|
14
|
+
prepaidAt?: string;
|
|
15
|
+
dealSignPlannedAt?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type SetDealPrepaymentStateData = AxiosResponse<ResultData>;
|
|
19
|
+
export type SetDealPrepaymentStateError = AxiosError<ResultError>;
|
|
20
|
+
export type SetDealPrepaymentStateConfig = {
|
|
21
|
+
baseURL?: string;
|
|
22
|
+
urlParams: SetDealPrepaymentStateUrlParams;
|
|
23
|
+
headers: SetDealPrepaymentStateHeaders;
|
|
24
|
+
body: SetDealPrepaymentStateBody;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export function setDealPrepaymentStateRequest({
|
|
28
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
29
|
+
urlParams,
|
|
30
|
+
body,
|
|
31
|
+
headers,
|
|
32
|
+
}: SetDealPrepaymentStateConfig) {
|
|
33
|
+
return axios
|
|
34
|
+
.patch(`/api/deal/status/prepaid/${urlParams.id}`, body, {
|
|
35
|
+
baseURL,
|
|
36
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
37
|
+
transformResponse: [
|
|
38
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
39
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
40
|
+
],
|
|
41
|
+
})
|
|
42
|
+
.then((res: SetDealPrepaymentStateData) => res)
|
|
43
|
+
.catch((err: SetDealPrepaymentStateError) => {
|
|
44
|
+
throw err;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: Partial<Deal> & { id: number } };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type SetDealRegisteredStateUrlParams = { id: number };
|
|
11
|
+
export type SetDealRegisteredStateHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type SetDealRegisteredStateBody = {
|
|
13
|
+
rollbackReason?: string;
|
|
14
|
+
registeredAt?: string;
|
|
15
|
+
commissionPlannedAt?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type SetDealRegisteredStateData = AxiosResponse<ResultData>;
|
|
19
|
+
export type SetDealRegisteredStateError = AxiosError<ResultError>;
|
|
20
|
+
export type SetDealRegisteredStateConfig = {
|
|
21
|
+
baseURL?: string;
|
|
22
|
+
urlParams: SetDealRegisteredStateUrlParams;
|
|
23
|
+
headers: SetDealRegisteredStateHeaders;
|
|
24
|
+
body: SetDealRegisteredStateBody;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export function setDealRegisteredStateRequest({
|
|
28
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
29
|
+
urlParams,
|
|
30
|
+
body,
|
|
31
|
+
headers,
|
|
32
|
+
}: SetDealRegisteredStateConfig) {
|
|
33
|
+
return axios
|
|
34
|
+
.patch(`/api/deal/status/registered/${urlParams.id}`, body, {
|
|
35
|
+
baseURL,
|
|
36
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
37
|
+
transformResponse: [
|
|
38
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
39
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
40
|
+
],
|
|
41
|
+
})
|
|
42
|
+
.then((res: SetDealRegisteredStateData) => res)
|
|
43
|
+
.catch((err: SetDealRegisteredStateError) => {
|
|
44
|
+
throw err;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: Partial<Deal> & { id: number } };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type SetDealSignPlannedStateUrlParams = { id: number };
|
|
11
|
+
export type SetDealSignPlannedStateHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type SetDealSignPlannedStateBody = {
|
|
13
|
+
rollbackReason?: string;
|
|
14
|
+
dealSignPlannedAt?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type SetDealSignPlannedStateData = AxiosResponse<ResultData>;
|
|
18
|
+
export type SetDealSignPlannedStateError = AxiosError<ResultError>;
|
|
19
|
+
export type SetDealSignPlannedStateConfig = {
|
|
20
|
+
baseURL?: string;
|
|
21
|
+
urlParams: SetDealSignPlannedStateUrlParams;
|
|
22
|
+
headers: SetDealSignPlannedStateHeaders;
|
|
23
|
+
body: SetDealSignPlannedStateBody;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function setDealSignPlannedStateRequest({
|
|
27
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
28
|
+
urlParams,
|
|
29
|
+
body,
|
|
30
|
+
headers,
|
|
31
|
+
}: SetDealSignPlannedStateConfig) {
|
|
32
|
+
return axios
|
|
33
|
+
.patch(`/api/deal/status/deal-planned/${urlParams.id}`, body, {
|
|
34
|
+
baseURL,
|
|
35
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
36
|
+
transformResponse: [
|
|
37
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
38
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
39
|
+
],
|
|
40
|
+
})
|
|
41
|
+
.then((res: SetDealSignPlannedStateData) => res)
|
|
42
|
+
.catch((err: SetDealSignPlannedStateError) => {
|
|
43
|
+
throw err;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Deal } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: Partial<Deal> & { id: number } };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type SetDealSignedStateUrlParams = { id: number };
|
|
11
|
+
export type SetDealSignedStateHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type SetDealSignedStateBody = {
|
|
13
|
+
rollbackReason?: string;
|
|
14
|
+
dealSignedAt?: string;
|
|
15
|
+
registerPlannedAt?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type SetDealSignedStateData = AxiosResponse<ResultData>;
|
|
19
|
+
export type SetDealSignedStateError = AxiosError<ResultError>;
|
|
20
|
+
export type SetDealSignedStateConfig = {
|
|
21
|
+
baseURL?: string;
|
|
22
|
+
urlParams: SetDealSignedStateUrlParams;
|
|
23
|
+
headers: SetDealSignedStateHeaders;
|
|
24
|
+
body: SetDealSignedStateBody;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export function setDealSignedStateRequest({
|
|
28
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
29
|
+
urlParams,
|
|
30
|
+
body,
|
|
31
|
+
headers,
|
|
32
|
+
}: SetDealSignedStateConfig) {
|
|
33
|
+
return axios
|
|
34
|
+
.patch(`/api/deal/status/deal-signed/${urlParams.id}`, body, {
|
|
35
|
+
baseURL,
|
|
36
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
37
|
+
transformResponse: [
|
|
38
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
39
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
40
|
+
],
|
|
41
|
+
})
|
|
42
|
+
.then((res: SetDealSignedStateData) => res)
|
|
43
|
+
.catch((err: SetDealSignedStateError) => {
|
|
44
|
+
throw err;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -37,6 +37,10 @@ export * from './deal/deleteDealCategorizedFile';
|
|
|
37
37
|
export * from './deal/findDealCategorizedFiles';
|
|
38
38
|
export * from './deal/terminateDeal';
|
|
39
39
|
export * from './deal/updateDeal';
|
|
40
|
+
export * from './deal/setDealPrepaymentState';
|
|
41
|
+
export * from './deal/setDealRegisteredState';
|
|
42
|
+
export * from './deal/setDealSignPlannedState';
|
|
43
|
+
export * from './deal/setDealSignedState';
|
|
40
44
|
|
|
41
45
|
export * from './expert/findExperts';
|
|
42
46
|
export * from './expert/findPublishedExperts';
|
package/src/clients/v1/index.ts
CHANGED
|
@@ -183,6 +183,38 @@ export class Api {
|
|
|
183
183
|
return api.updateDealRequest({ urlParams, body, headers, baseURL: this.baseURL });
|
|
184
184
|
};
|
|
185
185
|
|
|
186
|
+
setDealPrepaymentState = (
|
|
187
|
+
urlParams: api.SetDealPrepaymentStateUrlParams,
|
|
188
|
+
body: api.SetDealPrepaymentStateBody,
|
|
189
|
+
headers: api.SetDealPrepaymentStateHeaders
|
|
190
|
+
) => {
|
|
191
|
+
return api.setDealPrepaymentStateRequest({ urlParams, body, headers, baseURL: this.baseURL });
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
setDealRegisteredState = (
|
|
195
|
+
urlParams: api.SetDealRegisteredStateUrlParams,
|
|
196
|
+
body: api.SetDealRegisteredStateBody,
|
|
197
|
+
headers: api.SetDealRegisteredStateHeaders
|
|
198
|
+
) => {
|
|
199
|
+
return api.setDealRegisteredStateRequest({ urlParams, body, headers, baseURL: this.baseURL });
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
setDealSignedState = (
|
|
203
|
+
urlParams: api.SetDealSignedStateUrlParams,
|
|
204
|
+
body: api.SetDealSignedStateBody,
|
|
205
|
+
headers: api.SetDealSignedStateHeaders
|
|
206
|
+
) => {
|
|
207
|
+
return api.setDealSignedStateRequest({ urlParams, body, headers, baseURL: this.baseURL });
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
setDealSignPlannedState = (
|
|
211
|
+
urlParams: api.SetDealSignPlannedStateUrlParams,
|
|
212
|
+
body: api.SetDealSignPlannedStateBody,
|
|
213
|
+
headers: api.SetDealSignPlannedStateHeaders
|
|
214
|
+
) => {
|
|
215
|
+
return api.setDealSignPlannedStateRequest({ urlParams, body, headers, baseURL: this.baseURL });
|
|
216
|
+
};
|
|
217
|
+
|
|
186
218
|
// expert
|
|
187
219
|
|
|
188
220
|
findExperts = (params: api.FindExpertsParams) => {
|
|
@@ -352,7 +384,11 @@ export class Api {
|
|
|
352
384
|
urlParams: api.FindServiceRequestCategorizedFileCreatedDateUrlParams,
|
|
353
385
|
headers: api.FindServiceRequestCategorizedFileCreatedDateHeaders
|
|
354
386
|
) => {
|
|
355
|
-
return api.findServiceRequestCategorizedFileCreatedDateRequest({
|
|
387
|
+
return api.findServiceRequestCategorizedFileCreatedDateRequest({
|
|
388
|
+
urlParams,
|
|
389
|
+
headers,
|
|
390
|
+
baseURL: this.baseURL,
|
|
391
|
+
});
|
|
356
392
|
};
|
|
357
393
|
|
|
358
394
|
sendServiceRequestToModeration = (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type CallProxy = {
|
|
2
|
-
|
|
2
|
+
createdAt: string;
|
|
3
3
|
expert: { id: number };
|
|
4
4
|
expertPhone: { id: number; number: string };
|
|
5
|
-
purposePhone: { id: number; number: string };
|
|
6
|
-
createdAt: string;
|
|
7
5
|
expiresAt: string;
|
|
6
|
+
id: number;
|
|
7
|
+
purposePhone: { id: number; number: string };
|
|
8
8
|
};
|