2026-09-25 11:36:25 -03:00
|
|
|
import { apiGet, apiPostNoContent } from "@/api/api";
|
2026-09-18 12:55:54 -03:00
|
|
|
import {
|
|
|
|
|
notificationFeedSchema,
|
|
|
|
|
type NotificationFeed,
|
|
|
|
|
} from "@/domain/notifications/types/notification-feed";
|
|
|
|
|
|
|
|
|
|
export const notificationsApi = {
|
|
|
|
|
feed: async (): Promise<NotificationFeed> =>
|
|
|
|
|
notificationFeedSchema.parse(await apiGet<unknown>("notifications")),
|
2026-09-25 11:36:25 -03:00
|
|
|
/** Records who acknowledged the missed response deadline in the work order's audit history. */
|
|
|
|
|
acknowledgeSlaBreach: (workOrderId: number): Promise<void> =>
|
|
|
|
|
apiPostNoContent(`notifications/sla/${workOrderId}/acknowledge`),
|
2026-09-18 12:55:54 -03:00
|
|
|
};
|