openrtc 2.0.0-rc.12 → 2.0.0-rc.13

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 (66) hide show
  1. package/dist/{DelegatingRuntimeAdapter-BLNigcS4.d.ts → DelegatingRuntimeAdapter-Btvzi1s9.d.ts} +2 -2
  2. package/dist/OpenRTCShared-LDKG5RPN.js +1 -0
  3. package/dist/WasmBridge-7AS445EV.js +1 -0
  4. package/dist/chunk-GBIGWN5H.js +3 -0
  5. package/dist/{chunk-4UZFT2P6.js → chunk-MHQHFEYX.js} +1 -1
  6. package/dist/chunk-PQK5SJ47.js +1 -0
  7. package/dist/{chunk-23XC6TGK.js → chunk-QGGQ3SRF.js} +1 -1
  8. package/dist/{chunk-RD3JEGGF.js → chunk-QHSM5NFZ.js} +2 -2
  9. package/dist/{chunk-KWXAZUAZ.js → chunk-RLRBSNLB.js} +1 -1
  10. package/dist/{chunk-7Z6N46RB.js → chunk-RRMBD5OL.js} +1 -1
  11. package/dist/chunk-TAGQBG3A.js +2 -0
  12. package/dist/chunk-Z2WVSXPW.js +1 -0
  13. package/dist/chunk-ZI47WSO6.js +1 -0
  14. package/dist/dist-FIVA6EPA.js +277 -0
  15. package/dist/factories-CKVQIMP6.js +1 -0
  16. package/dist/index.d.ts +4 -6
  17. package/dist/index.js +1 -1
  18. package/dist/ipcFactory-KNWHT65X.js +1 -0
  19. package/dist/native.d.ts +4 -7
  20. package/dist/native.js +1 -1
  21. package/dist/openrtc-CBUEX4W4.js +2 -0
  22. package/dist/openrtc_bg.wasm +0 -0
  23. package/dist/runtime/WasmRuntimeAdapter.d.ts +2 -2
  24. package/dist/runtime/WasmRuntimeAdapter.js +1 -1
  25. package/dist/runtime/device-status.d.ts +2 -2
  26. package/dist/runtime/index.d.ts +22 -59
  27. package/dist/runtime/index.js +1 -2
  28. package/dist/testing.d.ts +7 -17
  29. package/dist/testing.js +1 -1
  30. package/dist/transport/index.d.ts +2 -2
  31. package/dist/transport/index.js +1 -1
  32. package/dist/{OpenRTCShared-BswnbjpG.d.ts → types-1ivghCqV.d.ts} +257 -7
  33. package/dist/{types-D0pqNSOf.d.ts → types-Br65RHyy.d.ts} +2 -2
  34. package/dist/{types-BHePJWbM.d.ts → types-DHuvdODq.d.ts} +1 -1
  35. package/package.json +1 -25
  36. package/dist/OpenRTCShared-TKAQLONA.js +0 -1
  37. package/dist/WasmBridge-FBEUEAFX.js +0 -1
  38. package/dist/auth/index.d.ts +0 -78
  39. package/dist/auth/index.js +0 -1
  40. package/dist/auth/internal.d.ts +0 -4
  41. package/dist/auth/internal.js +0 -1
  42. package/dist/chunk-2QHDEGVX.js +0 -1
  43. package/dist/chunk-3HCG7RQF.js +0 -2
  44. package/dist/chunk-7LYYPXCV.js +0 -1
  45. package/dist/chunk-AHHBPPQW.js +0 -3
  46. package/dist/chunk-BXFXPIXO.js +0 -1
  47. package/dist/chunk-EXE6ZAE7.js +0 -1
  48. package/dist/chunk-I4TY5LGB.js +0 -1
  49. package/dist/chunk-K37WVIZL.js +0 -1
  50. package/dist/chunk-N26S7V4N.js +0 -1
  51. package/dist/chunk-N4SX7C3W.js +0 -2
  52. package/dist/chunk-NB4H5TP3.js +0 -1
  53. package/dist/chunk-PDXJVQ7Z.js +0 -2
  54. package/dist/chunk-Q4QVXWCW.js +0 -1
  55. package/dist/chunk-RKLFCEAL.js +0 -1
  56. package/dist/chunk-VK6KX433.js +0 -1
  57. package/dist/factories-OKSJ3MCY.js +0 -1
  58. package/dist/ipc-CflAVodw.d.ts +0 -11
  59. package/dist/ipcFactory-MDM3O5ZJ.js +0 -1
  60. package/dist/openrtc-C53CKZUM.js +0 -2
  61. package/dist/runtime/legacy.d.ts +0 -18
  62. package/dist/runtime/legacy.js +0 -1
  63. package/dist/runtime/tauri.d.ts +0 -6
  64. package/dist/runtime/tauri.js +0 -1
  65. package/dist/tauri-BgLgJoQA.d.ts +0 -33
  66. package/dist/types-byWIP-WI.d.ts +0 -234
@@ -1,234 +0,0 @@
1
- import { O as OpenRTCPeerNamespace, a as OpenRTCChannelNamespace, b as OpenRTCDiagnosticsNamespace, c as OpenRTCDeviceNamespace } from './OpenRTCShared-BswnbjpG.js';
2
- import { R as RuntimeChannelDescriptor } from './types-D0pqNSOf.js';
3
-
4
- interface OpenRTCAuthProvider {
5
- /** Registered provider ID from the developer app capability manifest. */
6
- readonly providerId?: string;
7
- /**
8
- * Stable, non-secret, local-only identifier for the currently signed-in
9
- * principal. It changes on login, logout, or account switch, but never for
10
- * an ordinary access-token refresh. OpenRTC hashes this value together
11
- * with the app and installation-key thumbprint before persisting a lookup.
12
- *
13
- * Optional during the 2.0 RC compatibility window. Providers that omit it
14
- * use the assertion-first flow and remain correct, but cannot skip the
15
- * assertion exchange on a cold process start.
16
- */
17
- getSessionKey?(): Promise<string | null>;
18
- getAssertion(input: {
19
- audience: 'https://api.openrtc.app/v2/assertions/exchange';
20
- forceRefresh: boolean;
21
- /**
22
- * Stable OpenRTC installation ID being enrolled. Consumer backends
23
- * may bind product admission (for example a paid device allowance) to
24
- * this value in the signed assertion. It is supplied only for an
25
- * enrollment/renewal assertion, never for hourly gateway refreshes.
26
- */
27
- deviceId: string;
28
- }): Promise<string | null>;
29
- /**
30
- * Optional identity-epoch observer. Notify only when the signed-in
31
- * principal/session changes (login, logout, account switch, or explicit
32
- * revocation). Do not notify for ordinary OAuth/Firebase access-token
33
- * refreshes: OpenRTC refreshes its own avenue grant in place.
34
- */
35
- subscribe?(listener: (event: {
36
- type: 'principal-changed';
37
- sessionKey: string | null;
38
- }) => void): () => void;
39
- }
40
- interface OpenRTCEnrolledDevice {
41
- deviceId: string;
42
- name?: string;
43
- platform?: string;
44
- enrolledAtMs: number | null;
45
- lastGrantAtMs: number | null;
46
- current: boolean;
47
- }
48
- interface OpenRTCAttestationProvider {
49
- readonly kind: 'firebase-app-check' | 'apple-app-attest' | 'play-integrity' | `custom:${string}`;
50
- /**
51
- * Describes what the provider actually signs. Reusable app-integrity
52
- * tokens (for example Firebase App Check) do not become request-bound just
53
- * because OpenRTC supplies an enrollment challenge. The server derives and
54
- * enforces the authoritative binding from the registered provider kind;
55
- * this field keeps host integrations and diagnostics honest.
56
- */
57
- readonly evidenceBinding: 'app-session' | 'request-challenge';
58
- getEvidence(input: {
59
- challenge: string;
60
- apiKey: string;
61
- }): Promise<{
62
- token: string;
63
- }>;
64
- }
65
- /**
66
- * Optional consumer-owned bot challenge. Core OpenRTC does not render a UI or
67
- * load a CAPTCHA dependency; the host supplies a fresh token only when its
68
- * developer manifest requires anonymous capability verification.
69
- */
70
- interface OpenRTCBotVerificationProvider {
71
- getToken(input: {
72
- action: 'openrtc_capability';
73
- apiKey: string;
74
- }): Promise<string>;
75
- }
76
- interface OpenRTCUsageUpdate {
77
- sessionCreditsUsd: number;
78
- operation: string;
79
- estimated: boolean;
80
- }
81
- interface OpenRTCUsageWarning extends OpenRTCUsageUpdate {
82
- thresholdCreditsUsd: number;
83
- kind: 'warning' | 'session-limit';
84
- }
85
- interface OpenRTCTransportPreferences {
86
- iroh?: boolean;
87
- webrtc?: boolean;
88
- relay?: boolean;
89
- moq?: boolean;
90
- ble?: boolean;
91
- /**
92
- * Advanced privacy mode. `relay-only` suppresses direct Iroh addresses,
93
- * local discovery, and host/srflx WebRTC candidates. It also requires the
94
- * developer manifest's relay opt-in.
95
- */
96
- privacy?: 'direct' | 'relay-only';
97
- /**
98
- * Advanced native integration for hosts whose Rust process owns the
99
- * application protocol registry (for example, a Tauri file-transfer host).
100
- * Normal SDK consumers should leave this disabled.
101
- */
102
- nativeHostProtocols?: boolean;
103
- priority?: readonly ('iroh' | 'webrtc' | 'moq' | 'ble')[];
104
- }
105
- interface OpenRTCOptions {
106
- apiKey: string;
107
- auth?: OpenRTCAuthProvider;
108
- trust?: {
109
- attestation?: OpenRTCAttestationProvider;
110
- botVerification?: OpenRTCBotVerificationProvider;
111
- };
112
- usage?: {
113
- warnAtSessionCreditsUsd?: number;
114
- maxSessionCreditsUsd?: number;
115
- onUsage?: (event: OpenRTCUsageUpdate) => void;
116
- onWarning?: (warning: OpenRTCUsageWarning) => void;
117
- };
118
- transports?: OpenRTCTransportPreferences;
119
- }
120
- type OpenRTCAccessMode = 'capability' | 'authenticated';
121
- type OpenRTCLatestStateMode = 'reliable' | 'latest-state';
122
- interface OpenRTCCapabilityHandle {
123
- readonly kind: 'devices' | 'space' | 'room' | 'ticket';
124
- readonly id: string;
125
- readonly peers: OpenRTCPeerNamespace;
126
- readonly channels: OpenRTCChannelNamespace;
127
- readonly diagnostics: OpenRTCDiagnosticsNamespace;
128
- readonly closed: boolean;
129
- close(): Promise<void>;
130
- }
131
- interface OpenRTCDevicesHandle extends OpenRTCCapabilityHandle {
132
- readonly kind: 'devices';
133
- localId(): ReturnType<OpenRTCDeviceNamespace['localId']>;
134
- localInfo(): ReturnType<OpenRTCDeviceNamespace['localInfo']>;
135
- list(): ReturnType<OpenRTCDeviceNamespace['list']>;
136
- listWithStatus(): ReturnType<OpenRTCDeviceNamespace['listWithStatus']>;
137
- watch: OpenRTCDeviceNamespace['watch'];
138
- connect: OpenRTCDeviceNamespace['connect'];
139
- disconnect: OpenRTCDeviceNamespace['disconnect'];
140
- }
141
- interface OpenRTCSpaceHandle extends OpenRTCCapabilityHandle {
142
- readonly kind: 'space';
143
- readonly delivery: OpenRTCLatestStateMode;
144
- leave(): Promise<void>;
145
- }
146
- interface OpenRTCRoomHandle extends OpenRTCCapabilityHandle {
147
- readonly kind: 'room';
148
- readonly membership: 'ephemeral' | 'durable';
149
- leave(): Promise<void>;
150
- }
151
- interface OpenRTCTicketHandle extends OpenRTCCapabilityHandle {
152
- readonly kind: 'ticket';
153
- readonly token: string;
154
- }
155
- interface OpenRTCDevicesStartOptions {
156
- auth?: OpenRTCAuthProvider;
157
- autoConnect?: 'none' | 'online';
158
- /** Optional local profile; it does not alter the durable device identity. */
159
- profile?: {
160
- name?: string;
161
- /**
162
- * Optional application-owned public presence metadata. It is bounded
163
- * to 4 KiB and folded into the initial connection/presence operation.
164
- */
165
- metadata?: string;
166
- };
167
- maxPeers?: number;
168
- /** Requires the app manifest's advanced-fanout opt-in. */
169
- advancedFanout?: boolean;
170
- }
171
- interface OpenRTCSpaceJoinOptions {
172
- access?: 'capability';
173
- identity?: 'ephemeral';
174
- payload?: OpenRTCLatestStateMode;
175
- maxPeers?: number;
176
- /** Requires the app manifest's advanced-fanout opt-in. */
177
- advancedFanout?: boolean;
178
- }
179
- interface OpenRTCRoomJoinOptions {
180
- access?: OpenRTCAccessMode;
181
- membership?: 'ephemeral' | 'durable';
182
- auth?: OpenRTCAuthProvider;
183
- maxPeers?: number;
184
- /** Requires the app manifest's advanced-fanout opt-in. */
185
- advancedFanout?: boolean;
186
- }
187
- interface OpenRTCTicketIssueOptions {
188
- maxPeers?: number;
189
- /** Requires the app manifest's advanced-fanout opt-in. */
190
- advancedFanout?: boolean;
191
- }
192
- interface OpenRTCChannelCatalog {
193
- register(descriptor: RuntimeChannelDescriptor): () => void;
194
- list(): readonly RuntimeChannelDescriptor[];
195
- }
196
- interface OpenRTCUsageNamespace {
197
- estimate(input: {
198
- operation: string;
199
- units?: number;
200
- }): {
201
- creditsUsd: number;
202
- estimated: true;
203
- };
204
- readonly sessionCreditsUsd: number;
205
- }
206
- interface OpenRTCClient {
207
- readonly devices: {
208
- start(options?: OpenRTCDevicesStartOptions): Promise<OpenRTCDevicesHandle>;
209
- listEnrolled(options?: {
210
- auth?: OpenRTCAuthProvider;
211
- }): Promise<OpenRTCEnrolledDevice[]>;
212
- revoke(deviceId: string, options?: {
213
- auth?: OpenRTCAuthProvider;
214
- }): Promise<void>;
215
- revokeAll(options?: {
216
- auth?: OpenRTCAuthProvider;
217
- exceptCurrent?: boolean;
218
- }): Promise<void>;
219
- };
220
- readonly spaces: {
221
- join(id: string, options?: OpenRTCSpaceJoinOptions): Promise<OpenRTCSpaceHandle>;
222
- };
223
- readonly rooms: {
224
- join(id: string, options?: OpenRTCRoomJoinOptions): Promise<OpenRTCRoomHandle>;
225
- };
226
- readonly tickets: {
227
- issue(id: string, options?: OpenRTCTicketIssueOptions): Promise<OpenRTCTicketHandle>;
228
- };
229
- readonly channels: OpenRTCChannelCatalog;
230
- readonly usage: OpenRTCUsageNamespace;
231
- close(): Promise<void>;
232
- }
233
-
234
- export type { OpenRTCOptions as O, OpenRTCClient as a, OpenRTCAccessMode as b, OpenRTCAttestationProvider as c, OpenRTCAuthProvider as d, OpenRTCBotVerificationProvider as e, OpenRTCCapabilityHandle as f, OpenRTCChannelCatalog as g, OpenRTCDevicesHandle as h, OpenRTCDevicesStartOptions as i, OpenRTCEnrolledDevice as j, OpenRTCLatestStateMode as k, OpenRTCRoomHandle as l, OpenRTCRoomJoinOptions as m, OpenRTCSpaceHandle as n, OpenRTCSpaceJoinOptions as o, OpenRTCTicketHandle as p, OpenRTCTicketIssueOptions as q, OpenRTCTransportPreferences as r, OpenRTCUsageNamespace as s, OpenRTCUsageUpdate as t, OpenRTCUsageWarning as u };