@reviza/api-client 1.0.0-SNAPSHOT-1c195465 → 1.0.0-SNAPSHOT-b1d8a2de
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/ActionLog/index.d.ts +25 -0
- package/dist/App/Data/ActionLog/index.js +1 -0
- package/dist/App/Data/Auth/index.d.ts +36 -0
- package/dist/App/Data/Auth/index.js +1 -0
- package/dist/App/Data/Category/index.d.ts +67 -0
- package/dist/App/Data/Category/index.js +1 -0
- package/dist/App/Data/Config/index.d.ts +36 -0
- package/dist/App/Data/Config/index.js +1 -0
- package/dist/App/Data/Demo/index.d.ts +20 -0
- package/dist/App/Data/Demo/index.js +1 -0
- package/dist/App/Data/Document/index.d.ts +22 -0
- package/dist/App/Data/Document/index.js +1 -0
- package/dist/App/Data/Facility/index.d.ts +108 -0
- package/dist/App/Data/Facility/index.js +1 -0
- package/dist/App/Data/FrontendRoute/index.d.ts +6 -0
- package/dist/App/Data/FrontendRoute/index.js +1 -0
- package/dist/App/Data/Map/index.d.ts +25 -0
- package/dist/App/Data/Map/index.js +1 -0
- package/dist/App/Data/Me/index.d.ts +29 -0
- package/dist/App/Data/Me/index.js +1 -0
- package/dist/App/Data/Notification/index.d.ts +32 -0
- package/dist/App/Data/Notification/index.js +1 -0
- package/dist/App/Data/Organization/index.d.ts +57 -0
- package/dist/App/Data/Organization/index.js +1 -0
- package/dist/App/Data/Permission/index.d.ts +32 -0
- package/dist/App/Data/Permission/index.js +1 -0
- package/dist/App/Data/Revision/index.d.ts +72 -0
- package/dist/App/Data/Revision/index.js +1 -0
- package/dist/App/Data/Search/index.d.ts +24 -0
- package/dist/App/Data/Search/index.js +1 -0
- package/dist/App/Data/Subscription/index.d.ts +25 -0
- package/dist/App/Data/Subscription/index.js +1 -0
- package/dist/App/Data/User/index.d.ts +31 -0
- package/dist/App/Data/User/index.js +1 -0
- package/dist/App/Data/index.d.ts +4 -0
- package/dist/App/Data/index.js +1 -0
- package/dist/App/Enum/Notifications/index.d.ts +11 -0
- package/dist/App/Enum/Notifications/index.js +13 -0
- package/dist/App/Enum/Permissions/index.d.ts +11 -0
- package/dist/App/Enum/Permissions/index.js +13 -0
- package/dist/App/Enum/index.d.ts +55 -0
- package/dist/App/Enum/index.js +62 -0
- package/dist/Illuminate/Http/index.d.ts +1 -0
- package/dist/Illuminate/Http/index.js +1 -0
- package/dist/Illuminate/index.d.ts +39 -0
- package/dist/Illuminate/index.js +1 -0
- package/dist/Spatie/LaravelData/Enums/index.d.ts +27 -0
- package/dist/Spatie/LaravelData/Enums/index.js +30 -0
- package/dist/Spatie/LaravelData/Support/Creation/index.d.ts +6 -0
- package/dist/Spatie/LaravelData/Support/Creation/index.js +7 -0
- package/dist/Spatie/LaravelData/Support/Partials/index.d.ts +6 -0
- package/dist/Spatie/LaravelData/Support/Partials/index.js +7 -0
- package/dist/Spatie/LaravelData/Support/Wrapping/index.d.ts +10 -0
- package/dist/Spatie/LaravelData/Support/Wrapping/index.js +12 -0
- package/dist/Spatie/LaravelData/index.d.ts +7 -0
- package/dist/Spatie/LaravelData/index.js +1 -0
- package/dist/Symfony/Component/HttpFoundation/index.d.ts +1 -0
- package/dist/Symfony/Component/HttpFoundation/index.js +1 -0
- package/dist/controllers/System/index.d.ts +253 -0
- package/dist/controllers/System/index.js +42 -0
- package/dist/controllers/index.d.ts +627 -0
- package/dist/controllers/index.js +382 -0
- package/dist/index.d.ts +184 -0
- package/dist/index.js +433 -0
- package/package.json +1 -1
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
export const AuthController = {
|
|
2
|
+
login: createActionWithMethods([{ method: "post", url: "api/v1/login" }]),
|
|
3
|
+
logout: createActionWithMethods([{ method: "post", url: "api/v1/logout" }]),
|
|
4
|
+
verifyRegistrationToken: createActionWithMethods([{ method: "get", url: "api/v1/register/{token}" }]),
|
|
5
|
+
register: createActionWithMethods([{ method: "post", url: "api/v1/register/{token}" }]),
|
|
6
|
+
forgotPassword: createActionWithMethods([
|
|
7
|
+
{ method: "post", url: "api/v1/password/forgot" },
|
|
8
|
+
]),
|
|
9
|
+
resetPassword: createActionWithMethods([{ method: "post", url: "api/v1/password/reset/{token}" }]),
|
|
10
|
+
};
|
|
11
|
+
export const CategoryController = {
|
|
12
|
+
index: createActionWithMethods([
|
|
13
|
+
{ method: "get", url: "api/v1/categories" },
|
|
14
|
+
]),
|
|
15
|
+
store: createActionWithMethods([
|
|
16
|
+
{ method: "post", url: "api/v1/categories" },
|
|
17
|
+
]),
|
|
18
|
+
show: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}" }]),
|
|
19
|
+
update: createActionWithMethods([
|
|
20
|
+
{ method: "put", url: "api/v1/categories/{category}" },
|
|
21
|
+
{ method: "patch", url: "api/v1/categories/{category}" },
|
|
22
|
+
]),
|
|
23
|
+
destroy: createActionWithMethods([{ method: "delete", url: "api/v1/categories/{category}" }]),
|
|
24
|
+
};
|
|
25
|
+
export const ConfigController = {
|
|
26
|
+
config: createActionWithMethods([{ method: "get", url: "api/v1/config" }]),
|
|
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
|
+
export const DemoRequestController = {
|
|
37
|
+
store: createActionWithMethods([
|
|
38
|
+
{ method: "post", url: "api/v1/request-demo" },
|
|
39
|
+
]),
|
|
40
|
+
index: createActionWithMethods([
|
|
41
|
+
{ method: "get", url: "api/v1/system/demo-requests" },
|
|
42
|
+
]),
|
|
43
|
+
};
|
|
44
|
+
export const FacilityController = {
|
|
45
|
+
getMapExtent: createActionWithMethods([
|
|
46
|
+
{
|
|
47
|
+
method: "get",
|
|
48
|
+
url: "api/v1/facilities/{facility}/maps/{map}/extent",
|
|
49
|
+
},
|
|
50
|
+
]),
|
|
51
|
+
index: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}/facilities" }]),
|
|
52
|
+
store: createActionWithMethods([{ method: "post", url: "api/v1/categories/{category}/facilities" }]),
|
|
53
|
+
show: createActionWithMethods([
|
|
54
|
+
{
|
|
55
|
+
method: "get",
|
|
56
|
+
url: "api/v1/categories/{category}/facilities/{facility}",
|
|
57
|
+
},
|
|
58
|
+
]),
|
|
59
|
+
update: createActionWithMethods([
|
|
60
|
+
{
|
|
61
|
+
method: "put",
|
|
62
|
+
url: "api/v1/categories/{category}/facilities/{facility}",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
method: "patch",
|
|
66
|
+
url: "api/v1/categories/{category}/facilities/{facility}",
|
|
67
|
+
},
|
|
68
|
+
]),
|
|
69
|
+
destroy: createActionWithMethods([
|
|
70
|
+
{
|
|
71
|
+
method: "delete",
|
|
72
|
+
url: "api/v1/categories/{category}/facilities/{facility}",
|
|
73
|
+
},
|
|
74
|
+
]),
|
|
75
|
+
storePicture: createActionWithMethods([
|
|
76
|
+
{
|
|
77
|
+
method: "post",
|
|
78
|
+
url: "api/v1/categories/{category}/facilities/{facility}/picture",
|
|
79
|
+
},
|
|
80
|
+
]),
|
|
81
|
+
viewPicture: createActionWithMethods([
|
|
82
|
+
{
|
|
83
|
+
method: "get",
|
|
84
|
+
url: "api/v1/categories/{category}/facilities/{facility}/picture",
|
|
85
|
+
},
|
|
86
|
+
]),
|
|
87
|
+
deletePicture: createActionWithMethods([
|
|
88
|
+
{
|
|
89
|
+
method: "delete",
|
|
90
|
+
url: "api/v1/categories/{category}/facilities/{facility}/picture",
|
|
91
|
+
},
|
|
92
|
+
]),
|
|
93
|
+
viewQrCode: createActionWithMethods([
|
|
94
|
+
{
|
|
95
|
+
method: "get",
|
|
96
|
+
url: "api/v1/categories/{category}/facilities/{facility}/qrcode",
|
|
97
|
+
},
|
|
98
|
+
]),
|
|
99
|
+
resolveIssue: createActionWithMethods([
|
|
100
|
+
{
|
|
101
|
+
method: "post",
|
|
102
|
+
url: "api/v1/categories/{category}/facilities/{facility}/issues/{issue}/resolve",
|
|
103
|
+
},
|
|
104
|
+
]),
|
|
105
|
+
};
|
|
106
|
+
export const FacilityDocumentController = {
|
|
107
|
+
index: createActionWithMethods([
|
|
108
|
+
{
|
|
109
|
+
method: "get",
|
|
110
|
+
url: "api/v1/categories/{category}/facilities/{facility}/documents",
|
|
111
|
+
},
|
|
112
|
+
]),
|
|
113
|
+
store: createActionWithMethods([
|
|
114
|
+
{
|
|
115
|
+
method: "post",
|
|
116
|
+
url: "api/v1/categories/{category}/facilities/{facility}/documents",
|
|
117
|
+
},
|
|
118
|
+
]),
|
|
119
|
+
destroy: createActionWithMethods([
|
|
120
|
+
{
|
|
121
|
+
method: "delete",
|
|
122
|
+
url: "api/v1/categories/{category}/facilities/{facility}/documents/{document}",
|
|
123
|
+
},
|
|
124
|
+
]),
|
|
125
|
+
update: createActionWithMethods([
|
|
126
|
+
{
|
|
127
|
+
method: "post",
|
|
128
|
+
url: "api/v1/categories/{category}/facilities/{facility}/documents/{document}",
|
|
129
|
+
},
|
|
130
|
+
]),
|
|
131
|
+
download: createActionWithMethods([
|
|
132
|
+
{
|
|
133
|
+
method: "get",
|
|
134
|
+
url: "api/v1/categories/{category}/facilities/{facility}/documents/{document}/download",
|
|
135
|
+
},
|
|
136
|
+
]),
|
|
137
|
+
};
|
|
138
|
+
export const FrontendErrorController = {
|
|
139
|
+
logError: createActionWithMethods([
|
|
140
|
+
{ method: "post", url: "api/v1/frontend-error" },
|
|
141
|
+
]),
|
|
142
|
+
};
|
|
143
|
+
export const FrontendRouteController = {
|
|
144
|
+
redirect: createActionWithMethods([
|
|
145
|
+
{ method: "get", url: "api/v1/frontend-route" },
|
|
146
|
+
]),
|
|
147
|
+
};
|
|
148
|
+
export const MapController = {
|
|
149
|
+
index: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}/maps" }]),
|
|
150
|
+
getTile: createActionWithMethods([
|
|
151
|
+
{
|
|
152
|
+
method: "get",
|
|
153
|
+
url: "api/v1/categories/{category}/maps/{map}/tile/{x}/{y}/{z}",
|
|
154
|
+
},
|
|
155
|
+
]),
|
|
156
|
+
};
|
|
157
|
+
export const MeController = {
|
|
158
|
+
me: createActionWithMethods([{ method: "get", url: "api/v1/me" }]),
|
|
159
|
+
update: createActionWithMethods([{ method: "put", url: "api/v1/me" }]),
|
|
160
|
+
tutorial: createActionWithMethods([
|
|
161
|
+
{ method: "put", url: "api/v1/me/tutorial" },
|
|
162
|
+
]),
|
|
163
|
+
changePassword: createActionWithMethods([
|
|
164
|
+
{ method: "post", url: "api/v1/me/change-password" },
|
|
165
|
+
]),
|
|
166
|
+
updateSettings: createActionWithMethods([
|
|
167
|
+
{ method: "put", url: "api/v1/me/settings" },
|
|
168
|
+
]),
|
|
169
|
+
};
|
|
170
|
+
export const NotificationSettingsController = {
|
|
171
|
+
show: createActionWithMethods([
|
|
172
|
+
{ method: "get", url: "api/v1/me/notification-settings" },
|
|
173
|
+
]),
|
|
174
|
+
update: createActionWithMethods([
|
|
175
|
+
{ method: "put", url: "api/v1/me/notification-settings" },
|
|
176
|
+
]),
|
|
177
|
+
};
|
|
178
|
+
export const OrganizationController = {
|
|
179
|
+
index: createActionWithMethods([
|
|
180
|
+
{ method: "get", url: "api/v1/organizations" },
|
|
181
|
+
]),
|
|
182
|
+
show: createActionWithMethods([{ method: "get", url: "api/v1/organizations/{organization}" }]),
|
|
183
|
+
update: createActionWithMethods([{ method: "put", url: "api/v1/organizations/{organization}" }]),
|
|
184
|
+
getSubscriptions: createActionWithMethods([
|
|
185
|
+
{
|
|
186
|
+
method: "get",
|
|
187
|
+
url: "api/v1/organizations/{organization}/subscriptions",
|
|
188
|
+
},
|
|
189
|
+
]),
|
|
190
|
+
};
|
|
191
|
+
export const PermissionController = {
|
|
192
|
+
show: createActionWithMethods([
|
|
193
|
+
{
|
|
194
|
+
method: "get",
|
|
195
|
+
url: "api/v1/organizations/{organization}/users/{user}/permissions",
|
|
196
|
+
},
|
|
197
|
+
]),
|
|
198
|
+
update: createActionWithMethods([
|
|
199
|
+
{
|
|
200
|
+
method: "put",
|
|
201
|
+
url: "api/v1/organizations/{organization}/users/{user}/permissions",
|
|
202
|
+
},
|
|
203
|
+
]),
|
|
204
|
+
};
|
|
205
|
+
export const RelatedFacilityController = {
|
|
206
|
+
options: createActionWithMethods([
|
|
207
|
+
{
|
|
208
|
+
method: "get",
|
|
209
|
+
url: "api/v1/categories/{category}/facilities/{facility}/related/options",
|
|
210
|
+
},
|
|
211
|
+
]),
|
|
212
|
+
store: createActionWithMethods([
|
|
213
|
+
{
|
|
214
|
+
method: "post",
|
|
215
|
+
url: "api/v1/categories/{category}/facilities/{facility}/related",
|
|
216
|
+
},
|
|
217
|
+
]),
|
|
218
|
+
destroy: createActionWithMethods([
|
|
219
|
+
{
|
|
220
|
+
method: "delete",
|
|
221
|
+
url: "api/v1/categories/{category}/facilities/{facility}/related/{relatedFacility}",
|
|
222
|
+
},
|
|
223
|
+
]),
|
|
224
|
+
};
|
|
225
|
+
export const RevisionController = {
|
|
226
|
+
index: createActionWithMethods([
|
|
227
|
+
{
|
|
228
|
+
method: "get",
|
|
229
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions",
|
|
230
|
+
},
|
|
231
|
+
]),
|
|
232
|
+
store: createActionWithMethods([
|
|
233
|
+
{
|
|
234
|
+
method: "post",
|
|
235
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions",
|
|
236
|
+
},
|
|
237
|
+
]),
|
|
238
|
+
show: createActionWithMethods([
|
|
239
|
+
{
|
|
240
|
+
method: "get",
|
|
241
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}",
|
|
242
|
+
},
|
|
243
|
+
]),
|
|
244
|
+
update: createActionWithMethods([
|
|
245
|
+
{
|
|
246
|
+
method: "put",
|
|
247
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}",
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
method: "patch",
|
|
251
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}",
|
|
252
|
+
},
|
|
253
|
+
]),
|
|
254
|
+
destroy: createActionWithMethods([
|
|
255
|
+
{
|
|
256
|
+
method: "delete",
|
|
257
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}",
|
|
258
|
+
},
|
|
259
|
+
]),
|
|
260
|
+
};
|
|
261
|
+
export const RevisionDocumentController = {
|
|
262
|
+
index: createActionWithMethods([
|
|
263
|
+
{
|
|
264
|
+
method: "get",
|
|
265
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/documents",
|
|
266
|
+
},
|
|
267
|
+
]),
|
|
268
|
+
store: createActionWithMethods([
|
|
269
|
+
{
|
|
270
|
+
method: "post",
|
|
271
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/documents",
|
|
272
|
+
},
|
|
273
|
+
]),
|
|
274
|
+
destroy: createActionWithMethods([
|
|
275
|
+
{
|
|
276
|
+
method: "delete",
|
|
277
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/documents/{document}",
|
|
278
|
+
},
|
|
279
|
+
]),
|
|
280
|
+
update: createActionWithMethods([
|
|
281
|
+
{
|
|
282
|
+
method: "post",
|
|
283
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/documents/{document}",
|
|
284
|
+
},
|
|
285
|
+
]),
|
|
286
|
+
download: createActionWithMethods([
|
|
287
|
+
{
|
|
288
|
+
method: "get",
|
|
289
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/documents/{document}/download",
|
|
290
|
+
},
|
|
291
|
+
]),
|
|
292
|
+
};
|
|
293
|
+
export const RevisionIssueController = {
|
|
294
|
+
getForCategory: createActionWithMethods([{ method: "get", url: "api/v1/categories/{category}/issues" }]),
|
|
295
|
+
index: createActionWithMethods([
|
|
296
|
+
{
|
|
297
|
+
method: "get",
|
|
298
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/issues",
|
|
299
|
+
},
|
|
300
|
+
]),
|
|
301
|
+
show: createActionWithMethods([
|
|
302
|
+
{
|
|
303
|
+
method: "get",
|
|
304
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/issues/{issue}",
|
|
305
|
+
},
|
|
306
|
+
]),
|
|
307
|
+
destroy: createActionWithMethods([
|
|
308
|
+
{
|
|
309
|
+
method: "delete",
|
|
310
|
+
url: "api/v1/categories/{category}/facilities/{facility}/revisions/{revision}/issues/{issue}",
|
|
311
|
+
},
|
|
312
|
+
]),
|
|
313
|
+
};
|
|
314
|
+
export const SearchController = {
|
|
315
|
+
search: createActionWithMethods([{ method: "get", url: "api/v1/search" }]),
|
|
316
|
+
};
|
|
317
|
+
export const UserController = {
|
|
318
|
+
organizationUsers: createActionWithMethods([{ method: "get", url: "api/v1/organizations/{organization}/users" }]),
|
|
319
|
+
invite: createActionWithMethods([
|
|
320
|
+
{
|
|
321
|
+
method: "post",
|
|
322
|
+
url: "api/v1/organizations/{organization}/users/invite",
|
|
323
|
+
},
|
|
324
|
+
]),
|
|
325
|
+
destroy: createActionWithMethods([
|
|
326
|
+
{
|
|
327
|
+
method: "delete",
|
|
328
|
+
url: "api/v1/organizations/{organization}/users/{user}",
|
|
329
|
+
},
|
|
330
|
+
]),
|
|
331
|
+
};
|
|
332
|
+
export function buildUrl(path, params, options) {
|
|
333
|
+
let url = path;
|
|
334
|
+
if (params) {
|
|
335
|
+
for (const [key, value] of Object.entries(params)) {
|
|
336
|
+
url = url.replace(`{${key}}`, String(value));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (options?.query) {
|
|
340
|
+
const searchParams = new URLSearchParams();
|
|
341
|
+
for (const [key, value] of Object.entries(options.query)) {
|
|
342
|
+
if (value === null || value === undefined) {
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
if (Array.isArray(value)) {
|
|
346
|
+
value.forEach((v) => searchParams.append(`${key}[]`, String(v)));
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
searchParams.append(key, String(value));
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
const queryString = searchParams.toString();
|
|
353
|
+
if (queryString) {
|
|
354
|
+
url += "?" + queryString;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return (typeof baseUrl !== "undefined" ? baseUrl : "") + "/" + url;
|
|
358
|
+
}
|
|
359
|
+
export function createActionWithMethods(routes) {
|
|
360
|
+
const defaultRoute = routes[0];
|
|
361
|
+
const createFn = (route) => {
|
|
362
|
+
return ((...args) => {
|
|
363
|
+
const params = args[0] && typeof args[0] === "object" && !("query" in args[0])
|
|
364
|
+
? args[0]
|
|
365
|
+
: undefined;
|
|
366
|
+
const options = params
|
|
367
|
+
? args[1]
|
|
368
|
+
: args[0];
|
|
369
|
+
const url = buildUrl(route.url, params, options);
|
|
370
|
+
return {
|
|
371
|
+
url,
|
|
372
|
+
method: route.method,
|
|
373
|
+
};
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
const fn = createFn(defaultRoute);
|
|
377
|
+
const methodVariants = {};
|
|
378
|
+
for (const route of routes) {
|
|
379
|
+
methodVariants[route.method.toLowerCase()] = createFn(route);
|
|
380
|
+
}
|
|
381
|
+
return Object.assign(fn, methodVariants);
|
|
382
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed API client — wraps generated controller actions with axios.
|
|
3
|
+
*/
|
|
4
|
+
import { type AxiosInstance, type AxiosRequestConfig } from "axios";
|
|
5
|
+
import { AuthController, CategoryController, ConfigController, DashboardController, DemoRequestController, FacilityController, FacilityDocumentController, FrontendErrorController, FrontendRouteController, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, UserController } from "./controllers";
|
|
6
|
+
import { ActionLogController, MapController as SystemMapController, OrganizationController as SystemOrganizationController, PermissionController as SystemPermissionController, UserController as SystemUserController } from "./controllers/System/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* Convert a typed payload that contains `File` / `Blob` fields into a
|
|
9
|
+
* `FormData` object ready for multipart upload.
|
|
10
|
+
*
|
|
11
|
+
* Axios automatically adds the correct `Content-Type: multipart/form-data; boundary=…`
|
|
12
|
+
* header when it detects a `FormData` body — do NOT set Content-Type manually,
|
|
13
|
+
* or the boundary will be missing and the server will reject the request.
|
|
14
|
+
*
|
|
15
|
+
* Array values are appended with the `key[]` convention expected by Laravel.
|
|
16
|
+
* Boolean values are serialised as `"1"` / `"0"`.
|
|
17
|
+
* `null` / `undefined` values are skipped.
|
|
18
|
+
*/
|
|
19
|
+
export declare function toFormData(data: object): FormData;
|
|
20
|
+
export type BlobData = string | ArrayBuffer | null;
|
|
21
|
+
export declare function readBlob(data: Blob): Promise<BlobData>;
|
|
22
|
+
export declare class ApiError extends Error {
|
|
23
|
+
message: string;
|
|
24
|
+
status: number;
|
|
25
|
+
constructor(message: string, status: number);
|
|
26
|
+
}
|
|
27
|
+
export declare class ValidationError<T> extends ApiError {
|
|
28
|
+
message: string;
|
|
29
|
+
errors: Partial<Record<keyof T, string>>;
|
|
30
|
+
constructor(message: string, errors: Partial<Record<keyof T, string>>);
|
|
31
|
+
}
|
|
32
|
+
export declare function createRevizaApi(http?: AxiosInstance): {
|
|
33
|
+
frontendError(data: any, config?: AxiosRequestConfig): Promise<FrontendErrorController.logError.Response>;
|
|
34
|
+
config(config?: AxiosRequestConfig): Promise<ConfigController.config.Response>;
|
|
35
|
+
frontendRoute(config?: AxiosRequestConfig): Promise<FrontendRouteController.redirect.Response>;
|
|
36
|
+
search(config?: AxiosRequestConfig): Promise<SearchController.search.Response>;
|
|
37
|
+
dashboard: {
|
|
38
|
+
categoryTree(config?: AxiosRequestConfig): Promise<DashboardController.categoryTree.Response>;
|
|
39
|
+
facilityList(config?: AxiosRequestConfig): Promise<DashboardController.facilityList.Response>;
|
|
40
|
+
};
|
|
41
|
+
demo: {
|
|
42
|
+
index(config?: AxiosRequestConfig): Promise<DemoRequestController.index.Response>;
|
|
43
|
+
request(data: DemoRequestController.store.Request, config?: AxiosRequestConfig): Promise<DemoRequestController.store.Response>;
|
|
44
|
+
};
|
|
45
|
+
auth: {
|
|
46
|
+
login(data: AuthController.login.Request, config?: AxiosRequestConfig): Promise<AuthController.login.Response>;
|
|
47
|
+
logout(config?: AxiosRequestConfig): Promise<AuthController.logout.Response>;
|
|
48
|
+
forgotPassword(data: AuthController.forgotPassword.Request, config?: AxiosRequestConfig): Promise<AuthController.forgotPassword.Response>;
|
|
49
|
+
resetPassword(token: string, data: AuthController.resetPassword.Request, config?: AxiosRequestConfig): Promise<AuthController.resetPassword.Response>;
|
|
50
|
+
register(token: string, data: AuthController.register.Request, config?: AxiosRequestConfig): Promise<AuthController.register.Response>;
|
|
51
|
+
verifyRegistrationToken(token: string, config?: AxiosRequestConfig): Promise<AuthController.verifyRegistrationToken.Response>;
|
|
52
|
+
};
|
|
53
|
+
me: {
|
|
54
|
+
get(config?: AxiosRequestConfig): Promise<MeController.me.Response>;
|
|
55
|
+
update(data: MeController.update.Request, config?: AxiosRequestConfig): Promise<MeController.update.Response>;
|
|
56
|
+
changePassword(data: MeController.changePassword.Request, config?: AxiosRequestConfig): Promise<MeController.changePassword.Response>;
|
|
57
|
+
updateSettings(data: MeController.updateSettings.Request, config?: AxiosRequestConfig): Promise<MeController.updateSettings.Response>;
|
|
58
|
+
tutorial(config?: AxiosRequestConfig): Promise<MeController.tutorial.Response>;
|
|
59
|
+
};
|
|
60
|
+
notificationSettings: {
|
|
61
|
+
show(config?: AxiosRequestConfig): Promise<NotificationSettingsController.show.Response>;
|
|
62
|
+
update(data: NotificationSettingsController.update.Request, config?: AxiosRequestConfig): Promise<NotificationSettingsController.update.Response>;
|
|
63
|
+
};
|
|
64
|
+
organizations: {
|
|
65
|
+
index(config?: AxiosRequestConfig): Promise<OrganizationController.index.Response>;
|
|
66
|
+
show(organization: number, config?: AxiosRequestConfig): Promise<OrganizationController.show.Response>;
|
|
67
|
+
update(organization: number, data: OrganizationController.update.Request, config?: AxiosRequestConfig): Promise<OrganizationController.update.Response>;
|
|
68
|
+
getSubscriptions(organization: number, config?: AxiosRequestConfig): Promise<OrganizationController.getSubscriptions.Response>;
|
|
69
|
+
};
|
|
70
|
+
users: {
|
|
71
|
+
organizationUsers(organization: number, config?: AxiosRequestConfig): Promise<UserController.organizationUsers.Response>;
|
|
72
|
+
invite(organization: number, data: UserController.invite.Request, config?: AxiosRequestConfig): Promise<UserController.invite.Response>;
|
|
73
|
+
destroy(organization: number, user: number, config?: AxiosRequestConfig): Promise<UserController.destroy.Response>;
|
|
74
|
+
};
|
|
75
|
+
permissions: {
|
|
76
|
+
show(organization: number, user: number, config?: AxiosRequestConfig): Promise<PermissionController.show.Response>;
|
|
77
|
+
update(organization: number, user: number, data: PermissionController.update.Request, config?: AxiosRequestConfig): Promise<PermissionController.update.Response>;
|
|
78
|
+
};
|
|
79
|
+
categories: {
|
|
80
|
+
index(config?: AxiosRequestConfig): Promise<CategoryController.index.Response>;
|
|
81
|
+
show(category: number, config?: AxiosRequestConfig): Promise<CategoryController.show.Response>;
|
|
82
|
+
store(data: CategoryController.store.Request, config?: AxiosRequestConfig): Promise<CategoryController.store.Response>;
|
|
83
|
+
update(category: number, data: CategoryController.update.Request, config?: AxiosRequestConfig): Promise<CategoryController.update.Response>;
|
|
84
|
+
destroy(category: number, config?: AxiosRequestConfig): Promise<CategoryController.destroy.Response>;
|
|
85
|
+
};
|
|
86
|
+
maps: {
|
|
87
|
+
index(category: number, config?: AxiosRequestConfig): Promise<MapController.index.Response>;
|
|
88
|
+
};
|
|
89
|
+
facilities: {
|
|
90
|
+
index(category: number, config?: AxiosRequestConfig): Promise<FacilityController.index.Response>;
|
|
91
|
+
show(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.show.Response>;
|
|
92
|
+
store(category: number, data: FacilityController.store.Request, config?: AxiosRequestConfig): Promise<FacilityController.store.Response>;
|
|
93
|
+
update(category: number, facility: number, data: FacilityController.update.Request, config?: AxiosRequestConfig): Promise<FacilityController.update.Response>;
|
|
94
|
+
destroy(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.destroy.Response>;
|
|
95
|
+
resolveIssue(category: number, facility: number, issue: number, data: FacilityController.resolveIssue.Request, config?: AxiosRequestConfig): Promise<FacilityController.resolveIssue.Response>;
|
|
96
|
+
qrCode(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
97
|
+
viewPicture(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
98
|
+
storePicture(category: number, facility: number, data: FacilityController.storePicture.Request, config?: AxiosRequestConfig): Promise<FacilityController.storePicture.Response>;
|
|
99
|
+
deletePicture(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.deletePicture.Response>;
|
|
100
|
+
mapExtent(facility: number, map: number, config?: AxiosRequestConfig): Promise<FacilityController.getMapExtent.Response>;
|
|
101
|
+
};
|
|
102
|
+
relatedFacilities: {
|
|
103
|
+
options(category: number, facility: number, config?: AxiosRequestConfig): Promise<RelatedFacilityController.options.Response>;
|
|
104
|
+
store(category: number, facility: number, data: RelatedFacilityController.store.Request, config?: AxiosRequestConfig): Promise<RelatedFacilityController.store.Response>;
|
|
105
|
+
delete(category: number, facility: number, relatedFacility: number, config?: AxiosRequestConfig): Promise<RelatedFacilityController.destroy.Response>;
|
|
106
|
+
};
|
|
107
|
+
facilityDocuments: {
|
|
108
|
+
index(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityDocumentController.index.Response>;
|
|
109
|
+
store(category: number, facility: number, data: FacilityDocumentController.store.Request, config?: AxiosRequestConfig): Promise<FacilityDocumentController.store.Response>;
|
|
110
|
+
update(category: number, facility: number, document: number, data: FacilityDocumentController.update.Request, config?: AxiosRequestConfig): Promise<FacilityDocumentController.update.Response>;
|
|
111
|
+
destroy(category: number, facility: number, document: number, config?: AxiosRequestConfig): Promise<FacilityDocumentController.destroy.Response>;
|
|
112
|
+
download(category: number, facility: number, document: number, preview: boolean, config?: AxiosRequestConfig): Promise<FacilityDocumentController.download.Response>;
|
|
113
|
+
};
|
|
114
|
+
revisions: {
|
|
115
|
+
index(category: number, facility: number, config?: AxiosRequestConfig): Promise<RevisionController.index.Response>;
|
|
116
|
+
show(category: number, facility: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionController.show.Response>;
|
|
117
|
+
store(category: number, facility: number, data: RevisionController.store.Request, config?: AxiosRequestConfig): Promise<RevisionController.store.Response>;
|
|
118
|
+
update(category: number, facility: number, revision: number, data: RevisionController.update.Request, config?: AxiosRequestConfig): Promise<RevisionController.update.Response>;
|
|
119
|
+
destroy(category: number, facility: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionController.destroy.Response>;
|
|
120
|
+
};
|
|
121
|
+
revisionIssues: {
|
|
122
|
+
index(category: number, facility: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.index.Response>;
|
|
123
|
+
show(category: number, facility: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.show.Response>;
|
|
124
|
+
destroy(category: number, facility: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.destroy.Response>;
|
|
125
|
+
getForCategory(category: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.getForCategory.Response>;
|
|
126
|
+
};
|
|
127
|
+
revisionDocuments: {
|
|
128
|
+
index(category: number, facility: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionDocumentController.index.Response>;
|
|
129
|
+
store(category: number, facility: number, revision: number, data: RevisionDocumentController.store.Request, config?: AxiosRequestConfig): Promise<RevisionDocumentController.store.Response>;
|
|
130
|
+
update(category: number, facility: number, revision: number, document: number, data: RevisionDocumentController.update.Request, config?: AxiosRequestConfig): Promise<RevisionDocumentController.update.Response>;
|
|
131
|
+
destroy(category: number, facility: number, revision: number, document: number, config?: AxiosRequestConfig): Promise<RevisionDocumentController.destroy.Response>;
|
|
132
|
+
download(category: number, facility: number, revision: number, document: number, preview: boolean, config?: AxiosRequestConfig): Promise<FacilityDocumentController.download.Response>;
|
|
133
|
+
};
|
|
134
|
+
system: {
|
|
135
|
+
actionLog: {
|
|
136
|
+
index(config?: AxiosRequestConfig): Promise<ActionLogController.index.Response>;
|
|
137
|
+
show(transaction: number | string, config?: AxiosRequestConfig): Promise<ActionLogController.show.Response>;
|
|
138
|
+
revert(transaction: number | string, config?: AxiosRequestConfig): Promise<ActionLogController.revert.Response>;
|
|
139
|
+
};
|
|
140
|
+
maps: {
|
|
141
|
+
store(data: SystemMapController.store.Request, config?: AxiosRequestConfig): Promise<SystemMapController.store.Response>;
|
|
142
|
+
update(map: number, data: SystemMapController.update.Request, config?: AxiosRequestConfig): Promise<SystemMapController.update.Response>;
|
|
143
|
+
destroy(map: number, config?: AxiosRequestConfig): Promise<SystemMapController.destroy.Response>;
|
|
144
|
+
};
|
|
145
|
+
organizations: {
|
|
146
|
+
store(data: SystemOrganizationController.store.Request, config?: AxiosRequestConfig): Promise<SystemOrganizationController.store.Response>;
|
|
147
|
+
destroy(organization: number, config?: AxiosRequestConfig): Promise<SystemOrganizationController.destroy.Response>;
|
|
148
|
+
storeSubscription(organization: number, data: SystemOrganizationController.storeSubscription.Request, config?: AxiosRequestConfig): Promise<SystemOrganizationController.storeSubscription.Response>;
|
|
149
|
+
};
|
|
150
|
+
permissions: {
|
|
151
|
+
show(user: number, config?: AxiosRequestConfig): Promise<SystemPermissionController.show.Response>;
|
|
152
|
+
update(user: number, data: SystemPermissionController.update.Request, config?: AxiosRequestConfig): Promise<SystemPermissionController.update.Response>;
|
|
153
|
+
};
|
|
154
|
+
users: {
|
|
155
|
+
index(config?: AxiosRequestConfig): Promise<SystemUserController.index.Response>;
|
|
156
|
+
show(user: number, config?: AxiosRequestConfig): Promise<SystemUserController.show.Response>;
|
|
157
|
+
update(user: number, data: SystemUserController.update.Request, config?: AxiosRequestConfig): Promise<SystemUserController.update.Response>;
|
|
158
|
+
destroy(user: number, config?: AxiosRequestConfig): Promise<SystemUserController.destroy.Response>;
|
|
159
|
+
loginAsUser(user: number, config?: AxiosRequestConfig): Promise<SystemUserController.loginAsUser.Response>;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
export type * from "./App/Data";
|
|
164
|
+
export type * from "./App/Data/ActionLog";
|
|
165
|
+
export type * from "./App/Data/Auth";
|
|
166
|
+
export type * from "./App/Data/Category";
|
|
167
|
+
export type * from "./App/Data/Config";
|
|
168
|
+
export type * from "./App/Data/Demo";
|
|
169
|
+
export type * from "./App/Data/Document";
|
|
170
|
+
export type * from "./App/Data/Facility";
|
|
171
|
+
export type * from "./App/Data/Map";
|
|
172
|
+
export type * from "./App/Data/Me";
|
|
173
|
+
export type * from "./App/Data/Notification";
|
|
174
|
+
export type * from "./App/Data/Organization";
|
|
175
|
+
export type * from "./App/Data/Permission";
|
|
176
|
+
export type * from "./App/Data/Revision";
|
|
177
|
+
export type * from "./App/Data/Search";
|
|
178
|
+
export type * from "./App/Data/Subscription";
|
|
179
|
+
export type * from "./App/Data/User";
|
|
180
|
+
export * from "./App/Enum";
|
|
181
|
+
export * from "./App/Enum/Permissions";
|
|
182
|
+
export * from "./App/Enum/Notifications";
|
|
183
|
+
/** The type of the API client returned by createRevizaApi. */
|
|
184
|
+
export type RevizaApi = ReturnType<typeof createRevizaApi>;
|