kafka-ui/kafka-ui-react-app/src/redux/interfaces/alerts.ts
Oleg Shur 9d75dbdacd
Kafka Connect. Initial setup (#362)
* Refactor Nav. Use feature flags. Connect

* Refactor Alerts

* Kafka Connect initial setup
2021-04-07 23:50:17 +03:00

28 lines
574 B
TypeScript

import { ErrorResponse } from 'generated-sources';
import React from 'react';
export interface ServerResponse {
status: number;
statusText: string;
body?: ErrorResponse;
}
export interface FailurePayload {
title: string;
message?: string;
subject: string;
response?: ServerResponse;
}
export interface Alert {
id: string;
type: 'error' | 'success' | 'warning' | 'info';
title: string;
message: React.ReactNode;
response?: ServerResponse;
createdAt: number;
}
export type Alerts = Alert[];
export type AlertsState = Record<Alert['id'], Alert>;