@zdn3517/act-api 0.1.2 → 0.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/build/index.d.ts +42 -1
- package/build/types/act.d.ts +1 -0
- package/build/types/actItem.d.ts +1 -0
- package/build/types/actListItem.d.ts +1 -0
- package/build/types/authRequest.d.ts +1 -0
- package/build/types/authResponse.d.ts +1 -0
- package/build/types/components-schemas-act/act.d.ts +19 -0
- package/build/types/components-schemas-act/actItem.d.ts +14 -0
- package/build/types/components-schemas-act/actListItem.d.ts +17 -0
- package/build/types/components-schemas-act/createActItem.d.ts +12 -0
- package/build/types/components-schemas-act/createActRequest.d.ts +17 -0
- package/build/types/components-schemas-act/getActsResponse.d.ts +11 -0
- package/build/types/components-schemas-act/index.d.ts +14 -0
- package/build/types/components-schemas-act/updateActRequest.d.ts +17 -0
- package/build/types/components-schemas-auth/authRequest.d.ts +11 -0
- package/build/types/components-schemas-auth/authResponse.d.ts +10 -0
- package/build/types/components-schemas-auth/index.d.ts +9 -0
- package/build/types/components-schemas-common/errorResponse.d.ts +10 -0
- package/build/types/components-schemas-common/index.d.ts +8 -0
- package/build/types/components-schemas-estimates/estimate.d.ts +14 -0
- package/build/types/components-schemas-estimates/getEstimatesResponse.d.ts +11 -0
- package/build/types/components-schemas-estimates/index.d.ts +9 -0
- package/build/types/components-schemas-health/healthResponse.d.ts +10 -0
- package/build/types/components-schemas-health/index.d.ts +9 -0
- package/build/types/components-schemas-health/pingResponse.d.ts +10 -0
- package/build/types/components-schemas-objects/getObjectsResponse.d.ts +11 -0
- package/build/types/components-schemas-objects/index.d.ts +9 -0
- package/build/types/components-schemas-objects/object.d.ts +11 -0
- package/build/types/components-schemas-unit/getUnitsResponse.d.ts +11 -0
- package/build/types/components-schemas-unit/index.d.ts +9 -0
- package/build/types/components-schemas-unit/unit.d.ts +10 -0
- package/build/types/createActItem.d.ts +1 -0
- package/build/types/createActRequest.d.ts +1 -0
- package/build/types/errorResponse.d.ts +1 -0
- package/build/types/estimate.d.ts +1 -0
- package/build/types/getActsParams.d.ts +10 -0
- package/build/types/getActsResponse.d.ts +1 -0
- package/build/types/getEstimatesParams.d.ts +10 -0
- package/build/types/getEstimatesResponse.d.ts +1 -0
- package/build/types/getObjectsResponse.d.ts +1 -0
- package/build/types/getUnitsResponse.d.ts +1 -0
- package/build/types/healthResponse.d.ts +1 -0
- package/build/types/index.d.ts +27 -0
- package/build/types/object.d.ts +1 -0
- package/build/types/paths-act/index.d.ts +8 -0
- package/build/types/paths-act/schema.d.ts +9 -0
- package/build/types/paths-acts/index.d.ts +8 -0
- package/build/types/paths-acts/schema.d.ts +9 -0
- package/build/types/paths-auth/index.d.ts +8 -0
- package/build/types/paths-auth/schema.d.ts +9 -0
- package/build/types/paths-estimate/index.d.ts +8 -0
- package/build/types/paths-estimate/schema.d.ts +9 -0
- package/build/types/paths-estimates/index.d.ts +8 -0
- package/build/types/paths-estimates/schema.d.ts +9 -0
- package/build/types/paths-health/index.d.ts +8 -0
- package/build/types/paths-health/schema.d.ts +9 -0
- package/build/types/paths-objects/index.d.ts +8 -0
- package/build/types/paths-objects/schema.d.ts +9 -0
- package/build/types/paths-ping/index.d.ts +8 -0
- package/build/types/paths-ping/schema.d.ts +9 -0
- package/build/types/paths-units/index.d.ts +8 -0
- package/build/types/paths-units/schema.d.ts +9 -0
- package/build/types/pingResponse.d.ts +1 -0
- package/build/types/unit.d.ts +1 -0
- package/build/types/updateActRequest.d.ts +1 -0
- package/build/zod/index.d.ts +1 -0
- package/build/zod/types.gen.d.ts +95 -0
- package/package.json +5 -3
- package/build/types.gen.d.ts +0 -26
package/build/index.d.ts
CHANGED
|
@@ -1 +1,42 @@
|
|
|
1
|
-
|
|
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 * as axios from 'axios';
|
|
9
|
+
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
10
|
+
import type { HealthResponse, PingResponse } from './types/components-schemas-health';
|
|
11
|
+
import type { AuthRequest, AuthResponse } from './types/components-schemas-auth';
|
|
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';
|
|
15
|
+
import type { GetObjectsResponse } from './types/components-schemas-objects';
|
|
16
|
+
import type { Estimate, GetEstimatesResponse } from './types/components-schemas-estimates';
|
|
17
|
+
export declare const getActAPI: () => {
|
|
18
|
+
getHealth: <TData = axios.AxiosResponse<HealthResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
19
|
+
getPing: <TData = axios.AxiosResponse<PingResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
20
|
+
authTelegram: <TData = axios.AxiosResponse<AuthResponse, any, {}>>(authRequest: AuthRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
21
|
+
getUnits: <TData = axios.AxiosResponse<GetUnitsResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
22
|
+
getActs: <TData = axios.AxiosResponse<GetActsResponse, any, {}>>(params?: GetActsParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
23
|
+
createAct: <TData = axios.AxiosResponse<Act, any, {}>>(createActRequest: CreateActRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
24
|
+
getActById: <TData = axios.AxiosResponse<Act, any, {}>>(actId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
25
|
+
updateAct: <TData = axios.AxiosResponse<Act, any, {}>>(actId: string, updateActRequest: UpdateActRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
26
|
+
deleteAct: <TData = axios.AxiosResponse<void, any, {}>>(actId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
27
|
+
getObjects: <TData = axios.AxiosResponse<GetObjectsResponse, any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
|
|
28
|
+
getEstimates: <TData = axios.AxiosResponse<GetEstimatesResponse, any, {}>>(params: GetEstimatesParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
29
|
+
getEstimateById: <TData = axios.AxiosResponse<Estimate, any, {}>>(estimateId: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
30
|
+
};
|
|
31
|
+
export type GetHealthResult = AxiosResponse<HealthResponse>;
|
|
32
|
+
export type GetPingResult = AxiosResponse<PingResponse>;
|
|
33
|
+
export type AuthTelegramResult = AxiosResponse<AuthResponse>;
|
|
34
|
+
export type GetUnitsResult = AxiosResponse<GetUnitsResponse>;
|
|
35
|
+
export type GetActsResult = AxiosResponse<GetActsResponse>;
|
|
36
|
+
export type CreateActResult = AxiosResponse<Act>;
|
|
37
|
+
export type GetActByIdResult = AxiosResponse<Act>;
|
|
38
|
+
export type UpdateActResult = AxiosResponse<Act>;
|
|
39
|
+
export type DeleteActResult = AxiosResponse<void>;
|
|
40
|
+
export type GetObjectsResult = AxiosResponse<GetObjectsResponse>;
|
|
41
|
+
export type GetEstimatesResult = AxiosResponse<GetEstimatesResponse>;
|
|
42
|
+
export type GetEstimateByIdResult = AxiosResponse<Estimate>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { ActItem } from './actItem';
|
|
9
|
+
export interface Act {
|
|
10
|
+
uuid: string;
|
|
11
|
+
contract_id: string;
|
|
12
|
+
object_id?: string;
|
|
13
|
+
estimate_id?: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
period_start: string;
|
|
17
|
+
period_end: string;
|
|
18
|
+
items: ActItem[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 ActItem {
|
|
9
|
+
uuid: string;
|
|
10
|
+
act_id: string;
|
|
11
|
+
service_id: string;
|
|
12
|
+
quantity: number;
|
|
13
|
+
price: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 ActListItem {
|
|
9
|
+
uuid: string;
|
|
10
|
+
contract_id: string;
|
|
11
|
+
object_id?: string;
|
|
12
|
+
estimate_id?: string;
|
|
13
|
+
title: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
period_start: string;
|
|
16
|
+
period_end: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { CreateActItem } from './createActItem';
|
|
9
|
+
export interface CreateActRequest {
|
|
10
|
+
contract_id: string;
|
|
11
|
+
estimate_id?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
period_start: string;
|
|
15
|
+
period_end: string;
|
|
16
|
+
items: CreateActItem[];
|
|
17
|
+
}
|
|
@@ -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 { ActListItem } from './actListItem';
|
|
9
|
+
export interface GetActsResponse {
|
|
10
|
+
acts: ActListItem[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 * from './act';
|
|
9
|
+
export * from './actItem';
|
|
10
|
+
export * from './actListItem';
|
|
11
|
+
export * from './createActItem';
|
|
12
|
+
export * from './createActRequest';
|
|
13
|
+
export * from './getActsResponse';
|
|
14
|
+
export * from './updateActRequest';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { CreateActItem } from './createActItem';
|
|
9
|
+
export interface UpdateActRequest {
|
|
10
|
+
contract_id: string;
|
|
11
|
+
estimate_id?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
period_start: string;
|
|
15
|
+
period_end: string;
|
|
16
|
+
items: CreateActItem[];
|
|
17
|
+
}
|
|
@@ -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
|
+
export interface AuthRequest {
|
|
9
|
+
/** Raw Telegram WebApp initData string. */
|
|
10
|
+
init_data: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 Estimate {
|
|
9
|
+
uuid: string;
|
|
10
|
+
object_id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
is_confirmed: boolean;
|
|
14
|
+
}
|
|
@@ -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 { Estimate } from './estimate';
|
|
9
|
+
export interface GetEstimatesResponse {
|
|
10
|
+
estimates: Estimate[];
|
|
11
|
+
}
|
|
@@ -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 { Object } from './object';
|
|
9
|
+
export interface GetObjectsResponse {
|
|
10
|
+
objects: Object[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 * from './act';
|
|
9
|
+
export * from './actItem';
|
|
10
|
+
export * from './actListItem';
|
|
11
|
+
export * from './authRequest';
|
|
12
|
+
export * from './authResponse';
|
|
13
|
+
export * from './createActItem';
|
|
14
|
+
export * from './createActRequest';
|
|
15
|
+
export * from './errorResponse';
|
|
16
|
+
export * from './estimate';
|
|
17
|
+
export * from './getActsParams';
|
|
18
|
+
export * from './getActsResponse';
|
|
19
|
+
export * from './getEstimatesParams';
|
|
20
|
+
export * from './getEstimatesResponse';
|
|
21
|
+
export * from './getObjectsResponse';
|
|
22
|
+
export * from './getUnitsResponse';
|
|
23
|
+
export * from './healthResponse';
|
|
24
|
+
export * from './object';
|
|
25
|
+
export * from './pingResponse';
|
|
26
|
+
export * from './unit';
|
|
27
|
+
export * from './updateActRequest';
|
|
@@ -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 { 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,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 * from './types.gen';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export type Act = {
|
|
2
|
+
uuid: string;
|
|
3
|
+
contract_id: string;
|
|
4
|
+
object_id?: string;
|
|
5
|
+
estimate_id?: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
period_start: string;
|
|
9
|
+
period_end: string;
|
|
10
|
+
items: Array<ActItem>;
|
|
11
|
+
};
|
|
12
|
+
export type ActItem = {
|
|
13
|
+
uuid: string;
|
|
14
|
+
act_id: string;
|
|
15
|
+
service_id: string;
|
|
16
|
+
quantity: number;
|
|
17
|
+
price: number;
|
|
18
|
+
};
|
|
19
|
+
export type ActListItem = {
|
|
20
|
+
uuid: string;
|
|
21
|
+
contract_id: string;
|
|
22
|
+
object_id?: string;
|
|
23
|
+
estimate_id?: string;
|
|
24
|
+
title: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
period_start: string;
|
|
27
|
+
period_end: string;
|
|
28
|
+
};
|
|
29
|
+
export type AuthRequest = {
|
|
30
|
+
/**
|
|
31
|
+
* Raw Telegram WebApp initData string.
|
|
32
|
+
*/
|
|
33
|
+
init_data: string;
|
|
34
|
+
};
|
|
35
|
+
export type AuthResponse = {
|
|
36
|
+
token: string;
|
|
37
|
+
};
|
|
38
|
+
export type CreateActItem = {
|
|
39
|
+
service_id: string;
|
|
40
|
+
quantity: number;
|
|
41
|
+
price: number;
|
|
42
|
+
};
|
|
43
|
+
export type CreateActRequest = {
|
|
44
|
+
contract_id: string;
|
|
45
|
+
estimate_id?: string;
|
|
46
|
+
title: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
period_start: string;
|
|
49
|
+
period_end: string;
|
|
50
|
+
items: Array<CreateActItem>;
|
|
51
|
+
};
|
|
52
|
+
export type ErrorResponse = {
|
|
53
|
+
error: string;
|
|
54
|
+
};
|
|
55
|
+
export type Estimate = {
|
|
56
|
+
uuid: string;
|
|
57
|
+
object_id: string;
|
|
58
|
+
title: string;
|
|
59
|
+
description: string;
|
|
60
|
+
is_confirmed: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type GetActsResponse = {
|
|
63
|
+
acts: Array<ActListItem>;
|
|
64
|
+
};
|
|
65
|
+
export type GetEstimatesResponse = {
|
|
66
|
+
estimates: Array<Estimate>;
|
|
67
|
+
};
|
|
68
|
+
export type GetObjectsResponse = {
|
|
69
|
+
objects: Array<Object>;
|
|
70
|
+
};
|
|
71
|
+
export type GetUnitsResponse = {
|
|
72
|
+
units: Array<Unit>;
|
|
73
|
+
};
|
|
74
|
+
export type HealthResponse = {
|
|
75
|
+
status: string;
|
|
76
|
+
};
|
|
77
|
+
export type Object = {
|
|
78
|
+
uuid: string;
|
|
79
|
+
title: string;
|
|
80
|
+
};
|
|
81
|
+
export type PingResponse = {
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
export type Unit = {
|
|
85
|
+
unit: string;
|
|
86
|
+
};
|
|
87
|
+
export type UpdateActRequest = {
|
|
88
|
+
contract_id: string;
|
|
89
|
+
estimate_id?: string;
|
|
90
|
+
title: string;
|
|
91
|
+
description?: string;
|
|
92
|
+
period_start: string;
|
|
93
|
+
period_end: string;
|
|
94
|
+
items: Array<CreateActItem>;
|
|
95
|
+
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zdn3517/act-api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepublishOnly": "rm -rf build && tsc",
|
|
8
8
|
"build": "tsc -p tsconfig.json",
|
|
9
|
-
"gen": "
|
|
10
|
-
"gen:zod": "
|
|
9
|
+
"gen": "orval --config orval.config.cjs",
|
|
10
|
+
"gen:zod": "openapi-ts -f openapi-ts.zod.config.cjs"
|
|
11
11
|
},
|
|
12
12
|
"author": "",
|
|
13
13
|
"license": "ISC",
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@hey-api/openapi-ts": "^0.60.0",
|
|
20
|
+
"orval": "^7.17.2",
|
|
20
21
|
"typescript": "^5.9.2"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
24
|
+
"axios": "^1.13.2",
|
|
23
25
|
"zod": "^4.3.4"
|
|
24
26
|
}
|
|
25
27
|
}
|
package/build/types.gen.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type AuthRequest = {
|
|
2
|
-
/**
|
|
3
|
-
* Raw Telegram WebApp initData string.
|
|
4
|
-
*/
|
|
5
|
-
init_data: string;
|
|
6
|
-
};
|
|
7
|
-
export type AuthResponse = {
|
|
8
|
-
token: string;
|
|
9
|
-
};
|
|
10
|
-
export type ErrorResponse = {
|
|
11
|
-
error: string;
|
|
12
|
-
};
|
|
13
|
-
export type GetUnitsResponse = {
|
|
14
|
-
units: Array<Unit>;
|
|
15
|
-
};
|
|
16
|
-
export type HealthResponse = {
|
|
17
|
-
status: string;
|
|
18
|
-
};
|
|
19
|
-
export type PingResponse = {
|
|
20
|
-
message: string;
|
|
21
|
-
};
|
|
22
|
-
export type Unit = {
|
|
23
|
-
uuid: string;
|
|
24
|
-
title: string;
|
|
25
|
-
code: string;
|
|
26
|
-
};
|