@zdn3517/act-api 0.1.3 → 0.1.5
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/build/index.d.ts +3 -0
- package/build/types/components-schemas-act/act.d.ts +3 -4
- package/build/types/components-schemas-act/actItem.d.ts +7 -2
- package/build/types/components-schemas-act/actListItem.d.ts +3 -4
- package/build/types/components-schemas-act/createActItem.d.ts +12 -3
- package/build/types/components-schemas-act/createActRequest.d.ts +2 -4
- package/build/types/components-schemas-act/updateActRequest.d.ts +2 -4
- package/build/types/components-schemas-contracts/contract.d.ts +15 -0
- package/build/types/components-schemas-contracts/getContractsResponse.d.ts +11 -0
- package/build/types/components-schemas-contracts/index.d.ts +9 -0
- package/build/types/components-schemas-estimates/estimate.d.ts +3 -2
- package/build/types/components-schemas-unit/unit.d.ts +1 -3
- package/build/types/contract.d.ts +1 -0
- package/build/types/getContractsResponse.d.ts +1 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/paths-contracts/index.d.ts +8 -0
- package/build/types/paths-contracts/schema.d.ts +9 -0
- package/build/zod/types.gen.d.ts +54 -26
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type { GetUnitsResponse } from './types/components-schemas-unit';
|
|
|
13
13
|
import type { Act, CreateActRequest, GetActsResponse, UpdateActRequest } from './types/components-schemas-act';
|
|
14
14
|
import type { GetActsParams, GetEstimatesParams } from './types';
|
|
15
15
|
import type { GetObjectsResponse } from './types/components-schemas-objects';
|
|
16
|
+
import type { GetContractsResponse } from './types/components-schemas-contracts';
|
|
16
17
|
import type { Estimate, GetEstimatesResponse } from './types/components-schemas-estimates';
|
|
17
18
|
export declare const getActAPI: () => {
|
|
18
19
|
getHealth: <TData = axios.AxiosResponse<HealthResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
@@ -25,6 +26,7 @@ export declare const getActAPI: () => {
|
|
|
25
26
|
updateAct: <TData = axios.AxiosResponse<Act, any, {}>>(actId: string, updateActRequest: UpdateActRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
26
27
|
deleteAct: <TData = axios.AxiosResponse<void, any, {}>>(actId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
27
28
|
getObjects: <TData = axios.AxiosResponse<GetObjectsResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
29
|
+
getContracts: <TData = axios.AxiosResponse<GetContractsResponse, any, {}>>(objectId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
28
30
|
getEstimates: <TData = axios.AxiosResponse<GetEstimatesResponse, any, {}>>(params: GetEstimatesParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
29
31
|
getEstimateById: <TData = axios.AxiosResponse<Estimate, any, {}>>(estimateId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
30
32
|
};
|
|
@@ -38,5 +40,6 @@ export type GetActByIdResult = AxiosResponse<Act>;
|
|
|
38
40
|
export type UpdateActResult = AxiosResponse<Act>;
|
|
39
41
|
export type DeleteActResult = AxiosResponse<void>;
|
|
40
42
|
export type GetObjectsResult = AxiosResponse<GetObjectsResponse>;
|
|
43
|
+
export type GetContractsResult = AxiosResponse<GetContractsResponse>;
|
|
41
44
|
export type GetEstimatesResult = AxiosResponse<GetEstimatesResponse>;
|
|
42
45
|
export type GetEstimateByIdResult = AxiosResponse<Estimate>;
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
import type { ActItem } from './actItem';
|
|
9
9
|
export interface Act {
|
|
10
10
|
uuid: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
estimate_id
|
|
14
|
-
kind: string;
|
|
11
|
+
contract_id: string;
|
|
12
|
+
object_id?: string;
|
|
13
|
+
estimate_id: string;
|
|
15
14
|
title: string;
|
|
16
15
|
description?: string;
|
|
17
16
|
period_start: string;
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
export interface ActItem {
|
|
9
9
|
uuid: string;
|
|
10
10
|
act_id: string;
|
|
11
|
-
|
|
11
|
+
/** @minLength 3 */
|
|
12
|
+
room_title?: string;
|
|
13
|
+
work_type: string;
|
|
12
14
|
quantity: number;
|
|
13
|
-
|
|
15
|
+
unit: string;
|
|
16
|
+
unit_price: number;
|
|
17
|
+
note?: string;
|
|
18
|
+
total: number;
|
|
14
19
|
}
|
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export interface ActListItem {
|
|
9
9
|
uuid: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
estimate_id
|
|
13
|
-
kind: string;
|
|
10
|
+
contract_id: string;
|
|
11
|
+
object_id?: string;
|
|
12
|
+
estimate_id: string;
|
|
14
13
|
title: string;
|
|
15
14
|
description?: string;
|
|
16
15
|
period_start: string;
|
|
@@ -6,7 +6,16 @@
|
|
|
6
6
|
* OpenAPI spec version: 0.1.0
|
|
7
7
|
*/
|
|
8
8
|
export interface CreateActItem {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/** section or item */
|
|
10
|
+
kind: string;
|
|
11
|
+
/** Section title (for kind=section) */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** @minLength 3 */
|
|
14
|
+
room_title?: string;
|
|
15
|
+
work_type?: string;
|
|
16
|
+
quantity?: number;
|
|
17
|
+
unit?: string;
|
|
18
|
+
unit_price?: number;
|
|
19
|
+
note?: string;
|
|
20
|
+
total?: number;
|
|
12
21
|
}
|
|
@@ -7,10 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { CreateActItem } from './createActItem';
|
|
9
9
|
export interface CreateActRequest {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
estimate_id?: string;
|
|
13
|
-
kind: string;
|
|
10
|
+
contract_id: string;
|
|
11
|
+
estimate_id: string;
|
|
14
12
|
title: string;
|
|
15
13
|
description?: string;
|
|
16
14
|
period_start: string;
|
|
@@ -7,10 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { CreateActItem } from './createActItem';
|
|
9
9
|
export interface UpdateActRequest {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
estimate_id?: string;
|
|
13
|
-
kind: string;
|
|
10
|
+
contract_id: string;
|
|
11
|
+
estimate_id: string;
|
|
14
12
|
title: string;
|
|
15
13
|
description?: string;
|
|
16
14
|
period_start: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.17.2 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Act API
|
|
5
|
+
* API specification for the Act service.
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
export interface Contract {
|
|
9
|
+
uuid: string;
|
|
10
|
+
object_id: string;
|
|
11
|
+
customer_id: string;
|
|
12
|
+
contractor_id: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.17.2 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Act API
|
|
5
|
+
* API specification for the Act service.
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { Contract } from './contract';
|
|
9
|
+
export interface GetContractsResponse {
|
|
10
|
+
contracts: Contract[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/types/index.d.ts
CHANGED
|
@@ -10,12 +10,14 @@ export * from './actItem';
|
|
|
10
10
|
export * from './actListItem';
|
|
11
11
|
export * from './authRequest';
|
|
12
12
|
export * from './authResponse';
|
|
13
|
+
export * from './contract';
|
|
13
14
|
export * from './createActItem';
|
|
14
15
|
export * from './createActRequest';
|
|
15
16
|
export * from './errorResponse';
|
|
16
17
|
export * from './estimate';
|
|
17
18
|
export * from './getActsParams';
|
|
18
19
|
export * from './getActsResponse';
|
|
20
|
+
export * from './getContractsResponse';
|
|
19
21
|
export * from './getEstimatesParams';
|
|
20
22
|
export * from './getEstimatesResponse';
|
|
21
23
|
export * from './getObjectsResponse';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.17.2 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Act API
|
|
5
|
+
* API specification for the Act service.
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { ErrorResponse } from '../components-schemas-common/errorResponse';
|
|
9
|
+
export type Schema = ErrorResponse;
|
package/build/zod/types.gen.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export type Act = {
|
|
2
2
|
uuid: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
estimate_id
|
|
6
|
-
kind: string;
|
|
3
|
+
contract_id: string;
|
|
4
|
+
object_id?: string;
|
|
5
|
+
estimate_id: string;
|
|
7
6
|
title: string;
|
|
8
7
|
description?: string;
|
|
9
8
|
period_start: string;
|
|
@@ -13,16 +12,19 @@ export type Act = {
|
|
|
13
12
|
export type ActItem = {
|
|
14
13
|
uuid: string;
|
|
15
14
|
act_id: string;
|
|
16
|
-
|
|
15
|
+
room_title?: string;
|
|
16
|
+
work_type: string;
|
|
17
17
|
quantity: number;
|
|
18
|
-
|
|
18
|
+
unit: string;
|
|
19
|
+
unit_price: number;
|
|
20
|
+
note?: string;
|
|
21
|
+
total: number;
|
|
19
22
|
};
|
|
20
23
|
export type ActListItem = {
|
|
21
24
|
uuid: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
estimate_id
|
|
25
|
-
kind: string;
|
|
25
|
+
contract_id: string;
|
|
26
|
+
object_id?: string;
|
|
27
|
+
estimate_id: string;
|
|
26
28
|
title: string;
|
|
27
29
|
description?: string;
|
|
28
30
|
period_start: string;
|
|
@@ -37,16 +39,34 @@ export type AuthRequest = {
|
|
|
37
39
|
export type AuthResponse = {
|
|
38
40
|
token: string;
|
|
39
41
|
};
|
|
42
|
+
export type Contract = {
|
|
43
|
+
uuid: string;
|
|
44
|
+
object_id: string;
|
|
45
|
+
customer_id: string;
|
|
46
|
+
contractor_id: string;
|
|
47
|
+
title?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
};
|
|
40
50
|
export type CreateActItem = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
/**
|
|
52
|
+
* section or item
|
|
53
|
+
*/
|
|
54
|
+
kind: string;
|
|
55
|
+
/**
|
|
56
|
+
* Section title (for kind=section)
|
|
57
|
+
*/
|
|
58
|
+
title?: string;
|
|
59
|
+
room_title?: string;
|
|
60
|
+
work_type?: string;
|
|
61
|
+
quantity?: number;
|
|
62
|
+
unit?: string;
|
|
63
|
+
unit_price?: number;
|
|
64
|
+
note?: string;
|
|
65
|
+
total?: number;
|
|
44
66
|
};
|
|
45
67
|
export type CreateActRequest = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
estimate_id?: string;
|
|
49
|
-
kind: string;
|
|
68
|
+
contract_id: string;
|
|
69
|
+
estimate_id: string;
|
|
50
70
|
title: string;
|
|
51
71
|
description?: string;
|
|
52
72
|
period_start: string;
|
|
@@ -58,14 +78,18 @@ export type ErrorResponse = {
|
|
|
58
78
|
};
|
|
59
79
|
export type Estimate = {
|
|
60
80
|
uuid: string;
|
|
61
|
-
|
|
81
|
+
contract_id: string;
|
|
82
|
+
object_id?: string;
|
|
62
83
|
title: string;
|
|
63
|
-
description
|
|
84
|
+
description?: string;
|
|
64
85
|
is_confirmed: boolean;
|
|
65
86
|
};
|
|
66
87
|
export type GetActsResponse = {
|
|
67
88
|
acts: Array<ActListItem>;
|
|
68
89
|
};
|
|
90
|
+
export type GetContractsResponse = {
|
|
91
|
+
contracts: Array<Contract>;
|
|
92
|
+
};
|
|
69
93
|
export type GetEstimatesResponse = {
|
|
70
94
|
estimates: Array<Estimate>;
|
|
71
95
|
};
|
|
@@ -86,18 +110,22 @@ export type PingResponse = {
|
|
|
86
110
|
message: string;
|
|
87
111
|
};
|
|
88
112
|
export type Unit = {
|
|
89
|
-
|
|
90
|
-
title: string;
|
|
91
|
-
code: string;
|
|
113
|
+
unit: string;
|
|
92
114
|
};
|
|
93
115
|
export type UpdateActRequest = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
estimate_id?: string;
|
|
97
|
-
kind: string;
|
|
116
|
+
contract_id: string;
|
|
117
|
+
estimate_id: string;
|
|
98
118
|
title: string;
|
|
99
119
|
description?: string;
|
|
100
120
|
period_start: string;
|
|
101
121
|
period_end: string;
|
|
102
122
|
items: Array<CreateActItem>;
|
|
103
123
|
};
|
|
124
|
+
export type WorkTypeSuggestion = {
|
|
125
|
+
work_type: string;
|
|
126
|
+
unit: string;
|
|
127
|
+
unit_price: number;
|
|
128
|
+
};
|
|
129
|
+
export type WorkTypeSuggestionsResponse = {
|
|
130
|
+
items: Array<WorkTypeSuggestion>;
|
|
131
|
+
};
|