openai 7.13.0 → 7.14.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/CHANGELOG.md +15 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/helpers/live.d.mts +2 -0
- package/helpers/live.d.mts.map +1 -0
- package/helpers/live.d.ts +2 -0
- package/helpers/live.d.ts.map +1 -0
- package/helpers/live.js +6 -0
- package/helpers/live.js.map +1 -0
- package/helpers/live.mjs +2 -0
- package/helpers/live.mjs.map +1 -0
- package/lib/live/transcript-grouper.d.mts +96 -0
- package/lib/live/transcript-grouper.d.mts.map +1 -0
- package/lib/live/transcript-grouper.d.ts +96 -0
- package/lib/live/transcript-grouper.d.ts.map +1 -0
- package/lib/live/transcript-grouper.js +223 -0
- package/lib/live/transcript-grouper.js.map +1 -0
- package/lib/live/transcript-grouper.mjs +219 -0
- package/lib/live/transcript-grouper.mjs.map +1 -0
- package/lib/live/transcript-grouping.d.mts +49 -0
- package/lib/live/transcript-grouping.d.mts.map +1 -0
- package/lib/live/transcript-grouping.d.ts +49 -0
- package/lib/live/transcript-grouping.d.ts.map +1 -0
- package/lib/live/transcript-grouping.js +287 -0
- package/lib/live/transcript-grouping.js.map +1 -0
- package/lib/live/transcript-grouping.mjs +283 -0
- package/lib/live/transcript-grouping.mjs.map +1 -0
- package/lib/live/webrtc.d.mts +13 -0
- package/lib/live/webrtc.d.mts.map +1 -0
- package/lib/live/webrtc.d.ts +13 -0
- package/lib/live/webrtc.d.ts.map +1 -0
- package/lib/live/webrtc.js +16 -0
- package/lib/live/webrtc.js.map +1 -0
- package/lib/live/webrtc.mjs +10 -0
- package/lib/live/webrtc.mjs.map +1 -0
- package/lib/realtime/webrtc.d.mts +13 -0
- package/lib/realtime/webrtc.d.mts.map +1 -0
- package/lib/realtime/webrtc.d.ts +13 -0
- package/lib/realtime/webrtc.d.ts.map +1 -0
- package/lib/realtime/webrtc.js +16 -0
- package/lib/realtime/webrtc.js.map +1 -0
- package/lib/realtime/webrtc.mjs +10 -0
- package/lib/realtime/webrtc.mjs.map +1 -0
- package/lib/webrtc/connection.d.mts +40 -0
- package/lib/webrtc/connection.d.mts.map +1 -0
- package/lib/webrtc/connection.d.ts +40 -0
- package/lib/webrtc/connection.d.ts.map +1 -0
- package/lib/webrtc/connection.js +228 -0
- package/lib/webrtc/connection.js.map +1 -0
- package/lib/webrtc/connection.mjs +224 -0
- package/lib/webrtc/connection.mjs.map +1 -0
- package/lib/webrtc/data-channel.d.mts +32 -0
- package/lib/webrtc/data-channel.d.mts.map +1 -0
- package/lib/webrtc/data-channel.d.ts +32 -0
- package/lib/webrtc/data-channel.d.ts.map +1 -0
- package/lib/webrtc/data-channel.js +125 -0
- package/lib/webrtc/data-channel.js.map +1 -0
- package/lib/webrtc/data-channel.mjs +121 -0
- package/lib/webrtc/data-channel.mjs.map +1 -0
- package/lib/webrtc/errors.d.mts +19 -0
- package/lib/webrtc/errors.d.mts.map +1 -0
- package/lib/webrtc/errors.d.ts +19 -0
- package/lib/webrtc/errors.d.ts.map +1 -0
- package/lib/webrtc/errors.js +18 -0
- package/lib/webrtc/errors.js.map +1 -0
- package/lib/webrtc/errors.mjs +14 -0
- package/lib/webrtc/errors.mjs.map +1 -0
- package/lib/webrtc/subscriptions.d.mts +13 -0
- package/lib/webrtc/subscriptions.d.mts.map +1 -0
- package/lib/webrtc/subscriptions.d.ts +13 -0
- package/lib/webrtc/subscriptions.d.ts.map +1 -0
- package/lib/webrtc/subscriptions.js +62 -0
- package/lib/webrtc/subscriptions.js.map +1 -0
- package/lib/webrtc/subscriptions.mjs +58 -0
- package/lib/webrtc/subscriptions.mjs.map +1 -0
- package/lib/webrtc/types.d.mts +99 -0
- package/lib/webrtc/types.d.mts.map +1 -0
- package/lib/webrtc/types.d.ts +99 -0
- package/lib/webrtc/types.d.ts.map +1 -0
- package/lib/webrtc/types.js +3 -0
- package/lib/webrtc/types.js.map +1 -0
- package/lib/webrtc/types.mjs +2 -0
- package/lib/webrtc/types.mjs.map +1 -0
- package/live/webrtc.d.mts +3 -0
- package/live/webrtc.d.mts.map +1 -0
- package/live/webrtc.d.ts +3 -0
- package/live/webrtc.d.ts.map +1 -0
- package/live/webrtc.js +8 -0
- package/live/webrtc.js.map +1 -0
- package/live/webrtc.mjs +2 -0
- package/live/webrtc.mjs.map +1 -0
- package/package.json +11 -1
- package/realtime/webrtc.d.mts +3 -0
- package/realtime/webrtc.d.mts.map +1 -0
- package/realtime/webrtc.d.ts +3 -0
- package/realtime/webrtc.d.ts.map +1 -0
- package/realtime/webrtc.js +8 -0
- package/realtime/webrtc.js.map +1 -0
- package/realtime/webrtc.mjs +2 -0
- package/realtime/webrtc.mjs.map +1 -0
- package/resources/beta/responses/responses.d.mts +48 -0
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +48 -0
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/conversations/items.d.mts +16 -0
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts +16 -0
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/live/forks/forks.d.mts +110 -0
- package/resources/live/forks/forks.d.mts.map +1 -0
- package/resources/live/forks/forks.d.ts +110 -0
- package/resources/live/forks/forks.d.ts.map +1 -0
- package/resources/live/forks/forks.js +9 -0
- package/resources/live/forks/forks.js.map +1 -0
- package/resources/live/forks/forks.mjs +5 -0
- package/resources/live/forks/forks.mjs.map +1 -0
- package/resources/live/forks/index.d.mts +4 -0
- package/resources/live/forks/index.d.mts.map +1 -0
- package/resources/live/forks/index.d.ts +4 -0
- package/resources/live/forks/index.d.ts.map +1 -0
- package/resources/live/forks/index.js +7 -0
- package/resources/live/forks/index.js.map +1 -0
- package/resources/live/forks/index.mjs +3 -0
- package/resources/live/forks/index.mjs.map +1 -0
- package/resources/live/forks/internal-base.d.mts +73 -0
- package/resources/live/forks/internal-base.d.mts.map +1 -0
- package/resources/live/forks/internal-base.d.ts +73 -0
- package/resources/live/forks/internal-base.d.ts.map +1 -0
- package/resources/live/forks/internal-base.js +49 -0
- package/resources/live/forks/internal-base.js.map +1 -0
- package/resources/live/forks/internal-base.mjs +43 -0
- package/resources/live/forks/internal-base.mjs.map +1 -0
- package/resources/live/forks/ws-base.d.mts +109 -0
- package/resources/live/forks/ws-base.d.mts.map +1 -0
- package/resources/live/forks/ws-base.d.ts +109 -0
- package/resources/live/forks/ws-base.d.ts.map +1 -0
- package/resources/live/forks/ws-base.js +476 -0
- package/resources/live/forks/ws-base.js.map +1 -0
- package/resources/live/forks/ws-base.mjs +472 -0
- package/resources/live/forks/ws-base.mjs.map +1 -0
- package/resources/live/forks/ws.d.mts +13 -0
- package/resources/live/forks/ws.d.mts.map +1 -0
- package/resources/live/forks/ws.d.ts +13 -0
- package/resources/live/forks/ws.d.ts.map +1 -0
- package/resources/live/forks/ws.js +34 -0
- package/resources/live/forks/ws.js.map +1 -0
- package/resources/live/forks/ws.mjs +29 -0
- package/resources/live/forks/ws.mjs.map +1 -0
- package/resources/live/forks.d.mts +2 -0
- package/resources/live/forks.d.mts.map +1 -0
- package/resources/live/forks.d.ts +2 -0
- package/resources/live/forks.d.ts.map +1 -0
- package/resources/live/forks.js +6 -0
- package/resources/live/forks.js.map +1 -0
- package/resources/live/forks.mjs +3 -0
- package/resources/live/forks.mjs.map +1 -0
- package/resources/live/index.d.mts +7 -0
- package/resources/live/index.d.mts.map +1 -0
- package/resources/live/index.d.ts +7 -0
- package/resources/live/index.d.ts.map +1 -0
- package/resources/live/index.js +13 -0
- package/resources/live/index.js.map +1 -0
- package/resources/live/index.mjs +6 -0
- package/resources/live/index.mjs.map +1 -0
- package/resources/live/internal-base.d.mts +71 -0
- package/resources/live/internal-base.d.mts.map +1 -0
- package/resources/live/internal-base.d.ts +71 -0
- package/resources/live/internal-base.d.ts.map +1 -0
- package/resources/live/internal-base.js +48 -0
- package/resources/live/internal-base.js.map +1 -0
- package/resources/live/internal-base.mjs +42 -0
- package/resources/live/internal-base.mjs.map +1 -0
- package/resources/live/live.d.mts +1864 -0
- package/resources/live/live.d.mts.map +1 -0
- package/resources/live/live.d.ts +1864 -0
- package/resources/live/live.d.ts.map +1 -0
- package/resources/live/live.js +40 -0
- package/resources/live/live.js.map +1 -0
- package/resources/live/live.mjs +35 -0
- package/resources/live/live.mjs.map +1 -0
- package/resources/live/sessions.d.mts +254 -0
- package/resources/live/sessions.d.mts.map +1 -0
- package/resources/live/sessions.d.ts +254 -0
- package/resources/live/sessions.d.ts.map +1 -0
- package/resources/live/sessions.js +118 -0
- package/resources/live/sessions.js.map +1 -0
- package/resources/live/sessions.mjs +114 -0
- package/resources/live/sessions.mjs.map +1 -0
- package/resources/live/sideband/index.d.mts +4 -0
- package/resources/live/sideband/index.d.mts.map +1 -0
- package/resources/live/sideband/index.d.ts +4 -0
- package/resources/live/sideband/index.d.ts.map +1 -0
- package/resources/live/sideband/index.js +7 -0
- package/resources/live/sideband/index.js.map +1 -0
- package/resources/live/sideband/index.mjs +3 -0
- package/resources/live/sideband/index.mjs.map +1 -0
- package/resources/live/sideband/internal-base.d.mts +73 -0
- package/resources/live/sideband/internal-base.d.mts.map +1 -0
- package/resources/live/sideband/internal-base.d.ts +73 -0
- package/resources/live/sideband/internal-base.d.ts.map +1 -0
- package/resources/live/sideband/internal-base.js +49 -0
- package/resources/live/sideband/internal-base.js.map +1 -0
- package/resources/live/sideband/internal-base.mjs +43 -0
- package/resources/live/sideband/internal-base.mjs.map +1 -0
- package/resources/live/sideband/sideband.d.mts +25 -0
- package/resources/live/sideband/sideband.d.mts.map +1 -0
- package/resources/live/sideband/sideband.d.ts +25 -0
- package/resources/live/sideband/sideband.d.ts.map +1 -0
- package/resources/live/sideband/sideband.js +9 -0
- package/resources/live/sideband/sideband.js.map +1 -0
- package/resources/live/sideband/sideband.mjs +5 -0
- package/resources/live/sideband/sideband.mjs.map +1 -0
- package/resources/live/sideband/ws-base.d.mts +114 -0
- package/resources/live/sideband/ws-base.d.mts.map +1 -0
- package/resources/live/sideband/ws-base.d.ts +114 -0
- package/resources/live/sideband/ws-base.d.ts.map +1 -0
- package/resources/live/sideband/ws-base.js +476 -0
- package/resources/live/sideband/ws-base.js.map +1 -0
- package/resources/live/sideband/ws-base.mjs +472 -0
- package/resources/live/sideband/ws-base.mjs.map +1 -0
- package/resources/live/sideband/ws.d.mts +13 -0
- package/resources/live/sideband/ws.d.mts.map +1 -0
- package/resources/live/sideband/ws.d.ts +13 -0
- package/resources/live/sideband/ws.d.ts.map +1 -0
- package/resources/live/sideband/ws.js +34 -0
- package/resources/live/sideband/ws.js.map +1 -0
- package/resources/live/sideband/ws.mjs +29 -0
- package/resources/live/sideband/ws.mjs.map +1 -0
- package/resources/live/sideband.d.mts +2 -0
- package/resources/live/sideband.d.mts.map +1 -0
- package/resources/live/sideband.d.ts +2 -0
- package/resources/live/sideband.d.ts.map +1 -0
- package/resources/live/sideband.js +6 -0
- package/resources/live/sideband.js.map +1 -0
- package/resources/live/sideband.mjs +3 -0
- package/resources/live/sideband.mjs.map +1 -0
- package/resources/live/ws-base.d.mts +106 -0
- package/resources/live/ws-base.d.mts.map +1 -0
- package/resources/live/ws-base.d.ts +106 -0
- package/resources/live/ws-base.d.ts.map +1 -0
- package/resources/live/ws-base.js +476 -0
- package/resources/live/ws-base.js.map +1 -0
- package/resources/live/ws-base.mjs +472 -0
- package/resources/live/ws-base.mjs.map +1 -0
- package/resources/live/ws.d.mts +13 -0
- package/resources/live/ws.d.mts.map +1 -0
- package/resources/live/ws.d.ts +13 -0
- package/resources/live/ws.d.ts.map +1 -0
- package/resources/live/ws.js +34 -0
- package/resources/live/ws.js.map +1 -0
- package/resources/live/ws.mjs +29 -0
- package/resources/live/ws.mjs.map +1 -0
- package/resources/live.d.mts +2 -0
- package/resources/live.d.mts.map +1 -0
- package/resources/live.d.ts +2 -0
- package/resources/live.d.ts.map +1 -0
- package/resources/live.js +6 -0
- package/resources/live.js.map +1 -0
- package/resources/live.mjs +3 -0
- package/resources/live.mjs.map +1 -0
- package/resources/responses/responses.d.mts +48 -0
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +48 -0
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +72 -5
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +72 -5
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/client.ts +5 -0
- package/src/helpers/live.ts +8 -0
- package/src/lib/live/transcript-grouper.ts +303 -0
- package/src/lib/live/transcript-grouping.ts +362 -0
- package/src/lib/live/webrtc.ts +23 -0
- package/src/lib/realtime/webrtc.ts +20 -0
- package/src/lib/webrtc/connection.ts +309 -0
- package/src/lib/webrtc/data-channel.ts +144 -0
- package/src/lib/webrtc/errors.ts +38 -0
- package/src/lib/webrtc/subscriptions.ts +62 -0
- package/src/lib/webrtc/types.ts +109 -0
- package/src/live/webrtc.ts +10 -0
- package/src/realtime/webrtc.ts +10 -0
- package/src/resources/beta/responses/responses.ts +60 -0
- package/src/resources/conversations/items.ts +20 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/live/api.md +87 -0
- package/src/resources/live/forks/forks.ts +169 -0
- package/src/resources/live/forks/index.ts +5 -0
- package/src/resources/live/forks/internal-base.ts +107 -0
- package/src/resources/live/forks/ws-base.ts +611 -0
- package/src/resources/live/forks/ws.ts +46 -0
- package/src/resources/live/forks.ts +3 -0
- package/src/resources/live/index.ts +20 -0
- package/src/resources/live/internal-base.ts +104 -0
- package/src/resources/live/live.ts +2296 -0
- package/src/resources/live/sessions.ts +337 -0
- package/src/resources/live/sideband/index.ts +10 -0
- package/src/resources/live/sideband/internal-base.ts +107 -0
- package/src/resources/live/sideband/sideband.ts +58 -0
- package/src/resources/live/sideband/ws-base.ts +621 -0
- package/src/resources/live/sideband/ws.ts +46 -0
- package/src/resources/live/sideband.ts +3 -0
- package/src/resources/live/ws-base.ts +607 -0
- package/src/resources/live/ws.ts +42 -0
- package/src/resources/live.ts +3 -0
- package/src/resources/responses/responses.ts +60 -0
- package/src/resources/webhooks/api.md +1 -0
- package/src/resources/webhooks/webhooks.ts +82 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { WebRTCError } from "./errors.mjs";
|
|
2
|
+
/** A native event source, without requiring DOM declarations in server projects. */
|
|
3
|
+
export interface WebRTCEventTarget {
|
|
4
|
+
/** Registers a native event listener. */
|
|
5
|
+
addEventListener: (type: string, listener: (event: unknown) => void) => void;
|
|
6
|
+
/** Removes a previously registered native event listener. */
|
|
7
|
+
removeEventListener: (type: string, listener: (event: unknown) => void) => void;
|
|
8
|
+
}
|
|
9
|
+
/** The subset of a native data channel used by the SDK. */
|
|
10
|
+
export interface WebRTCDataChannel extends WebRTCEventTarget {
|
|
11
|
+
/** Native channel readiness; sending requires `open`. */
|
|
12
|
+
readonly readyState: string;
|
|
13
|
+
/** Sends one serialized protocol message. */
|
|
14
|
+
send: (data: string) => void;
|
|
15
|
+
/** Closes this channel. Borrowed adapters never call this method. */
|
|
16
|
+
close: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** The subset of a native peer connection used by negotiation. */
|
|
19
|
+
export interface WebRTCPeerConnection extends WebRTCEventTarget {
|
|
20
|
+
/** Native connection state, including transient `disconnected` states. */
|
|
21
|
+
readonly connectionState: string;
|
|
22
|
+
/** The local description after `setLocalDescription`. */
|
|
23
|
+
readonly localDescription: {
|
|
24
|
+
readonly sdp: string;
|
|
25
|
+
} | null;
|
|
26
|
+
/** Creates the protocol data channel before generating an SDP offer. */
|
|
27
|
+
createDataChannel: (label: string) => WebRTCDataChannel;
|
|
28
|
+
/** Generates the local SDP offer. */
|
|
29
|
+
createOffer: () => Promise<{
|
|
30
|
+
type: 'answer' | 'offer' | 'pranswer' | 'rollback';
|
|
31
|
+
sdp?: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Applies the offer to the local peer. */
|
|
34
|
+
setLocalDescription: (description: {
|
|
35
|
+
type?: 'answer' | 'offer' | 'pranswer' | 'rollback';
|
|
36
|
+
sdp?: string;
|
|
37
|
+
}) => Promise<void>;
|
|
38
|
+
/** Applies the application's SDP answer. */
|
|
39
|
+
setRemoteDescription: (description: {
|
|
40
|
+
type: 'answer';
|
|
41
|
+
sdp: string;
|
|
42
|
+
}) => Promise<void>;
|
|
43
|
+
/** Releases the peer connection, without stopping application-owned tracks. */
|
|
44
|
+
close: () => void;
|
|
45
|
+
}
|
|
46
|
+
/** Native browser peer type when DOM types are available; otherwise the SDK's minimal view. */
|
|
47
|
+
export type BrowserPeerConnection = typeof globalThis extends {
|
|
48
|
+
RTCPeerConnection: {
|
|
49
|
+
prototype: infer Peer;
|
|
50
|
+
};
|
|
51
|
+
} ? Peer : WebRTCPeerConnection;
|
|
52
|
+
/** Native browser channel type when DOM types are available. */
|
|
53
|
+
export type BrowserDataChannel = typeof globalThis extends {
|
|
54
|
+
RTCDataChannel: {
|
|
55
|
+
prototype: infer Channel;
|
|
56
|
+
};
|
|
57
|
+
} ? Channel : WebRTCDataChannel;
|
|
58
|
+
/** Standard RTCConfiguration in a browser project; no runtime polyfill is installed. */
|
|
59
|
+
export type WebRTCConfiguration = typeof globalThis extends {
|
|
60
|
+
RTCPeerConnection: new (configuration?: infer Configuration) => unknown;
|
|
61
|
+
} ? Configuration : object;
|
|
62
|
+
/** Exchanges a local SDP offer for an SDP answer using application-owned signaling. */
|
|
63
|
+
export type ExchangeSdp = (offer: string, options: {
|
|
64
|
+
/** Aborted when setup is cancelled, times out, or fails; pass it to fetch. */
|
|
65
|
+
signal: AbortSignal;
|
|
66
|
+
}) => Promise<string>;
|
|
67
|
+
/** Options for one connection attempt. No retries or reconnection are performed. */
|
|
68
|
+
export interface WebRTCConnectOptions {
|
|
69
|
+
/** Application callback that submits the offer and returns the SDP answer. */
|
|
70
|
+
exchangeSdp: ExchangeSdp;
|
|
71
|
+
/** Cancels setup only. After connection succeeds, use close() to end the connection. */
|
|
72
|
+
signal?: AbortSignal;
|
|
73
|
+
/** Total setup deadline in milliseconds; defaults to 30,000. Must be positive and finite. */
|
|
74
|
+
timeoutMs?: number;
|
|
75
|
+
}
|
|
76
|
+
/** SDK connection state. A closed instance cannot be connected again. */
|
|
77
|
+
export type WebRTCState = 'new' | 'connecting' | 'connected' | 'closed';
|
|
78
|
+
/** Why a connection ended. Setup failures are also returned by connect(). */
|
|
79
|
+
export type WebRTCCloseReason = 'local' | 'remote' | 'failed' | 'aborted' | 'timeout';
|
|
80
|
+
/** Local lifecycle and diagnostics, separate from server protocol events. */
|
|
81
|
+
export type WebRTCConnectionEvent = {
|
|
82
|
+
/** A connection became usable or began setup. */
|
|
83
|
+
type: 'state.changed';
|
|
84
|
+
/** The new state. There is no replay on subscription. */
|
|
85
|
+
state: 'connecting' | 'connected';
|
|
86
|
+
} | {
|
|
87
|
+
/** An unsolicited local failure, not an API error event. */
|
|
88
|
+
type: 'error';
|
|
89
|
+
/** The local diagnostic. Messages never contain raw protocol payloads. */
|
|
90
|
+
error: WebRTCError;
|
|
91
|
+
/** Whether the managed helper is ending this connection. */
|
|
92
|
+
fatal: boolean;
|
|
93
|
+
} | {
|
|
94
|
+
/** The connection ended; emitted at most once. */
|
|
95
|
+
type: 'closed';
|
|
96
|
+
/** Whether closure was requested, observed, or caused by a setup/transport failure. */
|
|
97
|
+
reason: WebRTCCloseReason;
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/lib/webrtc/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAiB;AAE5C,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;IAC7E,6DAA6D;IAC7D,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;CACjF;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,yDAAyD;IACzD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6CAA6C;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,qEAAqE;IACrE,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,kEAAkE;AAClE,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3D,wEAAwE;IACxE,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;IACxD,qCAAqC;IACrC,WAAW,EAAE,MAAM,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjG,2CAA2C;IAC3C,mBAAmB,EAAE,CAAC,WAAW,EAAE;QACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;QACpD,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpB,4CAA4C;IAC5C,oBAAoB,EAAE,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtF,+EAA+E;IAC/E,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,+FAA+F;AAC/F,MAAM,MAAM,qBAAqB,GAAG,OAAO,UAAU,SAAS;IAC5D,iBAAiB,EAAE;QAAE,SAAS,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CAC9C,GACG,IAAI,GACJ,oBAAoB,CAAC;AAEzB,gEAAgE;AAChE,MAAM,MAAM,kBAAkB,GAAG,OAAO,UAAU,SAAS;IACzD,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,OAAO,CAAA;KAAE,CAAC;CAC9C,GACG,OAAO,GACP,iBAAiB,CAAC;AAEtB,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,OAAO,UAAU,SAAS;IAC1D,iBAAiB,EAAE,KAAK,aAAa,CAAC,EAAE,MAAM,aAAa,KAAK,OAAO,CAAC;CACzE,GACG,aAAa,GACb,MAAM,CAAC;AAEX,uFAAuF;AACvF,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IACP,8EAA8E;IAC9E,MAAM,EAAE,WAAW,CAAC;CACrB,KACE,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB,oFAAoF;AACpF,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,WAAW,EAAE,WAAW,CAAC;IACzB,wFAAwF;IACxF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExE,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtF,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAC7B;IACE,iDAAiD;IACjD,IAAI,EAAE,eAAe,CAAC;IACtB,yDAAyD;IACzD,KAAK,EAAE,YAAY,GAAG,WAAW,CAAC;CACnC,GACD;IACE,4DAA4D;IAC5D,IAAI,EAAE,OAAO,CAAC;IACd,0EAA0E;IAC1E,KAAK,EAAE,WAAW,CAAC;IACnB,4DAA4D;IAC5D,KAAK,EAAE,OAAO,CAAC;CAChB,GACD;IACE,kDAAkD;IAClD,IAAI,EAAE,QAAQ,CAAC;IACf,uFAAuF;IACvF,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { WebRTCError } from "./errors.js";
|
|
2
|
+
/** A native event source, without requiring DOM declarations in server projects. */
|
|
3
|
+
export interface WebRTCEventTarget {
|
|
4
|
+
/** Registers a native event listener. */
|
|
5
|
+
addEventListener: (type: string, listener: (event: unknown) => void) => void;
|
|
6
|
+
/** Removes a previously registered native event listener. */
|
|
7
|
+
removeEventListener: (type: string, listener: (event: unknown) => void) => void;
|
|
8
|
+
}
|
|
9
|
+
/** The subset of a native data channel used by the SDK. */
|
|
10
|
+
export interface WebRTCDataChannel extends WebRTCEventTarget {
|
|
11
|
+
/** Native channel readiness; sending requires `open`. */
|
|
12
|
+
readonly readyState: string;
|
|
13
|
+
/** Sends one serialized protocol message. */
|
|
14
|
+
send: (data: string) => void;
|
|
15
|
+
/** Closes this channel. Borrowed adapters never call this method. */
|
|
16
|
+
close: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** The subset of a native peer connection used by negotiation. */
|
|
19
|
+
export interface WebRTCPeerConnection extends WebRTCEventTarget {
|
|
20
|
+
/** Native connection state, including transient `disconnected` states. */
|
|
21
|
+
readonly connectionState: string;
|
|
22
|
+
/** The local description after `setLocalDescription`. */
|
|
23
|
+
readonly localDescription: {
|
|
24
|
+
readonly sdp: string;
|
|
25
|
+
} | null;
|
|
26
|
+
/** Creates the protocol data channel before generating an SDP offer. */
|
|
27
|
+
createDataChannel: (label: string) => WebRTCDataChannel;
|
|
28
|
+
/** Generates the local SDP offer. */
|
|
29
|
+
createOffer: () => Promise<{
|
|
30
|
+
type: 'answer' | 'offer' | 'pranswer' | 'rollback';
|
|
31
|
+
sdp?: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Applies the offer to the local peer. */
|
|
34
|
+
setLocalDescription: (description: {
|
|
35
|
+
type?: 'answer' | 'offer' | 'pranswer' | 'rollback';
|
|
36
|
+
sdp?: string;
|
|
37
|
+
}) => Promise<void>;
|
|
38
|
+
/** Applies the application's SDP answer. */
|
|
39
|
+
setRemoteDescription: (description: {
|
|
40
|
+
type: 'answer';
|
|
41
|
+
sdp: string;
|
|
42
|
+
}) => Promise<void>;
|
|
43
|
+
/** Releases the peer connection, without stopping application-owned tracks. */
|
|
44
|
+
close: () => void;
|
|
45
|
+
}
|
|
46
|
+
/** Native browser peer type when DOM types are available; otherwise the SDK's minimal view. */
|
|
47
|
+
export type BrowserPeerConnection = typeof globalThis extends {
|
|
48
|
+
RTCPeerConnection: {
|
|
49
|
+
prototype: infer Peer;
|
|
50
|
+
};
|
|
51
|
+
} ? Peer : WebRTCPeerConnection;
|
|
52
|
+
/** Native browser channel type when DOM types are available. */
|
|
53
|
+
export type BrowserDataChannel = typeof globalThis extends {
|
|
54
|
+
RTCDataChannel: {
|
|
55
|
+
prototype: infer Channel;
|
|
56
|
+
};
|
|
57
|
+
} ? Channel : WebRTCDataChannel;
|
|
58
|
+
/** Standard RTCConfiguration in a browser project; no runtime polyfill is installed. */
|
|
59
|
+
export type WebRTCConfiguration = typeof globalThis extends {
|
|
60
|
+
RTCPeerConnection: new (configuration?: infer Configuration) => unknown;
|
|
61
|
+
} ? Configuration : object;
|
|
62
|
+
/** Exchanges a local SDP offer for an SDP answer using application-owned signaling. */
|
|
63
|
+
export type ExchangeSdp = (offer: string, options: {
|
|
64
|
+
/** Aborted when setup is cancelled, times out, or fails; pass it to fetch. */
|
|
65
|
+
signal: AbortSignal;
|
|
66
|
+
}) => Promise<string>;
|
|
67
|
+
/** Options for one connection attempt. No retries or reconnection are performed. */
|
|
68
|
+
export interface WebRTCConnectOptions {
|
|
69
|
+
/** Application callback that submits the offer and returns the SDP answer. */
|
|
70
|
+
exchangeSdp: ExchangeSdp;
|
|
71
|
+
/** Cancels setup only. After connection succeeds, use close() to end the connection. */
|
|
72
|
+
signal?: AbortSignal;
|
|
73
|
+
/** Total setup deadline in milliseconds; defaults to 30,000. Must be positive and finite. */
|
|
74
|
+
timeoutMs?: number;
|
|
75
|
+
}
|
|
76
|
+
/** SDK connection state. A closed instance cannot be connected again. */
|
|
77
|
+
export type WebRTCState = 'new' | 'connecting' | 'connected' | 'closed';
|
|
78
|
+
/** Why a connection ended. Setup failures are also returned by connect(). */
|
|
79
|
+
export type WebRTCCloseReason = 'local' | 'remote' | 'failed' | 'aborted' | 'timeout';
|
|
80
|
+
/** Local lifecycle and diagnostics, separate from server protocol events. */
|
|
81
|
+
export type WebRTCConnectionEvent = {
|
|
82
|
+
/** A connection became usable or began setup. */
|
|
83
|
+
type: 'state.changed';
|
|
84
|
+
/** The new state. There is no replay on subscription. */
|
|
85
|
+
state: 'connecting' | 'connected';
|
|
86
|
+
} | {
|
|
87
|
+
/** An unsolicited local failure, not an API error event. */
|
|
88
|
+
type: 'error';
|
|
89
|
+
/** The local diagnostic. Messages never contain raw protocol payloads. */
|
|
90
|
+
error: WebRTCError;
|
|
91
|
+
/** Whether the managed helper is ending this connection. */
|
|
92
|
+
fatal: boolean;
|
|
93
|
+
} | {
|
|
94
|
+
/** The connection ended; emitted at most once. */
|
|
95
|
+
type: 'closed';
|
|
96
|
+
/** Whether closure was requested, observed, or caused by a setup/transport failure. */
|
|
97
|
+
reason: WebRTCCloseReason;
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/webrtc/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAiB;AAE5C,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;IAC7E,6DAA6D;IAC7D,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;CACjF;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,yDAAyD;IACzD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6CAA6C;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,qEAAqE;IACrE,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,kEAAkE;AAClE,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3D,wEAAwE;IACxE,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;IACxD,qCAAqC;IACrC,WAAW,EAAE,MAAM,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjG,2CAA2C;IAC3C,mBAAmB,EAAE,CAAC,WAAW,EAAE;QACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;QACpD,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpB,4CAA4C;IAC5C,oBAAoB,EAAE,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtF,+EAA+E;IAC/E,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,+FAA+F;AAC/F,MAAM,MAAM,qBAAqB,GAAG,OAAO,UAAU,SAAS;IAC5D,iBAAiB,EAAE;QAAE,SAAS,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CAC9C,GACG,IAAI,GACJ,oBAAoB,CAAC;AAEzB,gEAAgE;AAChE,MAAM,MAAM,kBAAkB,GAAG,OAAO,UAAU,SAAS;IACzD,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,OAAO,CAAA;KAAE,CAAC;CAC9C,GACG,OAAO,GACP,iBAAiB,CAAC;AAEtB,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,OAAO,UAAU,SAAS;IAC1D,iBAAiB,EAAE,KAAK,aAAa,CAAC,EAAE,MAAM,aAAa,KAAK,OAAO,CAAC;CACzE,GACG,aAAa,GACb,MAAM,CAAC;AAEX,uFAAuF;AACvF,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IACP,8EAA8E;IAC9E,MAAM,EAAE,WAAW,CAAC;CACrB,KACE,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB,oFAAoF;AACpF,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,WAAW,EAAE,WAAW,CAAC;IACzB,wFAAwF;IACxF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExE,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtF,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAC7B;IACE,iDAAiD;IACjD,IAAI,EAAE,eAAe,CAAC;IACtB,yDAAyD;IACzD,KAAK,EAAE,YAAY,GAAG,WAAW,CAAC;CACnC,GACD;IACE,4DAA4D;IAC5D,IAAI,EAAE,OAAO,CAAC;IACd,0EAA0E;IAC1E,KAAK,EAAE,WAAW,CAAC;IACnB,4DAA4D;IAC5D,KAAK,EAAE,OAAO,CAAC;CAChB,GACD;IACE,kDAAkD;IAClD,IAAI,EAAE,QAAQ,CAAC;IACf,uFAAuF;IACvF,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/webrtc/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/lib/webrtc/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { OpenAILiveWebRTC, LiveDataChannel, WebRTCError } from "../lib/live/webrtc.mjs";
|
|
2
|
+
export type { ExchangeSdp, WebRTCConnectOptions, WebRTCConnectionEvent, WebRTCConfiguration, WebRTCErrorCode, WebRTCErrorPhase, WebRTCState, } from "../lib/live/webrtc.mjs";
|
|
3
|
+
//# sourceMappingURL=webrtc.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.d.mts","sourceRoot":"","sources":["../src/live/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,+BAA2B;AACpF,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,+BAA2B"}
|
package/live/webrtc.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { OpenAILiveWebRTC, LiveDataChannel, WebRTCError } from "../lib/live/webrtc.js";
|
|
2
|
+
export type { ExchangeSdp, WebRTCConnectOptions, WebRTCConnectionEvent, WebRTCConfiguration, WebRTCErrorCode, WebRTCErrorPhase, WebRTCState, } from "../lib/live/webrtc.js";
|
|
3
|
+
//# sourceMappingURL=webrtc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.d.ts","sourceRoot":"","sources":["../src/live/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,8BAA2B;AACpF,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,8BAA2B"}
|
package/live/webrtc.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebRTCError = exports.LiveDataChannel = exports.OpenAILiveWebRTC = void 0;
|
|
4
|
+
var webrtc_1 = require("../lib/live/webrtc.js");
|
|
5
|
+
Object.defineProperty(exports, "OpenAILiveWebRTC", { enumerable: true, get: function () { return webrtc_1.OpenAILiveWebRTC; } });
|
|
6
|
+
Object.defineProperty(exports, "LiveDataChannel", { enumerable: true, get: function () { return webrtc_1.LiveDataChannel; } });
|
|
7
|
+
Object.defineProperty(exports, "WebRTCError", { enumerable: true, get: function () { return webrtc_1.WebRTCError; } });
|
|
8
|
+
//# sourceMappingURL=webrtc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.js","sourceRoot":"","sources":["../src/live/webrtc.ts"],"names":[],"mappings":";;;AAAA,gDAAoF;AAA3E,0GAAA,gBAAgB,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,qGAAA,WAAW,OAAA"}
|
package/live/webrtc.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.mjs","sourceRoot":"","sources":["../src/live/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,+BAA2B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openai",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.14.0",
|
|
4
4
|
"description": "The official TypeScript library for the OpenAI API",
|
|
5
5
|
"author": "OpenAI <support@openai.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -182,6 +182,16 @@
|
|
|
182
182
|
"import": "./lib/*.mjs",
|
|
183
183
|
"require": "./lib/*.js"
|
|
184
184
|
},
|
|
185
|
+
"./live/*.mjs": {
|
|
186
|
+
"default": "./live/*.mjs"
|
|
187
|
+
},
|
|
188
|
+
"./live/*.js": {
|
|
189
|
+
"default": "./live/*.js"
|
|
190
|
+
},
|
|
191
|
+
"./live/*": {
|
|
192
|
+
"import": "./live/*.mjs",
|
|
193
|
+
"require": "./live/*.js"
|
|
194
|
+
},
|
|
185
195
|
"./pagination": {
|
|
186
196
|
"import": "./pagination.mjs",
|
|
187
197
|
"require": "./pagination.js"
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { OpenAIRealtimeWebRTC, RealtimeDataChannel, WebRTCError } from "../lib/realtime/webrtc.mjs";
|
|
2
|
+
export type { ExchangeSdp, WebRTCConnectOptions, WebRTCConnectionEvent, WebRTCConfiguration, WebRTCErrorCode, WebRTCErrorPhase, WebRTCState, } from "../lib/realtime/webrtc.mjs";
|
|
3
|
+
//# sourceMappingURL=webrtc.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.d.mts","sourceRoot":"","sources":["../src/realtime/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,mCAA+B;AAChG,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,mCAA+B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { OpenAIRealtimeWebRTC, RealtimeDataChannel, WebRTCError } from "../lib/realtime/webrtc.js";
|
|
2
|
+
export type { ExchangeSdp, WebRTCConnectOptions, WebRTCConnectionEvent, WebRTCConfiguration, WebRTCErrorCode, WebRTCErrorPhase, WebRTCState, } from "../lib/realtime/webrtc.js";
|
|
3
|
+
//# sourceMappingURL=webrtc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.d.ts","sourceRoot":"","sources":["../src/realtime/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,kCAA+B;AAChG,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,kCAA+B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebRTCError = exports.RealtimeDataChannel = exports.OpenAIRealtimeWebRTC = void 0;
|
|
4
|
+
var webrtc_1 = require("../lib/realtime/webrtc.js");
|
|
5
|
+
Object.defineProperty(exports, "OpenAIRealtimeWebRTC", { enumerable: true, get: function () { return webrtc_1.OpenAIRealtimeWebRTC; } });
|
|
6
|
+
Object.defineProperty(exports, "RealtimeDataChannel", { enumerable: true, get: function () { return webrtc_1.RealtimeDataChannel; } });
|
|
7
|
+
Object.defineProperty(exports, "WebRTCError", { enumerable: true, get: function () { return webrtc_1.WebRTCError; } });
|
|
8
|
+
//# sourceMappingURL=webrtc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.js","sourceRoot":"","sources":["../src/realtime/webrtc.ts"],"names":[],"mappings":";;;AAAA,oDAAgG;AAAvF,8GAAA,oBAAoB,OAAA;AAAE,6GAAA,mBAAmB,OAAA;AAAE,qGAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.mjs","sourceRoot":"","sources":["../src/realtime/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,WAAW,EAAE,mCAA+B"}
|
|
@@ -4678,15 +4678,31 @@ export declare namespace BetaResponseInputItem {
|
|
|
4678
4678
|
* The type of the image generation call. Always `image_generation_call`.
|
|
4679
4679
|
*/
|
|
4680
4680
|
type: 'image_generation_call';
|
|
4681
|
+
/**
|
|
4682
|
+
* The action used for image generation.
|
|
4683
|
+
*/
|
|
4684
|
+
action?: 'generate' | 'edit' | 'auto' | null;
|
|
4681
4685
|
/**
|
|
4682
4686
|
* The agent that produced this item.
|
|
4683
4687
|
*/
|
|
4684
4688
|
agent?: ImageGenerationCall.Agent | null;
|
|
4689
|
+
/**
|
|
4690
|
+
* The background setting used for generation.
|
|
4691
|
+
*/
|
|
4692
|
+
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
4693
|
+
/**
|
|
4694
|
+
* The output format used for generation.
|
|
4695
|
+
*/
|
|
4696
|
+
output_format?: 'png' | 'webp' | 'jpeg' | null;
|
|
4685
4697
|
/**
|
|
4686
4698
|
* The quality of the image generated by the image generation tool call. One of
|
|
4687
4699
|
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
4688
4700
|
*/
|
|
4689
4701
|
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
4702
|
+
/**
|
|
4703
|
+
* The prompt that was used after any model prompt rewriting.
|
|
4704
|
+
*/
|
|
4705
|
+
revised_prompt?: string | null;
|
|
4690
4706
|
/**
|
|
4691
4707
|
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
4692
4708
|
*/
|
|
@@ -5900,15 +5916,31 @@ export declare namespace BetaResponseItem {
|
|
|
5900
5916
|
* The type of the image generation call. Always `image_generation_call`.
|
|
5901
5917
|
*/
|
|
5902
5918
|
type: 'image_generation_call';
|
|
5919
|
+
/**
|
|
5920
|
+
* The action used for image generation.
|
|
5921
|
+
*/
|
|
5922
|
+
action?: 'generate' | 'edit' | 'auto' | null;
|
|
5903
5923
|
/**
|
|
5904
5924
|
* The agent that produced this item.
|
|
5905
5925
|
*/
|
|
5906
5926
|
agent?: ImageGenerationCall.Agent | null;
|
|
5927
|
+
/**
|
|
5928
|
+
* The background setting used for generation.
|
|
5929
|
+
*/
|
|
5930
|
+
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
5931
|
+
/**
|
|
5932
|
+
* The output format used for generation.
|
|
5933
|
+
*/
|
|
5934
|
+
output_format?: 'png' | 'webp' | 'jpeg' | null;
|
|
5907
5935
|
/**
|
|
5908
5936
|
* The quality of the image generated by the image generation tool call. One of
|
|
5909
5937
|
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
5910
5938
|
*/
|
|
5911
5939
|
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
5940
|
+
/**
|
|
5941
|
+
* The prompt that was used after any model prompt rewriting.
|
|
5942
|
+
*/
|
|
5943
|
+
revised_prompt?: string | null;
|
|
5912
5944
|
/**
|
|
5913
5945
|
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
5914
5946
|
*/
|
|
@@ -6890,15 +6922,31 @@ export declare namespace BetaResponseOutputItem {
|
|
|
6890
6922
|
* The type of the image generation call. Always `image_generation_call`.
|
|
6891
6923
|
*/
|
|
6892
6924
|
type: 'image_generation_call';
|
|
6925
|
+
/**
|
|
6926
|
+
* The action used for image generation.
|
|
6927
|
+
*/
|
|
6928
|
+
action?: 'generate' | 'edit' | 'auto' | null;
|
|
6893
6929
|
/**
|
|
6894
6930
|
* The agent that produced this item.
|
|
6895
6931
|
*/
|
|
6896
6932
|
agent?: ImageGenerationCall.Agent | null;
|
|
6933
|
+
/**
|
|
6934
|
+
* The background setting used for generation.
|
|
6935
|
+
*/
|
|
6936
|
+
background?: 'transparent' | 'opaque' | 'auto' | null;
|
|
6937
|
+
/**
|
|
6938
|
+
* The output format used for generation.
|
|
6939
|
+
*/
|
|
6940
|
+
output_format?: 'png' | 'webp' | 'jpeg' | null;
|
|
6897
6941
|
/**
|
|
6898
6942
|
* The quality of the image generated by the image generation tool call. One of
|
|
6899
6943
|
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
6900
6944
|
*/
|
|
6901
6945
|
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
6946
|
+
/**
|
|
6947
|
+
* The prompt that was used after any model prompt rewriting.
|
|
6948
|
+
*/
|
|
6949
|
+
revised_prompt?: string | null;
|
|
6902
6950
|
/**
|
|
6903
6951
|
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
6904
6952
|
*/
|