@urun-sh/core 0.2.34 → 0.2.36
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-6HLCYJ7O.mjs +3 -0
- package/dist/chunk-TQBKKR7C.mjs +8 -0
- package/dist/index.browser.d.mts +5 -42
- package/dist/index.browser.d.ts +5 -42
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +5 -42
- package/dist/index.d.ts +5 -42
- package/dist/index.js +3 -3
- 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 +5 -5
- package/dist/internal.mjs +1 -1
- package/dist/{stream-data-8bdjS6Au.d.mts → stream-data-rsZLrJmS.d.mts} +107 -4
- package/dist/{stream-data-8bdjS6Au.d.ts → stream-data-rsZLrJmS.d.ts} +107 -4
- package/package.json +1 -1
- package/dist/chunk-73X4QNRW.mjs +0 -8
- package/dist/chunk-WBUDJHD7.mjs +0 -3
package/dist/internal.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __urunCreateRequire } from 'node:module'; const require = globalThis.require ?? __urunCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{D as r,G as t,H as a,I as n,K as s,L as p,M as m,N as c,O as i,P as l,Q as f,R as x,S,T as C,a as e,b as o}from"./chunk-TQBKKR7C.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,s as LoopbackStreamData,S as SessionDocumentImpl,c as TransportSession,r as allocateSession,C as createPresence,f as createWebsocketDocConnector,l as deriveYjsServerUrl,n as ensureNodeWebRTC,t as isNodeRuntime,a as nodeMediasoupHandlerName,m as streamDataLabel,p as transportStreamData};
|
|
@@ -470,7 +470,7 @@ interface AppOptions {
|
|
|
470
470
|
|
|
471
471
|
jwt?: string;
|
|
472
472
|
|
|
473
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
473
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
474
474
|
|
|
475
475
|
authProvider?: string;
|
|
476
476
|
|
|
@@ -484,7 +484,7 @@ interface AppOptions {
|
|
|
484
484
|
|
|
485
485
|
priority?: 'preempt';
|
|
486
486
|
}
|
|
487
|
-
interface AccessTokenOptions {
|
|
487
|
+
interface AccessTokenOptions$1 {
|
|
488
488
|
forceRefresh?: boolean;
|
|
489
489
|
reason?: 'initial' | 'unauthorized' | 'background';
|
|
490
490
|
}
|
|
@@ -499,7 +499,7 @@ interface AttachOptions {
|
|
|
499
499
|
|
|
500
500
|
jwt?: string;
|
|
501
501
|
|
|
502
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
502
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
503
503
|
|
|
504
504
|
authProvider?: string;
|
|
505
505
|
|
|
@@ -510,6 +510,109 @@ interface App {
|
|
|
510
510
|
[fnName: string]: (args?: Record<string, unknown>) => Session;
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
+
type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled';
|
|
514
|
+
interface SessionGatewayResponse {
|
|
515
|
+
status?: SessionGatewayStatus;
|
|
516
|
+
request_id?: string;
|
|
517
|
+
session_id?: string;
|
|
518
|
+
ws_url?: string;
|
|
519
|
+
|
|
520
|
+
ice_servers?: RTCIceServer[];
|
|
521
|
+
queued?: boolean;
|
|
522
|
+
retry_after_seconds?: number;
|
|
523
|
+
queue_position?: number;
|
|
524
|
+
queue_depth?: number;
|
|
525
|
+
|
|
526
|
+
runtime_state?: string;
|
|
527
|
+
|
|
528
|
+
runtime_reason?: string;
|
|
529
|
+
|
|
530
|
+
ends_at?: string;
|
|
531
|
+
error_code?: string;
|
|
532
|
+
error_message?: string;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface AdmissionUpdate {
|
|
536
|
+
|
|
537
|
+
status: 'queued' | 'pending';
|
|
538
|
+
|
|
539
|
+
requestId?: string;
|
|
540
|
+
|
|
541
|
+
queue?: {
|
|
542
|
+
position: number;
|
|
543
|
+
depth: number;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
runtime?: RuntimeAvailability;
|
|
547
|
+
}
|
|
548
|
+
interface AllocateSessionOptions {
|
|
549
|
+
baseUrl: string;
|
|
550
|
+
fallbackUrls?: readonly string[];
|
|
551
|
+
app: string;
|
|
552
|
+
functionName: string;
|
|
553
|
+
orgId: string;
|
|
554
|
+
jwt?: string;
|
|
555
|
+
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
556
|
+
authProvider?: string;
|
|
557
|
+
idempotencyKey: string;
|
|
558
|
+
|
|
559
|
+
onAdmission?: (update: AdmissionUpdate) => void;
|
|
560
|
+
|
|
561
|
+
onRequest?: (handle: {
|
|
562
|
+
requestId: string;
|
|
563
|
+
baseUrl: string;
|
|
564
|
+
}) => void;
|
|
565
|
+
|
|
566
|
+
sessionKey?: string;
|
|
567
|
+
|
|
568
|
+
priority?: 'preempt';
|
|
569
|
+
}
|
|
570
|
+
interface AccessTokenOptions {
|
|
571
|
+
forceRefresh?: boolean;
|
|
572
|
+
reason?: 'initial' | 'unauthorized' | 'background';
|
|
573
|
+
}
|
|
574
|
+
interface AllocatedSession {
|
|
575
|
+
baseUrl: string;
|
|
576
|
+
sessionId: string;
|
|
577
|
+
wsUrl: string;
|
|
578
|
+
|
|
579
|
+
endsAt: Date | null;
|
|
580
|
+
response: SessionGatewayResponse;
|
|
581
|
+
}
|
|
582
|
+
interface ReleaseSessionBeaconOptions {
|
|
583
|
+
baseUrl: string;
|
|
584
|
+
requestId: string;
|
|
585
|
+
orgId: string;
|
|
586
|
+
|
|
587
|
+
jwt?: string;
|
|
588
|
+
authProvider?: string;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
declare function releaseSessionBeacon(options: ReleaseSessionBeaconOptions): void;
|
|
592
|
+
declare function allocateSession(options: AllocateSessionOptions): Promise<AllocatedSession>;
|
|
593
|
+
interface PrewakeOptions {
|
|
594
|
+
baseUrl: string;
|
|
595
|
+
|
|
596
|
+
app: string;
|
|
597
|
+
|
|
598
|
+
functionName: string;
|
|
599
|
+
orgId: string;
|
|
600
|
+
jwt?: string;
|
|
601
|
+
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
602
|
+
authProvider?: string;
|
|
603
|
+
}
|
|
604
|
+
type PrewakeStatus = 'warming' | 'prebound' | 'unknown-app' | 'unavailable';
|
|
605
|
+
interface PrewakeResult {
|
|
606
|
+
|
|
607
|
+
status: PrewakeStatus;
|
|
608
|
+
|
|
609
|
+
expiresAt?: string;
|
|
610
|
+
|
|
611
|
+
warmCapable?: boolean;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare function prewake(options: PrewakeOptions): Promise<PrewakeResult>;
|
|
615
|
+
|
|
513
616
|
interface ChannelEndpoint {
|
|
514
617
|
on(channel: string, handler: (data: ChannelMessage) => void): () => void;
|
|
515
618
|
emit(channel: string, data: Record<string, unknown>): void;
|
|
@@ -917,4 +1020,4 @@ interface DataChannelTransport {
|
|
|
917
1020
|
|
|
918
1021
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
919
1022
|
|
|
920
|
-
export { type
|
|
1023
|
+
export { type SessionText as $, type AccessTokenOptions$1 as A, type RecordingsAccessor as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type ReleaseSessionBeaconOptions as E, type RequestOptions as F, type RequestStreamOptions as G, type RuntimeArtifact as H, type RuntimeArtifactDownload as I, type RuntimeArtifactsAccessor as J, type RuntimeAvailability as K, LoopbackStreamData as L, type MediaChunkBinding as M, type SessionDiagnostic as N, type SessionDocument as O, type Presence as P, SessionDocumentImpl as Q, type Recording as R, type Session as S, type SessionEndResult as T, type SessionFailureKind as U, type SessionPhase as V, type SessionPhaseError as W, type SessionPhaseName as X, type SessionStartOptions as Y, type SessionStatus as Z, type SessionStream as _, type AccessTokenOptions as a, type Store as a0, type StoreOptions as a1, type StreamChunkOptions as a2, type StreamDataTransport as a3, TransportSession as a4, type TransportSessionOptions as a5, type TransportState as a6, allocateSession as a7, createPresence as a8, createWebsocketDocConnector as a9, deriveYjsServerUrl as aa, isPendingRecording as ab, mediaRecorderChunkSource as ac, prewake as ad, releaseSessionBeacon as ae, streamDataLabel as af, transportStreamData as ag, type ActivationEvent as b, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type ChannelMessage as i, ChannelMultiplexer as j, type ChannelName as k, type ChunkReadable as l, DeferredChannelMultiplexer as m, DeferredDocConnector as n, type DocConnection as o, type DocConnector as p, type MediaChunkSource as q, type MediaChunkSourceFactory as r, type MediaRecorderChunkSourceOptions as s, type PresenceState as t, type PrewakeOptions as u, type PrewakeResult as v, type PrewakeStatus as w, type RecordingBucket as x, type RecordingLifecycle as y, type RecordingStatus as z };
|
|
@@ -470,7 +470,7 @@ interface AppOptions {
|
|
|
470
470
|
|
|
471
471
|
jwt?: string;
|
|
472
472
|
|
|
473
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
473
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
474
474
|
|
|
475
475
|
authProvider?: string;
|
|
476
476
|
|
|
@@ -484,7 +484,7 @@ interface AppOptions {
|
|
|
484
484
|
|
|
485
485
|
priority?: 'preempt';
|
|
486
486
|
}
|
|
487
|
-
interface AccessTokenOptions {
|
|
487
|
+
interface AccessTokenOptions$1 {
|
|
488
488
|
forceRefresh?: boolean;
|
|
489
489
|
reason?: 'initial' | 'unauthorized' | 'background';
|
|
490
490
|
}
|
|
@@ -499,7 +499,7 @@ interface AttachOptions {
|
|
|
499
499
|
|
|
500
500
|
jwt?: string;
|
|
501
501
|
|
|
502
|
-
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
502
|
+
getAccessToken?: (options?: AccessTokenOptions$1) => string | null | undefined | Promise<string | null | undefined>;
|
|
503
503
|
|
|
504
504
|
authProvider?: string;
|
|
505
505
|
|
|
@@ -510,6 +510,109 @@ interface App {
|
|
|
510
510
|
[fnName: string]: (args?: Record<string, unknown>) => Session;
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
+
type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled';
|
|
514
|
+
interface SessionGatewayResponse {
|
|
515
|
+
status?: SessionGatewayStatus;
|
|
516
|
+
request_id?: string;
|
|
517
|
+
session_id?: string;
|
|
518
|
+
ws_url?: string;
|
|
519
|
+
|
|
520
|
+
ice_servers?: RTCIceServer[];
|
|
521
|
+
queued?: boolean;
|
|
522
|
+
retry_after_seconds?: number;
|
|
523
|
+
queue_position?: number;
|
|
524
|
+
queue_depth?: number;
|
|
525
|
+
|
|
526
|
+
runtime_state?: string;
|
|
527
|
+
|
|
528
|
+
runtime_reason?: string;
|
|
529
|
+
|
|
530
|
+
ends_at?: string;
|
|
531
|
+
error_code?: string;
|
|
532
|
+
error_message?: string;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface AdmissionUpdate {
|
|
536
|
+
|
|
537
|
+
status: 'queued' | 'pending';
|
|
538
|
+
|
|
539
|
+
requestId?: string;
|
|
540
|
+
|
|
541
|
+
queue?: {
|
|
542
|
+
position: number;
|
|
543
|
+
depth: number;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
runtime?: RuntimeAvailability;
|
|
547
|
+
}
|
|
548
|
+
interface AllocateSessionOptions {
|
|
549
|
+
baseUrl: string;
|
|
550
|
+
fallbackUrls?: readonly string[];
|
|
551
|
+
app: string;
|
|
552
|
+
functionName: string;
|
|
553
|
+
orgId: string;
|
|
554
|
+
jwt?: string;
|
|
555
|
+
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
556
|
+
authProvider?: string;
|
|
557
|
+
idempotencyKey: string;
|
|
558
|
+
|
|
559
|
+
onAdmission?: (update: AdmissionUpdate) => void;
|
|
560
|
+
|
|
561
|
+
onRequest?: (handle: {
|
|
562
|
+
requestId: string;
|
|
563
|
+
baseUrl: string;
|
|
564
|
+
}) => void;
|
|
565
|
+
|
|
566
|
+
sessionKey?: string;
|
|
567
|
+
|
|
568
|
+
priority?: 'preempt';
|
|
569
|
+
}
|
|
570
|
+
interface AccessTokenOptions {
|
|
571
|
+
forceRefresh?: boolean;
|
|
572
|
+
reason?: 'initial' | 'unauthorized' | 'background';
|
|
573
|
+
}
|
|
574
|
+
interface AllocatedSession {
|
|
575
|
+
baseUrl: string;
|
|
576
|
+
sessionId: string;
|
|
577
|
+
wsUrl: string;
|
|
578
|
+
|
|
579
|
+
endsAt: Date | null;
|
|
580
|
+
response: SessionGatewayResponse;
|
|
581
|
+
}
|
|
582
|
+
interface ReleaseSessionBeaconOptions {
|
|
583
|
+
baseUrl: string;
|
|
584
|
+
requestId: string;
|
|
585
|
+
orgId: string;
|
|
586
|
+
|
|
587
|
+
jwt?: string;
|
|
588
|
+
authProvider?: string;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
declare function releaseSessionBeacon(options: ReleaseSessionBeaconOptions): void;
|
|
592
|
+
declare function allocateSession(options: AllocateSessionOptions): Promise<AllocatedSession>;
|
|
593
|
+
interface PrewakeOptions {
|
|
594
|
+
baseUrl: string;
|
|
595
|
+
|
|
596
|
+
app: string;
|
|
597
|
+
|
|
598
|
+
functionName: string;
|
|
599
|
+
orgId: string;
|
|
600
|
+
jwt?: string;
|
|
601
|
+
getAccessToken?: (options?: AccessTokenOptions) => string | null | undefined | Promise<string | null | undefined>;
|
|
602
|
+
authProvider?: string;
|
|
603
|
+
}
|
|
604
|
+
type PrewakeStatus = 'warming' | 'prebound' | 'unknown-app' | 'unavailable';
|
|
605
|
+
interface PrewakeResult {
|
|
606
|
+
|
|
607
|
+
status: PrewakeStatus;
|
|
608
|
+
|
|
609
|
+
expiresAt?: string;
|
|
610
|
+
|
|
611
|
+
warmCapable?: boolean;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare function prewake(options: PrewakeOptions): Promise<PrewakeResult>;
|
|
615
|
+
|
|
513
616
|
interface ChannelEndpoint {
|
|
514
617
|
on(channel: string, handler: (data: ChannelMessage) => void): () => void;
|
|
515
618
|
emit(channel: string, data: Record<string, unknown>): void;
|
|
@@ -917,4 +1020,4 @@ interface DataChannelTransport {
|
|
|
917
1020
|
|
|
918
1021
|
declare function transportStreamData(transport: DataChannelTransport): StreamDataTransport;
|
|
919
1022
|
|
|
920
|
-
export { type
|
|
1023
|
+
export { type SessionText as $, type AccessTokenOptions$1 as A, type RecordingsAccessor as B, type ChannelEndpoint as C, DOC_SYNC_WIRE_CONTRACT_VERSION as D, type ReleaseSessionBeaconOptions as E, type RequestOptions as F, type RequestStreamOptions as G, type RuntimeArtifact as H, type RuntimeArtifactDownload as I, type RuntimeArtifactsAccessor as J, type RuntimeAvailability as K, LoopbackStreamData as L, type MediaChunkBinding as M, type SessionDiagnostic as N, type SessionDocument as O, type Presence as P, SessionDocumentImpl as Q, type Recording as R, type Session as S, type SessionEndResult as T, type SessionFailureKind as U, type SessionPhase as V, type SessionPhaseError as W, type SessionPhaseName as X, type SessionStartOptions as Y, type SessionStatus as Z, type SessionStream as _, type AccessTokenOptions as a, type Store as a0, type StoreOptions as a1, type StreamChunkOptions as a2, type StreamDataTransport as a3, TransportSession as a4, type TransportSessionOptions as a5, type TransportState as a6, allocateSession as a7, createPresence as a8, createWebsocketDocConnector as a9, deriveYjsServerUrl as aa, isPendingRecording as ab, mediaRecorderChunkSource as ac, prewake as ad, releaseSessionBeacon as ae, streamDataLabel as af, transportStreamData as ag, type ActivationEvent as b, type ActivationState as c, type AllocateSessionOptions as d, type AllocatedSession as e, type App as f, type AppOptions as g, type AttachOptions as h, type ChannelMessage as i, ChannelMultiplexer as j, type ChannelName as k, type ChunkReadable as l, DeferredChannelMultiplexer as m, DeferredDocConnector as n, type DocConnection as o, type DocConnector as p, type MediaChunkSource as q, type MediaChunkSourceFactory as r, type MediaRecorderChunkSourceOptions as s, type PresenceState as t, type PrewakeOptions as u, type PrewakeResult as v, type PrewakeStatus as w, type RecordingBucket as x, type RecordingLifecycle as y, type RecordingStatus as z };
|