import { REST } from '../api/ApiService'; import type { INotification } from '../domain'; export interface IAppNotifications { application: string; [key: string]: INotification[] | string; // "| string" is just for application field } export class AppNotificationsService { public static getNotificationsForApplication(applicationName: string): PromiseLike { return REST('/notifications/application').path(applicationName).get(); } public static saveNotificationsForApplication( applicationName: string, notifications: IAppNotifications, ): PromiseLike { return REST('/notifications/application').path(applicationName).post(notifications); } }