
* Refactor Nav. Use feature flags. Connect * Refactor Alerts * Kafka Connect initial setup
28 lines
574 B
TypeScript
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>;
|