@urun-sh/core 0.2.7 → 0.2.9
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.
- package/dist/chunk-7DY3HQ7G.mjs +8 -0
- package/dist/{chunk-47GHXEPH.mjs → chunk-NJKX45LE.mjs} +2 -2
- package/dist/index.browser.d.mts +93 -5
- package/dist/index.browser.d.ts +93 -5
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +93 -5
- package/dist/index.d.ts +93 -5
- package/dist/index.js +6 -2
- package/dist/index.mjs +1 -1
- package/dist/internal.browser.d.mts +1 -1
- package/dist/internal.browser.d.ts +1 -1
- package/dist/internal.browser.js +2 -2
- package/dist/internal.browser.mjs +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +6 -2
- package/dist/internal.mjs +1 -1
- package/dist/{stream-data-B16nTnox.d.mts → stream-data-DWu57atL.d.mts} +43 -3
- package/dist/{stream-data-B16nTnox.d.ts → stream-data-DWu57atL.d.ts} +43 -3
- package/package.json +1 -1
- package/dist/chunk-YYZIRCR7.mjs +0 -4
package/dist/index.browser.d.mts
CHANGED
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
import { b as AppOptions, a as App$1,
|
|
2
|
-
export { L as Layer,
|
|
1
|
+
import { b as AppOptions, a as App$1, K as SessionPhase, T as SessionStatus, O as SessionPhaseName, A as AccessTokenOptions$1, y as RuntimeArtifact, z as RuntimeArtifactDownload, R as Recording, G as Session$1, C as ChannelEndpoint, _ as TransportSession, c as AttachOptions, v as RecordingsAccessor, B as RuntimeArtifactsAccessor, U as SessionStream$1, Z as StreamDataTransport, I as SessionDocumentImpl, Y as StreamChunkOptions, g as ChunkReadable, P as Presence, k as DocConnector, w as RequestOptions, x as RequestStreamOptions, X as StoreOptions, W as Store, e as ChannelMultiplexer, J as SessionFailureKind } from './stream-data-DWu57atL.mjs';
|
|
2
|
+
export { L as Layer, l as LayoutConfig, m as LayoutContext, M as MediaChunkBinding, o as MediaChunkSource, p as MediaChunkSourceFactory, q as MediaRecorderChunkSourceOptions, r as PresenceState, s as RecordingBucket, t as RecordingLifecycle, u as RecordingStatus, E as RuntimeAvailability, S as SceneContext, F as SceneGraph, H as SessionDocument, N as SessionPhaseError, V as SessionText, a0 as TransportState, a4 as isPendingRecording, a5 as mediaRecorderChunkSource } from './stream-data-DWu57atL.mjs';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
5
5
|
|
|
6
6
|
declare function App(appId: string, options: AppOptions): App$1;
|
|
7
7
|
|
|
8
|
+
interface AccessTokenOptions {
|
|
9
|
+
forceRefresh?: boolean;
|
|
10
|
+
reason?: 'initial' | 'unauthorized' | 'background';
|
|
11
|
+
}
|
|
12
|
+
interface PrewakeOptions {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
|
|
15
|
+
app: string;
|
|
16
|
+
|
|
17
|
+
functionName: string;
|
|
18
|
+
orgId: string;
|
|
19
|
+
jwt?: string;
|
|
20
|
+
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
21
|
+
authProvider?: string;
|
|
22
|
+
}
|
|
23
|
+
type PrewakeStatus = 'warming' | 'prebound' | 'unknown-app' | 'unavailable';
|
|
24
|
+
interface PrewakeResult {
|
|
25
|
+
|
|
26
|
+
status: PrewakeStatus;
|
|
27
|
+
|
|
28
|
+
expiresAt?: string;
|
|
29
|
+
|
|
30
|
+
warmCapable?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare function prewake(options: PrewakeOptions): Promise<PrewakeResult>;
|
|
34
|
+
|
|
35
|
+
declare function isWakingPhase(phase: SessionPhase | SessionPhaseName | null | undefined): boolean;
|
|
36
|
+
|
|
8
37
|
interface PhaseObservable {
|
|
9
38
|
|
|
10
39
|
readonly phase: SessionPhase;
|
|
@@ -32,7 +61,7 @@ interface RuntimeArtifactsClientOptions {
|
|
|
32
61
|
fallbackUrls?: readonly string[];
|
|
33
62
|
orgId: string;
|
|
34
63
|
jwt?: string;
|
|
35
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
64
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
36
65
|
authProvider?: string;
|
|
37
66
|
}
|
|
38
67
|
declare class RuntimeArtifactsError extends Error {
|
|
@@ -69,7 +98,7 @@ interface RecordingsClientOptions {
|
|
|
69
98
|
|
|
70
99
|
jwt?: string;
|
|
71
100
|
|
|
72
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
101
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
73
102
|
|
|
74
103
|
authProvider?: string;
|
|
75
104
|
}
|
|
@@ -227,6 +256,10 @@ declare class Session implements Session$1 {
|
|
|
227
256
|
private _recordingsAccessor;
|
|
228
257
|
|
|
229
258
|
private _artifactsAccessor;
|
|
259
|
+
|
|
260
|
+
private _recoveryHooks;
|
|
261
|
+
|
|
262
|
+
private _lifecycleUnsub;
|
|
230
263
|
constructor(sessionId: string, multiplexer: ChannelEndpoint, transport: TransportSession, recordingsAuth?: RecordingsClientOptions, artifactsAuth?: RuntimeArtifactsClientOptions);
|
|
231
264
|
private _wireControlDocIncarnation;
|
|
232
265
|
|
|
@@ -235,6 +268,8 @@ declare class Session implements Session$1 {
|
|
|
235
268
|
|
|
236
269
|
get phase(): SessionPhase;
|
|
237
270
|
|
|
271
|
+
get endsAt(): Date | null;
|
|
272
|
+
|
|
238
273
|
get status(): SessionStatus;
|
|
239
274
|
|
|
240
275
|
onPhase(handler: (phase: SessionPhase) => void): () => void;
|
|
@@ -273,9 +308,17 @@ declare class Session implements Session$1 {
|
|
|
273
308
|
requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
|
|
274
309
|
|
|
275
310
|
complete(payload: unknown, options?: RequestStreamOptions): Promise<unknown>;
|
|
311
|
+
|
|
312
|
+
recover(): void;
|
|
313
|
+
|
|
314
|
+
onRecovery(hook: () => void): () => void;
|
|
276
315
|
disconnect(): void;
|
|
277
316
|
}
|
|
278
317
|
|
|
318
|
+
declare const FOREGROUND_COALESCE_MS = 250;
|
|
319
|
+
|
|
320
|
+
declare function observePageLifecycle(onForeground: () => void): () => void;
|
|
321
|
+
|
|
279
322
|
declare function createStore(options: StoreOptions): Store & {
|
|
280
323
|
_getInternals(): {
|
|
281
324
|
multiplexer: ChannelMultiplexer;
|
|
@@ -359,4 +402,49 @@ declare class SessionAllocationError extends Error {
|
|
|
359
402
|
});
|
|
360
403
|
}
|
|
361
404
|
|
|
362
|
-
|
|
405
|
+
type CaptureKind = 'audio' | 'video';
|
|
406
|
+
type GetUserMedia = (constraints: MediaStreamConstraints) => Promise<MediaStream>;
|
|
407
|
+
|
|
408
|
+
declare class CaptureUnavailableError extends Error {
|
|
409
|
+
constructor();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
interface CaptureClaim {
|
|
413
|
+
readonly kind: CaptureKind;
|
|
414
|
+
|
|
415
|
+
readonly track: MediaStreamTrack | null;
|
|
416
|
+
|
|
417
|
+
readonly stream: MediaStream | null;
|
|
418
|
+
|
|
419
|
+
update(constraints: MediaTrackConstraints): Promise<MediaStreamTrack>;
|
|
420
|
+
|
|
421
|
+
release(): void;
|
|
422
|
+
|
|
423
|
+
onTrack(listener: (track: MediaStreamTrack, stream: MediaStream) => void): () => void;
|
|
424
|
+
|
|
425
|
+
onLost(listener: (error: Error) => void): () => void;
|
|
426
|
+
}
|
|
427
|
+
interface CaptureControllerOptions {
|
|
428
|
+
|
|
429
|
+
getUserMedia?: GetUserMedia;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare class CaptureController {
|
|
433
|
+
private readonly claims;
|
|
434
|
+
private readonly injectedGetUserMedia?;
|
|
435
|
+
private queue;
|
|
436
|
+
constructor(options?: CaptureControllerOptions);
|
|
437
|
+
|
|
438
|
+
claim(kind: CaptureKind, constraints: MediaTrackConstraints): Promise<CaptureClaim>;
|
|
439
|
+
|
|
440
|
+
idle(): Promise<void>;
|
|
441
|
+
private enqueue;
|
|
442
|
+
private resolveGetUserMedia;
|
|
443
|
+
|
|
444
|
+
private converge;
|
|
445
|
+
private createState;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
declare function sharedCaptureController(): CaptureController;
|
|
449
|
+
|
|
450
|
+
export { App, App$1 as AppInterface, AppOptions, AttachOptions, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, FOREGROUND_COALESCE_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PrewakeOptions, type PrewakeResult, type PrewakeStatus, 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, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, isDurationString, isWakingPhase, normalizeRetention, observePageLifecycle, prewake, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive };
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
import { b as AppOptions, a as App$1,
|
|
2
|
-
export { L as Layer,
|
|
1
|
+
import { b as AppOptions, a as App$1, K as SessionPhase, T as SessionStatus, O as SessionPhaseName, A as AccessTokenOptions$1, y as RuntimeArtifact, z as RuntimeArtifactDownload, R as Recording, G as Session$1, C as ChannelEndpoint, _ as TransportSession, c as AttachOptions, v as RecordingsAccessor, B as RuntimeArtifactsAccessor, U as SessionStream$1, Z as StreamDataTransport, I as SessionDocumentImpl, Y as StreamChunkOptions, g as ChunkReadable, P as Presence, k as DocConnector, w as RequestOptions, x as RequestStreamOptions, X as StoreOptions, W as Store, e as ChannelMultiplexer, J as SessionFailureKind } from './stream-data-DWu57atL.js';
|
|
2
|
+
export { L as Layer, l as LayoutConfig, m as LayoutContext, M as MediaChunkBinding, o as MediaChunkSource, p as MediaChunkSourceFactory, q as MediaRecorderChunkSourceOptions, r as PresenceState, s as RecordingBucket, t as RecordingLifecycle, u as RecordingStatus, E as RuntimeAvailability, S as SceneContext, F as SceneGraph, H as SessionDocument, N as SessionPhaseError, V as SessionText, a0 as TransportState, a4 as isPendingRecording, a5 as mediaRecorderChunkSource } from './stream-data-DWu57atL.js';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
import 'y-protocols/awareness';
|
|
5
5
|
|
|
6
6
|
declare function App(appId: string, options: AppOptions): App$1;
|
|
7
7
|
|
|
8
|
+
interface AccessTokenOptions {
|
|
9
|
+
forceRefresh?: boolean;
|
|
10
|
+
reason?: 'initial' | 'unauthorized' | 'background';
|
|
11
|
+
}
|
|
12
|
+
interface PrewakeOptions {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
|
|
15
|
+
app: string;
|
|
16
|
+
|
|
17
|
+
functionName: string;
|
|
18
|
+
orgId: string;
|
|
19
|
+
jwt?: string;
|
|
20
|
+
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
21
|
+
authProvider?: string;
|
|
22
|
+
}
|
|
23
|
+
type PrewakeStatus = 'warming' | 'prebound' | 'unknown-app' | 'unavailable';
|
|
24
|
+
interface PrewakeResult {
|
|
25
|
+
|
|
26
|
+
status: PrewakeStatus;
|
|
27
|
+
|
|
28
|
+
expiresAt?: string;
|
|
29
|
+
|
|
30
|
+
warmCapable?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare function prewake(options: PrewakeOptions): Promise<PrewakeResult>;
|
|
34
|
+
|
|
35
|
+
declare function isWakingPhase(phase: SessionPhase | SessionPhaseName | null | undefined): boolean;
|
|
36
|
+
|
|
8
37
|
interface PhaseObservable {
|
|
9
38
|
|
|
10
39
|
readonly phase: SessionPhase;
|
|
@@ -32,7 +61,7 @@ interface RuntimeArtifactsClientOptions {
|
|
|
32
61
|
fallbackUrls?: readonly string[];
|
|
33
62
|
orgId: string;
|
|
34
63
|
jwt?: string;
|
|
35
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
64
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
36
65
|
authProvider?: string;
|
|
37
66
|
}
|
|
38
67
|
declare class RuntimeArtifactsError extends Error {
|
|
@@ -69,7 +98,7 @@ interface RecordingsClientOptions {
|
|
|
69
98
|
|
|
70
99
|
jwt?: string;
|
|
71
100
|
|
|
72
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
101
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
73
102
|
|
|
74
103
|
authProvider?: string;
|
|
75
104
|
}
|
|
@@ -227,6 +256,10 @@ declare class Session implements Session$1 {
|
|
|
227
256
|
private _recordingsAccessor;
|
|
228
257
|
|
|
229
258
|
private _artifactsAccessor;
|
|
259
|
+
|
|
260
|
+
private _recoveryHooks;
|
|
261
|
+
|
|
262
|
+
private _lifecycleUnsub;
|
|
230
263
|
constructor(sessionId: string, multiplexer: ChannelEndpoint, transport: TransportSession, recordingsAuth?: RecordingsClientOptions, artifactsAuth?: RuntimeArtifactsClientOptions);
|
|
231
264
|
private _wireControlDocIncarnation;
|
|
232
265
|
|
|
@@ -235,6 +268,8 @@ declare class Session implements Session$1 {
|
|
|
235
268
|
|
|
236
269
|
get phase(): SessionPhase;
|
|
237
270
|
|
|
271
|
+
get endsAt(): Date | null;
|
|
272
|
+
|
|
238
273
|
get status(): SessionStatus;
|
|
239
274
|
|
|
240
275
|
onPhase(handler: (phase: SessionPhase) => void): () => void;
|
|
@@ -273,9 +308,17 @@ declare class Session implements Session$1 {
|
|
|
273
308
|
requestStream(payload: unknown, options?: RequestStreamOptions): AsyncIterable<string>;
|
|
274
309
|
|
|
275
310
|
complete(payload: unknown, options?: RequestStreamOptions): Promise<unknown>;
|
|
311
|
+
|
|
312
|
+
recover(): void;
|
|
313
|
+
|
|
314
|
+
onRecovery(hook: () => void): () => void;
|
|
276
315
|
disconnect(): void;
|
|
277
316
|
}
|
|
278
317
|
|
|
318
|
+
declare const FOREGROUND_COALESCE_MS = 250;
|
|
319
|
+
|
|
320
|
+
declare function observePageLifecycle(onForeground: () => void): () => void;
|
|
321
|
+
|
|
279
322
|
declare function createStore(options: StoreOptions): Store & {
|
|
280
323
|
_getInternals(): {
|
|
281
324
|
multiplexer: ChannelMultiplexer;
|
|
@@ -359,4 +402,49 @@ declare class SessionAllocationError extends Error {
|
|
|
359
402
|
});
|
|
360
403
|
}
|
|
361
404
|
|
|
362
|
-
|
|
405
|
+
type CaptureKind = 'audio' | 'video';
|
|
406
|
+
type GetUserMedia = (constraints: MediaStreamConstraints) => Promise<MediaStream>;
|
|
407
|
+
|
|
408
|
+
declare class CaptureUnavailableError extends Error {
|
|
409
|
+
constructor();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
interface CaptureClaim {
|
|
413
|
+
readonly kind: CaptureKind;
|
|
414
|
+
|
|
415
|
+
readonly track: MediaStreamTrack | null;
|
|
416
|
+
|
|
417
|
+
readonly stream: MediaStream | null;
|
|
418
|
+
|
|
419
|
+
update(constraints: MediaTrackConstraints): Promise<MediaStreamTrack>;
|
|
420
|
+
|
|
421
|
+
release(): void;
|
|
422
|
+
|
|
423
|
+
onTrack(listener: (track: MediaStreamTrack, stream: MediaStream) => void): () => void;
|
|
424
|
+
|
|
425
|
+
onLost(listener: (error: Error) => void): () => void;
|
|
426
|
+
}
|
|
427
|
+
interface CaptureControllerOptions {
|
|
428
|
+
|
|
429
|
+
getUserMedia?: GetUserMedia;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare class CaptureController {
|
|
433
|
+
private readonly claims;
|
|
434
|
+
private readonly injectedGetUserMedia?;
|
|
435
|
+
private queue;
|
|
436
|
+
constructor(options?: CaptureControllerOptions);
|
|
437
|
+
|
|
438
|
+
claim(kind: CaptureKind, constraints: MediaTrackConstraints): Promise<CaptureClaim>;
|
|
439
|
+
|
|
440
|
+
idle(): Promise<void>;
|
|
441
|
+
private enqueue;
|
|
442
|
+
private resolveGetUserMedia;
|
|
443
|
+
|
|
444
|
+
private converge;
|
|
445
|
+
private createState;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
declare function sharedCaptureController(): CaptureController;
|
|
449
|
+
|
|
450
|
+
export { App, App$1 as AppInterface, AppOptions, AttachOptions, type CaptureClaim, CaptureController, type CaptureControllerOptions, type CaptureKind, CaptureUnavailableError, ChunkReadable, DEFAULT_DOC_SYNC_TIMEOUT_MS, DEFAULT_WHEN_LIVE_TIMEOUT_MS, FOREGROUND_COALESCE_MS, InvalidDurationError, PermanentLockedError, type PhaseObservable, PinRequiresActiveTempError, Presence, type PrewakeOptions, type PrewakeResult, type PrewakeStatus, 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, SessionFailedError, SessionFailureKind, Session$1 as SessionInterface, SessionPhase, SessionPhaseName, SessionStatus, SessionStream$1 as SessionStream, Store, StoreOptions, StreamChunkOptions, StreamDirectionConflict, type VideoStreamOptions, type WhenLiveOptions, createRecordingsClient, createRuntimeArtifactsClient, createStore, describeSessionFailure, describeSessionPhase, isDurationString, isWakingPhase, normalizeRetention, observePageLifecycle, prewake, sessionFailureFromMediaError, sharedCaptureController, videoStream, whenLive };
|