@urun-sh/core 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,30 @@
1
- import { b as AppOptions, a as App$1, A as AccessTokenOptions, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, F as SessionDocument, j as DocConnector, K as SessionText, E as Session$1, C as ChannelEndpoint, U as TransportSession, c as AttachOptions, G as SessionPhase, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, J as SessionStream$1, T as StreamDataTransport, Q as StreamChunkOptions, g as ChunkReadable, P as Presence, v as RequestOptions, w as RequestStreamOptions, O as StoreOptions, N as Store, e as ChannelMultiplexer } from './stream-data-DFTD9vJY.mjs';
2
- export { L as Layer, k as LayoutConfig, l as LayoutContext, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, S as SceneContext, B as SceneGraph, H as SessionPhaseName, W as TransportState, _ as isPendingRecording, $ as mediaRecorderChunkSource } from './stream-data-DFTD9vJY.mjs';
1
+ import { b as AppOptions, a as App$1, H as SessionPhase, N as SessionStatus, A as AccessTokenOptions, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, F as SessionDocument, j as DocConnector, Q as SessionText, E as Session$1, C as ChannelEndpoint, X as TransportSession, c as AttachOptions, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, O as SessionStream$1, W as StreamDataTransport, V as StreamChunkOptions, g as ChunkReadable, P as Presence, v as RequestOptions, w as RequestStreamOptions, U as StoreOptions, T as Store, e as ChannelMultiplexer, G as SessionFailureKind } from './stream-data-Bv0WmUUA.mjs';
2
+ export { L as Layer, k as LayoutConfig, l as LayoutContext, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, S as SceneContext, B as SceneGraph, I as SessionPhaseError, J as SessionPhaseName, Z as TransportState, a1 as isPendingRecording, a2 as mediaRecorderChunkSource } from './stream-data-Bv0WmUUA.mjs';
3
3
  import * as Y from 'yjs';
4
4
  import { Awareness } from 'y-protocols/awareness';
5
5
 
6
6
  declare function App(appId: string, options: AppOptions): App$1;
7
7
 
8
+ interface PhaseObservable {
9
+
10
+ readonly phase: SessionPhase;
11
+
12
+ onPhase(handler: (phase: SessionPhase) => void): () => void;
13
+
14
+ readonly status?: SessionStatus;
15
+ }
16
+
17
+ interface WhenLiveOptions {
18
+
19
+ timeout?: number;
20
+
21
+ signal?: AbortSignal;
22
+ }
23
+
24
+ declare const DEFAULT_WHEN_LIVE_TIMEOUT_MS = 45000;
25
+
26
+ declare function whenLive(session: PhaseObservable, options?: WhenLiveOptions): Promise<void>;
27
+
8
28
  interface RuntimeArtifactsClientOptions {
9
29
  baseUrl: string;
10
30
  fallbackUrls?: readonly string[];
@@ -264,8 +284,12 @@ declare class Session implements Session$1 {
264
284
 
265
285
  get phase(): SessionPhase;
266
286
 
287
+ get status(): SessionStatus;
288
+
267
289
  onPhase(handler: (phase: SessionPhase) => void): () => void;
268
290
 
291
+ whenLive(options?: WhenLiveOptions): Promise<void>;
292
+
269
293
  get recordings(): RecordingsAccessor;
270
294
  get artifacts(): RuntimeArtifactsAccessor;
271
295
  setArtifactsAuth(auth: RuntimeArtifactsClientOptions): void;
@@ -357,4 +381,31 @@ declare class RequestCancelledError extends RequestError {
357
381
  constructor(requestId?: string);
358
382
  }
359
383
 
360
- export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, InvalidDurationError, PermanentLockedError, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionDocument, Session$1 as SessionInterface, SessionPhase, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, isDurationString, normalizeRetention, videoStream };
384
+ declare function describeSessionFailure(kind: SessionFailureKind, status: SessionStatus): {
385
+ message: string;
386
+ hint: string;
387
+ };
388
+
389
+ declare class SessionFailedError extends Error {
390
+ readonly kind: SessionFailureKind;
391
+
392
+ readonly status: SessionStatus;
393
+
394
+ readonly hint: string;
395
+ constructor(kind: SessionFailureKind, status: SessionStatus, options?: {
396
+ cause?: unknown;
397
+ });
398
+ }
399
+
400
+ declare function sessionFailureFromMediaError(error: unknown, status?: SessionStatus): SessionFailedError;
401
+
402
+ declare class SessionAllocationError extends Error {
403
+
404
+ readonly httpStatus?: number;
405
+ constructor(message: string, options?: {
406
+ httpStatus?: number;
407
+ cause?: unknown;
408
+ });
409
+ }
410
+
411
+ export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDocument, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionStatus, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, isDurationString, normalizeRetention, sessionFailureFromMediaError, videoStream, whenLive };
@@ -1,10 +1,30 @@
1
- import { b as AppOptions, a as App$1, A as AccessTokenOptions, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, F as SessionDocument, j as DocConnector, K as SessionText, E as Session$1, C as ChannelEndpoint, U as TransportSession, c as AttachOptions, G as SessionPhase, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, J as SessionStream$1, T as StreamDataTransport, Q as StreamChunkOptions, g as ChunkReadable, P as Presence, v as RequestOptions, w as RequestStreamOptions, O as StoreOptions, N as Store, e as ChannelMultiplexer } from './stream-data-DFTD9vJY.js';
2
- export { L as Layer, k as LayoutConfig, l as LayoutContext, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, S as SceneContext, B as SceneGraph, H as SessionPhaseName, W as TransportState, _ as isPendingRecording, $ as mediaRecorderChunkSource } from './stream-data-DFTD9vJY.js';
1
+ import { b as AppOptions, a as App$1, H as SessionPhase, N as SessionStatus, A as AccessTokenOptions, x as RuntimeArtifact, y as RuntimeArtifactDownload, R as Recording, F as SessionDocument, j as DocConnector, Q as SessionText, E as Session$1, C as ChannelEndpoint, X as TransportSession, c as AttachOptions, u as RecordingsAccessor, z as RuntimeArtifactsAccessor, O as SessionStream$1, W as StreamDataTransport, V as StreamChunkOptions, g as ChunkReadable, P as Presence, v as RequestOptions, w as RequestStreamOptions, U as StoreOptions, T as Store, e as ChannelMultiplexer, G as SessionFailureKind } from './stream-data-Bv0WmUUA.js';
2
+ export { L as Layer, k as LayoutConfig, l as LayoutContext, M as MediaChunkBinding, n as MediaChunkSource, o as MediaChunkSourceFactory, p as MediaRecorderChunkSourceOptions, q as PresenceState, r as RecordingBucket, s as RecordingLifecycle, t as RecordingStatus, S as SceneContext, B as SceneGraph, I as SessionPhaseError, J as SessionPhaseName, Z as TransportState, a1 as isPendingRecording, a2 as mediaRecorderChunkSource } from './stream-data-Bv0WmUUA.js';
3
3
  import * as Y from 'yjs';
4
4
  import { Awareness } from 'y-protocols/awareness';
5
5
 
6
6
  declare function App(appId: string, options: AppOptions): App$1;
7
7
 
8
+ interface PhaseObservable {
9
+
10
+ readonly phase: SessionPhase;
11
+
12
+ onPhase(handler: (phase: SessionPhase) => void): () => void;
13
+
14
+ readonly status?: SessionStatus;
15
+ }
16
+
17
+ interface WhenLiveOptions {
18
+
19
+ timeout?: number;
20
+
21
+ signal?: AbortSignal;
22
+ }
23
+
24
+ declare const DEFAULT_WHEN_LIVE_TIMEOUT_MS = 45000;
25
+
26
+ declare function whenLive(session: PhaseObservable, options?: WhenLiveOptions): Promise<void>;
27
+
8
28
  interface RuntimeArtifactsClientOptions {
9
29
  baseUrl: string;
10
30
  fallbackUrls?: readonly string[];
@@ -264,8 +284,12 @@ declare class Session implements Session$1 {
264
284
 
265
285
  get phase(): SessionPhase;
266
286
 
287
+ get status(): SessionStatus;
288
+
267
289
  onPhase(handler: (phase: SessionPhase) => void): () => void;
268
290
 
291
+ whenLive(options?: WhenLiveOptions): Promise<void>;
292
+
269
293
  get recordings(): RecordingsAccessor;
270
294
  get artifacts(): RuntimeArtifactsAccessor;
271
295
  setArtifactsAuth(auth: RuntimeArtifactsClientOptions): void;
@@ -357,4 +381,31 @@ declare class RequestCancelledError extends RequestError {
357
381
  constructor(requestId?: string);
358
382
  }
359
383
 
360
- export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, InvalidDurationError, PermanentLockedError, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionDocument, Session$1 as SessionInterface, SessionPhase, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, isDurationString, normalizeRetention, videoStream };
384
+ declare function describeSessionFailure(kind: SessionFailureKind, status: SessionStatus): {
385
+ message: string;
386
+ hint: string;
387
+ };
388
+
389
+ declare class SessionFailedError extends Error {
390
+ readonly kind: SessionFailureKind;
391
+
392
+ readonly status: SessionStatus;
393
+
394
+ readonly hint: string;
395
+ constructor(kind: SessionFailureKind, status: SessionStatus, options?: {
396
+ cause?: unknown;
397
+ });
398
+ }
399
+
400
+ declare function sessionFailureFromMediaError(error: unknown, status?: SessionStatus): SessionFailedError;
401
+
402
+ declare class SessionAllocationError extends Error {
403
+
404
+ readonly httpStatus?: number;
405
+ constructor(message: string, options?: {
406
+ httpStatus?: number;
407
+ cause?: unknown;
408
+ });
409
+ }
410
+
411
+ export { App, App$1 as AppInterface, AppOptions, AttachOptions, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, Recording, RecordingNotFoundError, RecordingsAccessor, RecordingsClient, type RecordingsClientOptions, RecordingsError, RecordingsUnauthorizedError, RequestAbortError, RequestCancelledError, RequestDocSyncError, RequestError, RequestOptions, RequestStreamOptions, RequestTimeoutError, RetainNotTempError, type RetentionIntent, RuntimeArtifact, RuntimeArtifactDownload, RuntimeArtifactNotFoundError, RuntimeArtifactsAccessor, RuntimeArtifactsClient, type RuntimeArtifactsClientOptions, RuntimeArtifactsError, RuntimeArtifactsUnauthorizedError, Session, SessionAllocationError, SessionDocument, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionStatus, SessionStream$1 as SessionStream, SessionText, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, isDurationString, normalizeRetention, sessionFailureFromMediaError, videoStream, whenLive };