@zdn3517/act-api 0.1.4 → 0.1.6
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 +18 -2
- package/build/types/actPreviewResponse.d.ts +1 -0
- package/build/types/actStatus.d.ts +9 -0
- package/build/types/components-schemas-act/act.d.ts +4 -4
- package/build/types/components-schemas-act/actItem.d.ts +6 -2
- package/build/types/components-schemas-act/actListItem.d.ts +4 -4
- package/build/types/components-schemas-act/actPreviewResponse.d.ts +10 -0
- package/build/types/components-schemas-act/actStatus.d.ts +12 -0
- package/build/types/components-schemas-act/createActItem.d.ts +11 -3
- package/build/types/components-schemas-act/createActItemRequest.d.ts +16 -0
- package/build/types/components-schemas-act/createActRequest.d.ts +2 -4
- package/build/types/components-schemas-act/index.d.ts +5 -0
- package/build/types/components-schemas-act/updateActItemRequest.d.ts +16 -0
- package/build/types/components-schemas-act/updateActMetadataRequest.d.ts +11 -0
- package/build/types/components-schemas-act/updateActRequest.d.ts +1 -3
- 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 +2 -3
- package/build/types/components-schemas-suggestions/index.d.ts +9 -0
- package/build/types/components-schemas-suggestions/workTypeSuggestion.d.ts +12 -0
- package/build/types/components-schemas-suggestions/workTypeSuggestionsResponse.d.ts +11 -0
- package/build/types/contract.d.ts +1 -0
- package/build/types/createActItemRequest.d.ts +1 -0
- package/build/types/getContractsResponse.d.ts +1 -0
- package/build/types/getWorkTypeSuggestionsParams.d.ts +16 -0
- package/build/types/index.d.ts +10 -0
- package/build/types/paths-act_item/index.d.ts +8 -0
- package/build/types/paths-act_item/schema.d.ts +9 -0
- package/build/types/paths-act_items/index.d.ts +8 -0
- package/build/types/paths-act_items/schema.d.ts +9 -0
- package/build/types/paths-act_preview/index.d.ts +8 -0
- package/build/types/paths-act_preview/schema.d.ts +9 -0
- package/build/types/paths-contracts/index.d.ts +8 -0
- package/build/types/paths-contracts/schema.d.ts +9 -0
- package/build/types/paths-work_type_suggestions/index.d.ts +8 -0
- package/build/types/paths-work_type_suggestions/schema.d.ts +9 -0
- package/build/types/updateActItemRequest.d.ts +1 -0
- package/build/types/updateActMetadataRequest.d.ts +1 -0
- package/build/types/workTypeSuggestion.d.ts +1 -0
- package/build/types/workTypeSuggestionsResponse.d.ts +1 -0
- package/build/zod/types.gen.d.ts +76 -22
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -10,10 +10,12 @@ import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
|
10
10
|
import type { HealthResponse, PingResponse } from './types/components-schemas-health';
|
|
11
11
|
import type { AuthRequest, AuthResponse } from './types/components-schemas-auth';
|
|
12
12
|
import type { GetUnitsResponse } from './types/components-schemas-unit';
|
|
13
|
-
import type { Act, CreateActRequest, GetActsResponse, UpdateActRequest } from './types/components-schemas-act';
|
|
14
|
-
import type { GetActsParams, GetEstimatesParams } from './types';
|
|
13
|
+
import type { Act, ActItem, ActPreviewResponse, CreateActItemRequest, CreateActRequest, GetActsResponse, UpdateActItemRequest, UpdateActMetadataRequest, UpdateActRequest } from './types/components-schemas-act';
|
|
14
|
+
import type { GetActsParams, GetEstimatesParams, GetWorkTypeSuggestionsParams } 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';
|
|
18
|
+
import type { WorkTypeSuggestionsResponse } from './types/components-schemas-suggestions';
|
|
17
19
|
export declare const getActAPI: () => {
|
|
18
20
|
getHealth: <TData = axios.AxiosResponse<HealthResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
19
21
|
getPing: <TData = axios.AxiosResponse<PingResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
@@ -23,10 +25,17 @@ export declare const getActAPI: () => {
|
|
|
23
25
|
createAct: <TData = axios.AxiosResponse<Act, any, {}>>(createActRequest: CreateActRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
24
26
|
getActById: <TData = axios.AxiosResponse<Act, any, {}>>(actId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
25
27
|
updateAct: <TData = axios.AxiosResponse<Act, any, {}>>(actId: string, updateActRequest: UpdateActRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
28
|
+
updateActMetadata: <TData = axios.AxiosResponse<Act, any, {}>>(actId: string, updateActMetadataRequest: UpdateActMetadataRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
26
29
|
deleteAct: <TData = axios.AxiosResponse<void, any, {}>>(actId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
30
|
+
createActItem: <TData = axios.AxiosResponse<ActItem, any, {}>>(actId: string, createActItemRequest: CreateActItemRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
31
|
+
updateActItem: <TData = axios.AxiosResponse<ActItem, any, {}>>(actId: string, itemId: string, updateActItemRequest: UpdateActItemRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
32
|
+
deleteActItem: <TData = axios.AxiosResponse<void, any, {}>>(actId: string, itemId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
33
|
+
previewAct: <TData = axios.AxiosResponse<ActPreviewResponse, any, {}>>(actId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
27
34
|
getObjects: <TData = axios.AxiosResponse<GetObjectsResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
35
|
+
getContracts: <TData = axios.AxiosResponse<GetContractsResponse, any, {}>>(objectId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
28
36
|
getEstimates: <TData = axios.AxiosResponse<GetEstimatesResponse, any, {}>>(params: GetEstimatesParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
29
37
|
getEstimateById: <TData = axios.AxiosResponse<Estimate, any, {}>>(estimateId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
38
|
+
getWorkTypeSuggestions: <TData = axios.AxiosResponse<WorkTypeSuggestionsResponse, any, {}>>(params: GetWorkTypeSuggestionsParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
30
39
|
};
|
|
31
40
|
export type GetHealthResult = AxiosResponse<HealthResponse>;
|
|
32
41
|
export type GetPingResult = AxiosResponse<PingResponse>;
|
|
@@ -36,7 +45,14 @@ export type GetActsResult = AxiosResponse<GetActsResponse>;
|
|
|
36
45
|
export type CreateActResult = AxiosResponse<Act>;
|
|
37
46
|
export type GetActByIdResult = AxiosResponse<Act>;
|
|
38
47
|
export type UpdateActResult = AxiosResponse<Act>;
|
|
48
|
+
export type UpdateActMetadataResult = AxiosResponse<Act>;
|
|
39
49
|
export type DeleteActResult = AxiosResponse<void>;
|
|
50
|
+
export type CreateActItemResult = AxiosResponse<ActItem>;
|
|
51
|
+
export type UpdateActItemResult = AxiosResponse<ActItem>;
|
|
52
|
+
export type DeleteActItemResult = AxiosResponse<void>;
|
|
53
|
+
export type PreviewActResult = AxiosResponse<ActPreviewResponse>;
|
|
40
54
|
export type GetObjectsResult = AxiosResponse<GetObjectsResponse>;
|
|
55
|
+
export type GetContractsResult = AxiosResponse<GetContractsResponse>;
|
|
41
56
|
export type GetEstimatesResult = AxiosResponse<GetEstimatesResponse>;
|
|
42
57
|
export type GetEstimateByIdResult = AxiosResponse<Estimate>;
|
|
58
|
+
export type GetWorkTypeSuggestionsResult = AxiosResponse<WorkTypeSuggestionsResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 { ActStatus as ComponentsSchemasActActStatus } from './components-schemas-act/actStatus';
|
|
9
|
+
export type ActStatus = ComponentsSchemasActActStatus;
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* API specification for the Act service.
|
|
6
6
|
* OpenAPI spec version: 0.1.0
|
|
7
7
|
*/
|
|
8
|
+
import type { ActStatus } from './actStatus';
|
|
8
9
|
import type { ActItem } from './actItem';
|
|
9
10
|
export interface Act {
|
|
10
11
|
uuid: string;
|
|
11
12
|
contract_id: string;
|
|
12
|
-
|
|
13
|
-
estimate_id?: string;
|
|
14
|
-
title: string;
|
|
15
|
-
description?: string;
|
|
13
|
+
estimate_id: string;
|
|
16
14
|
period_start: string;
|
|
17
15
|
period_end: string;
|
|
16
|
+
status: ActStatus;
|
|
17
|
+
submitted_at?: string;
|
|
18
18
|
items: ActItem[];
|
|
19
19
|
}
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
export interface ActItem {
|
|
9
9
|
uuid: string;
|
|
10
10
|
act_id: string;
|
|
11
|
-
|
|
11
|
+
section_title?: string;
|
|
12
|
+
work_type: string;
|
|
12
13
|
quantity: number;
|
|
13
|
-
|
|
14
|
+
unit: string;
|
|
15
|
+
unit_price: number;
|
|
16
|
+
note?: string;
|
|
17
|
+
total: number;
|
|
14
18
|
}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* API specification for the Act service.
|
|
6
6
|
* OpenAPI spec version: 0.1.0
|
|
7
7
|
*/
|
|
8
|
+
import type { ActStatus } from './actStatus';
|
|
8
9
|
export interface ActListItem {
|
|
9
10
|
uuid: string;
|
|
10
11
|
contract_id: string;
|
|
11
|
-
|
|
12
|
-
estimate_id?: string;
|
|
13
|
-
title: string;
|
|
14
|
-
description?: string;
|
|
12
|
+
estimate_id: string;
|
|
15
13
|
period_start: string;
|
|
16
14
|
period_end: string;
|
|
15
|
+
status: ActStatus;
|
|
16
|
+
submitted_at?: string;
|
|
17
17
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 type ActStatus = typeof ActStatus[keyof typeof ActStatus];
|
|
9
|
+
export declare const ActStatus: {
|
|
10
|
+
readonly draft: "draft";
|
|
11
|
+
readonly submitted: "submitted";
|
|
12
|
+
};
|
|
@@ -6,7 +6,15 @@
|
|
|
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
|
+
section_title?: string;
|
|
14
|
+
work_type?: string;
|
|
15
|
+
quantity?: number;
|
|
16
|
+
unit?: string;
|
|
17
|
+
unit_price?: number;
|
|
18
|
+
note?: string;
|
|
19
|
+
total?: number;
|
|
12
20
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 CreateActItemRequest {
|
|
9
|
+
section_title?: string;
|
|
10
|
+
work_type: string;
|
|
11
|
+
quantity: number;
|
|
12
|
+
unit: string;
|
|
13
|
+
unit_price: number;
|
|
14
|
+
total: number;
|
|
15
|
+
note?: string;
|
|
16
|
+
}
|
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
import type { CreateActItem } from './createActItem';
|
|
9
9
|
export interface CreateActRequest {
|
|
10
10
|
contract_id: string;
|
|
11
|
-
estimate_id
|
|
12
|
-
title: string;
|
|
13
|
-
description?: string;
|
|
11
|
+
estimate_id: string;
|
|
14
12
|
period_start: string;
|
|
15
13
|
period_end: string;
|
|
16
|
-
items
|
|
14
|
+
items?: CreateActItem[];
|
|
17
15
|
}
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
export * from './act';
|
|
9
9
|
export * from './actItem';
|
|
10
10
|
export * from './actListItem';
|
|
11
|
+
export * from './actPreviewResponse';
|
|
12
|
+
export * from './actStatus';
|
|
11
13
|
export * from './createActItem';
|
|
14
|
+
export * from './createActItemRequest';
|
|
12
15
|
export * from './createActRequest';
|
|
13
16
|
export * from './getActsResponse';
|
|
17
|
+
export * from './updateActItemRequest';
|
|
18
|
+
export * from './updateActMetadataRequest';
|
|
14
19
|
export * from './updateActRequest';
|
|
@@ -0,0 +1,16 @@
|
|
|
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 UpdateActItemRequest {
|
|
9
|
+
section_title?: string;
|
|
10
|
+
work_type?: string;
|
|
11
|
+
quantity?: number;
|
|
12
|
+
unit?: string;
|
|
13
|
+
unit_price?: number;
|
|
14
|
+
total?: number;
|
|
15
|
+
note?: string;
|
|
16
|
+
}
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
import type { CreateActItem } from './createActItem';
|
|
9
9
|
export interface UpdateActRequest {
|
|
10
10
|
contract_id: string;
|
|
11
|
-
estimate_id
|
|
12
|
-
title: string;
|
|
13
|
-
description?: string;
|
|
11
|
+
estimate_id: string;
|
|
14
12
|
period_start: string;
|
|
15
13
|
period_end: string;
|
|
16
14
|
items: CreateActItem[];
|
|
@@ -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,12 @@
|
|
|
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 WorkTypeSuggestion {
|
|
9
|
+
work_type: string;
|
|
10
|
+
unit: string;
|
|
11
|
+
unit_price: number;
|
|
12
|
+
}
|
|
@@ -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 { WorkTypeSuggestion } from './workTypeSuggestion';
|
|
9
|
+
export interface WorkTypeSuggestionsResponse {
|
|
10
|
+
items: WorkTypeSuggestion[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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 type GetWorkTypeSuggestionsParams = {
|
|
9
|
+
estimate_id: string;
|
|
10
|
+
q: string;
|
|
11
|
+
/**
|
|
12
|
+
* @minimum 1
|
|
13
|
+
* @maximum 50
|
|
14
|
+
*/
|
|
15
|
+
limit?: number;
|
|
16
|
+
};
|
package/build/types/index.d.ts
CHANGED
|
@@ -8,20 +8,30 @@
|
|
|
8
8
|
export * from './act';
|
|
9
9
|
export * from './actItem';
|
|
10
10
|
export * from './actListItem';
|
|
11
|
+
export * from './actPreviewResponse';
|
|
12
|
+
export * from './actStatus';
|
|
11
13
|
export * from './authRequest';
|
|
12
14
|
export * from './authResponse';
|
|
15
|
+
export * from './contract';
|
|
13
16
|
export * from './createActItem';
|
|
17
|
+
export * from './createActItemRequest';
|
|
14
18
|
export * from './createActRequest';
|
|
15
19
|
export * from './errorResponse';
|
|
16
20
|
export * from './estimate';
|
|
17
21
|
export * from './getActsParams';
|
|
18
22
|
export * from './getActsResponse';
|
|
23
|
+
export * from './getContractsResponse';
|
|
19
24
|
export * from './getEstimatesParams';
|
|
20
25
|
export * from './getEstimatesResponse';
|
|
21
26
|
export * from './getObjectsResponse';
|
|
22
27
|
export * from './getUnitsResponse';
|
|
28
|
+
export * from './getWorkTypeSuggestionsParams';
|
|
23
29
|
export * from './healthResponse';
|
|
24
30
|
export * from './object';
|
|
25
31
|
export * from './pingResponse';
|
|
26
32
|
export * from './unit';
|
|
33
|
+
export * from './updateActItemRequest';
|
|
34
|
+
export * from './updateActMetadataRequest';
|
|
27
35
|
export * from './updateActRequest';
|
|
36
|
+
export * from './workTypeSuggestion';
|
|
37
|
+
export * from './workTypeSuggestionsResponse';
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/zod/types.gen.d.ts
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
export type Act = {
|
|
2
2
|
uuid: string;
|
|
3
3
|
contract_id: string;
|
|
4
|
-
|
|
5
|
-
estimate_id?: string;
|
|
6
|
-
title: string;
|
|
7
|
-
description?: string;
|
|
4
|
+
estimate_id: string;
|
|
8
5
|
period_start: string;
|
|
9
6
|
period_end: string;
|
|
7
|
+
status: ActStatus;
|
|
8
|
+
submitted_at?: string;
|
|
10
9
|
items: Array<ActItem>;
|
|
11
10
|
};
|
|
12
11
|
export type ActItem = {
|
|
13
12
|
uuid: string;
|
|
14
13
|
act_id: string;
|
|
15
|
-
|
|
14
|
+
section_title?: string;
|
|
15
|
+
work_type: string;
|
|
16
16
|
quantity: number;
|
|
17
|
-
|
|
17
|
+
unit: string;
|
|
18
|
+
unit_price: number;
|
|
19
|
+
note?: string;
|
|
20
|
+
total: number;
|
|
18
21
|
};
|
|
19
22
|
export type ActListItem = {
|
|
20
23
|
uuid: string;
|
|
21
24
|
contract_id: string;
|
|
22
|
-
|
|
23
|
-
estimate_id?: string;
|
|
24
|
-
title: string;
|
|
25
|
-
description?: string;
|
|
25
|
+
estimate_id: string;
|
|
26
26
|
period_start: string;
|
|
27
27
|
period_end: string;
|
|
28
|
+
status: ActStatus;
|
|
29
|
+
submitted_at?: string;
|
|
30
|
+
};
|
|
31
|
+
export type ActPreviewResponse = {
|
|
32
|
+
url: string;
|
|
28
33
|
};
|
|
34
|
+
export type ActStatus = 'draft' | 'submitted';
|
|
29
35
|
export type AuthRequest = {
|
|
30
36
|
/**
|
|
31
37
|
* Raw Telegram WebApp initData string.
|
|
@@ -35,33 +41,62 @@ export type AuthRequest = {
|
|
|
35
41
|
export type AuthResponse = {
|
|
36
42
|
token: string;
|
|
37
43
|
};
|
|
44
|
+
export type Contract = {
|
|
45
|
+
uuid: string;
|
|
46
|
+
object_id: string;
|
|
47
|
+
customer_id: string;
|
|
48
|
+
contractor_id: string;
|
|
49
|
+
title?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
};
|
|
38
52
|
export type CreateActItem = {
|
|
39
|
-
|
|
53
|
+
/**
|
|
54
|
+
* section or item
|
|
55
|
+
*/
|
|
56
|
+
kind: string;
|
|
57
|
+
/**
|
|
58
|
+
* Section title (for kind=section)
|
|
59
|
+
*/
|
|
60
|
+
title?: string;
|
|
61
|
+
section_title?: string;
|
|
62
|
+
work_type?: string;
|
|
63
|
+
quantity?: number;
|
|
64
|
+
unit?: string;
|
|
65
|
+
unit_price?: number;
|
|
66
|
+
note?: string;
|
|
67
|
+
total?: number;
|
|
68
|
+
};
|
|
69
|
+
export type CreateActItemRequest = {
|
|
70
|
+
section_title?: string;
|
|
71
|
+
work_type: string;
|
|
40
72
|
quantity: number;
|
|
41
|
-
|
|
73
|
+
unit: string;
|
|
74
|
+
unit_price: number;
|
|
75
|
+
total: number;
|
|
76
|
+
note?: string;
|
|
42
77
|
};
|
|
43
78
|
export type CreateActRequest = {
|
|
44
79
|
contract_id: string;
|
|
45
|
-
estimate_id
|
|
46
|
-
title: string;
|
|
47
|
-
description?: string;
|
|
80
|
+
estimate_id: string;
|
|
48
81
|
period_start: string;
|
|
49
82
|
period_end: string;
|
|
50
|
-
items
|
|
83
|
+
items?: Array<CreateActItem>;
|
|
51
84
|
};
|
|
52
85
|
export type ErrorResponse = {
|
|
53
86
|
error: string;
|
|
54
87
|
};
|
|
55
88
|
export type Estimate = {
|
|
56
89
|
uuid: string;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
description: string;
|
|
90
|
+
contract_id: string;
|
|
91
|
+
object_id?: string;
|
|
60
92
|
is_confirmed: boolean;
|
|
61
93
|
};
|
|
62
94
|
export type GetActsResponse = {
|
|
63
95
|
acts: Array<ActListItem>;
|
|
64
96
|
};
|
|
97
|
+
export type GetContractsResponse = {
|
|
98
|
+
contracts: Array<Contract>;
|
|
99
|
+
};
|
|
65
100
|
export type GetEstimatesResponse = {
|
|
66
101
|
estimates: Array<Estimate>;
|
|
67
102
|
};
|
|
@@ -84,12 +119,31 @@ export type PingResponse = {
|
|
|
84
119
|
export type Unit = {
|
|
85
120
|
unit: string;
|
|
86
121
|
};
|
|
122
|
+
export type UpdateActItemRequest = {
|
|
123
|
+
section_title?: string;
|
|
124
|
+
work_type?: string;
|
|
125
|
+
quantity?: number;
|
|
126
|
+
unit?: string;
|
|
127
|
+
unit_price?: number;
|
|
128
|
+
total?: number;
|
|
129
|
+
note?: string;
|
|
130
|
+
};
|
|
131
|
+
export type UpdateActMetadataRequest = {
|
|
132
|
+
period_start?: string;
|
|
133
|
+
period_end?: string;
|
|
134
|
+
};
|
|
87
135
|
export type UpdateActRequest = {
|
|
88
136
|
contract_id: string;
|
|
89
|
-
estimate_id
|
|
90
|
-
title: string;
|
|
91
|
-
description?: string;
|
|
137
|
+
estimate_id: string;
|
|
92
138
|
period_start: string;
|
|
93
139
|
period_end: string;
|
|
94
140
|
items: Array<CreateActItem>;
|
|
95
141
|
};
|
|
142
|
+
export type WorkTypeSuggestion = {
|
|
143
|
+
work_type: string;
|
|
144
|
+
unit: string;
|
|
145
|
+
unit_price: number;
|
|
146
|
+
};
|
|
147
|
+
export type WorkTypeSuggestionsResponse = {
|
|
148
|
+
items: Array<WorkTypeSuggestion>;
|
|
149
|
+
};
|