@reviza/api-client 1.0.0-SNAPSHOT-1459b9b2 → 1.0.0-SNAPSHOT-36bd5799
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/Facility/index.d.ts +1 -5
- package/dist/App/Data/Picture/index.d.ts +4 -0
- package/dist/App/Data/Picture/index.js +1 -0
- package/dist/App/Data/Revision/index.d.ts +4 -2
- package/dist/controllers/index.d.ts +6 -23
- package/dist/controllers/index.js +15 -26
- package/dist/index.d.ts +15 -16
- package/dist/index.js +28 -51
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@ import { CategoryData } from "../Category";
|
|
|
3
3
|
import { RevisionData, RevisionIssueData } from "../Revision";
|
|
4
4
|
import { DocumentData } from "../Document";
|
|
5
5
|
import { MapData } from "../Map";
|
|
6
|
-
import { UploadedFile } from "../../../Illuminate/Http";
|
|
7
6
|
export type FacilityCreatePayload = {
|
|
8
7
|
name: string;
|
|
9
8
|
identification_number: string | null;
|
|
@@ -48,7 +47,7 @@ export type FacilityData = {
|
|
|
48
47
|
note: string | null;
|
|
49
48
|
map_feature_layer: string;
|
|
50
49
|
state: FacilityStateEnum;
|
|
51
|
-
|
|
50
|
+
picture_ids: number[];
|
|
52
51
|
intervals: Record<string, FacilityIntervalData>;
|
|
53
52
|
values: Record<string, string>;
|
|
54
53
|
category?: CategoryData;
|
|
@@ -77,9 +76,6 @@ export type FacilityListData = {
|
|
|
77
76
|
category_id: number;
|
|
78
77
|
organization_id: number | null;
|
|
79
78
|
};
|
|
80
|
-
export type FacilityPicturePayload = {
|
|
81
|
-
picture: UploadedFile;
|
|
82
|
-
};
|
|
83
79
|
export type FacilityUpdatePayload = {
|
|
84
80
|
name: string;
|
|
85
81
|
identification_number: string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { FacilityData } from "../Facility";
|
|
|
3
3
|
import { DocumentData } from "../Document";
|
|
4
4
|
import { UserData } from "../User";
|
|
5
5
|
export type RevisionCreatePayload = {
|
|
6
|
+
facility_ids: number[];
|
|
6
7
|
revision_date: string;
|
|
7
8
|
next_revision_date: string;
|
|
8
9
|
state: FacilityStateEnum;
|
|
@@ -14,7 +15,7 @@ export type RevisionCreatePayload = {
|
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* Includes:
|
|
17
|
-
* -
|
|
18
|
+
* - facilities
|
|
18
19
|
* - issues
|
|
19
20
|
* - documents
|
|
20
21
|
* - authorUser
|
|
@@ -28,7 +29,7 @@ export type RevisionData = {
|
|
|
28
29
|
custom_revision_type: string | null;
|
|
29
30
|
next_revision_type: RevisionTypeEnum;
|
|
30
31
|
next_custom_revision_type: string | null;
|
|
31
|
-
|
|
32
|
+
facilities?: FacilityData[];
|
|
32
33
|
issues?: RevisionIssueData[];
|
|
33
34
|
documents?: DocumentData[];
|
|
34
35
|
author_user?: UserData | null;
|
|
@@ -62,6 +63,7 @@ export type RevisionIssueUpdatePayload = {
|
|
|
62
63
|
description: string;
|
|
63
64
|
};
|
|
64
65
|
export type RevisionUpdatePayload = {
|
|
66
|
+
facility_ids: number[];
|
|
65
67
|
revision_date: string;
|
|
66
68
|
next_revision_date: string;
|
|
67
69
|
state: FacilityStateEnum;
|
|
@@ -3,9 +3,10 @@ import { RevizaResponseData } from "../App/Data";
|
|
|
3
3
|
import { DataCollection } from "../Spatie/LaravelData";
|
|
4
4
|
import { CategoryData, CategoryCreatePayload, CategoryUpdatePayload, CategoryTreeData } from "../App/Data/Category";
|
|
5
5
|
import { ConfigData } from "../App/Data/Config";
|
|
6
|
-
import { FacilityListData, FacilityData, FacilityCreatePayload, FacilityUpdatePayload,
|
|
6
|
+
import { FacilityListData, FacilityData, FacilityCreatePayload, FacilityUpdatePayload, FacilityIssueResolvedPayload, RelatedFacilityCreatePayload } from "../App/Data/Facility";
|
|
7
7
|
import { DemoRequestCreatePayload, DemoRequestData } from "../App/Data/Demo";
|
|
8
8
|
import { MapExtentData, MapData } from "../App/Data/Map";
|
|
9
|
+
import { PicturePayload } from "../App/Data/Picture";
|
|
9
10
|
import { StreamedResponse } from "../Symfony/Component/HttpFoundation";
|
|
10
11
|
import { DocumentData, DocumentCreatePayload, DocumentUpdatePayload } from "../App/Data/Document";
|
|
11
12
|
import { FrontendRouteRedirectRequest, FrontendRouteRedirectData } from "../App/Data/FrontendRoute";
|
|
@@ -15,7 +16,7 @@ import { NotificationSettingsData, NotificationSettingsPayload } from "../App/Da
|
|
|
15
16
|
import { OrganizationData, OrganizationUpdatePayload } from "../App/Data/Organization";
|
|
16
17
|
import { SubscriptionData } from "../App/Data/Subscription";
|
|
17
18
|
import { UserPermissionData, UserPermissionPayload } from "../App/Data/Permission";
|
|
18
|
-
import {
|
|
19
|
+
import { RevisionCreatePayload, RevisionData, RevisionUpdatePayload, RevisionIssueData } from "../App/Data/Revision";
|
|
19
20
|
import { SearchData } from "../App/Data/Search";
|
|
20
21
|
type ActionFunction<P extends RouteParams | undefined> = P extends undefined ? (options?: RouteOptions) => ActionResult : (params: P, options?: RouteOptions) => ActionResult;
|
|
21
22
|
type ActionResult = RouteDefinition & {
|
|
@@ -166,10 +167,12 @@ export declare const FacilityController: {
|
|
|
166
167
|
readonly viewPicture: ActionWithMethods<{
|
|
167
168
|
category: string | number;
|
|
168
169
|
facility: string | number;
|
|
170
|
+
picture: string | number;
|
|
169
171
|
}, string>;
|
|
170
172
|
readonly deletePicture: ActionWithMethods<{
|
|
171
173
|
category: string | number;
|
|
172
174
|
facility: string | number;
|
|
175
|
+
picture: string | number;
|
|
173
176
|
}, string>;
|
|
174
177
|
readonly viewQrCode: ActionWithMethods<{
|
|
175
178
|
category: string | number;
|
|
@@ -207,7 +210,7 @@ export declare namespace FacilityController {
|
|
|
207
210
|
type Response = RevizaResponseData<null>;
|
|
208
211
|
}
|
|
209
212
|
namespace storePicture {
|
|
210
|
-
type Request =
|
|
213
|
+
type Request = PicturePayload;
|
|
211
214
|
type Response = RevizaResponseData<FacilityData | null>;
|
|
212
215
|
}
|
|
213
216
|
namespace viewPicture {
|
|
@@ -442,35 +445,23 @@ export declare namespace RelatedFacilityController {
|
|
|
442
445
|
}
|
|
443
446
|
}
|
|
444
447
|
export declare const RevisionController: {
|
|
445
|
-
readonly index: ActionWithMethods<{
|
|
446
|
-
category: string | number;
|
|
447
|
-
facility: string | number;
|
|
448
|
-
}, string>;
|
|
449
448
|
readonly store: ActionWithMethods<{
|
|
450
449
|
category: string | number;
|
|
451
|
-
facility: string | number;
|
|
452
450
|
}, string>;
|
|
453
451
|
readonly show: ActionWithMethods<{
|
|
454
452
|
category: string | number;
|
|
455
|
-
facility: string | number;
|
|
456
453
|
revision: string | number;
|
|
457
454
|
}, string>;
|
|
458
455
|
readonly update: ActionWithMethods<{
|
|
459
456
|
category: string | number;
|
|
460
|
-
facility: string | number;
|
|
461
457
|
revision: string | number;
|
|
462
458
|
}, string>;
|
|
463
459
|
readonly destroy: ActionWithMethods<{
|
|
464
460
|
category: string | number;
|
|
465
|
-
facility: string | number;
|
|
466
461
|
revision: string | number;
|
|
467
462
|
}, string>;
|
|
468
463
|
};
|
|
469
464
|
export declare namespace RevisionController {
|
|
470
|
-
namespace index {
|
|
471
|
-
type Request = object;
|
|
472
|
-
type Response = RevizaResponseData<DataCollection<number, RevisionData> | null>;
|
|
473
|
-
}
|
|
474
465
|
namespace store {
|
|
475
466
|
type Request = RevisionCreatePayload;
|
|
476
467
|
type Response = RevizaResponseData<RevisionData>;
|
|
@@ -491,29 +482,24 @@ export declare namespace RevisionController {
|
|
|
491
482
|
export declare const RevisionDocumentController: {
|
|
492
483
|
readonly index: ActionWithMethods<{
|
|
493
484
|
category: string | number;
|
|
494
|
-
facility: string | number;
|
|
495
485
|
revision: string | number;
|
|
496
486
|
}, string>;
|
|
497
487
|
readonly store: ActionWithMethods<{
|
|
498
488
|
category: string | number;
|
|
499
|
-
facility: string | number;
|
|
500
489
|
revision: string | number;
|
|
501
490
|
}, string>;
|
|
502
491
|
readonly destroy: ActionWithMethods<{
|
|
503
492
|
category: string | number;
|
|
504
|
-
facility: string | number;
|
|
505
493
|
revision: string | number;
|
|
506
494
|
document: string | number;
|
|
507
495
|
}, string>;
|
|
508
496
|
readonly update: ActionWithMethods<{
|
|
509
497
|
category: string | number;
|
|
510
|
-
facility: string | number;
|
|
511
498
|
revision: string | number;
|
|
512
499
|
document: string | number;
|
|
513
500
|
}, string>;
|
|
514
501
|
readonly download: ActionWithMethods<{
|
|
515
502
|
category: string | number;
|
|
516
|
-
facility: string | number;
|
|
517
503
|
revision: string | number;
|
|
518
504
|
document: string | number;
|
|
519
505
|
}, string>;
|
|
@@ -546,18 +532,15 @@ export declare const RevisionIssueController: {
|
|
|
546
532
|
}, string>;
|
|
547
533
|
readonly index: ActionWithMethods<{
|
|
548
534
|
category: string | number;
|
|
549
|
-
facility: string | number;
|
|
550
535
|
revision: string | number;
|
|
551
536
|
}, string>;
|
|
552
537
|
readonly show: ActionWithMethods<{
|
|
553
538
|
category: string | number;
|
|
554
|
-
facility: string | number;
|
|
555
539
|
revision: string | number;
|
|
556
540
|
issue: string | number;
|
|
557
541
|
}, string>;
|
|
558
542
|
readonly destroy: ActionWithMethods<{
|
|
559
543
|
category: string | number;
|
|
560
|
-
facility: string | number;
|
|
561
544
|
revision: string | number;
|
|
562
545
|
issue: string | number;
|
|
563
546
|
}, string>;
|
|
@@ -81,13 +81,13 @@ export const FacilityController = {
|
|
|
81
81
|
viewPicture: createActionWithMethods([
|
|
82
82
|
{
|
|
83
83
|
method: "get",
|
|
84
|
-
url: "api/v1/categories/{category}/facilities/{facility}/picture",
|
|
84
|
+
url: "api/v1/categories/{category}/facilities/{facility}/picture/{picture}",
|
|
85
85
|
},
|
|
86
86
|
]),
|
|
87
87
|
deletePicture: createActionWithMethods([
|
|
88
88
|
{
|
|
89
89
|
method: "delete",
|
|
90
|
-
url: "api/v1/categories/{category}/facilities/{facility}/picture",
|
|
90
|
+
url: "api/v1/categories/{category}/facilities/{facility}/picture/{picture}",
|
|
91
91
|
},
|
|
92
92
|
]),
|
|
93
93
|
viewQrCode: createActionWithMethods([
|
|
@@ -223,38 +223,27 @@ export const RelatedFacilityController = {
|
|
|
223
223
|
]),
|
|
224
224
|
};
|
|
225
225
|
export const RevisionController = {
|
|
226
|
-
|
|
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
|
-
]),
|
|
226
|
+
store: createActionWithMethods([{ method: "post", url: "api/v1/categories/{category}/revisions" }]),
|
|
238
227
|
show: createActionWithMethods([
|
|
239
228
|
{
|
|
240
229
|
method: "get",
|
|
241
|
-
url: "api/v1/categories/{category}/
|
|
230
|
+
url: "api/v1/categories/{category}/revisions/{revision}",
|
|
242
231
|
},
|
|
243
232
|
]),
|
|
244
233
|
update: createActionWithMethods([
|
|
245
234
|
{
|
|
246
235
|
method: "put",
|
|
247
|
-
url: "api/v1/categories/{category}/
|
|
236
|
+
url: "api/v1/categories/{category}/revisions/{revision}",
|
|
248
237
|
},
|
|
249
238
|
{
|
|
250
239
|
method: "patch",
|
|
251
|
-
url: "api/v1/categories/{category}/
|
|
240
|
+
url: "api/v1/categories/{category}/revisions/{revision}",
|
|
252
241
|
},
|
|
253
242
|
]),
|
|
254
243
|
destroy: createActionWithMethods([
|
|
255
244
|
{
|
|
256
245
|
method: "delete",
|
|
257
|
-
url: "api/v1/categories/{category}/
|
|
246
|
+
url: "api/v1/categories/{category}/revisions/{revision}",
|
|
258
247
|
},
|
|
259
248
|
]),
|
|
260
249
|
};
|
|
@@ -262,31 +251,31 @@ export const RevisionDocumentController = {
|
|
|
262
251
|
index: createActionWithMethods([
|
|
263
252
|
{
|
|
264
253
|
method: "get",
|
|
265
|
-
url: "api/v1/categories/{category}/
|
|
254
|
+
url: "api/v1/categories/{category}/revisions/{revision}/documents",
|
|
266
255
|
},
|
|
267
256
|
]),
|
|
268
257
|
store: createActionWithMethods([
|
|
269
258
|
{
|
|
270
259
|
method: "post",
|
|
271
|
-
url: "api/v1/categories/{category}/
|
|
260
|
+
url: "api/v1/categories/{category}/revisions/{revision}/documents",
|
|
272
261
|
},
|
|
273
262
|
]),
|
|
274
263
|
destroy: createActionWithMethods([
|
|
275
264
|
{
|
|
276
265
|
method: "delete",
|
|
277
|
-
url: "api/v1/categories/{category}/
|
|
266
|
+
url: "api/v1/categories/{category}/revisions/{revision}/documents/{document}",
|
|
278
267
|
},
|
|
279
268
|
]),
|
|
280
269
|
update: createActionWithMethods([
|
|
281
270
|
{
|
|
282
271
|
method: "post",
|
|
283
|
-
url: "api/v1/categories/{category}/
|
|
272
|
+
url: "api/v1/categories/{category}/revisions/{revision}/documents/{document}",
|
|
284
273
|
},
|
|
285
274
|
]),
|
|
286
275
|
download: createActionWithMethods([
|
|
287
276
|
{
|
|
288
277
|
method: "get",
|
|
289
|
-
url: "api/v1/categories/{category}/
|
|
278
|
+
url: "api/v1/categories/{category}/revisions/{revision}/documents/{document}/download",
|
|
290
279
|
},
|
|
291
280
|
]),
|
|
292
281
|
};
|
|
@@ -295,19 +284,19 @@ export const RevisionIssueController = {
|
|
|
295
284
|
index: createActionWithMethods([
|
|
296
285
|
{
|
|
297
286
|
method: "get",
|
|
298
|
-
url: "api/v1/categories/{category}/
|
|
287
|
+
url: "api/v1/categories/{category}/revisions/{revision}/issues",
|
|
299
288
|
},
|
|
300
289
|
]),
|
|
301
290
|
show: createActionWithMethods([
|
|
302
291
|
{
|
|
303
292
|
method: "get",
|
|
304
|
-
url: "api/v1/categories/{category}/
|
|
293
|
+
url: "api/v1/categories/{category}/revisions/{revision}/issues/{issue}",
|
|
305
294
|
},
|
|
306
295
|
]),
|
|
307
296
|
destroy: createActionWithMethods([
|
|
308
297
|
{
|
|
309
298
|
method: "delete",
|
|
310
|
-
url: "api/v1/categories/{category}/
|
|
299
|
+
url: "api/v1/categories/{category}/revisions/{revision}/issues/{issue}",
|
|
311
300
|
},
|
|
312
301
|
]),
|
|
313
302
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { ActionLogController, MapController as SystemMapController, Notification
|
|
|
13
13
|
* or the boundary will be missing and the server will reject the request.
|
|
14
14
|
*
|
|
15
15
|
* Array values are appended with the `key[]` convention expected by Laravel.
|
|
16
|
-
* Boolean values are
|
|
16
|
+
* Boolean values are serialized as `"1"` / `"0"`.
|
|
17
17
|
* `null` / `undefined` values are skipped.
|
|
18
18
|
*/
|
|
19
19
|
export declare function toFormData(data: object): FormData;
|
|
@@ -94,9 +94,9 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
94
94
|
destroy(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.destroy.Response>;
|
|
95
95
|
resolveIssue(category: number, facility: number, issue: number, data: FacilityController.resolveIssue.Request, config?: AxiosRequestConfig): Promise<FacilityController.resolveIssue.Response>;
|
|
96
96
|
qrCode(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
97
|
-
viewPicture(category: number, facility: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
97
|
+
viewPicture(category: number, facility: number, picture: number, config?: AxiosRequestConfig): Promise<FacilityController.viewQrCode.Response>;
|
|
98
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>;
|
|
99
|
+
deletePicture(category: number, facility: number, picture: number, config?: AxiosRequestConfig): Promise<FacilityController.deletePicture.Response>;
|
|
100
100
|
mapExtent(facility: number, map: number, config?: AxiosRequestConfig): Promise<FacilityController.getMapExtent.Response>;
|
|
101
101
|
};
|
|
102
102
|
relatedFacilities: {
|
|
@@ -112,24 +112,23 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
112
112
|
download(category: number, facility: number, document: number, preview: boolean, config?: AxiosRequestConfig): Promise<FacilityDocumentController.download.Response>;
|
|
113
113
|
};
|
|
114
114
|
revisions: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
destroy(category: number, facility: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionController.destroy.Response>;
|
|
115
|
+
show(category: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionController.show.Response>;
|
|
116
|
+
store(category: number, data: RevisionController.store.Request, config?: AxiosRequestConfig): Promise<RevisionController.store.Response>;
|
|
117
|
+
update(category: number, revision: number, data: RevisionController.update.Request, config?: AxiosRequestConfig): Promise<RevisionController.update.Response>;
|
|
118
|
+
destroy(category: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionController.destroy.Response>;
|
|
120
119
|
};
|
|
121
120
|
revisionIssues: {
|
|
122
|
-
index(category: number,
|
|
123
|
-
show(category: number,
|
|
124
|
-
destroy(category: number,
|
|
121
|
+
index(category: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.index.Response>;
|
|
122
|
+
show(category: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.show.Response>;
|
|
123
|
+
destroy(category: number, revision: number, issue: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.destroy.Response>;
|
|
125
124
|
getForCategory(category: number, config?: AxiosRequestConfig): Promise<RevisionIssueController.getForCategory.Response>;
|
|
126
125
|
};
|
|
127
126
|
revisionDocuments: {
|
|
128
|
-
index(category: number,
|
|
129
|
-
store(category: number,
|
|
130
|
-
update(category: number,
|
|
131
|
-
destroy(category: number,
|
|
132
|
-
download(category: number,
|
|
127
|
+
index(category: number, revision: number, config?: AxiosRequestConfig): Promise<RevisionDocumentController.index.Response>;
|
|
128
|
+
store(category: number, revision: number, data: RevisionDocumentController.store.Request, config?: AxiosRequestConfig): Promise<RevisionDocumentController.store.Response>;
|
|
129
|
+
update(category: number, revision: number, document: number, data: RevisionDocumentController.update.Request, config?: AxiosRequestConfig): Promise<RevisionDocumentController.update.Response>;
|
|
130
|
+
destroy(category: number, revision: number, document: number, config?: AxiosRequestConfig): Promise<RevisionDocumentController.destroy.Response>;
|
|
131
|
+
download(category: number, revision: number, document: number, preview: boolean, config?: AxiosRequestConfig): Promise<FacilityDocumentController.download.Response>;
|
|
133
132
|
};
|
|
134
133
|
system: {
|
|
135
134
|
notifications: {
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { ActionLogController, MapController as SystemMapController, Notification
|
|
|
14
14
|
* or the boundary will be missing and the server will reject the request.
|
|
15
15
|
*
|
|
16
16
|
* Array values are appended with the `key[]` convention expected by Laravel.
|
|
17
|
-
* Boolean values are
|
|
17
|
+
* Boolean values are serialized as `"1"` / `"0"`.
|
|
18
18
|
* `null` / `undefined` values are skipped.
|
|
19
19
|
*/
|
|
20
20
|
export function toFormData(data) {
|
|
@@ -244,16 +244,16 @@ export function createRevizaApi(http = axios) {
|
|
|
244
244
|
config = { responseType: "blob", ...config };
|
|
245
245
|
return request(FacilityController.viewQrCode({ category, facility }), undefined, config);
|
|
246
246
|
},
|
|
247
|
-
viewPicture(category, facility, config) {
|
|
247
|
+
viewPicture(category, facility, picture, config) {
|
|
248
248
|
config = { responseType: "blob", ...config };
|
|
249
|
-
return request(FacilityController.viewPicture({ category, facility }), undefined, config);
|
|
249
|
+
return request(FacilityController.viewPicture({ category, facility, picture }), undefined, config);
|
|
250
250
|
},
|
|
251
251
|
storePicture(category, facility, data, config) {
|
|
252
252
|
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
253
253
|
return request(FacilityController.storePicture({ category, facility }), toFormData(data), config);
|
|
254
254
|
},
|
|
255
|
-
deletePicture(category, facility, config) {
|
|
256
|
-
return request(FacilityController.deletePicture({ category, facility }), undefined, config);
|
|
255
|
+
deletePicture(category, facility, picture, config) {
|
|
256
|
+
return request(FacilityController.deletePicture({ category, facility, picture }), undefined, config);
|
|
257
257
|
},
|
|
258
258
|
mapExtent(facility, map, config) {
|
|
259
259
|
return request(FacilityController.getMapExtent({ facility, map }), undefined, config);
|
|
@@ -290,33 +290,29 @@ export function createRevizaApi(http = axios) {
|
|
|
290
290
|
},
|
|
291
291
|
},
|
|
292
292
|
revisions: {
|
|
293
|
-
|
|
294
|
-
return request(RevisionController.
|
|
295
|
-
},
|
|
296
|
-
show(category, facility, revision, config) {
|
|
297
|
-
return request(RevisionController.show({ category, facility, revision }), undefined, config);
|
|
293
|
+
show(category, revision, config) {
|
|
294
|
+
return request(RevisionController.show({ category, revision }), undefined, config);
|
|
298
295
|
},
|
|
299
|
-
store(category,
|
|
300
|
-
return request(RevisionController.store({ category
|
|
296
|
+
store(category, data, config) {
|
|
297
|
+
return request(RevisionController.store({ category }), data, config);
|
|
301
298
|
},
|
|
302
|
-
update(category,
|
|
303
|
-
return request(RevisionController.update({ category,
|
|
299
|
+
update(category, revision, data, config) {
|
|
300
|
+
return request(RevisionController.update({ category, revision }), data, config);
|
|
304
301
|
},
|
|
305
|
-
destroy(category,
|
|
306
|
-
return request(RevisionController.destroy({ category,
|
|
302
|
+
destroy(category, revision, config) {
|
|
303
|
+
return request(RevisionController.destroy({ category, revision }), undefined, config);
|
|
307
304
|
},
|
|
308
305
|
},
|
|
309
306
|
revisionIssues: {
|
|
310
|
-
index(category,
|
|
311
|
-
return request(RevisionIssueController.index({ category,
|
|
307
|
+
index(category, revision, config) {
|
|
308
|
+
return request(RevisionIssueController.index({ category, revision }), undefined, config);
|
|
312
309
|
},
|
|
313
|
-
show(category,
|
|
314
|
-
return request(RevisionIssueController.show({ category,
|
|
310
|
+
show(category, revision, issue, config) {
|
|
311
|
+
return request(RevisionIssueController.show({ category, revision, issue }), undefined, config);
|
|
315
312
|
},
|
|
316
|
-
destroy(category,
|
|
313
|
+
destroy(category, revision, issue, config) {
|
|
317
314
|
return request(RevisionIssueController.destroy({
|
|
318
315
|
category,
|
|
319
|
-
facility,
|
|
320
316
|
revision,
|
|
321
317
|
issue
|
|
322
318
|
}), undefined, config);
|
|
@@ -326,41 +322,22 @@ export function createRevizaApi(http = axios) {
|
|
|
326
322
|
}
|
|
327
323
|
},
|
|
328
324
|
revisionDocuments: {
|
|
329
|
-
index(category,
|
|
330
|
-
return request(RevisionDocumentController.index({ category,
|
|
325
|
+
index(category, revision, config) {
|
|
326
|
+
return request(RevisionDocumentController.index({ category, revision }), undefined, config);
|
|
331
327
|
},
|
|
332
|
-
store(category,
|
|
328
|
+
store(category, revision, data, config) {
|
|
333
329
|
config = { ...config, headers: { 'Content-Type': 'multipart/form-data' } };
|
|
334
|
-
return request(RevisionDocumentController.store({
|
|
335
|
-
category,
|
|
336
|
-
facility,
|
|
337
|
-
revision
|
|
338
|
-
}), toFormData(data), config);
|
|
330
|
+
return request(RevisionDocumentController.store({ category, revision }), toFormData(data), config);
|
|
339
331
|
},
|
|
340
|
-
update(category,
|
|
341
|
-
return request(RevisionDocumentController.update({
|
|
342
|
-
category,
|
|
343
|
-
facility,
|
|
344
|
-
revision,
|
|
345
|
-
document
|
|
346
|
-
}), data, config);
|
|
332
|
+
update(category, revision, document, data, config) {
|
|
333
|
+
return request(RevisionDocumentController.update({ category, revision, document }), data, config);
|
|
347
334
|
},
|
|
348
|
-
destroy(category,
|
|
349
|
-
return request(RevisionDocumentController.destroy({
|
|
350
|
-
category,
|
|
351
|
-
facility,
|
|
352
|
-
revision,
|
|
353
|
-
document
|
|
354
|
-
}), undefined, config);
|
|
335
|
+
destroy(category, revision, document, config) {
|
|
336
|
+
return request(RevisionDocumentController.destroy({ category, revision, document }), undefined, config);
|
|
355
337
|
},
|
|
356
|
-
download(category,
|
|
338
|
+
download(category, revision, document, preview, config) {
|
|
357
339
|
config = { ...config, responseType: "blob", params: { preview: preview } };
|
|
358
|
-
return request(RevisionDocumentController.download({
|
|
359
|
-
category,
|
|
360
|
-
facility,
|
|
361
|
-
revision,
|
|
362
|
-
document
|
|
363
|
-
}), undefined, config);
|
|
340
|
+
return request(RevisionDocumentController.download({ category, revision, document }), undefined, config);
|
|
364
341
|
},
|
|
365
342
|
},
|
|
366
343
|
// ── System (admin) endpoints ───────────────────────────────────────────
|