@reviza/api-client 1.0.0-SNAPSHOT-40be46d9 → 1.0.0-SNAPSHOT-cf387ab8
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.
|
@@ -12,6 +12,15 @@ export type CategoryNotificationPayload = {
|
|
|
12
12
|
notifications: CategoryNotificationEnum[];
|
|
13
13
|
categories: CategoryNotificationPayload[] | null;
|
|
14
14
|
};
|
|
15
|
+
export type NotificationData = {
|
|
16
|
+
full_name: string;
|
|
17
|
+
email: string;
|
|
18
|
+
subject: string;
|
|
19
|
+
data: Record<string, any>;
|
|
20
|
+
created_at: string | null;
|
|
21
|
+
updated_at: string | null;
|
|
22
|
+
read_at: string | null;
|
|
23
|
+
};
|
|
15
24
|
export type NotificationSettingsData = {
|
|
16
25
|
organizations: OrganizationNotificationData[];
|
|
17
26
|
};
|
|
@@ -2,6 +2,7 @@ import { RevizaResponseData } from "../../App/Data";
|
|
|
2
2
|
import { DataCollection } from "../../Spatie/LaravelData";
|
|
3
3
|
import { ActionTransactionData } from "../../App/Data/ActionLog";
|
|
4
4
|
import { MapCreatePayload, MapUpdatePayload } from "../../App/Data/Map";
|
|
5
|
+
import { NotificationData } from "../../App/Data/Notification";
|
|
5
6
|
import { OrganizationCreatePayload, OrganizationData } from "../../App/Data/Organization";
|
|
6
7
|
import { SubscriptionCreatePayload, SubscriptionData } from "../../App/Data/Subscription";
|
|
7
8
|
import { UserPermissionData, UserPermissionPayload } from "../../App/Data/Permission";
|
|
@@ -97,6 +98,21 @@ export declare namespace MapController {
|
|
|
97
98
|
type Response = RevizaResponseData<null>;
|
|
98
99
|
}
|
|
99
100
|
}
|
|
101
|
+
export declare const NotificationController: {
|
|
102
|
+
readonly index: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
103
|
+
url: string;
|
|
104
|
+
}) & {
|
|
105
|
+
[x: string]: (options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
106
|
+
url: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export declare namespace NotificationController {
|
|
111
|
+
namespace index {
|
|
112
|
+
type Request = object;
|
|
113
|
+
type Response = RevizaResponseData<DataCollection<number, NotificationData>>;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
100
116
|
export declare const OrganizationController: {
|
|
101
117
|
readonly store: ((options?: import("../").RouteOptions) => import("../").RouteDefinition & {
|
|
102
118
|
url: string;
|
|
@@ -13,6 +13,11 @@ export const MapController = {
|
|
|
13
13
|
update: createActionWithMethods([{ method: "patch", url: "api/v1/system/maps/{map}" }]),
|
|
14
14
|
destroy: createActionWithMethods([{ method: "delete", url: "api/v1/system/maps/{map}" }]),
|
|
15
15
|
};
|
|
16
|
+
export const NotificationController = {
|
|
17
|
+
index: createActionWithMethods([
|
|
18
|
+
{ method: "get", url: "api/v1/system/notifications" },
|
|
19
|
+
]),
|
|
20
|
+
};
|
|
16
21
|
export const OrganizationController = {
|
|
17
22
|
store: createActionWithMethods([
|
|
18
23
|
{ method: "post", url: "api/v1/system/organizations" },
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type AxiosInstance, type AxiosRequestConfig } from "axios";
|
|
5
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";
|
|
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
|
|
9
9
|
* `FormData` object ready for multipart upload.
|
|
@@ -132,6 +132,9 @@ export declare function createRevizaApi(http?: AxiosInstance): {
|
|
|
132
132
|
download(category: number, facility: number, revision: number, document: number, preview: boolean, config?: AxiosRequestConfig): Promise<FacilityDocumentController.download.Response>;
|
|
133
133
|
};
|
|
134
134
|
system: {
|
|
135
|
+
notifications: {
|
|
136
|
+
index(config?: AxiosRequestConfig): Promise<NotificationController.index.Response>;
|
|
137
|
+
};
|
|
135
138
|
actionLog: {
|
|
136
139
|
index(config?: AxiosRequestConfig): Promise<ActionLogController.index.Response>;
|
|
137
140
|
show(transaction: number | string, config?: AxiosRequestConfig): Promise<ActionLogController.show.Response>;
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import axios, { isAxiosError } from "axios";
|
|
5
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";
|
|
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
|
/**
|
|
9
9
|
* Convert a typed payload that contains `File` / `Blob` fields into a
|
|
@@ -365,6 +365,11 @@ export function createRevizaApi(http = axios) {
|
|
|
365
365
|
},
|
|
366
366
|
// ── System (admin) endpoints ───────────────────────────────────────────
|
|
367
367
|
system: {
|
|
368
|
+
notifications: {
|
|
369
|
+
index(config) {
|
|
370
|
+
return request(NotificationController.index(), undefined, config);
|
|
371
|
+
},
|
|
372
|
+
},
|
|
368
373
|
actionLog: {
|
|
369
374
|
index(config) {
|
|
370
375
|
return request(ActionLogController.index(), undefined, config);
|