@reviza/api-client 1.2.0-SNAPSHOT-df1298f6 → 1.2.0-SNAPSHOT-e68dcb26
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/App/Data/Category/index.d.ts +0 -11
- package/dist/App/Data/Facility/index.d.ts +32 -16
- package/dist/App/Data/Frontend/index.d.ts +66 -0
- package/dist/App/Data/Frontend/index.js +1 -0
- package/dist/App/Data/Revision/index.d.ts +2 -0
- package/dist/controllers/index.d.ts +17 -16
- package/dist/controllers/index.js +8 -8
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -44,17 +44,6 @@ export type CategoryData = {
|
|
|
44
44
|
updated_at: string | null;
|
|
45
45
|
deleted_at: string | null;
|
|
46
46
|
};
|
|
47
|
-
export type CategoryTreeData = {
|
|
48
|
-
key: string;
|
|
49
|
-
label: string;
|
|
50
|
-
selectable: boolean;
|
|
51
|
-
data: CategoryTreeNodeMetaData;
|
|
52
|
-
children: CategoryTreeData[];
|
|
53
|
-
};
|
|
54
|
-
export type CategoryTreeNodeMetaData = {
|
|
55
|
-
id: number;
|
|
56
|
-
organization_id: number | null;
|
|
57
|
-
};
|
|
58
47
|
export type CategoryUpdatePayload = {
|
|
59
48
|
name: string;
|
|
60
49
|
type_name: string;
|
|
@@ -3,6 +3,30 @@ import { CategoryData } from "../Category";
|
|
|
3
3
|
import { RevisionData, RevisionIssueData } from "../Revision";
|
|
4
4
|
import { DocumentData } from "../Document";
|
|
5
5
|
import { MapData } from "../Map";
|
|
6
|
+
export type BaseFacilityData = {
|
|
7
|
+
id: number;
|
|
8
|
+
name: string;
|
|
9
|
+
identification_number: string | null;
|
|
10
|
+
facility_type: FacilityTypeEnum;
|
|
11
|
+
custom_facility_type: string | null;
|
|
12
|
+
revision_group: string | null;
|
|
13
|
+
revision_type: string | null;
|
|
14
|
+
has_custom_revision_group: boolean | null;
|
|
15
|
+
custom_revision_group: string | null;
|
|
16
|
+
color: string | null;
|
|
17
|
+
manufacture_year: number | null;
|
|
18
|
+
manufacture_number: string | number | null;
|
|
19
|
+
note: string | null;
|
|
20
|
+
map_feature_layer: string;
|
|
21
|
+
state: FacilityStateEnum;
|
|
22
|
+
path: string;
|
|
23
|
+
picture_ids: number[];
|
|
24
|
+
intervals: Record<string, FacilityIntervalData>;
|
|
25
|
+
values: Record<string, string>;
|
|
26
|
+
created_at: string | null;
|
|
27
|
+
updated_at: string | null;
|
|
28
|
+
deleted_at: string | null;
|
|
29
|
+
};
|
|
6
30
|
export type FacilityCreatePayload = {
|
|
7
31
|
name: string;
|
|
8
32
|
identification_number: string | null;
|
|
@@ -21,8 +45,6 @@ export type FacilityCreatePayload = {
|
|
|
21
45
|
};
|
|
22
46
|
/**
|
|
23
47
|
* Includes:
|
|
24
|
-
* - intervals
|
|
25
|
-
* - values
|
|
26
48
|
* - category
|
|
27
49
|
* - revisions
|
|
28
50
|
* - lastRevision
|
|
@@ -32,6 +54,13 @@ export type FacilityCreatePayload = {
|
|
|
32
54
|
* - maps
|
|
33
55
|
*/
|
|
34
56
|
export type FacilityData = {
|
|
57
|
+
category?: CategoryData;
|
|
58
|
+
revisions?: RevisionData[];
|
|
59
|
+
last_revision?: RevisionData | null;
|
|
60
|
+
issues?: RevisionIssueData[];
|
|
61
|
+
documents?: DocumentData[];
|
|
62
|
+
related_facilities?: RelatedFacilityData[];
|
|
63
|
+
maps?: MapData[];
|
|
35
64
|
id: number;
|
|
36
65
|
name: string;
|
|
37
66
|
identification_number: string | null;
|
|
@@ -51,13 +80,6 @@ export type FacilityData = {
|
|
|
51
80
|
picture_ids: number[];
|
|
52
81
|
intervals: Record<string, FacilityIntervalData>;
|
|
53
82
|
values: Record<string, string>;
|
|
54
|
-
category?: CategoryData;
|
|
55
|
-
revisions?: RevisionData[];
|
|
56
|
-
last_revision?: RevisionData | null;
|
|
57
|
-
issues?: RevisionIssueData[];
|
|
58
|
-
documents?: DocumentData[];
|
|
59
|
-
related_facilities?: RelatedFacilityData[];
|
|
60
|
-
maps?: MapData[];
|
|
61
83
|
created_at: string | null;
|
|
62
84
|
updated_at: string | null;
|
|
63
85
|
deleted_at: string | null;
|
|
@@ -80,17 +102,11 @@ export type FacilityRevisionData = {
|
|
|
80
102
|
custom_revision_type: string | null;
|
|
81
103
|
next_revision_type: RevisionTypeEnum;
|
|
82
104
|
next_custom_revision_type: string | null;
|
|
105
|
+
path: string;
|
|
83
106
|
created_at: string | null;
|
|
84
107
|
updated_at: string | null;
|
|
85
108
|
deleted_at: string | null;
|
|
86
109
|
};
|
|
87
|
-
export type FacilityTreeData = {
|
|
88
|
-
key: string;
|
|
89
|
-
label: string;
|
|
90
|
-
category_id: number;
|
|
91
|
-
facilities: FacilityData[];
|
|
92
|
-
children: FacilityTreeData[];
|
|
93
|
-
};
|
|
94
110
|
export type FacilityUpdatePayload = {
|
|
95
111
|
name: string;
|
|
96
112
|
identification_number: string | null;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { RevisionTypeEnum, FacilityTypeEnum, FacilityStateEnum } from "../../Enum";
|
|
2
|
+
import { FacilityIntervalData } from "../Facility";
|
|
3
|
+
export type CarriableIssueData = {
|
|
4
|
+
id: number;
|
|
5
|
+
number: number;
|
|
6
|
+
description: string;
|
|
7
|
+
note: string | null;
|
|
8
|
+
resolve_deadline: string | null;
|
|
9
|
+
revision: CarriableIssueRevisionData;
|
|
10
|
+
};
|
|
11
|
+
export type CarriableIssueRevisionData = {
|
|
12
|
+
id: number;
|
|
13
|
+
revision_date: string;
|
|
14
|
+
next_revision_date: string;
|
|
15
|
+
revision_type: RevisionTypeEnum;
|
|
16
|
+
custom_revision_type: string | null;
|
|
17
|
+
next_revision_type: RevisionTypeEnum;
|
|
18
|
+
next_custom_revision_type: string | null;
|
|
19
|
+
path: string;
|
|
20
|
+
created_at: string | null;
|
|
21
|
+
updated_at: string | null;
|
|
22
|
+
deleted_at: string | null;
|
|
23
|
+
};
|
|
24
|
+
export type CategoryTreeData = {
|
|
25
|
+
key: string;
|
|
26
|
+
label: string;
|
|
27
|
+
selectable: boolean;
|
|
28
|
+
data: CategoryTreeNodeMetaData;
|
|
29
|
+
children: CategoryTreeData[];
|
|
30
|
+
};
|
|
31
|
+
export type CategoryTreeNodeMetaData = {
|
|
32
|
+
id: number;
|
|
33
|
+
organization_id: number | null;
|
|
34
|
+
};
|
|
35
|
+
export type FacilityTreeData = {
|
|
36
|
+
key: string;
|
|
37
|
+
label: string;
|
|
38
|
+
category_id: number;
|
|
39
|
+
facilities: FacilityTreeNodeData[];
|
|
40
|
+
children: FacilityTreeData[];
|
|
41
|
+
};
|
|
42
|
+
export type FacilityTreeNodeData = {
|
|
43
|
+
carriable_issues: CarriableIssueData[];
|
|
44
|
+
id: number;
|
|
45
|
+
name: string;
|
|
46
|
+
identification_number: string | null;
|
|
47
|
+
facility_type: FacilityTypeEnum;
|
|
48
|
+
custom_facility_type: string | null;
|
|
49
|
+
revision_group: string | null;
|
|
50
|
+
revision_type: string | null;
|
|
51
|
+
has_custom_revision_group: boolean | null;
|
|
52
|
+
custom_revision_group: string | null;
|
|
53
|
+
color: string | null;
|
|
54
|
+
manufacture_year: number | null;
|
|
55
|
+
manufacture_number: string | number | null;
|
|
56
|
+
note: string | null;
|
|
57
|
+
map_feature_layer: string;
|
|
58
|
+
state: FacilityStateEnum;
|
|
59
|
+
path: string;
|
|
60
|
+
picture_ids: number[];
|
|
61
|
+
intervals: Record<string, FacilityIntervalData>;
|
|
62
|
+
values: Record<string, string>;
|
|
63
|
+
created_at: string | null;
|
|
64
|
+
updated_at: string | null;
|
|
65
|
+
deleted_at: string | null;
|
|
66
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,6 +11,7 @@ export type BaseRevisionData = {
|
|
|
11
11
|
custom_revision_type: string | null;
|
|
12
12
|
next_revision_type: RevisionTypeEnum;
|
|
13
13
|
next_custom_revision_type: string | null;
|
|
14
|
+
path: string;
|
|
14
15
|
created_at: string | null;
|
|
15
16
|
updated_at: string | null;
|
|
16
17
|
deleted_at: string | null;
|
|
@@ -41,6 +42,7 @@ export type RevisionData = {
|
|
|
41
42
|
custom_revision_type: string | null;
|
|
42
43
|
next_revision_type: RevisionTypeEnum;
|
|
43
44
|
next_custom_revision_type: string | null;
|
|
45
|
+
path: string;
|
|
44
46
|
created_at: string | null;
|
|
45
47
|
updated_at: string | null;
|
|
46
48
|
deleted_at: string | null;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { LoginPayload, LoginData, RegistrationTokenData, RegisterPayload, ForgotPasswordPayload, PasswordPayload, InvitationPayload } from "../App/Data/Auth";
|
|
2
2
|
import { RevizaResponseData } from "../App/Data";
|
|
3
3
|
import { DataCollection } from "../Spatie/LaravelData";
|
|
4
|
-
import { CategoryData, CategoryCreatePayload, CategoryUpdatePayload
|
|
4
|
+
import { CategoryData, CategoryCreatePayload, CategoryUpdatePayload } from "../App/Data/Category";
|
|
5
5
|
import { ConfigData } from "../App/Data/Config";
|
|
6
|
-
import { FacilityTreeData, FacilityData, FacilityCreatePayload, FacilityUpdatePayload, FacilityIssueResolvedPayload, RelatedFacilityCreatePayload } from "../App/Data/Facility";
|
|
7
6
|
import { DemoRequestCreatePayload, DemoRequestData } from "../App/Data/Demo";
|
|
8
7
|
import { MapExtentData, MapData } from "../App/Data/Map";
|
|
8
|
+
import { FacilityData, FacilityCreatePayload, FacilityUpdatePayload, FacilityIssueResolvedPayload, RelatedFacilityCreatePayload } from "../App/Data/Facility";
|
|
9
9
|
import { StreamedResponse } from "../Symfony/Component/HttpFoundation";
|
|
10
10
|
import { DocumentData, DocumentCreatePayload, DocumentUpdatePayload } from "../App/Data/Document";
|
|
11
11
|
import { PicturePayload } from "../App/Data/Picture";
|
|
12
|
+
import { CategoryTreeData, FacilityTreeData } from "../App/Data/Frontend";
|
|
12
13
|
import { FrontendRouteRedirectRequest, FrontendRouteRedirectData } from "../App/Data/FrontendRoute";
|
|
13
14
|
import { MeData, MeUpdatePayload } from "../App/Data/Me";
|
|
14
15
|
import { UserSettingsPayload, UserData } from "../App/Data/User";
|
|
@@ -110,20 +111,6 @@ export declare namespace ConfigController {
|
|
|
110
111
|
type Response = RevizaResponseData<ConfigData>;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
export declare const DashboardController: {
|
|
114
|
-
readonly categoryTree: ActionWithMethods<undefined, string>;
|
|
115
|
-
readonly facilityTree: ActionWithMethods<undefined, string>;
|
|
116
|
-
};
|
|
117
|
-
export declare namespace DashboardController {
|
|
118
|
-
namespace categoryTree {
|
|
119
|
-
type Request = object;
|
|
120
|
-
type Response = RevizaResponseData<DataCollection<number, CategoryTreeData>>;
|
|
121
|
-
}
|
|
122
|
-
namespace facilityTree {
|
|
123
|
-
type Request = object;
|
|
124
|
-
type Response = RevizaResponseData<DataCollection<number, FacilityTreeData>>;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
114
|
export declare const DemoRequestController: {
|
|
128
115
|
readonly store: ActionWithMethods<undefined, string>;
|
|
129
116
|
readonly index: ActionWithMethods<undefined, string>;
|
|
@@ -282,6 +269,20 @@ export declare namespace FacilityPictureController {
|
|
|
282
269
|
type Response = RevizaResponseData<null>;
|
|
283
270
|
}
|
|
284
271
|
}
|
|
272
|
+
export declare const FrontendController: {
|
|
273
|
+
readonly categoryTree: ActionWithMethods<undefined, string>;
|
|
274
|
+
readonly facilityTree: ActionWithMethods<undefined, string>;
|
|
275
|
+
};
|
|
276
|
+
export declare namespace FrontendController {
|
|
277
|
+
namespace categoryTree {
|
|
278
|
+
type Request = object;
|
|
279
|
+
type Response = RevizaResponseData<DataCollection<number, CategoryTreeData>>;
|
|
280
|
+
}
|
|
281
|
+
namespace facilityTree {
|
|
282
|
+
type Request = object;
|
|
283
|
+
type Response = RevizaResponseData<DataCollection<number, FacilityTreeData>>;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
285
286
|
export declare const FrontendErrorController: {
|
|
286
287
|
readonly logError: ActionWithMethods<undefined, string>;
|
|
287
288
|
};
|
|
@@ -25,14 +25,6 @@ export const CategoryController = {
|
|
|
25
25
|
export const ConfigController = {
|
|
26
26
|
config: createActionWithMethods([{ method: "get", url: "api/v1/config" }]),
|
|
27
27
|
};
|
|
28
|
-
export const DashboardController = {
|
|
29
|
-
categoryTree: createActionWithMethods([
|
|
30
|
-
{ method: "get", url: "api/v1/dashboard/categories/tree" },
|
|
31
|
-
]),
|
|
32
|
-
facilityTree: createActionWithMethods([
|
|
33
|
-
{ method: "get", url: "api/v1/dashboard/facilities/tree" },
|
|
34
|
-
]),
|
|
35
|
-
};
|
|
36
28
|
export const DemoRequestController = {
|
|
37
29
|
store: createActionWithMethods([
|
|
38
30
|
{ method: "post", url: "api/v1/request-demo" },
|
|
@@ -137,6 +129,14 @@ export const FacilityPictureController = {
|
|
|
137
129
|
},
|
|
138
130
|
]),
|
|
139
131
|
};
|
|
132
|
+
export const FrontendController = {
|
|
133
|
+
categoryTree: createActionWithMethods([
|
|
134
|
+
{ method: "get", url: "api/v1/frontend/categories/tree" },
|
|
135
|
+
]),
|
|
136
|
+
facilityTree: createActionWithMethods([
|
|
137
|
+
{ method: "get", url: "api/v1/frontend/facilities/tree" },
|
|
138
|
+
]),
|
|
139
|
+
};
|
|
140
140
|
export const FrontendErrorController = {
|
|
141
141
|
logError: createActionWithMethods([
|
|
142
142
|
{ method: "post", url: "api/v1/frontend-error" },
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Typed API client — wraps generated controller actions with axios.
|
|
3
3
|
*/
|
|
4
4
|
import { type AxiosInstance, type AxiosRequestConfig } from "axios";
|
|
5
|
-
import { AuthController, CategoryController, ConfigController,
|
|
5
|
+
import { AuthController, CategoryController, ConfigController, DemoRequestController, FacilityController, FacilityDocumentController, FacilityPictureController, FrontendController, FrontendErrorController, FrontendRouteController, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, UiSettingsController, UserController } from "./controllers";
|
|
6
6
|
import { ActionLogController, MapController as SystemMapController, NotificationController, OrganizationController as SystemOrganizationController, PermissionController as SystemPermissionController, UserController as SystemUserController } from "./controllers/System/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* Convert a typed payload that contains `File` / `Blob` fields into a
|
|
@@ -34,9 +34,9 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
34
34
|
config(config?: AxiosRequestConfig): Promise<ConfigController.config.Response>;
|
|
35
35
|
frontendRoute(config?: AxiosRequestConfig): Promise<FrontendRouteController.redirect.Response>;
|
|
36
36
|
search(config?: AxiosRequestConfig): Promise<SearchController.search.Response>;
|
|
37
|
-
|
|
38
|
-
categoryTree(config?: AxiosRequestConfig): Promise<
|
|
39
|
-
facilityTree(config?: AxiosRequestConfig): Promise<
|
|
37
|
+
frontend: {
|
|
38
|
+
categoryTree(config?: AxiosRequestConfig): Promise<FrontendController.categoryTree.Response>;
|
|
39
|
+
facilityTree(config?: AxiosRequestConfig): Promise<FrontendController.facilityTree.Response>;
|
|
40
40
|
};
|
|
41
41
|
demo: {
|
|
42
42
|
index(config?: AxiosRequestConfig): Promise<DemoRequestController.index.Response>;
|
|
@@ -187,6 +187,7 @@ export type * from "./App/Data/Subscription";
|
|
|
187
187
|
export type * from "./App/Data/User";
|
|
188
188
|
export type * from "./App/Data/Picture";
|
|
189
189
|
export type * from "./App/Data/Ui";
|
|
190
|
+
export type * from "./App/Data/Frontend";
|
|
190
191
|
export * from "./App/Enum";
|
|
191
192
|
export * from "./App/Enum/Permissions";
|
|
192
193
|
export * from "./App/Enum/Notifications";
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Typed API client — wraps generated controller actions with axios.
|
|
3
3
|
*/
|
|
4
4
|
import axios, { isAxiosError } from "axios";
|
|
5
|
-
import { AuthController, CategoryController, ConfigController,
|
|
5
|
+
import { AuthController, CategoryController, ConfigController, DemoRequestController, FacilityController, FacilityDocumentController, FacilityPictureController, FrontendController, FrontendErrorController, FrontendRouteController, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, UiSettingsController, UserController, } from "./controllers";
|
|
6
6
|
import { ActionLogController, MapController as SystemMapController, NotificationController, OrganizationController as SystemOrganizationController, PermissionController as SystemPermissionController, UserController as SystemUserController, } from "./controllers/System/index.js";
|
|
7
7
|
// ── helpers ───────────────────────────────────────────────────────────────────
|
|
8
8
|
/**
|
|
@@ -105,12 +105,12 @@ export function createRevizaApi(http = axios) {
|
|
|
105
105
|
search(config) {
|
|
106
106
|
return request(SearchController.search(), undefined, config);
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
frontend: {
|
|
109
109
|
categoryTree(config) {
|
|
110
|
-
return request(
|
|
110
|
+
return request(FrontendController.categoryTree(), undefined, config);
|
|
111
111
|
},
|
|
112
112
|
facilityTree(config) {
|
|
113
|
-
return request(
|
|
113
|
+
return request(FrontendController.facilityTree(), undefined, config);
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
demo: {
|