@reviza/api-client 1.2.0-SNAPSHOT-df1298f6 → 1.2.0-SNAPSHOT-bad959e0
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 -21
- 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 +13 -0
- package/dist/controllers/index.d.ts +26 -26
- package/dist/controllers/index.js +14 -14
- package/dist/index.d.ts +6 -5
- package/dist/index.js +18 -10
- 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;
|
|
@@ -66,11 +88,6 @@ export type FacilityIntervalData = {
|
|
|
66
88
|
duration: number | null;
|
|
67
89
|
unit: IntervalUnitEnum | null;
|
|
68
90
|
};
|
|
69
|
-
export type FacilityIssueResolvedPayload = {
|
|
70
|
-
resolved: boolean;
|
|
71
|
-
resolved_date: string | null;
|
|
72
|
-
resolved_note: string | null;
|
|
73
|
-
};
|
|
74
91
|
export type FacilityRevisionData = {
|
|
75
92
|
state: FacilityStateEnum;
|
|
76
93
|
id: number;
|
|
@@ -80,17 +97,11 @@ export type FacilityRevisionData = {
|
|
|
80
97
|
custom_revision_type: string | null;
|
|
81
98
|
next_revision_type: RevisionTypeEnum;
|
|
82
99
|
next_custom_revision_type: string | null;
|
|
100
|
+
path: string;
|
|
83
101
|
created_at: string | null;
|
|
84
102
|
updated_at: string | null;
|
|
85
103
|
deleted_at: string | null;
|
|
86
104
|
};
|
|
87
|
-
export type FacilityTreeData = {
|
|
88
|
-
key: string;
|
|
89
|
-
label: string;
|
|
90
|
-
category_id: number;
|
|
91
|
-
facilities: FacilityData[];
|
|
92
|
-
children: FacilityTreeData[];
|
|
93
|
-
};
|
|
94
105
|
export type FacilityUpdatePayload = {
|
|
95
106
|
name: string;
|
|
96
107
|
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,10 +11,18 @@ 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;
|
|
17
18
|
};
|
|
19
|
+
export type FacilityIssueResolvePayload = {
|
|
20
|
+
issues: undefined[];
|
|
21
|
+
facility_ids: number[];
|
|
22
|
+
resolved: boolean;
|
|
23
|
+
resolved_date: string | null;
|
|
24
|
+
resolved_note: string | null;
|
|
25
|
+
};
|
|
18
26
|
export type RevisionCreatePayload = {
|
|
19
27
|
revision_date: string;
|
|
20
28
|
next_revision_date: string;
|
|
@@ -41,6 +49,7 @@ export type RevisionData = {
|
|
|
41
49
|
custom_revision_type: string | null;
|
|
42
50
|
next_revision_type: RevisionTypeEnum;
|
|
43
51
|
next_custom_revision_type: string | null;
|
|
52
|
+
path: string;
|
|
44
53
|
created_at: string | null;
|
|
45
54
|
updated_at: string | null;
|
|
46
55
|
deleted_at: string | null;
|
|
@@ -81,6 +90,8 @@ export type RevisionIssueCreatePayload = {
|
|
|
81
90
|
};
|
|
82
91
|
/**
|
|
83
92
|
* Includes:
|
|
93
|
+
* - groupIssues
|
|
94
|
+
* - groupIssueFacilities
|
|
84
95
|
* - revision
|
|
85
96
|
* - facility
|
|
86
97
|
*/
|
|
@@ -96,7 +107,9 @@ export type RevisionIssueData = {
|
|
|
96
107
|
duplicated_issue?: RevisionIssueData;
|
|
97
108
|
duplicating_issue?: RevisionIssueData;
|
|
98
109
|
group_key: string | null;
|
|
110
|
+
group_number: number | null;
|
|
99
111
|
group_issues?: RevisionIssueData[];
|
|
112
|
+
group_issue_facilities?: RevisionIssueData[];
|
|
100
113
|
revision?: RevisionData;
|
|
101
114
|
facility?: FacilityData;
|
|
102
115
|
path: string;
|
|
@@ -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, 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";
|
|
@@ -16,7 +17,7 @@ import { NotificationSettingsData, NotificationSettingsPayload } from "../App/Da
|
|
|
16
17
|
import { OrganizationData, OrganizationUpdatePayload } from "../App/Data/Organization";
|
|
17
18
|
import { SubscriptionData } from "../App/Data/Subscription";
|
|
18
19
|
import { UserPermissionData, UserPermissionPayload } from "../App/Data/Permission";
|
|
19
|
-
import { RevisionCreatePayload, RevisionData, RevisionUpdatePayload, RevisionIssueData } from "../App/Data/Revision";
|
|
20
|
+
import { RevisionCreatePayload, RevisionData, RevisionUpdatePayload, RevisionIssueData, FacilityIssueResolvePayload } from "../App/Data/Revision";
|
|
20
21
|
import { SearchData } from "../App/Data/Search";
|
|
21
22
|
import { UserUiSettingsData, UserUiSettingsUpdatePayload } from "../App/Data/Ui";
|
|
22
23
|
type ActionFunction<P extends RouteParams | undefined> = P extends undefined ? (options?: RouteOptions) => ActionResult : (params: P, options?: RouteOptions) => ActionResult;
|
|
@@ -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>;
|
|
@@ -165,11 +152,6 @@ export declare const FacilityController: {
|
|
|
165
152
|
category: string | number;
|
|
166
153
|
facility: string | number;
|
|
167
154
|
}, string>;
|
|
168
|
-
readonly resolveIssue: ActionWithMethods<{
|
|
169
|
-
category: string | number;
|
|
170
|
-
facility: string | number;
|
|
171
|
-
issue: string | number;
|
|
172
|
-
}, string>;
|
|
173
155
|
};
|
|
174
156
|
export declare namespace FacilityController {
|
|
175
157
|
namespace getMapExtent {
|
|
@@ -200,10 +182,6 @@ export declare namespace FacilityController {
|
|
|
200
182
|
type Request = object;
|
|
201
183
|
type Response = StreamedResponse;
|
|
202
184
|
}
|
|
203
|
-
namespace resolveIssue {
|
|
204
|
-
type Request = FacilityIssueResolvedPayload;
|
|
205
|
-
type Response = RevizaResponseData<FacilityData | null>;
|
|
206
|
-
}
|
|
207
185
|
}
|
|
208
186
|
export declare const FacilityDocumentController: {
|
|
209
187
|
readonly index: ActionWithMethods<{
|
|
@@ -282,6 +260,20 @@ export declare namespace FacilityPictureController {
|
|
|
282
260
|
type Response = RevizaResponseData<null>;
|
|
283
261
|
}
|
|
284
262
|
}
|
|
263
|
+
export declare const FrontendController: {
|
|
264
|
+
readonly categoryTree: ActionWithMethods<undefined, string>;
|
|
265
|
+
readonly facilityTree: ActionWithMethods<undefined, string>;
|
|
266
|
+
};
|
|
267
|
+
export declare namespace FrontendController {
|
|
268
|
+
namespace categoryTree {
|
|
269
|
+
type Request = object;
|
|
270
|
+
type Response = RevizaResponseData<DataCollection<number, CategoryTreeData>>;
|
|
271
|
+
}
|
|
272
|
+
namespace facilityTree {
|
|
273
|
+
type Request = object;
|
|
274
|
+
type Response = RevizaResponseData<DataCollection<number, FacilityTreeData>>;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
285
277
|
export declare const FrontendErrorController: {
|
|
286
278
|
readonly logError: ActionWithMethods<undefined, string>;
|
|
287
279
|
};
|
|
@@ -535,6 +527,10 @@ export declare const RevisionIssueController: {
|
|
|
535
527
|
readonly getForCategory: ActionWithMethods<{
|
|
536
528
|
category: string | number;
|
|
537
529
|
}, string>;
|
|
530
|
+
readonly resolveIssue: ActionWithMethods<{
|
|
531
|
+
category: string | number;
|
|
532
|
+
issue: string | number;
|
|
533
|
+
}, string>;
|
|
538
534
|
readonly index: ActionWithMethods<{
|
|
539
535
|
category: string | number;
|
|
540
536
|
revision: string | number;
|
|
@@ -555,6 +551,10 @@ export declare namespace RevisionIssueController {
|
|
|
555
551
|
type Request = object;
|
|
556
552
|
type Response = RevizaResponseData<DataCollection<number, RevisionIssueData> | null>;
|
|
557
553
|
}
|
|
554
|
+
namespace resolveIssue {
|
|
555
|
+
type Request = FacilityIssueResolvePayload;
|
|
556
|
+
type Response = RevizaResponseData<null>;
|
|
557
|
+
}
|
|
558
558
|
namespace index {
|
|
559
559
|
type Request = object;
|
|
560
560
|
type Response = RevizaResponseData<DataCollection<number, RevisionIssueData> | null>;
|
|
@@ -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" },
|
|
@@ -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,6 +123,14 @@ export const FacilityPictureController = {
|
|
|
137
123
|
},
|
|
138
124
|
]),
|
|
139
125
|
};
|
|
126
|
+
export const FrontendController = {
|
|
127
|
+
categoryTree: createActionWithMethods([
|
|
128
|
+
{ method: "get", url: "api/v1/frontend/categories/tree" },
|
|
129
|
+
]),
|
|
130
|
+
facilityTree: createActionWithMethods([
|
|
131
|
+
{ method: "get", url: "api/v1/frontend/facilities/tree" },
|
|
132
|
+
]),
|
|
133
|
+
};
|
|
140
134
|
export const FrontendErrorController = {
|
|
141
135
|
logError: createActionWithMethods([
|
|
142
136
|
{ method: "post", url: "api/v1/frontend-error" },
|
|
@@ -283,6 +277,12 @@ export const RevisionDocumentController = {
|
|
|
283
277
|
};
|
|
284
278
|
export const RevisionIssueController = {
|
|
285
279
|
getForCategory: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}/issues" }]),
|
|
280
|
+
resolveIssue: createActionWithMethods([
|
|
281
|
+
{
|
|
282
|
+
method: "post",
|
|
283
|
+
url: "api/v1/categories/{category}/issues/{issue}/resolve",
|
|
284
|
+
},
|
|
285
|
+
]),
|
|
286
286
|
index: createActionWithMethods([
|
|
287
287
|
{
|
|
288
288
|
method: "get",
|
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>;
|
|
@@ -96,7 +96,6 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
96
96
|
store(category: number, data: FacilityController.store.Request, config?: AxiosRequestConfig): Promise<FacilityController.store.Response>;
|
|
97
97
|
update(category: number, facility: number, data: FacilityController.update.Request, config?: AxiosRequestConfig): Promise<FacilityController.update.Response>;
|
|
98
98
|
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
99
|
qrCode(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
101
100
|
mapExtent(facility: number, map: number, config?: AxiosRequestConfig): Promise<FacilityController.getMapExtent.Response>;
|
|
102
101
|
};
|
|
@@ -128,6 +127,7 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
128
127
|
show(category: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.show.Response>;
|
|
129
128
|
destroy(category: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.destroy.Response>;
|
|
130
129
|
getForCategory(category: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.getForCategory.Response>;
|
|
130
|
+
resolveIssue(category: number, issue: number, data: RevisionIssueController.resolveIssue.Request, config?: AxiosRequestConfig): Promise<RevisionIssueController.resolveIssue.Response>;
|
|
131
131
|
};
|
|
132
132
|
revisionDocuments: {
|
|
133
133
|
index(category: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionDocumentController.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: {
|
|
@@ -245,9 +245,6 @@ export function createRevizaApi(http = axios) {
|
|
|
245
245
|
destroy(category, facility, config) {
|
|
246
246
|
return request(FacilityController.destroy({ category, facility }), undefined, config);
|
|
247
247
|
},
|
|
248
|
-
resolveIssue(category, facility, issue, data, config) {
|
|
249
|
-
return request(FacilityController.resolveIssue({ category, facility, issue }), data, config);
|
|
250
|
-
},
|
|
251
248
|
qrCode(category, facility, config) {
|
|
252
249
|
config = { responseType: "blob", ...config };
|
|
253
250
|
return request(FacilityController.viewQrCode({ category, facility }), undefined, config);
|
|
@@ -329,7 +326,10 @@ export function createRevizaApi(http = axios) {
|
|
|
329
326
|
},
|
|
330
327
|
getForCategory(category, config) {
|
|
331
328
|
return request(RevisionIssueController.getForCategory({ category }), undefined, config);
|
|
332
|
-
}
|
|
329
|
+
},
|
|
330
|
+
resolveIssue(category, issue, data, config) {
|
|
331
|
+
return request(RevisionIssueController.resolveIssue({ category, issue }), data, config);
|
|
332
|
+
},
|
|
333
333
|
},
|
|
334
334
|
revisionDocuments: {
|
|
335
335
|
index(category, revision, config) {
|
|
@@ -343,11 +343,19 @@ export function createRevizaApi(http = axios) {
|
|
|
343
343
|
return request(RevisionDocumentController.update({ category, revision, document }), data, config);
|
|
344
344
|
},
|
|
345
345
|
destroy(category, revision, document, config) {
|
|
346
|
-
return request(RevisionDocumentController.destroy({
|
|
346
|
+
return request(RevisionDocumentController.destroy({
|
|
347
|
+
category,
|
|
348
|
+
revision,
|
|
349
|
+
document
|
|
350
|
+
}), undefined, config);
|
|
347
351
|
},
|
|
348
352
|
download(category, revision, document, preview, config) {
|
|
349
353
|
config = { ...config, responseType: "blob", params: { preview: preview } };
|
|
350
|
-
return request(RevisionDocumentController.download({
|
|
354
|
+
return request(RevisionDocumentController.download({
|
|
355
|
+
category,
|
|
356
|
+
revision,
|
|
357
|
+
document
|
|
358
|
+
}), undefined, config);
|
|
351
359
|
},
|
|
352
360
|
},
|
|
353
361
|
// ── System (admin) endpoints ───────────────────────────────────────────
|