@reviza/api-client 1.2.0-SNAPSHOT-5598ca41 → 1.2.0-SNAPSHOT-dc2ab6bd

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.
@@ -22,6 +22,7 @@ export type RegisterPayload = {
22
22
  first_name: string;
23
23
  last_name: string;
24
24
  email: string;
25
+ phone: string | null;
25
26
  password: string;
26
27
  password_confirmation: string;
27
28
  legal_consent: boolean;
@@ -56,3 +56,7 @@ export type FacilityTreeNodeData = {
56
56
  last_revision: FacilityTreeLastRevisionData | null;
57
57
  carriable_issues: CarriableIssueData[];
58
58
  };
59
+ export type FacilityTreeRequestPayload = {
60
+ facility_id: number | null;
61
+ revision_id: number | null;
62
+ };
@@ -9,7 +9,7 @@ import { FacilityData, FacilityCreatePayload, FacilityUpdatePayload, RelatedFaci
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
+ import { CategoryTreeData, FacilityTreeRequestPayload, FacilityTreeData } from "../App/Data/Frontend";
13
13
  import { FrontendRouteRedirectRequest, FrontendRouteRedirectData } from "../App/Data/FrontendRoute";
14
14
  import { MeData, MeUpdatePayload } from "../App/Data/Me";
15
15
  import { UserSettingsPayload, UserData } from "../App/Data/User";
@@ -262,7 +262,9 @@ export declare namespace FacilityPictureController {
262
262
  }
263
263
  export declare const FrontendController: {
264
264
  readonly categoryTree: ActionWithMethods<undefined, string>;
265
- readonly facilityTree: ActionWithMethods<undefined, string>;
265
+ readonly facilityTree: ActionWithMethods<{
266
+ category: string | number;
267
+ }, string>;
266
268
  };
267
269
  export declare namespace FrontendController {
268
270
  namespace categoryTree {
@@ -270,7 +272,7 @@ export declare namespace FrontendController {
270
272
  type Response = RevizaResponseData<DataCollection<number, CategoryTreeData>>;
271
273
  }
272
274
  namespace facilityTree {
273
- type Request = object;
275
+ type Request = FacilityTreeRequestPayload;
274
276
  type Response = RevizaResponseData<DataCollection<number, FacilityTreeData>>;
275
277
  }
276
278
  }
@@ -128,7 +128,10 @@ export const FrontendController = {
128
128
  { method: "get", url: "api/v1/frontend/categories/tree" },
129
129
  ]),
130
130
  facilityTree: createActionWithMethods([
131
- { method: "get", url: "api/v1/frontend/facilities/tree" },
131
+ {
132
+ method: "get",
133
+ url: "api/v1/frontend/categories/{category}/facilities/tree",
134
+ },
132
135
  ]),
133
136
  };
134
137
  export const FrontendErrorController = {
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
  frontend: {
38
38
  categoryTree(config?: AxiosRequestConfig): Promise<FrontendController.categoryTree.Response>;
39
- facilityTree(config?: AxiosRequestConfig): Promise<FrontendController.facilityTree.Response>;
39
+ facilityTree(category: number, data: FrontendController.facilityTree.Request, config?: AxiosRequestConfig): Promise<FrontendController.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(FrontendController.categoryTree(), undefined, config);
111
111
  },
112
- facilityTree(config) {
113
- return request(FrontendController.facilityTree(), undefined, config);
112
+ facilityTree(category, data, config) {
113
+ return request(FrontendController.facilityTree({ category }), data, 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-5598ca41",
3
+ "version": "1.2.0-SNAPSHOT-dc2ab6bd",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",