@urun-sh/core 0.4.3 → 0.5.0

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/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{$ as m,G as r,M as t,N as n,O as a,P as s,U as p,V as c,W as l,a as e,aa as i,b as o,ba as S,ca as f,da as x,ea as C,fa as D}from"./chunk-SBNQYRRW.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,r as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,s as ensureNodeWebRTC,t as isNodeRuntime,n as nodeMediasoupHandlerName,a as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
2
+ import{H as r,N as t,O as n,P as a,Q as s,V as p,W as c,X as l,a as e,aa as m,b as o,ba as i,ca as S,da as f,ea as x,fa as C,ga as D}from"./chunk-XHXPCJYZ.mjs";export{e as ChannelMultiplexer,i as DOC_SYNC_WIRE_CONTRACT_VERSION,o as DeferredChannelMultiplexer,x as DeferredDocConnector,p as LoopbackStreamData,C as SessionDocumentImpl,m as TransportSession,r as allocateSession,D as createPresence,f as createWebsocketDocConnector,S as deriveYjsServerUrl,s as ensureNodeWebRTC,t as isNodeRuntime,n as nodeMediasoupHandlerName,a as nodeWebRTCUnavailableReason,l as streamDataLabel,c as transportStreamData};
@@ -463,9 +463,11 @@ interface RequestStreamOptions {
463
463
  }
464
464
 
465
465
  type SessionEndResult = {
466
- status: 'ended';
467
- requestId: string;
468
- platformStatus?: string;
466
+ status: 'paused';
467
+
468
+ sessionId: string;
469
+
470
+ reason: string;
469
471
  } | {
470
472
  status: 'canceled';
471
473
  requestId: string;
@@ -523,6 +525,8 @@ interface Session {
523
525
 
524
526
  end(): Promise<SessionEndResult>;
525
527
 
528
+ cancel(): Promise<SessionEndResult>;
529
+
526
530
  detach(): void;
527
531
 
528
532
  disconnect(): void;
@@ -678,6 +682,8 @@ interface App {
678
682
 
679
683
  type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled'
680
684
 
685
+ | 'paused'
686
+
681
687
  | 'redirect'
682
688
 
683
689
  | 'waiting_for_capacity'
@@ -757,9 +763,11 @@ interface AllocateSessionOptions {
757
763
 
758
764
  onAdmission?: (update: AdmissionUpdate) => void;
759
765
 
766
+
760
767
  onRequest?: (handle: {
761
768
  requestId: string;
762
769
  baseUrl: string;
770
+ sessionId?: string;
763
771
  }) => void;
764
772
 
765
773
  sessionKey?: string;
@@ -783,6 +791,8 @@ interface AllocatedSession {
783
791
  interface ReleaseSessionBeaconOptions {
784
792
  baseUrl: string;
785
793
  requestId: string;
794
+
795
+ sessionId?: string;
786
796
  orgId: string;
787
797
 
788
798
  jwt?: string;
@@ -463,9 +463,11 @@ interface RequestStreamOptions {
463
463
  }
464
464
 
465
465
  type SessionEndResult = {
466
- status: 'ended';
467
- requestId: string;
468
- platformStatus?: string;
466
+ status: 'paused';
467
+
468
+ sessionId: string;
469
+
470
+ reason: string;
469
471
  } | {
470
472
  status: 'canceled';
471
473
  requestId: string;
@@ -523,6 +525,8 @@ interface Session {
523
525
 
524
526
  end(): Promise<SessionEndResult>;
525
527
 
528
+ cancel(): Promise<SessionEndResult>;
529
+
526
530
  detach(): void;
527
531
 
528
532
  disconnect(): void;
@@ -678,6 +682,8 @@ interface App {
678
682
 
679
683
  type SessionGatewayStatus = 'allocated' | 'pending' | 'queued' | 'rejected' | 'failed' | 'canceled'
680
684
 
685
+ | 'paused'
686
+
681
687
  | 'redirect'
682
688
 
683
689
  | 'waiting_for_capacity'
@@ -757,9 +763,11 @@ interface AllocateSessionOptions {
757
763
 
758
764
  onAdmission?: (update: AdmissionUpdate) => void;
759
765
 
766
+
760
767
  onRequest?: (handle: {
761
768
  requestId: string;
762
769
  baseUrl: string;
770
+ sessionId?: string;
763
771
  }) => void;
764
772
 
765
773
  sessionKey?: string;
@@ -783,6 +791,8 @@ interface AllocatedSession {
783
791
  interface ReleaseSessionBeaconOptions {
784
792
  baseUrl: string;
785
793
  requestId: string;
794
+
795
+ sessionId?: string;
786
796
  orgId: string;
787
797
 
788
798
  jwt?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/core",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "Core transport and channel primitives for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",