feat(companion): add connection snapshot helper

This commit is contained in:
William Valentin
2026-02-16 22:24:16 -08:00
parent 965267d67e
commit c8f6d76638
7 changed files with 107 additions and 2 deletions
+13
View File
@@ -2,6 +2,7 @@ import type {
CompanionEventName,
CompanionEventEnvelope,
EventSurfaceSnapshot,
ConnectionSnapshot,
CompanionEventHandler,
CanvasClearResult,
CanvasDeleteResult,
@@ -306,6 +307,10 @@ export class MacOSCompanionClient {
return this.runtime.getEventSurfaceSnapshot();
}
getConnectionSnapshot(): ConnectionSnapshot {
return this.runtime.getConnectionSnapshot();
}
waitForAnyEvent<TData = unknown>(
eventNames: readonly (CompanionEventName | string)[],
options?: {
@@ -580,6 +585,10 @@ export class IOSCompanionClient {
return this.runtime.getEventSurfaceSnapshot();
}
getConnectionSnapshot(): ConnectionSnapshot {
return this.runtime.getConnectionSnapshot();
}
waitForAnyEvent<TData = unknown>(
eventNames: readonly (CompanionEventName | string)[],
options?: {
@@ -852,6 +861,10 @@ export class AndroidCompanionClient {
return this.runtime.getEventSurfaceSnapshot();
}
getConnectionSnapshot(): ConnectionSnapshot {
return this.runtime.getConnectionSnapshot();
}
waitForAnyEvent<TData = unknown>(
eventNames: readonly (CompanionEventName | string)[],
options?: {