@reviza/api-client 1.2.0 → 1.3.0
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/Auth/index.d.ts +1 -1
- package/dist/App/Data/Category/index.d.ts +0 -11
- package/dist/App/Data/Facility/index.d.ts +47 -21
- package/dist/App/Data/Frontend/index.d.ts +62 -0
- package/dist/App/Data/Frontend/index.js +1 -0
- package/dist/App/Data/Notification/index.d.ts +2 -2
- package/dist/App/Data/Revision/index.d.ts +92 -15
- package/dist/App/Data/Ui/index.d.ts +4 -2
- package/dist/controllers/Frontend/index.d.ts +91 -0
- package/dist/controllers/Frontend/index.js +30 -0
- package/dist/controllers/index.d.ts +12 -61
- package/dist/controllers/index.js +6 -32
- package/dist/index.d.ts +13 -10
- package/dist/index.js +31 -22
- 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: CategoryData[];
|
|
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;
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
import { FacilityTypeEnum, FacilityStateEnum, IntervalUnitEnum } from "../../Enum";
|
|
1
|
+
import { FacilityTypeEnum, FacilityStateEnum, IntervalUnitEnum, RevisionTypeEnum } from "../../Enum";
|
|
2
2
|
import { CategoryData } from "../Category";
|
|
3
|
-
import {
|
|
3
|
+
import { 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?: FacilityRevisionData[];
|
|
59
|
+
last_revision?: FacilityRevisionData | 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;
|
|
@@ -47,16 +76,10 @@ export type FacilityData = {
|
|
|
47
76
|
note: string | null;
|
|
48
77
|
map_feature_layer: string;
|
|
49
78
|
state: FacilityStateEnum;
|
|
79
|
+
path: string;
|
|
50
80
|
picture_ids: number[];
|
|
51
81
|
intervals: Record<string, FacilityIntervalData>;
|
|
52
82
|
values: Record<string, string>;
|
|
53
|
-
category?: CategoryData;
|
|
54
|
-
revisions?: RevisionData[];
|
|
55
|
-
last_revision?: RevisionData | null;
|
|
56
|
-
issues?: RevisionIssueData[];
|
|
57
|
-
documents?: DocumentData[];
|
|
58
|
-
related_facilities?: RelatedFacilityData[];
|
|
59
|
-
maps?: MapData[];
|
|
60
83
|
created_at: string | null;
|
|
61
84
|
updated_at: string | null;
|
|
62
85
|
deleted_at: string | null;
|
|
@@ -65,16 +88,19 @@ export type FacilityIntervalData = {
|
|
|
65
88
|
duration: number | null;
|
|
66
89
|
unit: IntervalUnitEnum | null;
|
|
67
90
|
};
|
|
68
|
-
export type
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
export type FacilityRevisionData = {
|
|
92
|
+
state: FacilityStateEnum;
|
|
93
|
+
id: number;
|
|
94
|
+
revision_date: string;
|
|
95
|
+
next_revision_date: string;
|
|
96
|
+
revision_type: RevisionTypeEnum;
|
|
97
|
+
custom_revision_type: string | null;
|
|
98
|
+
next_revision_type: RevisionTypeEnum;
|
|
99
|
+
next_custom_revision_type: string | null;
|
|
100
|
+
path: string;
|
|
101
|
+
created_at: string | null;
|
|
102
|
+
updated_at: string | null;
|
|
103
|
+
deleted_at: string | null;
|
|
78
104
|
};
|
|
79
105
|
export type FacilityUpdatePayload = {
|
|
80
106
|
name: string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { RevisionTypeEnum, FacilityTypeEnum } from "../../Enum";
|
|
2
|
+
import { FacilityIntervalData } from "../Facility";
|
|
3
|
+
export type CarriableIssueData = {
|
|
4
|
+
id: number;
|
|
5
|
+
number: number;
|
|
6
|
+
group_key: string | null;
|
|
7
|
+
group_number: number | null;
|
|
8
|
+
description: string;
|
|
9
|
+
note: string | null;
|
|
10
|
+
resolve_deadline: string | null;
|
|
11
|
+
revision: CarriableIssueRevisionData;
|
|
12
|
+
};
|
|
13
|
+
export type CarriableIssueRevisionData = {
|
|
14
|
+
id: number;
|
|
15
|
+
revision_date: string;
|
|
16
|
+
next_revision_date: string;
|
|
17
|
+
revision_type: RevisionTypeEnum;
|
|
18
|
+
custom_revision_type: string | null;
|
|
19
|
+
next_revision_type: RevisionTypeEnum;
|
|
20
|
+
next_custom_revision_type: string | null;
|
|
21
|
+
path: string;
|
|
22
|
+
created_at: string | null;
|
|
23
|
+
updated_at: string | null;
|
|
24
|
+
deleted_at: string | null;
|
|
25
|
+
};
|
|
26
|
+
export type CategoryTreeData = {
|
|
27
|
+
key: string;
|
|
28
|
+
label: string;
|
|
29
|
+
selectable: boolean;
|
|
30
|
+
data: CategoryTreeNodeMetaData;
|
|
31
|
+
children: CategoryTreeData[];
|
|
32
|
+
};
|
|
33
|
+
export type CategoryTreeNodeMetaData = {
|
|
34
|
+
id: number;
|
|
35
|
+
organization_id: number | null;
|
|
36
|
+
};
|
|
37
|
+
export type FacilityTreeData = {
|
|
38
|
+
key: string;
|
|
39
|
+
label: string;
|
|
40
|
+
category_id: number;
|
|
41
|
+
facilities: FacilityTreeNodeData[];
|
|
42
|
+
children: FacilityTreeData[];
|
|
43
|
+
};
|
|
44
|
+
export type FacilityTreeLastRevisionData = {
|
|
45
|
+
next_revision_type: RevisionTypeEnum;
|
|
46
|
+
next_custom_revision_type: string | null;
|
|
47
|
+
};
|
|
48
|
+
export type FacilityTreeNodeData = {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
identification_number: string | null;
|
|
52
|
+
facility_type: FacilityTypeEnum;
|
|
53
|
+
custom_facility_type: string | null;
|
|
54
|
+
path: string;
|
|
55
|
+
intervals: Record<string, FacilityIntervalData>;
|
|
56
|
+
last_revision: FacilityTreeLastRevisionData | null;
|
|
57
|
+
carriable_issues: CarriableIssueData[];
|
|
58
|
+
};
|
|
59
|
+
export type FacilityTreeRequestPayload = {
|
|
60
|
+
facility_id: number | null;
|
|
61
|
+
revision_id: number | null;
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CategoryNotificationEnum, NotificationTermEnum, OrganizationNotificationEnum } from "../../Enum/Notifications";
|
|
2
|
+
import { UserData } from "../User";
|
|
2
3
|
export type CategoryNotificationData = {
|
|
3
4
|
id: number;
|
|
4
5
|
name: string;
|
|
@@ -13,8 +14,7 @@ export type CategoryNotificationPayload = {
|
|
|
13
14
|
categories: CategoryNotificationPayload[] | null;
|
|
14
15
|
};
|
|
15
16
|
export type NotificationData = {
|
|
16
|
-
|
|
17
|
-
email: string;
|
|
17
|
+
user: UserData | null;
|
|
18
18
|
subject: string;
|
|
19
19
|
data: Record<string, any>;
|
|
20
20
|
created_at: string | null;
|
|
@@ -1,52 +1,98 @@
|
|
|
1
|
-
import { FacilityStateEnum,
|
|
2
|
-
import { FacilityData } from "../Facility";
|
|
1
|
+
import { RevisionTypeEnum, FacilityStateEnum, FacilityTypeEnum, RevisionIssueStateEnum } from "../../Enum";
|
|
3
2
|
import { DocumentData } from "../Document";
|
|
4
3
|
import { UserData } from "../User";
|
|
5
|
-
|
|
4
|
+
import { FacilityIntervalData, FacilityData } from "../Facility";
|
|
5
|
+
import { CategoryData } from "../Category";
|
|
6
|
+
export type BaseRevisionData = {
|
|
7
|
+
id: number;
|
|
8
|
+
revision_date: string;
|
|
9
|
+
next_revision_date: string;
|
|
10
|
+
revision_type: RevisionTypeEnum;
|
|
11
|
+
custom_revision_type: string | null;
|
|
12
|
+
next_revision_type: RevisionTypeEnum;
|
|
13
|
+
next_custom_revision_type: string | null;
|
|
14
|
+
path: string;
|
|
15
|
+
created_at: string | null;
|
|
16
|
+
updated_at: string | null;
|
|
17
|
+
deleted_at: string | null;
|
|
18
|
+
};
|
|
19
|
+
export type FacilityIssueResolvePayload = {
|
|
6
20
|
facility_ids: number[];
|
|
21
|
+
resolved: boolean;
|
|
22
|
+
resolved_date: string | null;
|
|
23
|
+
resolved_note: string | null;
|
|
24
|
+
};
|
|
25
|
+
export type RevisionCreatePayload = {
|
|
7
26
|
revision_date: string;
|
|
8
27
|
next_revision_date: string;
|
|
9
|
-
state: FacilityStateEnum;
|
|
10
|
-
issues: RevisionIssueCreatePayload[];
|
|
11
28
|
revision_type: RevisionTypeEnum;
|
|
12
29
|
custom_revision_type: string | null;
|
|
13
30
|
next_revision_type: RevisionTypeEnum;
|
|
14
31
|
next_custom_revision_type: string | null;
|
|
32
|
+
facilities: RevisionFacilityCreatePayload[];
|
|
15
33
|
};
|
|
16
34
|
/**
|
|
17
35
|
* Includes:
|
|
18
36
|
* - facilities
|
|
19
|
-
* - issues
|
|
20
37
|
* - documents
|
|
21
38
|
* - authorUser
|
|
22
39
|
*/
|
|
23
40
|
export type RevisionData = {
|
|
41
|
+
facilities?: RevisionFacilityData[];
|
|
42
|
+
documents?: DocumentData[] | null;
|
|
43
|
+
author_user?: UserData | null;
|
|
24
44
|
id: number;
|
|
25
45
|
revision_date: string;
|
|
26
46
|
next_revision_date: string;
|
|
27
|
-
state: FacilityStateEnum;
|
|
28
47
|
revision_type: RevisionTypeEnum;
|
|
29
48
|
custom_revision_type: string | null;
|
|
30
49
|
next_revision_type: RevisionTypeEnum;
|
|
31
50
|
next_custom_revision_type: string | null;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
51
|
+
path: string;
|
|
52
|
+
created_at: string | null;
|
|
53
|
+
updated_at: string | null;
|
|
54
|
+
deleted_at: string | null;
|
|
55
|
+
};
|
|
56
|
+
export type RevisionFacilityCreatePayload = {
|
|
57
|
+
id: number;
|
|
58
|
+
state: FacilityStateEnum;
|
|
59
|
+
issues: RevisionIssueCreatePayload[];
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Includes:
|
|
63
|
+
* - category
|
|
64
|
+
*/
|
|
65
|
+
export type RevisionFacilityData = {
|
|
66
|
+
id: number;
|
|
67
|
+
name: string;
|
|
68
|
+
facility_type: FacilityTypeEnum;
|
|
69
|
+
custom_facility_type: string | null;
|
|
70
|
+
state: FacilityStateEnum;
|
|
71
|
+
intervals: Record<string, FacilityIntervalData>;
|
|
72
|
+
issues: RevisionIssueData[];
|
|
73
|
+
category?: CategoryData;
|
|
36
74
|
created_at: string | null;
|
|
37
75
|
updated_at: string | null;
|
|
38
76
|
deleted_at: string | null;
|
|
39
77
|
};
|
|
78
|
+
export type RevisionFacilityUpdatePayload = {
|
|
79
|
+
id: number;
|
|
80
|
+
state: FacilityStateEnum;
|
|
81
|
+
issues: RevisionIssueUpdatePayload[];
|
|
82
|
+
};
|
|
40
83
|
export type RevisionIssueCreatePayload = {
|
|
41
|
-
state: RevisionIssueStateEnum;
|
|
42
84
|
resolve_deadline: string;
|
|
43
85
|
description: string;
|
|
44
86
|
note: string | null;
|
|
45
87
|
duplicated_issue_id: number | null;
|
|
88
|
+
group_key: string | null;
|
|
46
89
|
};
|
|
47
90
|
/**
|
|
48
91
|
* Includes:
|
|
92
|
+
* - groupIssues
|
|
93
|
+
* - groupIssueFacilities
|
|
49
94
|
* - revision
|
|
95
|
+
* - facility
|
|
50
96
|
*/
|
|
51
97
|
export type RevisionIssueData = {
|
|
52
98
|
id: number;
|
|
@@ -59,27 +105,58 @@ export type RevisionIssueData = {
|
|
|
59
105
|
resolved_note: string | null;
|
|
60
106
|
duplicated_issue?: RevisionIssueData;
|
|
61
107
|
duplicating_issue?: RevisionIssueData;
|
|
108
|
+
group_key: string | null;
|
|
109
|
+
group_number: number | null;
|
|
110
|
+
group_issues?: RevisionIssueData[];
|
|
111
|
+
group_issue_facilities?: RevisionIssueGroupFacilityData[];
|
|
62
112
|
revision?: RevisionData;
|
|
113
|
+
facility?: FacilityData;
|
|
63
114
|
path: string;
|
|
64
115
|
created_at: string;
|
|
65
116
|
updated_at: string;
|
|
66
117
|
deleted_at: string | null;
|
|
67
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* Includes:
|
|
121
|
+
* - issues
|
|
122
|
+
*/
|
|
123
|
+
export type RevisionIssueGroupData = {
|
|
124
|
+
group_key: string | null;
|
|
125
|
+
group_number: number | null;
|
|
126
|
+
number: number;
|
|
127
|
+
state: RevisionIssueStateEnum;
|
|
128
|
+
description: string;
|
|
129
|
+
note: string | null;
|
|
130
|
+
resolve_deadline: string | null;
|
|
131
|
+
resolved_date: string | null;
|
|
132
|
+
resolved_note: string | null;
|
|
133
|
+
issues: RevisionIssueData[];
|
|
134
|
+
};
|
|
135
|
+
export type RevisionIssueGroupFacilityData = {
|
|
136
|
+
facility_id: number;
|
|
137
|
+
name: string;
|
|
138
|
+
facility_type: FacilityTypeEnum;
|
|
139
|
+
custom_facility_type: string | null;
|
|
140
|
+
issue_id: number;
|
|
141
|
+
issue_number: number;
|
|
142
|
+
issue_state: RevisionIssueStateEnum;
|
|
143
|
+
resolved_date: string | null;
|
|
144
|
+
resolved_note: string | null;
|
|
145
|
+
};
|
|
68
146
|
export type RevisionIssueUpdatePayload = {
|
|
69
147
|
id: number | null;
|
|
70
148
|
resolve_deadline: string;
|
|
71
149
|
description: string;
|
|
72
150
|
note: string | null;
|
|
73
151
|
duplicated_issue_id: number | null;
|
|
152
|
+
group_key: string | null;
|
|
74
153
|
};
|
|
75
154
|
export type RevisionUpdatePayload = {
|
|
76
|
-
facility_ids: number[];
|
|
77
155
|
revision_date: string;
|
|
78
156
|
next_revision_date: string;
|
|
79
|
-
state: FacilityStateEnum;
|
|
80
|
-
issues: RevisionIssueUpdatePayload[];
|
|
81
157
|
revision_type: RevisionTypeEnum;
|
|
82
158
|
custom_revision_type: string | null;
|
|
83
159
|
next_revision_type: RevisionTypeEnum;
|
|
84
160
|
next_custom_revision_type: string | null;
|
|
161
|
+
facilities: RevisionFacilityUpdatePayload[];
|
|
85
162
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type FrontendUserSettingsData = {
|
|
2
2
|
facilities: string[];
|
|
3
|
+
category_facilities: string[];
|
|
3
4
|
issues: string[];
|
|
4
5
|
};
|
|
5
|
-
export type
|
|
6
|
+
export type FrontendUserSettingsUpdatePayload = {
|
|
6
7
|
facilities: string[] | null;
|
|
7
8
|
issues: string[] | null;
|
|
9
|
+
category_facilities: string[] | null;
|
|
8
10
|
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { RevizaResponseData } from "../../App/Data";
|
|
2
|
+
import { DataCollection } from "../../Spatie/LaravelData";
|
|
3
|
+
import { CategoryTreeData, FacilityTreeRequestPayload, FacilityTreeData } from "../../App/Data/Frontend";
|
|
4
|
+
import { FrontendRouteRedirectRequest, FrontendRouteRedirectData } from "../../App/Data/FrontendRoute";
|
|
5
|
+
import { FrontendUserSettingsData, FrontendUserSettingsUpdatePayload } from "../../App/Data/Ui";
|
|
6
|
+
export declare const FrontendController: {
|
|
7
|
+
readonly categoryTree: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
8
|
+
url: string;
|
|
9
|
+
}) & {
|
|
10
|
+
[x: string]: (options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
readonly facilityTree: ((params: {
|
|
15
|
+
category: string | number;
|
|
16
|
+
}, options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
17
|
+
url: string;
|
|
18
|
+
}) & {
|
|
19
|
+
[x: string]: (params: {
|
|
20
|
+
category: string | number;
|
|
21
|
+
}, options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare namespace FrontendController {
|
|
27
|
+
namespace categoryTree {
|
|
28
|
+
type Request = object;
|
|
29
|
+
type Response = RevizaResponseData<DataCollection<number, CategoryTreeData>>;
|
|
30
|
+
}
|
|
31
|
+
namespace facilityTree {
|
|
32
|
+
type Request = FacilityTreeRequestPayload;
|
|
33
|
+
type Response = RevizaResponseData<DataCollection<number, FacilityTreeData>>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export declare const FrontendErrorController: {
|
|
37
|
+
readonly logError: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
38
|
+
url: string;
|
|
39
|
+
}) & {
|
|
40
|
+
[x: string]: (options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export declare namespace FrontendErrorController {
|
|
46
|
+
namespace logError {
|
|
47
|
+
type Request = object;
|
|
48
|
+
type Response = RevizaResponseData<null>;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export declare const FrontendRouteController: {
|
|
52
|
+
readonly redirect: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
53
|
+
url: string;
|
|
54
|
+
}) & {
|
|
55
|
+
[x: string]: (options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
56
|
+
url: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare namespace FrontendRouteController {
|
|
61
|
+
namespace redirect {
|
|
62
|
+
type Request = FrontendRouteRedirectRequest;
|
|
63
|
+
type Response = RevizaResponseData<FrontendRouteRedirectData | null>;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export declare const FrontendSettingsController: {
|
|
67
|
+
readonly show: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
68
|
+
url: string;
|
|
69
|
+
}) & {
|
|
70
|
+
[x: string]: (options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
71
|
+
url: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly update: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
75
|
+
url: string;
|
|
76
|
+
}) & {
|
|
77
|
+
[x: string]: (options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
78
|
+
url: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare namespace FrontendSettingsController {
|
|
83
|
+
namespace show {
|
|
84
|
+
type Request = object;
|
|
85
|
+
type Response = RevizaResponseData<FrontendUserSettingsData>;
|
|
86
|
+
}
|
|
87
|
+
namespace update {
|
|
88
|
+
type Request = FrontendUserSettingsUpdatePayload;
|
|
89
|
+
type Response = RevizaResponseData<FrontendUserSettingsData>;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createActionWithMethods } from "../";
|
|
2
|
+
export const FrontendController = {
|
|
3
|
+
categoryTree: createActionWithMethods([
|
|
4
|
+
{ method: "get", url: "api/v1/frontend/categories/tree" },
|
|
5
|
+
]),
|
|
6
|
+
facilityTree: createActionWithMethods([
|
|
7
|
+
{
|
|
8
|
+
method: "get",
|
|
9
|
+
url: "api/v1/frontend/categories/{category}/facilities/tree",
|
|
10
|
+
},
|
|
11
|
+
]),
|
|
12
|
+
};
|
|
13
|
+
export const FrontendErrorController = {
|
|
14
|
+
logError: createActionWithMethods([
|
|
15
|
+
{ method: "post", url: "api/v1/frontend/error" },
|
|
16
|
+
]),
|
|
17
|
+
};
|
|
18
|
+
export const FrontendRouteController = {
|
|
19
|
+
redirect: createActionWithMethods([
|
|
20
|
+
{ method: "get", url: "api/v1/frontend/route" },
|
|
21
|
+
]),
|
|
22
|
+
};
|
|
23
|
+
export const FrontendSettingsController = {
|
|
24
|
+
show: createActionWithMethods([
|
|
25
|
+
{ method: "get", url: "api/v1/frontend/user-settings/tables" },
|
|
26
|
+
]),
|
|
27
|
+
update: createActionWithMethods([
|
|
28
|
+
{ method: "put", url: "api/v1/frontend/user-settings/tables" },
|
|
29
|
+
]),
|
|
30
|
+
};
|
|
@@ -1,24 +1,22 @@
|
|
|
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 { FacilityListData, 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, 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 { FrontendRouteRedirectRequest, FrontendRouteRedirectData } from "../App/Data/FrontendRoute";
|
|
13
12
|
import { MeData, MeUpdatePayload } from "../App/Data/Me";
|
|
14
13
|
import { UserSettingsPayload, UserData } from "../App/Data/User";
|
|
15
14
|
import { NotificationSettingsData, NotificationSettingsPayload } from "../App/Data/Notification";
|
|
16
15
|
import { OrganizationData, OrganizationUpdatePayload } from "../App/Data/Organization";
|
|
17
16
|
import { SubscriptionData } from "../App/Data/Subscription";
|
|
18
17
|
import { UserPermissionData, UserPermissionPayload } from "../App/Data/Permission";
|
|
19
|
-
import { RevisionCreatePayload, RevisionData, RevisionUpdatePayload, RevisionIssueData } from "../App/Data/Revision";
|
|
18
|
+
import { RevisionCreatePayload, RevisionData, RevisionUpdatePayload, RevisionIssueGroupData, FacilityIssueResolvePayload, RevisionIssueData } from "../App/Data/Revision";
|
|
20
19
|
import { SearchData } from "../App/Data/Search";
|
|
21
|
-
import { UserUiSettingsData, UserUiSettingsUpdatePayload } from "../App/Data/Ui";
|
|
22
20
|
type ActionFunction<P extends RouteParams | undefined> = P extends undefined ? (options?: RouteOptions) => ActionResult : (params: P, options?: RouteOptions) => ActionResult;
|
|
23
21
|
type ActionResult = RouteDefinition & {
|
|
24
22
|
url: string;
|
|
@@ -110,20 +108,6 @@ export declare namespace ConfigController {
|
|
|
110
108
|
type Response = RevizaResponseData<ConfigData>;
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
|
-
export declare const DashboardController: {
|
|
114
|
-
readonly categoryTree: ActionWithMethods<undefined, string>;
|
|
115
|
-
readonly facilityList: 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 facilityList {
|
|
123
|
-
type Request = object;
|
|
124
|
-
type Response = RevizaResponseData<DataCollection<number, FacilityListData>>;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
111
|
export declare const DemoRequestController: {
|
|
128
112
|
readonly store: ActionWithMethods<undefined, string>;
|
|
129
113
|
readonly index: ActionWithMethods<undefined, string>;
|
|
@@ -165,11 +149,6 @@ export declare const FacilityController: {
|
|
|
165
149
|
category: string | number;
|
|
166
150
|
facility: string | number;
|
|
167
151
|
}, string>;
|
|
168
|
-
readonly resolveIssue: ActionWithMethods<{
|
|
169
|
-
category: string | number;
|
|
170
|
-
facility: string | number;
|
|
171
|
-
issue: string | number;
|
|
172
|
-
}, string>;
|
|
173
152
|
};
|
|
174
153
|
export declare namespace FacilityController {
|
|
175
154
|
namespace getMapExtent {
|
|
@@ -200,10 +179,6 @@ export declare namespace FacilityController {
|
|
|
200
179
|
type Request = object;
|
|
201
180
|
type Response = StreamedResponse;
|
|
202
181
|
}
|
|
203
|
-
namespace resolveIssue {
|
|
204
|
-
type Request = FacilityIssueResolvedPayload;
|
|
205
|
-
type Response = RevizaResponseData<FacilityData | null>;
|
|
206
|
-
}
|
|
207
182
|
}
|
|
208
183
|
export declare const FacilityDocumentController: {
|
|
209
184
|
readonly index: ActionWithMethods<{
|
|
@@ -282,24 +257,6 @@ export declare namespace FacilityPictureController {
|
|
|
282
257
|
type Response = RevizaResponseData<null>;
|
|
283
258
|
}
|
|
284
259
|
}
|
|
285
|
-
export declare const FrontendErrorController: {
|
|
286
|
-
readonly logError: ActionWithMethods<undefined, string>;
|
|
287
|
-
};
|
|
288
|
-
export declare namespace FrontendErrorController {
|
|
289
|
-
namespace logError {
|
|
290
|
-
type Request = object;
|
|
291
|
-
type Response = RevizaResponseData<null>;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
export declare const FrontendRouteController: {
|
|
295
|
-
readonly redirect: ActionWithMethods<undefined, string>;
|
|
296
|
-
};
|
|
297
|
-
export declare namespace FrontendRouteController {
|
|
298
|
-
namespace redirect {
|
|
299
|
-
type Request = FrontendRouteRedirectRequest;
|
|
300
|
-
type Response = RevizaResponseData<FrontendRouteRedirectData | null>;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
260
|
export declare const MapController: {
|
|
304
261
|
readonly index: ActionWithMethods<{
|
|
305
262
|
category: string | number;
|
|
@@ -535,6 +492,10 @@ export declare const RevisionIssueController: {
|
|
|
535
492
|
readonly getForCategory: ActionWithMethods<{
|
|
536
493
|
category: string | number;
|
|
537
494
|
}, string>;
|
|
495
|
+
readonly resolveIssue: ActionWithMethods<{
|
|
496
|
+
category: string | number;
|
|
497
|
+
issue: string | number;
|
|
498
|
+
}, string>;
|
|
538
499
|
readonly index: ActionWithMethods<{
|
|
539
500
|
category: string | number;
|
|
540
501
|
revision: string | number;
|
|
@@ -553,7 +514,11 @@ export declare const RevisionIssueController: {
|
|
|
553
514
|
export declare namespace RevisionIssueController {
|
|
554
515
|
namespace getForCategory {
|
|
555
516
|
type Request = object;
|
|
556
|
-
type Response = RevizaResponseData<DataCollection<number,
|
|
517
|
+
type Response = RevizaResponseData<DataCollection<number, RevisionIssueGroupData> | null>;
|
|
518
|
+
}
|
|
519
|
+
namespace resolveIssue {
|
|
520
|
+
type Request = FacilityIssueResolvePayload;
|
|
521
|
+
type Response = RevizaResponseData<null>;
|
|
557
522
|
}
|
|
558
523
|
namespace index {
|
|
559
524
|
type Request = object;
|
|
@@ -585,20 +550,6 @@ export declare namespace SearchController {
|
|
|
585
550
|
type Response = RevizaResponseData<DataCollection<number, SearchData>>;
|
|
586
551
|
}
|
|
587
552
|
}
|
|
588
|
-
export declare const UiSettingsController: {
|
|
589
|
-
readonly show: ActionWithMethods<undefined, string>;
|
|
590
|
-
readonly update: ActionWithMethods<undefined, string>;
|
|
591
|
-
};
|
|
592
|
-
export declare namespace UiSettingsController {
|
|
593
|
-
namespace show {
|
|
594
|
-
type Request = object;
|
|
595
|
-
type Response = RevizaResponseData<UserUiSettingsData>;
|
|
596
|
-
}
|
|
597
|
-
namespace update {
|
|
598
|
-
type Request = UserUiSettingsUpdatePayload;
|
|
599
|
-
type Response = RevizaResponseData<UserUiSettingsData>;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
553
|
export declare const UserController: {
|
|
603
554
|
readonly organizationUsers: ActionWithMethods<{
|
|
604
555
|
organization: string | number;
|
|
@@ -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
|
-
facilityList: createActionWithMethods([
|
|
33
|
-
{ method: "get", url: "api/v1/dashboard/facilities/list" },
|
|
34
|
-
]),
|
|
35
|
-
};
|
|
36
28
|
export const DemoRequestController = {
|
|
37
29
|
store: createActionWithMethods([
|
|
38
30
|
{ method: "post", url: "api/v1/request-demo" },
|
|
@@ -78,12 +70,6 @@ export const FacilityController = {
|
|
|
78
70
|
url: "api/v1/categories/{category}/facilities/{facility}/qrcode",
|
|
79
71
|
},
|
|
80
72
|
]),
|
|
81
|
-
resolveIssue: createActionWithMethods([
|
|
82
|
-
{
|
|
83
|
-
method: "post",
|
|
84
|
-
url: "api/v1/categories/{category}/facilities/{facility}/issues/{issue}/resolve",
|
|
85
|
-
},
|
|
86
|
-
]),
|
|
87
73
|
};
|
|
88
74
|
export const FacilityDocumentController = {
|
|
89
75
|
index: createActionWithMethods([
|
|
@@ -137,16 +123,6 @@ export const FacilityPictureController = {
|
|
|
137
123
|
},
|
|
138
124
|
]),
|
|
139
125
|
};
|
|
140
|
-
export const FrontendErrorController = {
|
|
141
|
-
logError: createActionWithMethods([
|
|
142
|
-
{ method: "post", url: "api/v1/frontend-error" },
|
|
143
|
-
]),
|
|
144
|
-
};
|
|
145
|
-
export const FrontendRouteController = {
|
|
146
|
-
redirect: createActionWithMethods([
|
|
147
|
-
{ method: "get", url: "api/v1/frontend-route" },
|
|
148
|
-
]),
|
|
149
|
-
};
|
|
150
126
|
export const MapController = {
|
|
151
127
|
index: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}/maps" }]),
|
|
152
128
|
getTile: createActionWithMethods([
|
|
@@ -283,6 +259,12 @@ export const RevisionDocumentController = {
|
|
|
283
259
|
};
|
|
284
260
|
export const RevisionIssueController = {
|
|
285
261
|
getForCategory: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}/issues" }]),
|
|
262
|
+
resolveIssue: createActionWithMethods([
|
|
263
|
+
{
|
|
264
|
+
method: "post",
|
|
265
|
+
url: "api/v1/categories/{category}/issues/{issue}/resolve",
|
|
266
|
+
},
|
|
267
|
+
]),
|
|
286
268
|
index: createActionWithMethods([
|
|
287
269
|
{
|
|
288
270
|
method: "get",
|
|
@@ -305,14 +287,6 @@ export const RevisionIssueController = {
|
|
|
305
287
|
export const SearchController = {
|
|
306
288
|
search: createActionWithMethods([{ method: "get", url: "api/v1/search" }]),
|
|
307
289
|
};
|
|
308
|
-
export const UiSettingsController = {
|
|
309
|
-
show: createActionWithMethods([
|
|
310
|
-
{ method: "get", url: "api/v1/me/ui-settings/tables" },
|
|
311
|
-
]),
|
|
312
|
-
update: createActionWithMethods([
|
|
313
|
-
{ method: "put", url: "api/v1/me/ui-settings/tables" },
|
|
314
|
-
]),
|
|
315
|
-
};
|
|
316
290
|
export const UserController = {
|
|
317
291
|
organizationUsers: createActionWithMethods([{ method: "get", url: "api/v1/organizations/{organization}/users" }]),
|
|
318
292
|
invite: createActionWithMethods([
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
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, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, 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
|
+
import { FrontendController, FrontendErrorController, FrontendRouteController, FrontendSettingsController } from "./controllers/Frontend";
|
|
7
8
|
/**
|
|
8
9
|
* Convert a typed payload that contains `File` / `Blob` fields into a
|
|
9
10
|
* `FormData` object ready for multipart upload.
|
|
@@ -30,13 +31,17 @@ export declare class ValidationError<T> extends ApiError {
|
|
|
30
31
|
constructor(message: string, errors: Partial<Record<keyof T, string>>);
|
|
31
32
|
}
|
|
32
33
|
export declare function createRevizaApi(http?: AxiosInstance): {
|
|
33
|
-
frontendError(data: any, config?: AxiosRequestConfig): Promise<FrontendErrorController.logError.Response>;
|
|
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
|
-
|
|
39
|
-
|
|
37
|
+
frontend: {
|
|
38
|
+
error(data: any, config?: AxiosRequestConfig): Promise<FrontendErrorController.logError.Response>;
|
|
39
|
+
categoryTree(config?: AxiosRequestConfig): Promise<FrontendController.categoryTree.Response>;
|
|
40
|
+
facilityTree(category: number, data: FrontendController.facilityTree.Request, config?: AxiosRequestConfig): Promise<FrontendController.facilityTree.Response>;
|
|
41
|
+
settings: {
|
|
42
|
+
show(config?: AxiosRequestConfig): Promise<FrontendSettingsController.show.Response>;
|
|
43
|
+
update(data: FrontendSettingsController.update.Request, config?: AxiosRequestConfig): Promise<FrontendSettingsController.update.Response>;
|
|
44
|
+
};
|
|
40
45
|
};
|
|
41
46
|
demo: {
|
|
42
47
|
index(config?: AxiosRequestConfig): Promise<DemoRequestController.index.Response>;
|
|
@@ -56,10 +61,6 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
56
61
|
changePassword(data: MeController.changePassword.Request, config?: AxiosRequestConfig): Promise<MeController.changePassword.Response>;
|
|
57
62
|
updateSettings(data: MeController.updateSettings.Request, config?: AxiosRequestConfig): Promise<MeController.updateSettings.Response>;
|
|
58
63
|
tutorial(config?: AxiosRequestConfig): Promise<MeController.tutorial.Response>;
|
|
59
|
-
uiSettings: {
|
|
60
|
-
show(config?: AxiosRequestConfig): Promise<UiSettingsController.show.Response>;
|
|
61
|
-
update(data: UiSettingsController.update.Request, config?: AxiosRequestConfig): Promise<UiSettingsController.update.Response>;
|
|
62
|
-
};
|
|
63
64
|
};
|
|
64
65
|
notificationSettings: {
|
|
65
66
|
show(config?: AxiosRequestConfig): Promise<NotificationSettingsController.show.Response>;
|
|
@@ -96,7 +97,6 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
96
97
|
store(category: number, data: FacilityController.store.Request, config?: AxiosRequestConfig): Promise<FacilityController.store.Response>;
|
|
97
98
|
update(category: number, facility: number, data: FacilityController.update.Request, config?: AxiosRequestConfig): Promise<FacilityController.update.Response>;
|
|
98
99
|
destroy(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.destroy.Response>;
|
|
99
|
-
resolveIssue(category: number, facility: number, issue: number, data: FacilityController.resolveIssue.Request, config?: AxiosRequestConfig): Promise<FacilityController.resolveIssue.Response>;
|
|
100
100
|
qrCode(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
101
101
|
mapExtent(facility: number, map: number, config?: AxiosRequestConfig): Promise<FacilityController.getMapExtent.Response>;
|
|
102
102
|
};
|
|
@@ -128,6 +128,7 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
128
128
|
show(category: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.show.Response>;
|
|
129
129
|
destroy(category: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.destroy.Response>;
|
|
130
130
|
getForCategory(category: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.getForCategory.Response>;
|
|
131
|
+
resolveIssue(category: number, issue: number, data: RevisionIssueController.resolveIssue.Request, config?: AxiosRequestConfig): Promise<RevisionIssueController.resolveIssue.Response>;
|
|
131
132
|
};
|
|
132
133
|
revisionDocuments: {
|
|
133
134
|
index(category: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionDocumentController.index.Response>;
|
|
@@ -186,6 +187,8 @@ export type * from "./App/Data/Search";
|
|
|
186
187
|
export type * from "./App/Data/Subscription";
|
|
187
188
|
export type * from "./App/Data/User";
|
|
188
189
|
export type * from "./App/Data/Picture";
|
|
190
|
+
export type * from "./App/Data/Ui";
|
|
191
|
+
export type * from "./App/Data/Frontend";
|
|
189
192
|
export * from "./App/Enum";
|
|
190
193
|
export * from "./App/Enum/Permissions";
|
|
191
194
|
export * from "./App/Enum/Notifications";
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
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, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, 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
|
+
import { FrontendController, FrontendErrorController, FrontendRouteController, FrontendSettingsController, } from "./controllers/Frontend";
|
|
7
8
|
// ── helpers ───────────────────────────────────────────────────────────────────
|
|
8
9
|
/**
|
|
9
10
|
* Convert a typed payload that contains `File` / `Blob` fields into a
|
|
@@ -93,9 +94,6 @@ function makeRequest(http) {
|
|
|
93
94
|
export function createRevizaApi(http = axios) {
|
|
94
95
|
const request = makeRequest(http);
|
|
95
96
|
return {
|
|
96
|
-
frontendError(data, config) {
|
|
97
|
-
return request(FrontendErrorController.logError(), data, config);
|
|
98
|
-
},
|
|
99
97
|
config(config) {
|
|
100
98
|
return request(ConfigController.config(), undefined, config);
|
|
101
99
|
},
|
|
@@ -105,12 +103,23 @@ export function createRevizaApi(http = axios) {
|
|
|
105
103
|
search(config) {
|
|
106
104
|
return request(SearchController.search(), undefined, config);
|
|
107
105
|
},
|
|
108
|
-
|
|
106
|
+
frontend: {
|
|
107
|
+
error(data, config) {
|
|
108
|
+
return request(FrontendErrorController.logError(), data, config);
|
|
109
|
+
},
|
|
109
110
|
categoryTree(config) {
|
|
110
|
-
return request(
|
|
111
|
+
return request(FrontendController.categoryTree(), undefined, config);
|
|
112
|
+
},
|
|
113
|
+
facilityTree(category, data, config) {
|
|
114
|
+
return request(FrontendController.facilityTree({ category }), data, config);
|
|
111
115
|
},
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
settings: {
|
|
117
|
+
show(config) {
|
|
118
|
+
return request(FrontendSettingsController.show(), undefined, config);
|
|
119
|
+
},
|
|
120
|
+
update(data, config) {
|
|
121
|
+
return request(FrontendSettingsController.update(), data, config);
|
|
122
|
+
}
|
|
114
123
|
}
|
|
115
124
|
},
|
|
116
125
|
demo: {
|
|
@@ -156,14 +165,6 @@ export function createRevizaApi(http = axios) {
|
|
|
156
165
|
},
|
|
157
166
|
tutorial(config) {
|
|
158
167
|
return request(MeController.tutorial(), undefined, config);
|
|
159
|
-
},
|
|
160
|
-
uiSettings: {
|
|
161
|
-
show(config) {
|
|
162
|
-
return request(UiSettingsController.show(), config);
|
|
163
|
-
},
|
|
164
|
-
update(data, config) {
|
|
165
|
-
return request(UiSettingsController.update(), data, config);
|
|
166
|
-
}
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
170
|
notificationSettings: {
|
|
@@ -245,9 +246,6 @@ export function createRevizaApi(http = axios) {
|
|
|
245
246
|
destroy(category, facility, config) {
|
|
246
247
|
return request(FacilityController.destroy({ category, facility }), undefined, config);
|
|
247
248
|
},
|
|
248
|
-
resolveIssue(category, facility, issue, data, config) {
|
|
249
|
-
return request(FacilityController.resolveIssue({ category, facility, issue }), data, config);
|
|
250
|
-
},
|
|
251
249
|
qrCode(category, facility, config) {
|
|
252
250
|
config = { responseType: "blob", ...config };
|
|
253
251
|
return request(FacilityController.viewQrCode({ category, facility }), undefined, config);
|
|
@@ -329,7 +327,10 @@ export function createRevizaApi(http = axios) {
|
|
|
329
327
|
},
|
|
330
328
|
getForCategory(category, config) {
|
|
331
329
|
return request(RevisionIssueController.getForCategory({ category }), undefined, config);
|
|
332
|
-
}
|
|
330
|
+
},
|
|
331
|
+
resolveIssue(category, issue, data, config) {
|
|
332
|
+
return request(RevisionIssueController.resolveIssue({ category, issue }), data, config);
|
|
333
|
+
},
|
|
333
334
|
},
|
|
334
335
|
revisionDocuments: {
|
|
335
336
|
index(category, revision, config) {
|
|
@@ -343,11 +344,19 @@ export function createRevizaApi(http = axios) {
|
|
|
343
344
|
return request(RevisionDocumentController.update({ category, revision, document }), data, config);
|
|
344
345
|
},
|
|
345
346
|
destroy(category, revision, document, config) {
|
|
346
|
-
return request(RevisionDocumentController.destroy({
|
|
347
|
+
return request(RevisionDocumentController.destroy({
|
|
348
|
+
category,
|
|
349
|
+
revision,
|
|
350
|
+
document
|
|
351
|
+
}), undefined, config);
|
|
347
352
|
},
|
|
348
353
|
download(category, revision, document, preview, config) {
|
|
349
354
|
config = { ...config, responseType: "blob", params: { preview: preview } };
|
|
350
|
-
return request(RevisionDocumentController.download({
|
|
355
|
+
return request(RevisionDocumentController.download({
|
|
356
|
+
category,
|
|
357
|
+
revision,
|
|
358
|
+
document
|
|
359
|
+
}), undefined, config);
|
|
351
360
|
},
|
|
352
361
|
},
|
|
353
362
|
// ── System (admin) endpoints ───────────────────────────────────────────
|