@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
package/dist/index.js
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed API client — wraps generated controller actions with axios.
|
|
3
|
+
*/
|
|
4
|
+
import axios, { isAxiosError } 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
|
+
// ── helpers ───────────────────────────────────────────────────────────────────
|
|
8
|
+
/**
|
|
9
|
+
* Convert a typed payload that contains `File` / `Blob` fields into a
|
|
10
|
+
* `FormData` object ready for multipart upload.
|
|
11
|
+
*
|
|
12
|
+
* Axios automatically adds the correct `Content-Type: multipart/form-data; boundary=…`
|
|
13
|
+
* header when it detects a `FormData` body — do NOT set Content-Type manually,
|
|
14
|
+
* or the boundary will be missing and the server will reject the request.
|
|
15
|
+
*
|
|
16
|
+
* Array values are appended with the `key[]` convention expected by Laravel.
|
|
17
|
+
* Boolean values are serialised as `"1"` / `"0"`.
|
|
18
|
+
* `null` / `undefined` values are skipped.
|
|
19
|
+
*/
|
|
20
|
+
export function toFormData(data) {
|
|
21
|
+
const form = new FormData();
|
|
22
|
+
for (const [key, value] of Object.entries(data)) {
|
|
23
|
+
if (value === null || value === undefined)
|
|
24
|
+
continue;
|
|
25
|
+
if (value instanceof File || value instanceof Blob) {
|
|
26
|
+
form.append(key, value);
|
|
27
|
+
}
|
|
28
|
+
else if (Array.isArray(value)) {
|
|
29
|
+
for (const item of value) {
|
|
30
|
+
form.append(`${key}[]`, item instanceof File || item instanceof Blob ? item : String(item));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else if (typeof value === "boolean") {
|
|
34
|
+
form.append(key, value ? "1" : "0");
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
form.append(key, String(value));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return form;
|
|
41
|
+
}
|
|
42
|
+
export async function readBlob(data) {
|
|
43
|
+
return await new Promise((resolve, reject) => {
|
|
44
|
+
const reader = new FileReader();
|
|
45
|
+
reader.onload = () => resolve(reader.result);
|
|
46
|
+
reader.onerror = reject;
|
|
47
|
+
reader.readAsDataURL(data);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export class ApiError extends Error {
|
|
51
|
+
message;
|
|
52
|
+
status;
|
|
53
|
+
constructor(message, status) {
|
|
54
|
+
super(message);
|
|
55
|
+
this.message = message;
|
|
56
|
+
this.status = status;
|
|
57
|
+
this.name = "ApiError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export class ValidationError extends ApiError {
|
|
61
|
+
message;
|
|
62
|
+
errors;
|
|
63
|
+
constructor(message, errors) {
|
|
64
|
+
super(message, 422);
|
|
65
|
+
this.message = message;
|
|
66
|
+
this.errors = errors;
|
|
67
|
+
this.name = "ValidationError";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function makeRequest(http) {
|
|
71
|
+
return async function request(action, data, config) {
|
|
72
|
+
try {
|
|
73
|
+
const response = await http({
|
|
74
|
+
method: action.method,
|
|
75
|
+
url: action.url,
|
|
76
|
+
data,
|
|
77
|
+
...config,
|
|
78
|
+
});
|
|
79
|
+
return response.data;
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
if (isAxiosError(error)) {
|
|
83
|
+
if (error.status === 422) {
|
|
84
|
+
throw new ValidationError(error.response?.data?.message ?? "Validation error", error.response?.data?.errors ?? {});
|
|
85
|
+
}
|
|
86
|
+
throw new ApiError(error.response?.data?.message, error.response?.status ?? 500);
|
|
87
|
+
}
|
|
88
|
+
throw error;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// ── API factory ───────────────────────────────────────────────────────────────
|
|
93
|
+
export function createRevizaApi(http = axios) {
|
|
94
|
+
const request = makeRequest(http);
|
|
95
|
+
return {
|
|
96
|
+
frontendError(data, config) {
|
|
97
|
+
return request(FrontendErrorController.logError(), data, config);
|
|
98
|
+
},
|
|
99
|
+
config(config) {
|
|
100
|
+
return request(ConfigController.config(), undefined, config);
|
|
101
|
+
},
|
|
102
|
+
frontendRoute(config) {
|
|
103
|
+
return request(FrontendRouteController.redirect(), undefined, config);
|
|
104
|
+
},
|
|
105
|
+
search(config) {
|
|
106
|
+
return request(SearchController.search(), undefined, config);
|
|
107
|
+
},
|
|
108
|
+
dashboard: {
|
|
109
|
+
categoryTree(config) {
|
|
110
|
+
return request(DashboardController.categoryTree(), undefined, config);
|
|
111
|
+
},
|
|
112
|
+
facilityList(config) {
|
|
113
|
+
return request(DashboardController.facilityList(), undefined, config);
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
demo: {
|
|
117
|
+
index(config) {
|
|
118
|
+
return request(DemoRequestController.index(), undefined, config);
|
|
119
|
+
},
|
|
120
|
+
request(data, config) {
|
|
121
|
+
return request(DemoRequestController.store(), data, config);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
auth: {
|
|
125
|
+
login(data, config) {
|
|
126
|
+
return request(AuthController.login(), data, config);
|
|
127
|
+
},
|
|
128
|
+
logout(config) {
|
|
129
|
+
return request(AuthController.logout(), undefined, config);
|
|
130
|
+
},
|
|
131
|
+
forgotPassword(data, config) {
|
|
132
|
+
return request(AuthController.forgotPassword(), data, config);
|
|
133
|
+
},
|
|
134
|
+
resetPassword(token, data, config) {
|
|
135
|
+
return request(AuthController.resetPassword({ token }), data, config);
|
|
136
|
+
},
|
|
137
|
+
register(token, data, config) {
|
|
138
|
+
return request(AuthController.register({ token }), data, config);
|
|
139
|
+
},
|
|
140
|
+
verifyRegistrationToken(token, config) {
|
|
141
|
+
return request(AuthController.verifyRegistrationToken({ token }), undefined, config);
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
me: {
|
|
145
|
+
get(config) {
|
|
146
|
+
return request(MeController.me(), undefined, config);
|
|
147
|
+
},
|
|
148
|
+
update(data, config) {
|
|
149
|
+
return request(MeController.update(), data, config);
|
|
150
|
+
},
|
|
151
|
+
changePassword(data, config) {
|
|
152
|
+
return request(MeController.changePassword(), data, config);
|
|
153
|
+
},
|
|
154
|
+
updateSettings(data, config) {
|
|
155
|
+
return request(MeController.updateSettings(), data, config);
|
|
156
|
+
},
|
|
157
|
+
tutorial(config) {
|
|
158
|
+
return request(MeController.tutorial(), undefined, config);
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
notificationSettings: {
|
|
162
|
+
show(config) {
|
|
163
|
+
return request(NotificationSettingsController.show(), undefined, config);
|
|
164
|
+
},
|
|
165
|
+
update(data, config) {
|
|
166
|
+
return request(NotificationSettingsController.update(), data, config);
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
organizations: {
|
|
170
|
+
index(config) {
|
|
171
|
+
return request(OrganizationController.index(), undefined, config);
|
|
172
|
+
},
|
|
173
|
+
show(organization, config) {
|
|
174
|
+
return request(OrganizationController.show({ organization }), undefined, config);
|
|
175
|
+
},
|
|
176
|
+
update(organization, data, config) {
|
|
177
|
+
return request(OrganizationController.update({ organization }), data, config);
|
|
178
|
+
},
|
|
179
|
+
getSubscriptions(organization, config) {
|
|
180
|
+
return request(OrganizationController.getSubscriptions({ organization }), undefined, config);
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
users: {
|
|
184
|
+
organizationUsers(organization, config) {
|
|
185
|
+
return request(UserController.organizationUsers({ organization }), undefined, config);
|
|
186
|
+
},
|
|
187
|
+
invite(organization, data, config) {
|
|
188
|
+
return request(UserController.invite({ organization }), data, config);
|
|
189
|
+
},
|
|
190
|
+
destroy(organization, user, config) {
|
|
191
|
+
return request(UserController.destroy({ organization, user }), undefined, config);
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
permissions: {
|
|
195
|
+
show(organization, user, config) {
|
|
196
|
+
return request(PermissionController.show({ organization, user }), undefined, config);
|
|
197
|
+
},
|
|
198
|
+
update(organization, user, data, config) {
|
|
199
|
+
return request(PermissionController.update({ organization, user }), data, config);
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
categories: {
|
|
203
|
+
index(config) {
|
|
204
|
+
return request(CategoryController.index(), undefined, config);
|
|
205
|
+
},
|
|
206
|
+
show(category, config) {
|
|
207
|
+
return request(CategoryController.show({ category }), undefined, config);
|
|
208
|
+
},
|
|
209
|
+
store(data, config) {
|
|
210
|
+
return request(CategoryController.store(), data, config);
|
|
211
|
+
},
|
|
212
|
+
update(category, data, config) {
|
|
213
|
+
return request(CategoryController.update({ category }), data, config);
|
|
214
|
+
},
|
|
215
|
+
destroy(category, config) {
|
|
216
|
+
return request(CategoryController.destroy({ category }), undefined, config);
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
maps: {
|
|
220
|
+
index(category, config) {
|
|
221
|
+
return request(MapController.index({ category }), undefined, config);
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
facilities: {
|
|
225
|
+
index(category, config) {
|
|
226
|
+
return request(FacilityController.index({ category }), undefined, config);
|
|
227
|
+
},
|
|
228
|
+
show(category, facility, config) {
|
|
229
|
+
return request(FacilityController.show({ category, facility }), undefined, config);
|
|
230
|
+
},
|
|
231
|
+
store(category, data, config) {
|
|
232
|
+
return request(FacilityController.store({ category }), data, config);
|
|
233
|
+
},
|
|
234
|
+
update(category, facility, data, config) {
|
|
235
|
+
return request(FacilityController.update({ category, facility }), data, config);
|
|
236
|
+
},
|
|
237
|
+
destroy(category, facility, config) {
|
|
238
|
+
return request(FacilityController.destroy({ category, facility }), undefined, config);
|
|
239
|
+
},
|
|
240
|
+
resolveIssue(category, facility, issue, data, config) {
|
|
241
|
+
return request(FacilityController.resolveIssue({ category, facility, issue }), data, config);
|
|
242
|
+
},
|
|
243
|
+
qrCode(category, facility, config) {
|
|
244
|
+
config = { responseType: "blob", ...config };
|
|
245
|
+
return request(FacilityController.viewQrCode({ category, facility }), undefined, config);
|
|
246
|
+
},
|
|
247
|
+
viewPicture(category, facility, config) {
|
|
248
|
+
config = { responseType: "blob", ...config };
|
|
249
|
+
return request(FacilityController.viewPicture({ category, facility }), undefined, config);
|
|
250
|
+
},
|
|
251
|
+
storePicture(category, facility, data, config) {
|
|
252
|
+
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
253
|
+
return request(FacilityController.storePicture({ category, facility }), toFormData(data), config);
|
|
254
|
+
},
|
|
255
|
+
deletePicture(category, facility, config) {
|
|
256
|
+
return request(FacilityController.deletePicture({ category, facility }), undefined, config);
|
|
257
|
+
},
|
|
258
|
+
mapExtent(facility, map, config) {
|
|
259
|
+
return request(FacilityController.getMapExtent({ facility, map }), undefined, config);
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
relatedFacilities: {
|
|
263
|
+
options(category, facility, config) {
|
|
264
|
+
return request(RelatedFacilityController.options({ category, facility }), undefined, config);
|
|
265
|
+
},
|
|
266
|
+
store(category, facility, data, config) {
|
|
267
|
+
return request(RelatedFacilityController.store({ category, facility }), data, config);
|
|
268
|
+
},
|
|
269
|
+
delete(category, facility, relatedFacility, config) {
|
|
270
|
+
return request(RelatedFacilityController.destroy({ category, facility, relatedFacility }), config);
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
facilityDocuments: {
|
|
274
|
+
index(category, facility, config) {
|
|
275
|
+
return request(FacilityDocumentController.index({ category, facility }), undefined, config);
|
|
276
|
+
},
|
|
277
|
+
store(category, facility, data, config) {
|
|
278
|
+
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
279
|
+
return request(FacilityDocumentController.store({ category, facility }), toFormData(data), config);
|
|
280
|
+
},
|
|
281
|
+
update(category, facility, document, data, config) {
|
|
282
|
+
return request(FacilityDocumentController.update({ category, facility, document }), data, config);
|
|
283
|
+
},
|
|
284
|
+
destroy(category, facility, document, config) {
|
|
285
|
+
return request(FacilityDocumentController.destroy({ category, facility, document }), undefined, config);
|
|
286
|
+
},
|
|
287
|
+
download(category, facility, document, preview, config) {
|
|
288
|
+
config = { ...config, responseType: "blob", params: { preview: preview } };
|
|
289
|
+
return request(FacilityDocumentController.download({ category, facility, document }), undefined, config);
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
revisions: {
|
|
293
|
+
index(category, facility, config) {
|
|
294
|
+
return request(RevisionController.index({ category, facility }), undefined, config);
|
|
295
|
+
},
|
|
296
|
+
show(category, facility, revision, config) {
|
|
297
|
+
return request(RevisionController.show({ category, facility, revision }), undefined, config);
|
|
298
|
+
},
|
|
299
|
+
store(category, facility, data, config) {
|
|
300
|
+
return request(RevisionController.store({ category, facility }), data, config);
|
|
301
|
+
},
|
|
302
|
+
update(category, facility, revision, data, config) {
|
|
303
|
+
return request(RevisionController.update({ category, facility, revision }), data, config);
|
|
304
|
+
},
|
|
305
|
+
destroy(category, facility, revision, config) {
|
|
306
|
+
return request(RevisionController.destroy({ category, facility, revision }), undefined, config);
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
revisionIssues: {
|
|
310
|
+
index(category, facility, revision, config) {
|
|
311
|
+
return request(RevisionIssueController.index({ category, facility, revision }), undefined, config);
|
|
312
|
+
},
|
|
313
|
+
show(category, facility, revision, issue, config) {
|
|
314
|
+
return request(RevisionIssueController.show({ category, facility, revision, issue }), undefined, config);
|
|
315
|
+
},
|
|
316
|
+
destroy(category, facility, revision, issue, config) {
|
|
317
|
+
return request(RevisionIssueController.destroy({
|
|
318
|
+
category,
|
|
319
|
+
facility,
|
|
320
|
+
revision,
|
|
321
|
+
issue
|
|
322
|
+
}), undefined, config);
|
|
323
|
+
},
|
|
324
|
+
getForCategory(category, config) {
|
|
325
|
+
return request(RevisionIssueController.getForCategory({ category }), undefined, config);
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
revisionDocuments: {
|
|
329
|
+
index(category, facility, revision, config) {
|
|
330
|
+
return request(RevisionDocumentController.index({ category, facility, revision }), undefined, config);
|
|
331
|
+
},
|
|
332
|
+
store(category, facility, revision, data, config) {
|
|
333
|
+
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
334
|
+
return request(RevisionDocumentController.store({
|
|
335
|
+
category,
|
|
336
|
+
facility,
|
|
337
|
+
revision
|
|
338
|
+
}), toFormData(data), config);
|
|
339
|
+
},
|
|
340
|
+
update(category, facility, revision, document, data, config) {
|
|
341
|
+
return request(RevisionDocumentController.update({
|
|
342
|
+
category,
|
|
343
|
+
facility,
|
|
344
|
+
revision,
|
|
345
|
+
document
|
|
346
|
+
}), data, config);
|
|
347
|
+
},
|
|
348
|
+
destroy(category, facility, revision, document, config) {
|
|
349
|
+
return request(RevisionDocumentController.destroy({
|
|
350
|
+
category,
|
|
351
|
+
facility,
|
|
352
|
+
revision,
|
|
353
|
+
document
|
|
354
|
+
}), undefined, config);
|
|
355
|
+
},
|
|
356
|
+
download(category, facility, revision, document, preview, config) {
|
|
357
|
+
config = { ...config, responseType: "blob", params: { preview: preview } };
|
|
358
|
+
return request(RevisionDocumentController.download({
|
|
359
|
+
category,
|
|
360
|
+
facility,
|
|
361
|
+
revision,
|
|
362
|
+
document
|
|
363
|
+
}), undefined, config);
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
// ── System (admin) endpoints ───────────────────────────────────────────
|
|
367
|
+
system: {
|
|
368
|
+
actionLog: {
|
|
369
|
+
index(config) {
|
|
370
|
+
return request(ActionLogController.index(), undefined, config);
|
|
371
|
+
},
|
|
372
|
+
show(transaction, config) {
|
|
373
|
+
return request(ActionLogController.show({ transaction }), undefined, config);
|
|
374
|
+
},
|
|
375
|
+
revert(transaction, config) {
|
|
376
|
+
return request(ActionLogController.revert({ transaction }), undefined, config);
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
maps: {
|
|
380
|
+
store(data, config) {
|
|
381
|
+
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
382
|
+
return request(SystemMapController.store(), toFormData(data), config);
|
|
383
|
+
},
|
|
384
|
+
update(map, data, config) {
|
|
385
|
+
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
386
|
+
return request(SystemMapController.update({ map }), toFormData(data), config);
|
|
387
|
+
},
|
|
388
|
+
destroy(map, config) {
|
|
389
|
+
return request(SystemMapController.destroy({ map }), undefined, config);
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
organizations: {
|
|
393
|
+
store(data, config) {
|
|
394
|
+
return request(SystemOrganizationController.store(), data, config);
|
|
395
|
+
},
|
|
396
|
+
destroy(organization, config) {
|
|
397
|
+
return request(SystemOrganizationController.destroy({ organization }), undefined, config);
|
|
398
|
+
},
|
|
399
|
+
storeSubscription(organization, data, config) {
|
|
400
|
+
return request(SystemOrganizationController.storeSubscription({ organization }), data, config);
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
permissions: {
|
|
404
|
+
show(user, config) {
|
|
405
|
+
return request(SystemPermissionController.show({ user }), undefined, config);
|
|
406
|
+
},
|
|
407
|
+
update(user, data, config) {
|
|
408
|
+
return request(SystemPermissionController.update({ user }), data, config);
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
users: {
|
|
412
|
+
index(config) {
|
|
413
|
+
return request(SystemUserController.index(), undefined, config);
|
|
414
|
+
},
|
|
415
|
+
show(user, config) {
|
|
416
|
+
return request(SystemUserController.show({ user }), undefined, config);
|
|
417
|
+
},
|
|
418
|
+
update(user, data, config) {
|
|
419
|
+
return request(SystemUserController.update({ user }), data, config);
|
|
420
|
+
},
|
|
421
|
+
destroy(user, config) {
|
|
422
|
+
return request(SystemUserController.destroy({ user }), undefined, config);
|
|
423
|
+
},
|
|
424
|
+
loginAsUser(user, config) {
|
|
425
|
+
return request(SystemUserController.loginAsUser({ user }), undefined, config);
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
export * from "./App/Enum";
|
|
432
|
+
export * from "./App/Enum/Permissions";
|
|
433
|
+
export * from "./App/Enum/Notifications";
|