From 213e1592ae459b8a5370c72a4a4a030b1ff19801 Mon Sep 17 00:00:00 2001 From: Mathias Lykkegaard Lorenzen Date: Tue, 4 Apr 2023 08:28:41 +0200 Subject: [PATCH 1/3] Update event_hub.ts --- source/event_hub.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source/event_hub.ts b/source/event_hub.ts index a4369e4b..c69d0948 100644 --- a/source/event_hub.ts +++ b/source/event_hub.ts @@ -59,16 +59,10 @@ export interface UpdateEventPayload extends BaseEventPayload { data: UpdateEventData; } -export interface UnknownEventPayload extends BaseEventPayload { - topic: unknown; - data: unknown; -} - export type EventPayload = | ActionLaunchEventPayload | ActionDiscoverEventPayload - | UpdateEventPayload - | UnknownEventPayload; + | UpdateEventPayload; export interface EventSource { clientToken: string; From a78ac756c9e19834cfde0c708697ee7316f69720 Mon Sep 17 00:00:00 2001 From: Mathias Lykkegaard Lorenzen Date: Tue, 4 Apr 2023 11:05:47 +0200 Subject: [PATCH 2/3] Update source/event_hub.ts Co-authored-by: Lars Johansson --- source/event_hub.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/event_hub.ts b/source/event_hub.ts index c69d0948..a9291dc1 100644 --- a/source/event_hub.ts +++ b/source/event_hub.ts @@ -59,7 +59,14 @@ export interface UpdateEventPayload extends BaseEventPayload { data: UpdateEventData; } -export type EventPayload = +/** + * A union type of the different payload types with the + * `topic:` property as a type discriminator. + * Supports the topics `ftrack.action.discover`, `ftrack.action.launch` + * and `ftrack.update`. Please add a GitHub issue for any missing core topics. + * @interface EventPayload + */ + export type EventPayload = | ActionLaunchEventPayload | ActionDiscoverEventPayload | UpdateEventPayload; From 92b8a59e30dcaf30e108f26615415247415cac8c Mon Sep 17 00:00:00 2001 From: Lars Johansson Date: Tue, 4 Apr 2023 11:34:16 +0200 Subject: [PATCH 3/3] Prettier formatting --- source/event_hub.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/event_hub.ts b/source/event_hub.ts index a9291dc1..f0136958 100644 --- a/source/event_hub.ts +++ b/source/event_hub.ts @@ -60,13 +60,13 @@ export interface UpdateEventPayload extends BaseEventPayload { } /** - * A union type of the different payload types with the + * A union type of the different payload types with the * `topic:` property as a type discriminator. * Supports the topics `ftrack.action.discover`, `ftrack.action.launch` * and `ftrack.update`. Please add a GitHub issue for any missing core topics. * @interface EventPayload */ - export type EventPayload = +export type EventPayload = | ActionLaunchEventPayload | ActionDiscoverEventPayload | UpdateEventPayload;