UNPKG

@spotinst/spinnaker-deck

Version:

Spinnaker-Deck service, forked with support to Spotinst

21 lines (17 loc) 701 B
import { REST } from 'core/api/ApiService'; import { INotification } from 'core/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<IAppNotifications> { return REST('/notifications/application').path(applicationName).get(); } public static saveNotificationsForApplication( applicationName: string, notifications: IAppNotifications, ): PromiseLike<void> { return REST('/notifications/application').path(applicationName).post(notifications); } }