@reviza/api-client 1.2.0-SNAPSHOT-221eeb79 → 1.2.0-SNAPSHOT-076cede0
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.
|
@@ -47,6 +47,7 @@ export type FacilityData = {
|
|
|
47
47
|
note: string | null;
|
|
48
48
|
map_feature_layer: string;
|
|
49
49
|
state: FacilityStateEnum;
|
|
50
|
+
path: string;
|
|
50
51
|
picture_ids: number[];
|
|
51
52
|
intervals: Record<string, FacilityIntervalData>;
|
|
52
53
|
values: Record<string, string>;
|
|
@@ -70,12 +71,6 @@ export type FacilityIssueResolvedPayload = {
|
|
|
70
71
|
resolved_date: string | null;
|
|
71
72
|
resolved_note: string | null;
|
|
72
73
|
};
|
|
73
|
-
export type FacilityListData = {
|
|
74
|
-
facility_id: number;
|
|
75
|
-
facility_name: string;
|
|
76
|
-
category_id: number;
|
|
77
|
-
organization_id: number | null;
|
|
78
|
-
};
|
|
79
74
|
export type FacilityRevisionData = {
|
|
80
75
|
state: FacilityStateEnum;
|
|
81
76
|
id: number;
|
|
@@ -89,6 +84,13 @@ export type FacilityRevisionData = {
|
|
|
89
84
|
updated_at: string | null;
|
|
90
85
|
deleted_at: string | null;
|
|
91
86
|
};
|
|
87
|
+
export type FacilityTreeData = {
|
|
88
|
+
key: string;
|
|
89
|
+
label: string;
|
|
90
|
+
id: string;
|
|
91
|
+
facilities: FacilityData[];
|
|
92
|
+
children: FacilityTreeData[];
|
|
93
|
+
};
|
|
92
94
|
export type FacilityUpdatePayload = {
|
|
93
95
|
name: string;
|
|
94
96
|
identification_number: string | null;
|
|
@@ -3,7 +3,7 @@ import { RevizaResponseData } from "../App/Data";
|
|
|
3
3
|
import { DataCollection } from "../Spatie/LaravelData";
|
|
4
4
|
import { CategoryData, CategoryCreatePayload, CategoryUpdatePayload, CategoryTreeData } from "../App/Data/Category";
|
|
5
5
|
import { ConfigData } from "../App/Data/Config";
|
|
6
|
-
import {
|
|
6
|
+
import { FacilityTreeData, FacilityData, FacilityCreatePayload, FacilityUpdatePayload, FacilityIssueResolvedPayload, RelatedFacilityCreatePayload } from "../App/Data/Facility";
|
|
7
7
|
import { DemoRequestCreatePayload, DemoRequestData } from "../App/Data/Demo";
|
|
8
8
|
import { MapExtentData, MapData } from "../App/Data/Map";
|
|
9
9
|
import { StreamedResponse } from "../Symfony/Component/HttpFoundation";
|
|
@@ -112,16 +112,16 @@ export declare namespace ConfigController {
|
|
|
112
112
|
}
|
|
113
113
|
export declare const DashboardController: {
|
|
114
114
|
readonly categoryTree: ActionWithMethods<undefined, string>;
|
|
115
|
-
readonly
|
|
115
|
+
readonly facilityTree: ActionWithMethods<undefined, string>;
|
|
116
116
|
};
|
|
117
117
|
export declare namespace DashboardController {
|
|
118
118
|
namespace categoryTree {
|
|
119
119
|
type Request = object;
|
|
120
120
|
type Response = RevizaResponseData<DataCollection<number, CategoryTreeData>>;
|
|
121
121
|
}
|
|
122
|
-
namespace
|
|
122
|
+
namespace facilityTree {
|
|
123
123
|
type Request = object;
|
|
124
|
-
type Response = RevizaResponseData<DataCollection<number,
|
|
124
|
+
type Response = RevizaResponseData<DataCollection<number, FacilityTreeData>>;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
export declare const DemoRequestController: {
|
|
@@ -29,8 +29,8 @@ export const DashboardController = {
|
|
|
29
29
|
categoryTree: createActionWithMethods([
|
|
30
30
|
{ method: "get", url: "api/v1/dashboard/categories/tree" },
|
|
31
31
|
]),
|
|
32
|
-
|
|
33
|
-
{ method: "get", url: "api/v1/dashboard/facilities/
|
|
32
|
+
facilityTree: createActionWithMethods([
|
|
33
|
+
{ method: "get", url: "api/v1/dashboard/facilities/tree" },
|
|
34
34
|
]),
|
|
35
35
|
};
|
|
36
36
|
export const DemoRequestController = {
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
36
36
|
search(config?: AxiosRequestConfig): Promise<SearchController.search.Response>;
|
|
37
37
|
dashboard: {
|
|
38
38
|
categoryTree(config?: AxiosRequestConfig): Promise<DashboardController.categoryTree.Response>;
|
|
39
|
-
|
|
39
|
+
facilityTree(config?: AxiosRequestConfig): Promise<DashboardController.facilityTree.Response>;
|
|
40
40
|
};
|
|
41
41
|
demo: {
|
|
42
42
|
index(config?: AxiosRequestConfig): Promise<DemoRequestController.index.Response>;
|
package/dist/index.js
CHANGED
|
@@ -109,8 +109,8 @@ export function createRevizaApi(http = axios) {
|
|
|
109
109
|
categoryTree(config) {
|
|
110
110
|
return request(DashboardController.categoryTree(), undefined, config);
|
|
111
111
|
},
|
|
112
|
-
|
|
113
|
-
return request(DashboardController.
|
|
112
|
+
facilityTree(config) {
|
|
113
|
+
return request(DashboardController.facilityTree(), undefined, config);
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
demo: {
|