1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00
unleash.unleash/frontend/src/interfaces/integrationEvent.ts
Thomas Heartman 643cfeb5bb
chore: use EventSchema instead of IEvent (#7732)
Changes the type used by the useEventSearch hook to be `EventSchema`
from OpenAPI instead. This is more accurate with what we're actually
getting. And crucially for the event log search, it contains the
`createdByUserId` property that we need to filter out events.

It's mostly a straightforward find and replace except for one instance
where we need to do some extra fiddling. There's an inline comment
explaining that.
2024-08-02 11:05:42 +02:00

16 lines
371 B
TypeScript

import type { EventSchema } from 'openapi';
export type IntegrationEvent = {
id: string;
integrationId: number;
createdAt: string;
state: 'success' | 'failed' | 'successWithErrors';
stateDetails: string;
event: EventSchema;
details: Record<string, unknown>;
};
export type IntegrationEvents = {
integrationEvents: IntegrationEvent[];
};