@reviza/api-client 1.1.0-SNAPSHOT-90700239 → 1.1.0-SNAPSHOT-cc411318
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,6 +18,7 @@ import { SubscriptionData } from "../App/Data/Subscription";
|
|
|
18
18
|
import { UserPermissionData, UserPermissionPayload } from "../App/Data/Permission";
|
|
19
19
|
import { RevisionCreatePayload, RevisionData, RevisionUpdatePayload, RevisionIssueData } from "../App/Data/Revision";
|
|
20
20
|
import { SearchData } from "../App/Data/Search";
|
|
21
|
+
import { UserUiSettingsData, UserUiSettingsUpdatePayload } from "../App/Data/Ui";
|
|
21
22
|
type ActionFunction<P extends RouteParams | undefined> = P extends undefined ? (options?: RouteOptions) => ActionResult : (params: P, options?: RouteOptions) => ActionResult;
|
|
22
23
|
type ActionResult = RouteDefinition & {
|
|
23
24
|
url: string;
|
|
@@ -584,6 +585,20 @@ export declare namespace SearchController {
|
|
|
584
585
|
type Response = RevizaResponseData<DataCollection<number, SearchData>>;
|
|
585
586
|
}
|
|
586
587
|
}
|
|
588
|
+
export declare const UiSettingsController: {
|
|
589
|
+
readonly show: ActionWithMethods<undefined, string>;
|
|
590
|
+
readonly update: ActionWithMethods<undefined, string>;
|
|
591
|
+
};
|
|
592
|
+
export declare namespace UiSettingsController {
|
|
593
|
+
namespace show {
|
|
594
|
+
type Request = object;
|
|
595
|
+
type Response = RevizaResponseData<UserUiSettingsData>;
|
|
596
|
+
}
|
|
597
|
+
namespace update {
|
|
598
|
+
type Request = UserUiSettingsUpdatePayload;
|
|
599
|
+
type Response = RevizaResponseData<UserUiSettingsData>;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
587
602
|
export declare const UserController: {
|
|
588
603
|
readonly organizationUsers: ActionWithMethods<{
|
|
589
604
|
organization: string | number;
|
|
@@ -305,6 +305,14 @@ export const RevisionIssueController = {
|
|
|
305
305
|
export const SearchController = {
|
|
306
306
|
search: createActionWithMethods([{ method: "get", url: "api/v1/search" }]),
|
|
307
307
|
};
|
|
308
|
+
export const UiSettingsController = {
|
|
309
|
+
show: createActionWithMethods([
|
|
310
|
+
{ method: "get", url: "api/v1/me/ui-settings/tables" },
|
|
311
|
+
]),
|
|
312
|
+
update: createActionWithMethods([
|
|
313
|
+
{ method: "put", url: "api/v1/me/ui-settings/tables" },
|
|
314
|
+
]),
|
|
315
|
+
};
|
|
308
316
|
export const UserController = {
|
|
309
317
|
organizationUsers: createActionWithMethods([{ method: "get", url: "api/v1/organizations/{organization}/users" }]),
|
|
310
318
|
invite: createActionWithMethods([
|
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, DashboardController, DemoRequestController, FacilityController, FacilityDocumentController, FacilityPictureController, FrontendErrorController, FrontendRouteController, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, UserController } from "./controllers";
|
|
5
|
+
import { AuthController, CategoryController, ConfigController, DashboardController, DemoRequestController, FacilityController, FacilityDocumentController, FacilityPictureController, 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
|
|
@@ -56,6 +56,10 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
56
56
|
changePassword(data: MeController.changePassword.Request, config?: AxiosRequestConfig): Promise<MeController.changePassword.Response>;
|
|
57
57
|
updateSettings(data: MeController.updateSettings.Request, config?: AxiosRequestConfig): Promise<MeController.updateSettings.Response>;
|
|
58
58
|
tutorial(config?: AxiosRequestConfig): Promise<MeController.tutorial.Response>;
|
|
59
|
+
uiSettings: {
|
|
60
|
+
show(config?: AxiosRequestConfig): Promise<UiSettingsController.show.Response>;
|
|
61
|
+
update(data: UiSettingsController.update.Request, config?: AxiosRequestConfig): Promise<UiSettingsController.update.Response>;
|
|
62
|
+
};
|
|
59
63
|
};
|
|
60
64
|
notificationSettings: {
|
|
61
65
|
show(config?: AxiosRequestConfig): Promise<NotificationSettingsController.show.Response>;
|
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, DashboardController, DemoRequestController, FacilityController, FacilityDocumentController, FacilityPictureController, FrontendErrorController, FrontendRouteController, MapController, MeController, NotificationSettingsController, OrganizationController, PermissionController, RelatedFacilityController, RevisionController, RevisionDocumentController, RevisionIssueController, SearchController, UserController, } from "./controllers";
|
|
5
|
+
import { AuthController, CategoryController, ConfigController, DashboardController, DemoRequestController, FacilityController, FacilityDocumentController, FacilityPictureController, 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
|
/**
|
|
@@ -157,6 +157,14 @@ export function createRevizaApi(http = axios) {
|
|
|
157
157
|
tutorial(config) {
|
|
158
158
|
return request(MeController.tutorial(), undefined, config);
|
|
159
159
|
},
|
|
160
|
+
uiSettings: {
|
|
161
|
+
show(config) {
|
|
162
|
+
return request(UiSettingsController.show(), config);
|
|
163
|
+
},
|
|
164
|
+
update(data, config) {
|
|
165
|
+
return request(UiSettingsController.update(), data, config);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
160
168
|
},
|
|
161
169
|
notificationSettings: {
|
|
162
170
|
show(config) {
|