mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
https://linear.app/unleash/issue/2-2665/show-signals-in-the-event-timeline Implements signals in the event timeline. This merges events and signals into a unified `TimelineEvent` abstraction, streamlining the data structure to only include properties relevant to the timeline. Key changes: - Refactors the timeline logic to handle both events and signals through the new abstraction. - Introduces the `useSignalQuery` hook, modeled after `useEventSearch`, as both serve similar purposes, albeit for different resource types. Note: The signals suggestion alert is not included and will be addressed in a future task. 
39 lines
850 B
TypeScript
39 lines
850 B
TypeScript
export interface ISignalEndpoint {
|
|
id: number;
|
|
enabled: boolean;
|
|
name: string;
|
|
createdAt: string;
|
|
createdByUserId: number;
|
|
description: string;
|
|
tokens: ISignalEndpointToken[];
|
|
}
|
|
|
|
export interface ISignalEndpointToken {
|
|
id: number;
|
|
name: string;
|
|
signalEndpointId: number;
|
|
createdAt: string;
|
|
createdByUserId: number;
|
|
}
|
|
|
|
export type SignalSource = 'signal-endpoint';
|
|
|
|
export interface ISignal {
|
|
id: number;
|
|
source: SignalSource;
|
|
sourceId: number;
|
|
createdAt: string;
|
|
createdBySourceTokenId: number;
|
|
payload: Record<string, unknown>;
|
|
}
|
|
|
|
export interface ISignalEndpointSignal
|
|
extends Omit<ISignal, 'createdBySourceTokenId'> {
|
|
tokenName: string;
|
|
}
|
|
|
|
export interface ISignalQuerySignal extends ISignalEndpointSignal {
|
|
sourceName?: string;
|
|
sourceDescription?: string;
|
|
}
|