openrtc 2.0.0-rc.3 → 2.0.0-rc.30

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.
Files changed (89) hide show
  1. package/README.md +12 -8
  2. package/dist/{DelegatingRuntimeAdapter-DqfHkjLy.d.ts → DelegatingRuntimeAdapter-BFZDC604.d.ts} +32 -8
  3. package/dist/{types-BVJr065k.d.ts → ITransport-WV6gGMnX.d.ts} +42 -3
  4. package/dist/IpcRuntimeAdapter-CJq3dRBF.d.ts +19 -0
  5. package/dist/OpenRTCShared.d.ts +250 -0
  6. package/dist/OpenRTCShared.js +1 -0
  7. package/dist/WasmBridge-5GYKXPXK.js +1 -0
  8. package/dist/{OpenRTCShared-ZQPu5LqL.d.ts → assembly-q0jRRpsc.d.ts} +50 -250
  9. package/dist/{capabilities-YSskrE8H.d.ts → capabilities-BfZi4Cd7.d.ts} +4 -0
  10. package/dist/chunk-45WBH7E3.js +1 -0
  11. package/dist/chunk-7FPG3MFF.js +2 -0
  12. package/dist/chunk-AG2F6MOB.js +1 -0
  13. package/dist/chunk-CWGKLGJZ.js +1 -0
  14. package/dist/{chunk-A3IAG6EL.js → chunk-D2OJN5S5.js} +1 -1
  15. package/dist/chunk-DUY34MGT.js +1 -0
  16. package/dist/chunk-H5R5ZXXN.js +3 -0
  17. package/dist/chunk-KJTJLLJE.js +2 -0
  18. package/dist/{chunk-7Z6N46RB.js → chunk-LRT5GEGH.js} +2 -2
  19. package/dist/chunk-NRXEG5GQ.js +1 -0
  20. package/dist/chunk-OEVPKC3W.js +1 -0
  21. package/dist/chunk-VBUDERMM.js +2 -0
  22. package/dist/chunk-VOCOZ57Q.js +2 -0
  23. package/dist/chunk-XPL7PUBW.js +2 -0
  24. package/dist/chunk-Z2WVSXPW.js +1 -0
  25. package/dist/chunk-Z6TZLF4B.js +1 -0
  26. package/dist/controlPlane-P66ZTVNW.js +2 -0
  27. package/dist/deviceEnrollment-GL4JPVGG.js +2 -0
  28. package/dist/deviceKey-SBNKLVYF.js +1 -0
  29. package/dist/deviceManagement-PHY5TIOS.js +1 -0
  30. package/dist/deviceProfile-3BEQZLJF.js +2 -0
  31. package/dist/deviceRoster-VZA3TQOR.js +1 -0
  32. package/dist/dist-FIVA6EPA.js +277 -0
  33. package/dist/index.d.ts +10 -8
  34. package/dist/index.js +1 -1
  35. package/dist/ipcFactory-B6HBECSU.js +1 -0
  36. package/dist/native.d.ts +7 -8
  37. package/dist/native.js +1 -1
  38. package/dist/openrtc-WUVUMBQY.js +2 -0
  39. package/dist/openrtc_bg.wasm +0 -0
  40. package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -4
  41. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  42. package/dist/runtime/device-status.d.ts +2 -4
  43. package/dist/runtime/factories.d.ts +21 -0
  44. package/dist/runtime/factories.js +1 -0
  45. package/dist/runtime/index.d.ts +30 -78
  46. package/dist/runtime/index.js +1 -2
  47. package/dist/testing.d.ts +9 -18
  48. package/dist/testing.js +1 -1
  49. package/dist/transport/index.d.ts +2 -3
  50. package/dist/transport/index.js +1 -1
  51. package/dist/{types-DkgaCyqS.d.ts → types-DVNSd5B9.d.ts} +71 -4
  52. package/dist/{types-DNl4KHHY.d.ts → types-Di034GVQ.d.ts} +112 -16
  53. package/package.json +3 -27
  54. package/dist/IEngineBridge-BbsT8hof.d.ts +0 -17
  55. package/dist/ITransport-BsPcaov7.d.ts +0 -16
  56. package/dist/OpenRTCShared-TKAQLONA.js +0 -1
  57. package/dist/WasmBridge-2A22U7RU.js +0 -1
  58. package/dist/auth/index.d.ts +0 -78
  59. package/dist/auth/index.js +0 -1
  60. package/dist/auth/internal.d.ts +0 -4
  61. package/dist/auth/internal.js +0 -1
  62. package/dist/chunk-2QHDEGVX.js +0 -1
  63. package/dist/chunk-3USHQ7QW.js +0 -3
  64. package/dist/chunk-5LRLWIT5.js +0 -1
  65. package/dist/chunk-6TAVJ46R.js +0 -1
  66. package/dist/chunk-7H2JPCBN.js +0 -1
  67. package/dist/chunk-BXFXPIXO.js +0 -1
  68. package/dist/chunk-C7YN5MSV.js +0 -1
  69. package/dist/chunk-F2XGNLXL.js +0 -2
  70. package/dist/chunk-GW7P3D54.js +0 -1
  71. package/dist/chunk-K37WVIZL.js +0 -1
  72. package/dist/chunk-N26S7V4N.js +0 -1
  73. package/dist/chunk-N4SX7C3W.js +0 -2
  74. package/dist/chunk-NB4H5TP3.js +0 -1
  75. package/dist/chunk-NT5YHZQH.js +0 -1
  76. package/dist/chunk-PODAMIL6.js +0 -2
  77. package/dist/chunk-PRVFZI2T.js +0 -1
  78. package/dist/chunk-RD3JEGGF.js +0 -2
  79. package/dist/chunk-UEYM6WTT.js +0 -2
  80. package/dist/chunk-VK6KX433.js +0 -1
  81. package/dist/chunk-YBXGNKM7.js +0 -2
  82. package/dist/factories-LI53SFLH.js +0 -1
  83. package/dist/ipcFactory-QY44OIKA.js +0 -1
  84. package/dist/openrtc-UU4BBJLG.js +0 -2
  85. package/dist/runtime/legacy.d.ts +0 -18
  86. package/dist/runtime/legacy.js +0 -1
  87. package/dist/runtime/tauri.d.ts +0 -6
  88. package/dist/runtime/tauri.js +0 -1
  89. package/dist/tauri-Cz9n17g8.d.ts +0 -33
@@ -1,17 +0,0 @@
1
- type AuthContext = {
2
- userId: string;
3
- token?: string | null;
4
- refreshToken?: string | null;
5
- customToken?: string | null;
6
- tokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
7
- /**
8
- * Supplies the platform attestation token required by the configured
9
- * control plane. Firebase-backed hosted deployments use App Check today;
10
- * keeping acquisition on the auth context prevents coordination code from
11
- * owning a second Firebase app or assuming one global project.
12
- */
13
- appCheckTokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
14
- expiresAtMs?: number | null;
15
- };
16
-
17
- export type { AuthContext as A };
@@ -1,16 +0,0 @@
1
- interface ITransport {
2
- readonly name: string;
3
- readonly isReady: boolean;
4
- init(localNodeId: string, remoteNodeId: string, options: any): Promise<void>;
5
- send(data: Uint8Array): Promise<void>;
6
- close(): void;
7
- onMessage(callback: (data: Uint8Array) => void): void;
8
- onStateChange(callback: (state: 'connecting' | 'connected' | 'failed' | 'disconnected') => void): void;
9
- handleSignalingMessage?(msg: any): void;
10
- getSignalingHandler?(): (msg: any) => Promise<void>;
11
- getNativeTransport?(): any;
12
- getNegotiationId?(): string | null;
13
- getDataChannelReadyState?(): string | null;
14
- }
15
-
16
- export type { ITransport as I };
@@ -1 +0,0 @@
1
- export{a as resolveOptions,b as wrapAssembly}from'./chunk-2QHDEGVX.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';
@@ -1 +0,0 @@
1
- export{w as WasmBridge}from'./chunk-YBXGNKM7.js';import'./chunk-VK6KX433.js';import'./chunk-NT5YHZQH.js';import'./chunk-N26S7V4N.js';import'./chunk-NB4H5TP3.js';import'./chunk-RD3JEGGF.js';import'./chunk-C7YN5MSV.js';
@@ -1,78 +0,0 @@
1
- import { FirebaseApp } from 'firebase/app';
2
- import { Functions } from 'firebase/functions';
3
- import { User, Auth } from 'firebase/auth';
4
-
5
- type ProviderName = 'google' | 'apple';
6
- interface SignInCredentialPayload {
7
- provider: ProviderName;
8
- idToken: string;
9
- accessToken?: string;
10
- nonce?: string;
11
- isCustomToken?: boolean;
12
- callbackId?: string;
13
- email?: string;
14
- displayName?: string;
15
- photoURL?: string;
16
- }
17
- type DesktopAuthRelay = (payload: {
18
- authToken: string | null;
19
- refreshToken: string | null;
20
- }) => Promise<void> | void;
21
- declare function registerDesktopAuthRelay(relay: DesktopAuthRelay | null): void;
22
- declare class AuthHost {
23
- private app;
24
- private auth;
25
- private functions;
26
- private appCheck;
27
- private persistenceReady;
28
- private redirectResultPromise;
29
- private redirectResultConsumed;
30
- private lastRelayedToken;
31
- private lastRelayedRefreshToken;
32
- private syncDesktopAuthToken;
33
- constructor();
34
- getApp(): FirebaseApp;
35
- getFunctions(): Functions;
36
- getAppCheckToken(forceRefresh?: boolean): Promise<string | null>;
37
- getCurrentUser(): User | null;
38
- getAuth(): Auth;
39
- onAuthStateChanged(callback: (user: User | null) => void): () => void;
40
- onIdTokenChanged(callback: (user: User | null) => void): () => void;
41
- getIdToken(options?: {
42
- forceRefresh?: boolean;
43
- }): Promise<string | null>;
44
- checkForSSOToken(): Promise<void>;
45
- signInWithCustomTokenValue(token: string): Promise<User>;
46
- signInWithPluto(options?: {
47
- redirectUri?: string;
48
- authorizeBaseUrl?: string;
49
- }): Promise<void>;
50
- waitForAuth(): Promise<void>;
51
- signInAnonymously(): Promise<void>;
52
- signIn(email: string, password: string): Promise<User>;
53
- signUp(email: string, password: string): Promise<User>;
54
- signOut(): Promise<void>;
55
- deleteAccount(): Promise<void>;
56
- signInWithCredential(payload: SignInCredentialPayload): Promise<User>;
57
- private mintSessionTokenFromProviderToken;
58
- signInWithPopup(provider: ProviderName): Promise<{
59
- idToken: string;
60
- refreshToken?: string;
61
- }>;
62
- signInWithRedirect(provider: ProviderName, options?: {
63
- nonce?: string;
64
- }): Promise<void>;
65
- consumeRedirectResult(): Promise<{
66
- fromRedirect: boolean;
67
- user: User | null;
68
- providerId?: string | null;
69
- idToken?: string | null;
70
- } | null>;
71
- startGoogleSignIn(): Promise<void>;
72
- startAppleSignIn(): Promise<void>;
73
- mintSessionToken(): Promise<string>;
74
- }
75
- declare function getAuthHost(): AuthHost;
76
- declare const authHost: AuthHost;
77
-
78
- export { authHost, getAuthHost, registerDesktopAuthRelay };
@@ -1 +0,0 @@
1
- import {c}from'../chunk-N4SX7C3W.js';export{d as authHost,b as getAuthHost,a as registerDesktopAuthRelay}from'../chunk-N4SX7C3W.js';import'../chunk-BXFXPIXO.js';import'../chunk-N26S7V4N.js';import'../chunk-NB4H5TP3.js';import'../chunk-RD3JEGGF.js';import'../chunk-C7YN5MSV.js';c();
@@ -1,4 +0,0 @@
1
- export { registerDesktopAuthRelay } from './index.js';
2
- import 'firebase/app';
3
- import 'firebase/functions';
4
- import 'firebase/auth';
@@ -1 +0,0 @@
1
- import {c}from'../chunk-N4SX7C3W.js';export{a as registerDesktopAuthRelay}from'../chunk-N4SX7C3W.js';import'../chunk-BXFXPIXO.js';import'../chunk-N26S7V4N.js';import'../chunk-NB4H5TP3.js';import'../chunk-RD3JEGGF.js';import'../chunk-C7YN5MSV.js';c();
@@ -1 +0,0 @@
1
- import {r}from'./chunk-RD3JEGGF.js';function O(i){let s=r({...i});if("auth"in i&&!i.authMode){let n=i.auth;s.authMode=n==="none"?"anonymous":n;}if("identity"in i){let n=i.identity,r=n==="temporary"?"ephemeral":n;!i.deviceIdPersistence&&!i.nodeIdPersistence&&(s.deviceIdPersistence=r),!i.endpointIdPersistence&&!i.nodeIdPersistence&&(s.endpointIdPersistence=r);}return "namespace"in i&&!i.storagePrefix&&(s.storagePrefix=i.namespace),"privacy"in i&&i.strictMode===void 0&&(s.strictMode=!!i.privacy),s}function I(i,s){let n=i.runtime,r=Object.create(n),l=async e=>{if(typeof e!="string")return e;let o=(await n.listDevices()).find(c=>c.deviceId===e);if(!o)throw new Error(`OpenRTC device '${e}' is not currently discoverable.`);return o},u=async e=>({...e,localDeviceId:e?.localDeviceId??await n.getLocalDeviceId()??""}),R=async e=>{let{device:t,scope:o,...c}=e,a=c.deviceId??(typeof t=="string"?t:t?.deviceId)??null,m=c.ticket??(typeof t=="string"?void 0:t?.ticket);a&&!m&&(m=(await l(a).catch(()=>null))?.ticket);let d={...c,scope:o??"session"};return a&&(d.deviceId=a),m&&(d.ticket=m),d},g={list:()=>n.listDevices(),startSession:(e={})=>n.startManagedSession({...e,platform:e.platform??s}),stopSession:e=>n.stopManagedSession(e),listWithStatus:()=>n.listDevicesWithStatus(),watch:e=>n.watchDevices(e),watchWithStatus:e=>n.watchDevicesWithStatus(e),connect:async(e,t)=>n.connectDevice(await l(e),await u(t)),connectWithRetry:async(e,t,o)=>n.connectDeviceWithRetry(await l(e),t,o),disconnect:e=>n.disconnectDevice(e),update:(e,t)=>n.updateDevice(e,t),delete:e=>n.deleteDevice(e),localId:()=>n.getLocalDeviceId(),localInfo:()=>n.getLocalDeviceInfo(),localProfile:e=>n.getLocalDeviceProfile(e),updateLocalName:e=>n.updateLocalDeviceName(e)},v={watch:e=>n.watchPeerStates(e),watchLifecycle:e=>n.watchPeerLifecycle(e),get:e=>n.getPeerState(e),listConnected:()=>n.listConnectedPeers(),connect:e=>n.connectPeer(e),disconnect:(e,t)=>n.disconnectPeer(e,t),forceDisconnect:e=>n.forceDisconnectPeer(e),session:e=>n.getPeerSession(e),sessions:()=>n.listPeerSessions(),waitConnected:(e,t)=>n.waitForConnectedPeer(e,t),readiness:(e,t)=>n.getPeerReadiness(e,t),health:e=>n.getPeerHealth(e),identity:e=>n.resolvePeerIdentity(e),addScope:(e,t)=>n.addPeerScope(e,t),releaseScope:(e,t)=>n.releasePeerScope(e,t),scopes:e=>n.getPeerScopes(e),refresh:()=>n.refreshPeerSnapshot()},C={register:e=>n.registerChannel(e),unregister:e=>n.unregisterChannel(e),list:()=>n.listChannels(),openBi:(e,t,o)=>n.openPeerBi(e,{...o,channelId:t}),openUni:(e,t,o)=>n.openPeerUni(e,{...o,channelId:t}),onIncoming:e=>n.onIncomingStream(e),onIncomingChannel:(e,t)=>n.onIncomingChannelStream(e,o=>{if(o.channel)return t(o)}),connect:async e=>n.connectScopedChannel(await R(e)),connectScoped:e=>n.connectScopedChannel(e)},P={create:e=>n.createRoom(e),join:(e,t)=>n.joinRoom(e,t),leave:e=>n.leaveRoom(e),watch:(e,t)=>n.watchRoom(e,t),members:e=>n.getRoomMembers(e)},h={raw:()=>n.getInvite(),share:e=>n.getTicketWithToken("share",e?.maxConnections??1),grant:(e,t)=>n.getTicketWithToken(e,t?.maxConnections??0),revoke:e=>n.revokeTokensByScope(e)},S={status:()=>n.getRuntimeStatus(),policy:()=>n.getRuntimePolicy(),capabilities:()=>n.getRuntimeCapabilities(),capabilityProfile:()=>n.getCapabilityProfile(),connectionStates:()=>n.getConnectionStates(),onConnectionStateChange:e=>n.onConnectionStateChange(e),connections:()=>n.getConnections(),applicationReadyConnections:e=>n.getApplicationReadyConnections(e),onConnection:e=>n.onConnection(e),onDisconnection:e=>n.onDisconnection(e),onConnectionEvent:e=>n.onConnectionEvent(e),forceReconnectSnapshot:()=>n.forceReconnectSnapshot(),peerReconciliation:()=>n.getPeerReconciliationStats()},b={runtime:n,assembly:i,nodeId:()=>n.getNodeId(),nodeIdFromTicket:e=>n.getNodeIdFromTicket(e),endpointTicket:()=>n.getEndpointTicket(),connectRaw:e=>n.connectRaw(e),openBi:e=>n.openBi(e),openUni:e=>n.openUni(e),isConnected:e=>n.isConnected(e),disconnectNode:e=>n.disconnectNode(e),setAutoConnectExcluded:(e,t)=>n.setAutoConnectExcluded(e,t),notifyNetworkChange:e=>n.notifyNetworkChange(e)};return Object.defineProperties(r,{devices:{get:()=>g,enumerable:true},peers:{get:()=>v,enumerable:true},channels:{get:()=>C,enumerable:true},rooms:{get:()=>P,enumerable:true},tickets:{get:()=>h,enumerable:true},diagnostics:{get:()=>S,enumerable:true},advanced:{get:()=>b,enumerable:true},setAuth:{value:e=>i.setAuthContext(e),enumerable:true,writable:true,configurable:true},setAuthContext:{value:e=>i.setAuthContext(e),enumerable:true,writable:true,configurable:true},syncPlutoAuth:{value:e=>i.syncPlutoAuth(e),enumerable:true,writable:true,configurable:true},bindPlutoAuthHost:{value:()=>i.bindPlutoAuthHost(),enumerable:true,writable:true,configurable:true},signIn:{value:()=>i.signInWithPluto(),enumerable:true,writable:true,configurable:true},signOut:{value:()=>i.signOut(),enumerable:true,writable:true,configurable:true},runtime:{get:()=>n,enumerable:false},_assembly:{get:()=>i,enumerable:false}}),r}export{O as a,I as b};