@reviza/api-client 1.2.0-SNAPSHOT-6d67126a → 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.
@@ -49,7 +49,7 @@ export type CategoryTreeData = {
49
49
  label: string;
50
50
  selectable: boolean;
51
51
  data: CategoryTreeNodeMetaData;
52
- children: CategoryData[];
52
+ children: CategoryTreeData[];
53
53
  };
54
54
  export type CategoryTreeNodeMetaData = {
55
55
  id: number;
@@ -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 { FacilityListData, FacilityData, FacilityCreatePayload, FacilityUpdatePayload, FacilityIssueResolvedPayload, RelatedFacilityCreatePayload } from "../App/Data/Facility";
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 facilityList: ActionWithMethods<undefined, string>;
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 facilityList {
122
+ namespace facilityTree {
123
123
  type Request = object;
124
- type Response = RevizaResponseData<DataCollection<number, FacilityListData>>;
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
- facilityList: createActionWithMethods([
33
- { method: "get", url: "api/v1/dashboard/facilities/list" },
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
- facilityList(config?: AxiosRequestConfig): Promise<DashboardController.facilityList.Response>;
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
- facilityList(config) {
113
- return request(DashboardController.facilityList(), undefined, config);
112
+ facilityTree(config) {
113
+ return request(DashboardController.facilityTree(), undefined, config);
114
114
  }
115
115
  },
116
116
  demo: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reviza/api-client",
3
- "version": "1.2.0-SNAPSHOT-6d67126a",
3
+ "version": "1.2.0-SNAPSHOT-076cede0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",