@reviza/api-client 1.0.0-SNAPSHOT-86ca92ea → 1.0.0-SNAPSHOT-43ce7889
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/controllers/index.d.ts +5 -2
- package/dist/controllers/index.js +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -4
- 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,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";
|
|
@@ -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 {
|
|
@@ -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([
|
package/dist/index.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -179,6 +179,7 @@ export type * from "./App/Data/Revision";
|
|
|
179
179
|
export type * from "./App/Data/Search";
|
|
180
180
|
export type * from "./App/Data/Subscription";
|
|
181
181
|
export type * from "./App/Data/User";
|
|
182
|
+
export type * from "./App/Data/Picture";
|
|
182
183
|
export * from "./App/Enum";
|
|
183
184
|
export * from "./App/Enum/Permissions";
|
|
184
185
|
export * from "./App/Enum/Notifications";
|
package/dist/index.js
CHANGED
|
@@ -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);
|