@depup/openai 7.34.0-depup.0 → 7.35.0-depup.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 +28 -0
- package/README.md +2 -2
- package/changes.json +1 -1
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/responses-ws-credentials.d.mts +4 -21
- package/internal/responses-ws-credentials.d.mts.map +1 -1
- package/internal/responses-ws-credentials.d.ts +4 -21
- package/internal/responses-ws-credentials.d.ts.map +1 -1
- package/internal/responses-ws-credentials.js +4 -100
- package/internal/responses-ws-credentials.js.map +1 -1
- package/internal/responses-ws-credentials.mjs +4 -100
- package/internal/responses-ws-credentials.mjs.map +1 -1
- package/internal/ws-connection-controller.d.mts +95 -0
- package/internal/ws-connection-controller.d.mts.map +1 -0
- package/internal/ws-connection-controller.d.ts +95 -0
- package/internal/ws-connection-controller.d.ts.map +1 -0
- package/internal/ws-connection-controller.js +457 -0
- package/internal/ws-connection-controller.js.map +1 -0
- package/internal/ws-connection-controller.mjs +453 -0
- package/internal/ws-connection-controller.mjs.map +1 -0
- package/internal/ws-connection.d.mts +18 -0
- package/internal/ws-connection.d.mts.map +1 -0
- package/internal/ws-connection.d.ts +18 -0
- package/internal/ws-connection.d.ts.map +1 -0
- package/internal/ws-connection.js +94 -0
- package/internal/ws-connection.js.map +1 -0
- package/internal/ws-connection.mjs +88 -0
- package/internal/ws-connection.mjs.map +1 -0
- package/internal/ws-credentials.d.mts +25 -0
- package/internal/ws-credentials.d.mts.map +1 -0
- package/internal/ws-credentials.d.ts +25 -0
- package/internal/ws-credentials.d.ts.map +1 -0
- package/internal/ws-credentials.js +109 -0
- package/internal/ws-credentials.js.map +1 -0
- package/internal/ws-credentials.mjs +105 -0
- package/internal/ws-credentials.mjs.map +1 -0
- package/lib/live/webrtc.d.mts +5 -1
- package/lib/live/webrtc.d.mts.map +1 -1
- package/lib/live/webrtc.d.ts +5 -1
- package/lib/live/webrtc.d.ts.map +1 -1
- package/lib/live/webrtc.js.map +1 -1
- package/lib/live/webrtc.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/admin/organization/projects/api-keys.d.mts +28 -5
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts +28 -5
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/api-keys.js +18 -3
- package/resources/admin/organization/projects/api-keys.js.map +1 -1
- package/resources/admin/organization/projects/api-keys.mjs +18 -3
- package/resources/admin/organization/projects/api-keys.mjs.map +1 -1
- package/resources/audio/speech.d.mts +2 -1
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +2 -1
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/voices.d.mts +47 -12
- package/resources/audio/voices.d.mts.map +1 -1
- package/resources/audio/voices.d.ts +47 -12
- package/resources/audio/voices.d.ts.map +1 -1
- package/resources/audio/voices.js +9 -9
- package/resources/audio/voices.mjs +9 -9
- package/resources/beta/realtime/realtime.d.mts +4 -0
- package/resources/beta/realtime/realtime.d.mts.map +1 -1
- package/resources/beta/realtime/realtime.d.ts +4 -0
- package/resources/beta/realtime/realtime.d.ts.map +1 -1
- package/resources/beta/realtime/realtime.js.map +1 -1
- package/resources/beta/realtime/realtime.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +8 -0
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +8 -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/beta/responses/ws-base.d.mts +2 -24
- package/resources/beta/responses/ws-base.d.mts.map +1 -1
- package/resources/beta/responses/ws-base.d.ts +2 -24
- package/resources/beta/responses/ws-base.d.ts.map +1 -1
- package/resources/beta/responses/ws-base.js +93 -519
- package/resources/beta/responses/ws-base.js.map +1 -1
- package/resources/beta/responses/ws-base.mjs +94 -520
- package/resources/beta/responses/ws-base.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +1 -1
- package/resources/chat/completions/completions.d.ts +1 -1
- package/resources/decisions.d.mts +68 -1
- package/resources/decisions.d.mts.map +1 -1
- package/resources/decisions.d.ts +68 -1
- package/resources/decisions.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/live/forks/forks.d.mts +2 -2
- package/resources/live/forks/forks.d.mts.map +1 -1
- package/resources/live/forks/forks.d.ts +2 -2
- package/resources/live/forks/forks.d.ts.map +1 -1
- package/resources/live/forks/ws-base.d.mts +2 -23
- package/resources/live/forks/ws-base.d.mts.map +1 -1
- package/resources/live/forks/ws-base.d.ts +2 -23
- package/resources/live/forks/ws-base.d.ts.map +1 -1
- package/resources/live/forks/ws-base.js +84 -485
- package/resources/live/forks/ws-base.js.map +1 -1
- package/resources/live/forks/ws-base.mjs +83 -484
- package/resources/live/forks/ws-base.mjs.map +1 -1
- package/resources/live/live.d.mts +523 -29
- package/resources/live/live.d.mts.map +1 -1
- package/resources/live/live.d.ts +523 -29
- package/resources/live/live.d.ts.map +1 -1
- package/resources/live/live.js.map +1 -1
- package/resources/live/live.mjs.map +1 -1
- package/resources/live/sessions.d.mts +16 -4
- package/resources/live/sessions.d.mts.map +1 -1
- package/resources/live/sessions.d.ts +16 -4
- package/resources/live/sessions.d.ts.map +1 -1
- package/resources/live/sideband/sideband.d.mts +4 -4
- package/resources/live/sideband/sideband.d.mts.map +1 -1
- package/resources/live/sideband/sideband.d.ts +4 -4
- package/resources/live/sideband/sideband.d.ts.map +1 -1
- package/resources/live/sideband/ws-base.d.mts +2 -23
- package/resources/live/sideband/ws-base.d.mts.map +1 -1
- package/resources/live/sideband/ws-base.d.ts +2 -23
- package/resources/live/sideband/ws-base.d.ts.map +1 -1
- package/resources/live/sideband/ws-base.js +84 -485
- package/resources/live/sideband/ws-base.js.map +1 -1
- package/resources/live/sideband/ws-base.mjs +83 -484
- package/resources/live/sideband/ws-base.mjs.map +1 -1
- package/resources/live/ws-base.d.mts +2 -23
- package/resources/live/ws-base.d.mts.map +1 -1
- package/resources/live/ws-base.d.ts +2 -23
- package/resources/live/ws-base.d.ts.map +1 -1
- package/resources/live/ws-base.js +84 -485
- package/resources/live/ws-base.js.map +1 -1
- package/resources/live/ws-base.mjs +83 -484
- package/resources/live/ws-base.mjs.map +1 -1
- package/resources/realtime/realtime.d.mts +8 -2
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +8 -2
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/responses/responses.d.mts +8 -0
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +8 -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/responses/ws-base.d.mts +2 -24
- package/resources/responses/ws-base.d.mts.map +1 -1
- package/resources/responses/ws-base.d.ts +2 -24
- package/resources/responses/ws-base.d.ts.map +1 -1
- package/resources/responses/ws-base.js +93 -519
- package/resources/responses/ws-base.js.map +1 -1
- package/resources/responses/ws-base.mjs +94 -520
- package/resources/responses/ws-base.mjs.map +1 -1
- package/resources/shared.d.mts +7 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +7 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/videos.d.mts +8 -0
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +8 -0
- package/resources/videos.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/internal/responses-ws-credentials.ts +5 -157
- package/src/internal/ws-connection-controller.ts +632 -0
- package/src/internal/ws-connection.ts +116 -0
- package/src/internal/ws-credentials.ts +165 -0
- package/src/lib/live/webrtc.ts +4 -1
- package/src/resources/admin/organization/projects/api-keys.ts +29 -5
- package/src/resources/audio/speech.ts +2 -1
- package/src/resources/audio/voices.ts +53 -12
- package/src/resources/beta/realtime/realtime.ts +5 -0
- package/src/resources/beta/responses/responses.ts +10 -0
- package/src/resources/beta/responses/ws-base.ts +106 -604
- package/src/resources/chat/completions/completions.ts +1 -1
- package/src/resources/decisions.ts +75 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/live/api.md +12 -0
- package/src/resources/live/forks/forks.ts +9 -0
- package/src/resources/live/forks/ws-base.ts +98 -558
- package/src/resources/live/live.ts +668 -26
- package/src/resources/live/sessions.ts +19 -4
- package/src/resources/live/sideband/sideband.ts +11 -2
- package/src/resources/live/sideband/ws-base.ts +98 -562
- package/src/resources/live/ws-base.ts +98 -558
- package/src/resources/realtime/realtime.ts +9 -2
- package/src/resources/responses/responses.ts +10 -0
- package/src/resources/responses/ws-base.ts +106 -600
- package/src/resources/shared.ts +7 -0
- package/src/resources/videos.ts +10 -0
- 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,88 @@
|
|
|
1
|
+
import { OpenAIError } from "../core/error.mjs";
|
|
2
|
+
import { ReadyState } from "./ws-adapter.mjs";
|
|
3
|
+
import { flattenRawData } from "./ws.mjs";
|
|
4
|
+
/** Sends or queues an application event using the existing connection state. */
|
|
5
|
+
export function sendWebSocketEvent(owner, event, queue, isReconnecting, onError) {
|
|
6
|
+
if (!owner.socket) {
|
|
7
|
+
throw new OpenAIError('Internal error: failed to initialize socket. Please report this issue.');
|
|
8
|
+
}
|
|
9
|
+
if (isReconnecting() || owner.socket.readyState === ReadyState.CONNECTING) {
|
|
10
|
+
if (!queue.enqueue(event)) {
|
|
11
|
+
onError('send queue is full, message discarded');
|
|
12
|
+
}
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (owner.socket.readyState !== ReadyState.OPEN) {
|
|
16
|
+
onError('cannot send on a closed WebSocket');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
owner.socket.send(JSON.stringify(event));
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
onError('could not send data', error);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** Sends or snapshots a raw frame using the same admission rules as application events. */
|
|
27
|
+
export function sendRawWebSocketData(owner, data, queue, isReconnecting, onError) {
|
|
28
|
+
if (!owner.socket) {
|
|
29
|
+
throw new OpenAIError('Internal error: failed to initialize socket. Please report this issue.');
|
|
30
|
+
}
|
|
31
|
+
if (isReconnecting() || owner.socket.readyState === ReadyState.CONNECTING) {
|
|
32
|
+
if (!queue.enqueueRaw(data)) {
|
|
33
|
+
onError('send queue is full, message discarded');
|
|
34
|
+
}
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (owner.socket.readyState !== ReadyState.OPEN) {
|
|
38
|
+
onError('cannot send on a closed WebSocket');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
owner.socket.send(flattenRawData(data));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
onError('could not send data', error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** Flushes queued frames with the caller's existing failed-send policy. */
|
|
49
|
+
export function flushWebSocketSendQueue(owner, queue, onError, options) {
|
|
50
|
+
if (!owner.socket) {
|
|
51
|
+
throw new OpenAIError('Internal error: failed to initialize socket. Please report this issue.');
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
queue.flush((data) => owner.socket.send(flattenRawData(data)), options);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
onError('could not send queued data', error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Resolves when the socket opens, or rejects if it errors or closes first. */
|
|
61
|
+
export function waitForWebSocketOpen(socket) {
|
|
62
|
+
// oxlint-disable-next-line promise/avoid-new -- Convert the existing socket event callbacks into the connection attempt's promise.
|
|
63
|
+
return new Promise((resolve, reject) => {
|
|
64
|
+
/* oxlint-disable eslint/no-use-before-define -- All mutually dependent callbacks are initialized before socket listeners are registered. */
|
|
65
|
+
const cleanup = () => {
|
|
66
|
+
socket.off('open', onOpen);
|
|
67
|
+
socket.off('error', onError);
|
|
68
|
+
socket.off('close', onFail);
|
|
69
|
+
};
|
|
70
|
+
/* oxlint-enable eslint/no-use-before-define */
|
|
71
|
+
const onOpen = () => {
|
|
72
|
+
cleanup();
|
|
73
|
+
resolve();
|
|
74
|
+
};
|
|
75
|
+
const onError = (error) => {
|
|
76
|
+
cleanup();
|
|
77
|
+
reject(error);
|
|
78
|
+
};
|
|
79
|
+
const onFail = () => {
|
|
80
|
+
cleanup();
|
|
81
|
+
reject(new Error('socket closed before open'));
|
|
82
|
+
};
|
|
83
|
+
socket.once('open', onOpen);
|
|
84
|
+
socket.once('error', onError);
|
|
85
|
+
socket.once('close', onFail);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=ws-connection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws-connection.mjs","sourceRoot":"","sources":["../src/internal/ws-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAE1C,OAAO,EAAE,cAAc,EAAE,iBAAa;AAStC,gFAAgF;AAChF,MAAM,UAAU,kBAAkB,CAChC,KAAkB,EAClB,KAAQ,EACR,KAAmB,EACnB,cAA6B,EAC7B,OAAgB;IAEhB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAClB,MAAM,IAAI,WAAW,CA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,EAAE,EAAE;YAC/B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OpenAI } from "../client.mjs";
|
|
2
|
+
import type { CredentialedWebSocketOptions } from "./ws.mjs";
|
|
3
|
+
/** Per-connection credential snapshots shared by Node WebSocket bindings. */
|
|
4
|
+
export declare class WebSocketCredentials {
|
|
5
|
+
private readonly connectionName;
|
|
6
|
+
constructor(connectionName: string);
|
|
7
|
+
private initialAuthUsedAPIKey;
|
|
8
|
+
private initialAPIKey;
|
|
9
|
+
private prepared;
|
|
10
|
+
get preparedAPIKey(): string | null | undefined;
|
|
11
|
+
trackInitialHeaders(client: OpenAI, headers: Record<string, string>, hasSocket: () => boolean): void;
|
|
12
|
+
usesAPIKey(client: OpenAI, headers: Record<string, string>): boolean;
|
|
13
|
+
build<Options extends CredentialedWebSocketOptions>(client: OpenAI, authHeaders: Record<string, string>, options: Options | null | undefined, initialAuthUsedAPIKey?: boolean): {
|
|
14
|
+
headers: {
|
|
15
|
+
[k: string]: string;
|
|
16
|
+
};
|
|
17
|
+
followRedirects: boolean;
|
|
18
|
+
} & {
|
|
19
|
+
headers: {
|
|
20
|
+
[k: string]: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
prepare<Socket, Options extends CredentialedWebSocketOptions>(client: OpenAI, socketOptions: Options | null | undefined, authHeaders: (apiKey?: string | null) => Record<string, string>, createSocket: (url: URL, headers: Record<string, string>) => Socket): Promise<(url: URL) => Socket>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ws-credentials.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws-credentials.d.mts","sourceRoot":"","sources":["../src/internal/ws-credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,sBAAkB;AAQxC,OAAO,KAAK,EAAE,4BAA4B,EAAE,iBAAa;AAyDzD,6EAA6E;AAC7E,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;gBAE5B,cAAc,EAAE,MAAM;IAGlC,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAMF;IAEd,IAAI,cAAc,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAE9C;IAED,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,OAAO,GAAG,IAAI;IAMpG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO;IAoBpE,KAAK,CAAC,OAAO,SAAS,4BAA4B,EAChD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EACnC,qBAAqB,CAAC,EAAE,OAAO;;;;;;;;;;IAmB3B,OAAO,CAAC,MAAM,EAAE,OAAO,SAAS,4BAA4B,EAChE,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EACzC,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/D,YAAY,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,GAClE,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;CAuBjC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OpenAI } from "../client.js";
|
|
2
|
+
import type { CredentialedWebSocketOptions } from "./ws.js";
|
|
3
|
+
/** Per-connection credential snapshots shared by Node WebSocket bindings. */
|
|
4
|
+
export declare class WebSocketCredentials {
|
|
5
|
+
private readonly connectionName;
|
|
6
|
+
constructor(connectionName: string);
|
|
7
|
+
private initialAuthUsedAPIKey;
|
|
8
|
+
private initialAPIKey;
|
|
9
|
+
private prepared;
|
|
10
|
+
get preparedAPIKey(): string | null | undefined;
|
|
11
|
+
trackInitialHeaders(client: OpenAI, headers: Record<string, string>, hasSocket: () => boolean): void;
|
|
12
|
+
usesAPIKey(client: OpenAI, headers: Record<string, string>): boolean;
|
|
13
|
+
build<Options extends CredentialedWebSocketOptions>(client: OpenAI, authHeaders: Record<string, string>, options: Options | null | undefined, initialAuthUsedAPIKey?: boolean): {
|
|
14
|
+
headers: {
|
|
15
|
+
[k: string]: string;
|
|
16
|
+
};
|
|
17
|
+
followRedirects: boolean;
|
|
18
|
+
} & {
|
|
19
|
+
headers: {
|
|
20
|
+
[k: string]: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
prepare<Socket, Options extends CredentialedWebSocketOptions>(client: OpenAI, socketOptions: Options | null | undefined, authHeaders: (apiKey?: string | null) => Record<string, string>, createSocket: (url: URL, headers: Record<string, string>) => Socket): Promise<(url: URL) => Socket>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ws-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;CAuBjC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebSocketCredentials = void 0;
|
|
4
|
+
const error_1 = require("../core/error.js");
|
|
5
|
+
const realtime_credentials_1 = require("./realtime-credentials.js");
|
|
6
|
+
const ws_1 = require("./ws.js");
|
|
7
|
+
/**
|
|
8
|
+
* Keep caller credential admission distinct from the hook's final provider-key transform.
|
|
9
|
+
* The latter reuses captured base headers so no caller getters are reread after the refresh.
|
|
10
|
+
*/
|
|
11
|
+
function buildCredentialedWebSocketOptions(client, authHeaders, options, prepared) {
|
|
12
|
+
if (prepared) {
|
|
13
|
+
return prepared.apiKey === undefined
|
|
14
|
+
? (0, ws_1.mergeWebSocketAuthHeaders)(prepared.options, authHeaders, prepared.removedHeaders)
|
|
15
|
+
: (0, ws_1.buildWebSocketOptions)(client, authHeaders, prepared.options, prepared.removedHeaders, true);
|
|
16
|
+
}
|
|
17
|
+
if (!client._hasApiKeyProvider()) {
|
|
18
|
+
return (0, ws_1.buildWebSocketOptions)(client, authHeaders, options);
|
|
19
|
+
}
|
|
20
|
+
const removedHeaders = new Set();
|
|
21
|
+
const provided = (0, ws_1.buildWebSocketOptions)(client, {}, options, removedHeaders);
|
|
22
|
+
return (0, ws_1.snapshotWebSocketCredentials)(provided, ws_1.WEBSOCKET_METADATA_HEADERS)
|
|
23
|
+
? provided
|
|
24
|
+
: (0, ws_1.buildWebSocketOptions)(client, authHeaders, provided, removedHeaders, true);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Classify reconnect credentials without treating the previous SDK key as a caller override.
|
|
28
|
+
* Capture routing and caller options before any asynchronous key refresh.
|
|
29
|
+
*/
|
|
30
|
+
function prepareWebSocketReconnect(client, socketOptions, initialAuthUsedAPIKey) {
|
|
31
|
+
const removedHeaders = new Set();
|
|
32
|
+
const options = (0, ws_1.buildWebSocketOptions)(client, {}, socketOptions, removedHeaders);
|
|
33
|
+
let authentication;
|
|
34
|
+
if ((0, ws_1.snapshotWebSocketCredentials)(options, ws_1.WEBSOCKET_METADATA_HEADERS)) {
|
|
35
|
+
authentication = 'provided';
|
|
36
|
+
}
|
|
37
|
+
else if (removedHeaders.has('authorization') ||
|
|
38
|
+
options.headers?.['authorization'] !== undefined ||
|
|
39
|
+
!initialAuthUsedAPIKey) {
|
|
40
|
+
authentication = 'cached';
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
authentication = 'refresh';
|
|
44
|
+
}
|
|
45
|
+
return { options, removedHeaders, authentication };
|
|
46
|
+
}
|
|
47
|
+
/** Per-connection credential snapshots shared by Node WebSocket bindings. */
|
|
48
|
+
class WebSocketCredentials {
|
|
49
|
+
constructor(connectionName) {
|
|
50
|
+
this.initialAuthUsedAPIKey = false;
|
|
51
|
+
this.connectionName = connectionName;
|
|
52
|
+
}
|
|
53
|
+
get preparedAPIKey() {
|
|
54
|
+
return this.prepared?.apiKey;
|
|
55
|
+
}
|
|
56
|
+
trackInitialHeaders(client, headers, hasSocket) {
|
|
57
|
+
if (!hasSocket() && client._hasApiKeyProvider()) {
|
|
58
|
+
this.initialAPIKey = headers['Authorization']?.slice('Bearer '.length);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
usesAPIKey(client, headers) {
|
|
62
|
+
// Hooks can read the SDK key without delegating. Only use an ordinary cached property here:
|
|
63
|
+
// invoking custom/Bedrock getters could validate credentials a caller-owned socket never sends.
|
|
64
|
+
const apiKey = this.initialAPIKey ??
|
|
65
|
+
(client._hasApiKeyProvider() ? Object.getOwnPropertyDescriptor(client, 'apiKey')?.value : undefined);
|
|
66
|
+
if (!apiKey) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
// Metadata containing a copy of a credential does not make it the socket's authentication.
|
|
70
|
+
return (0, ws_1.snapshotWebSocketCredentials)({
|
|
71
|
+
headers: Object.fromEntries(Object.entries(headers).map(([name, value]) => [name, value?.includes(apiKey) ? value : ''])),
|
|
72
|
+
}, ws_1.WEBSOCKET_METADATA_HEADERS);
|
|
73
|
+
}
|
|
74
|
+
build(client, authHeaders, options, initialAuthUsedAPIKey) {
|
|
75
|
+
if (initialAuthUsedAPIKey !== undefined) {
|
|
76
|
+
this.initialAuthUsedAPIKey = initialAuthUsedAPIKey;
|
|
77
|
+
this.initialAPIKey = undefined;
|
|
78
|
+
}
|
|
79
|
+
const socketOptions = buildCredentialedWebSocketOptions(client, authHeaders, options, this.prepared);
|
|
80
|
+
if (client._hasApiKeyProvider() &&
|
|
81
|
+
!authHeaders['Authorization'] &&
|
|
82
|
+
!(0, ws_1.snapshotWebSocketCredentials)(socketOptions, ws_1.WEBSOCKET_METADATA_HEADERS)) {
|
|
83
|
+
throw new error_1.OpenAIError(`Cannot open a ${this.connectionName} WebSocket with an unresolved function-based apiKey. Resolve it before constructing the WebSocket or provide explicit WebSocket credentials.`);
|
|
84
|
+
}
|
|
85
|
+
return socketOptions;
|
|
86
|
+
}
|
|
87
|
+
async prepare(client, socketOptions, authHeaders, createSocket) {
|
|
88
|
+
const { options, removedHeaders, authentication } = prepareWebSocketReconnect(client, socketOptions, this.initialAuthUsedAPIKey);
|
|
89
|
+
const createPreparedSocket = (url, headers, apiKey) => {
|
|
90
|
+
const previous = this.prepared;
|
|
91
|
+
this.prepared = { options, removedHeaders, apiKey };
|
|
92
|
+
try {
|
|
93
|
+
// Resolve headers inside the scope so legacy zero-argument overrides see this attempt's key.
|
|
94
|
+
return createSocket(url, apiKey === undefined ? headers : authHeaders(apiKey));
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
this.prepared = previous;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
if (authentication !== 'refresh') {
|
|
101
|
+
const headers = authentication === 'provided' ? {} : authHeaders();
|
|
102
|
+
return (url) => createPreparedSocket(url, headers);
|
|
103
|
+
}
|
|
104
|
+
const { commit } = await (0, realtime_credentials_1.resolveRealtimeAPIKey)(client, true);
|
|
105
|
+
return (url) => createPreparedSocket(url, {}, commit());
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.WebSocketCredentials = WebSocketCredentials;
|
|
109
|
+
//# sourceMappingURL=ws-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws-credentials.js","sourceRoot":"","sources":["../src/internal/ws-credentials.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,oEAA+D;AAC/D,gCAKc;AAGd;;;GAGG;AACH,SAAS,iCAAiC,CACxC,MAAc,EACd,WAAmC,EACnC,OAAmC,EACnC,QAIC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC,MAAM,KAAK,SAAS;YAClC,CAAC,CAAC,IAAA,8BAAyB,EAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC;YACnF,CAAC,CAAC,IAAA,0BAAqB,EAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IAClG,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC;QACjC,OAAO,IAAA,0BAAqB,EAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAA,0BAAqB,EAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IAC5E,OAAO,IAAA,iCAA4B,EAAC,QAAQ,EAAE,+BAA0B,CAAC;QACvE,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,IAAA,0BAAqB,EAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;A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entials.mjs";
|
|
3
|
+
import { buildWebSocketOptions, mergeWebSocketAuthHeaders, snapshotWebSocketCredentials, WEBSOCKET_METADATA_HEADERS, } from "./ws.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Keep caller credential admission distinct from the hook's final provider-key transform.
|
|
6
|
+
* The latter reuses captured base headers so no caller getters are reread after the refresh.
|
|
7
|
+
*/
|
|
8
|
+
function buildCredentialedWebSocketOptions(client, authHeaders, options, prepared) {
|
|
9
|
+
if (prepared) {
|
|
10
|
+
return prepared.apiKey === undefined
|
|
11
|
+
? mergeWebSocketAuthHeaders(prepared.options, authHeaders, prepared.removedHeaders)
|
|
12
|
+
: buildWebSocketOptions(client, authHeaders, prepared.options, prepared.removedHeaders, true);
|
|
13
|
+
}
|
|
14
|
+
if (!client._hasApiKeyProvider()) {
|
|
15
|
+
return buildWebSocketOptions(client, authHeaders, options);
|
|
16
|
+
}
|
|
17
|
+
const removedHeaders = new Set();
|
|
18
|
+
const provided = buildWebSocketOptions(client, {}, options, removedHeaders);
|
|
19
|
+
return snapshotWebSocketCredentials(provided, WEBSOCKET_METADATA_HEADERS)
|
|
20
|
+
? provided
|
|
21
|
+
: buildWebSocketOptions(client, authHeaders, provided, removedHeaders, true);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Classify reconnect credentials without treating the previous SDK key as a caller override.
|
|
25
|
+
* Capture routing and caller options before any asynchronous key refresh.
|
|
26
|
+
*/
|
|
27
|
+
function prepareWebSocketReconnect(client, socketOptions, initialAuthUsedAPIKey) {
|
|
28
|
+
const removedHeaders = new Set();
|
|
29
|
+
const options = buildWebSocketOptions(client, {}, socketOptions, removedHeaders);
|
|
30
|
+
let authentication;
|
|
31
|
+
if (snapshotWebSocketCredentials(options, WEBSOCKET_METADATA_HEADERS)) {
|
|
32
|
+
authentication = 'provided';
|
|
33
|
+
}
|
|
34
|
+
else if (removedHeaders.has('authorization') ||
|
|
35
|
+
options.headers?.['authorization'] !== undefined ||
|
|
36
|
+
!initialAuthUsedAPIKey) {
|
|
37
|
+
authentication = 'cached';
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
authentication = 'refresh';
|
|
41
|
+
}
|
|
42
|
+
return { options, removedHeaders, authentication };
|
|
43
|
+
}
|
|
44
|
+
/** Per-connection credential snapshots shared by Node WebSocket bindings. */
|
|
45
|
+
export class WebSocketCredentials {
|
|
46
|
+
constructor(connectionName) {
|
|
47
|
+
this.initialAuthUsedAPIKey = false;
|
|
48
|
+
this.connectionName = connectionName;
|
|
49
|
+
}
|
|
50
|
+
get preparedAPIKey() {
|
|
51
|
+
return this.prepared?.apiKey;
|
|
52
|
+
}
|
|
53
|
+
trackInitialHeaders(client, headers, hasSocket) {
|
|
54
|
+
if (!hasSocket() && client._hasApiKeyProvider()) {
|
|
55
|
+
this.initialAPIKey = headers['Authorization']?.slice('Bearer '.length);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
usesAPIKey(client, headers) {
|
|
59
|
+
// Hooks can read the SDK key without delegating. Only use an ordinary cached property here:
|
|
60
|
+
// invoking custom/Bedrock getters could validate credentials a caller-owned socket never sends.
|
|
61
|
+
const apiKey = this.initialAPIKey ??
|
|
62
|
+
(client._hasApiKeyProvider() ? Object.getOwnPropertyDescriptor(client, 'apiKey')?.value : undefined);
|
|
63
|
+
if (!apiKey) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
// Metadata containing a copy of a credential does not make it the socket's authentication.
|
|
67
|
+
return snapshotWebSocketCredentials({
|
|
68
|
+
headers: Object.fromEntries(Object.entries(headers).map(([name, value]) => [name, value?.includes(apiKey) ? value : ''])),
|
|
69
|
+
}, WEBSOCKET_METADATA_HEADERS);
|
|
70
|
+
}
|
|
71
|
+
build(client, authHeaders, options, initialAuthUsedAPIKey) {
|
|
72
|
+
if (initialAuthUsedAPIKey !== undefined) {
|
|
73
|
+
this.initialAuthUsedAPIKey = initialAuthUsedAPIKey;
|
|
74
|
+
this.initialAPIKey = undefined;
|
|
75
|
+
}
|
|
76
|
+
const socketOptions = buildCredentialedWebSocketOptions(client, authHeaders, options, this.prepared);
|
|
77
|
+
if (client._hasApiKeyProvider() &&
|
|
78
|
+
!authHeaders['Authorization'] &&
|
|
79
|
+
!snapshotWebSocketCredentials(socketOptions, WEBSOCKET_METADATA_HEADERS)) {
|
|
80
|
+
throw new OpenAIError(`Cannot open a ${this.connectionName} WebSocket with an unresolved function-based apiKey. Resolve it before constructing the WebSocket or provide explicit WebSocket credentials.`);
|
|
81
|
+
}
|
|
82
|
+
return socketOptions;
|
|
83
|
+
}
|
|
84
|
+
async prepare(client, socketOptions, authHeaders, createSocket) {
|
|
85
|
+
const { options, removedHeaders, authentication } = prepareWebSocketReconnect(client, socketOptions, this.initialAuthUsedAPIKey);
|
|
86
|
+
const createPreparedSocket = (url, headers, apiKey) => {
|
|
87
|
+
const previous = this.prepared;
|
|
88
|
+
this.prepared = { options, removedHeaders, apiKey };
|
|
89
|
+
try {
|
|
90
|
+
// Resolve headers inside the scope so legacy zero-argument overrides see this attempt's key.
|
|
91
|
+
return createSocket(url, apiKey === undefined ? headers : authHeaders(apiKey));
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
this.prepared = previous;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
if (authentication !== 'refresh') {
|
|
98
|
+
const headers = authentication === 'provided' ? {} : authHeaders();
|
|
99
|
+
return (url) => createPreparedSocket(url, headers);
|
|
100
|
+
}
|
|
101
|
+
const { commit } = await resolveRealtimeAPIKey(client, true);
|
|
102
|
+
return (url) => createPreparedSocket(url, {}, commit());
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=ws-credentials.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws-credentials.mjs","sourceRoot":"","sources":["../src/internal/ws-credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAE5C,OAAO,E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AAQ,CAAC;YAC/B,IAAI,CAAC,QAAQ,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;YACpD,IAAI,CAAC;gBACH,6FAA6F;gBAC7F,OAAO,YAAY,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACjF,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC;QACF,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,OAAO,GAAG,cAAc,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACnE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACrD,CAAC;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
|
package/lib/live/webrtc.d.mts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type { ConnectClientEvent
|
|
1
|
+
import type { ConnectClientEvent, ConnectServerEvent as ServerEvent } from "../../resources/live/sideband/sideband.mjs";
|
|
2
2
|
import { WebRTCConnection } from "../webrtc/connection.mjs";
|
|
3
3
|
import { DataChannel } from "../webrtc/data-channel.mjs";
|
|
4
4
|
export { WebRTCError } from "../webrtc/errors.mjs";
|
|
5
5
|
export type { WebRTCErrorCode, WebRTCErrorPhase } from "../webrtc/errors.mjs";
|
|
6
6
|
export type { ExchangeSdp, WebRTCConnectOptions, WebRTCConnectionEvent, WebRTCConfiguration, WebRTCState, } from "../webrtc/types.mjs";
|
|
7
|
+
/** Fixture playback requires a primary WebSocket or server sideband. */
|
|
8
|
+
type ClientEvent = Exclude<ConnectClientEvent, {
|
|
9
|
+
type: 'session.output_audio.fixture.play';
|
|
10
|
+
}>;
|
|
7
11
|
/** Browser Live connection with application-owned SDP exchange and typed server-event subscriptions. */
|
|
8
12
|
export declare class OpenAILiveWebRTC extends WebRTCConnection<ClientEvent, ServerEvent> {
|
|
9
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc.d.mts","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,
|
|
1
|
+
{"version":3,"file":"webrtc.d.mts","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,IAAI,WAAW,EAClC,mDAA+C;AAChD,OAAO,EAAE,gBAAgB,EAAE,iCAA6B;AACxD,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,6BAAyB;AAC1E,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,GACZ,4BAAwB;AAEzB,wEAAwE;AACxE,KAAK,WAAW,GAAG,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,mCAAmC,CAAA;CAAE,CAAC,CAAC;AAE9F,wGAAwG;AACxG,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC;CAAG;AAEnF,kGAAkG;AAClG,qBAAa,eAAgB,SAAQ,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC;CAAG"}
|
package/lib/live/webrtc.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type { ConnectClientEvent
|
|
1
|
+
import type { ConnectClientEvent, ConnectServerEvent as ServerEvent } from "../../resources/live/sideband/sideband.js";
|
|
2
2
|
import { WebRTCConnection } from "../webrtc/connection.js";
|
|
3
3
|
import { DataChannel } from "../webrtc/data-channel.js";
|
|
4
4
|
export { WebRTCError } from "../webrtc/errors.js";
|
|
5
5
|
export type { WebRTCErrorCode, WebRTCErrorPhase } from "../webrtc/errors.js";
|
|
6
6
|
export type { ExchangeSdp, WebRTCConnectOptions, WebRTCConnectionEvent, WebRTCConfiguration, WebRTCState, } from "../webrtc/types.js";
|
|
7
|
+
/** Fixture playback requires a primary WebSocket or server sideband. */
|
|
8
|
+
type ClientEvent = Exclude<ConnectClientEvent, {
|
|
9
|
+
type: 'session.output_audio.fixture.play';
|
|
10
|
+
}>;
|
|
7
11
|
/** Browser Live connection with application-owned SDP exchange and typed server-event subscriptions. */
|
|
8
12
|
export declare class OpenAILiveWebRTC extends WebRTCConnection<ClientEvent, ServerEvent> {
|
|
9
13
|
}
|
package/lib/live/webrtc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc.d.ts","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,
|
|
1
|
+
{"version":3,"file":"webrtc.d.ts","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,IAAI,WAAW,EAClC,kDAA+C;AAChD,OAAO,EAAE,gBAAgB,EAAE,gCAA6B;AACxD,OAAO,EAAE,WAAW,EAAE,kCAA+B;AAErD,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAAyB;AAC1E,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,GACZ,2BAAwB;AAEzB,wEAAwE;AACxE,KAAK,WAAW,GAAG,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,mCAAmC,CAAA;CAAE,CAAC,CAAC;AAE9F,wGAAwG;AACxG,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC;CAAG;AAEnF,kGAAkG;AAClG,qBAAa,eAAgB,SAAQ,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC;CAAG"}
|
package/lib/live/webrtc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc.js","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":";;;AAKA,wDAAwD;AACxD,4DAAqD;AAErD,8CAA+C;AAAtC,qGAAA,WAAW,OAAA;
|
|
1
|
+
{"version":3,"file":"webrtc.js","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":";;;AAKA,wDAAwD;AACxD,4DAAqD;AAErD,8CAA+C;AAAtC,qGAAA,WAAW,OAAA;AAapB,wGAAwG;AACxG,MAAa,gBAAiB,SAAQ,6BAA0C;CAAG;AAAnF,4CAAmF;AAEnF,kGAAkG;AAClG,MAAa,eAAgB,SAAQ,0BAAqC;CAAG;AAA7E,0CAA6E"}
|
package/lib/live/webrtc.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc.mjs","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,iCAA6B;AACxD,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,WAAW,EAAE,6BAAyB;
|
|
1
|
+
{"version":3,"file":"webrtc.mjs","sourceRoot":"","sources":["../../src/lib/live/webrtc.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,iCAA6B;AACxD,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAa/C,wGAAwG;AACxG,MAAM,OAAO,gBAAiB,SAAQ,gBAA0C;CAAG;AAEnF,kGAAkG;AAClG,MAAM,OAAO,eAAgB,SAAQ,WAAqC;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/openai",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.35.0-depup.0",
|
|
4
4
|
"description": "The official TypeScript library for the OpenAI API (with updated dependencies)",
|
|
5
5
|
"author": "OpenAI <support@openai.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -321,8 +321,8 @@
|
|
|
321
321
|
"changes": {},
|
|
322
322
|
"depsUpdated": 0,
|
|
323
323
|
"originalPackage": "openai",
|
|
324
|
-
"originalVersion": "7.
|
|
325
|
-
"processedAt": "2026-10-
|
|
324
|
+
"originalVersion": "7.35.0",
|
|
325
|
+
"processedAt": "2026-10-17T00:32:14.490Z",
|
|
326
326
|
"smokeTest": "passed"
|
|
327
327
|
}
|
|
328
328
|
}
|
|
@@ -17,8 +17,20 @@ export declare class APIKeys extends APIResource {
|
|
|
17
17
|
*/
|
|
18
18
|
retrieve(apiKeyID: string, params: APIKeyRetrieveParams, options?: RequestOptions): APIPromise<ProjectAPIKey>;
|
|
19
19
|
/**
|
|
20
|
-
* Updates the expiration of an existing API key in the project,
|
|
21
|
-
* service-account-owned key. Requires permission to write project API
|
|
20
|
+
* Updates the scopes and/or expiration of an existing API key in the project,
|
|
21
|
+
* including a service-account-owned key. Requires permission to write project API
|
|
22
|
+
* keys.
|
|
23
|
+
*
|
|
24
|
+
* Provide at least one of `scopes` or `expires_in_seconds`. Omitted fields stay
|
|
25
|
+
* unchanged; neither field accepts `null`. Both changes are saved together.
|
|
26
|
+
*
|
|
27
|
+
* `scopes` replaces the key's scope restrictions using the same scope identifiers
|
|
28
|
+
* as the dashboard. An empty array means All permissions, subject to the owner's
|
|
29
|
+
* effective access; it does not mean no access. Use `["api.all.read"]` for
|
|
30
|
+
* read-only access or specific scopes such as `["api.files.read"]` for restricted
|
|
31
|
+
* access. This does not change user or service-account roles or grant admin
|
|
32
|
+
* permissions. Scope changes follow the same authentication-cache propagation as
|
|
33
|
+
* dashboard edits.
|
|
22
34
|
*
|
|
23
35
|
* Provide `expires_in_seconds` to set the expiration relative to this request. The
|
|
24
36
|
* value must satisfy the organization's and project's expiry policies. Expired
|
|
@@ -30,7 +42,10 @@ export declare class APIKeys extends APIResource {
|
|
|
30
42
|
* const projectAPIKey =
|
|
31
43
|
* await client.admin.organization.projects.apiKeys.update(
|
|
32
44
|
* 'api_key_id',
|
|
33
|
-
* {
|
|
45
|
+
* {
|
|
46
|
+
* project_id: 'project_id',
|
|
47
|
+
* scopes: ['api.all.read'],
|
|
48
|
+
* },
|
|
34
49
|
* );
|
|
35
50
|
* ```
|
|
36
51
|
*/
|
|
@@ -196,9 +211,17 @@ export interface APIKeyUpdateParams {
|
|
|
196
211
|
/**
|
|
197
212
|
* Body param: Number of seconds from this request until the API key expires. Must
|
|
198
213
|
* comply with the organization and project expiry policies. Expired keys cannot be
|
|
199
|
-
* updated. Retrying resets the expiry relative to the new request.
|
|
214
|
+
* updated. Retrying resets the expiry relative to the new request. Omit to keep
|
|
215
|
+
* the current expiration.
|
|
216
|
+
*/
|
|
217
|
+
expires_in_seconds?: number;
|
|
218
|
+
/**
|
|
219
|
+
* Body param: Replace the API key scope restrictions. Omit to leave scopes
|
|
220
|
+
* unchanged. An empty array removes key restrictions (All permissions), subject to
|
|
221
|
+
* the owner's effective permissions. Use ["api.all.read"] for read-only access.
|
|
222
|
+
* Scopes do not change the owner's roles or grant administrative permissions.
|
|
200
223
|
*/
|
|
201
|
-
|
|
224
|
+
scopes?: Array<string>;
|
|
202
225
|
}
|
|
203
226
|
export interface APIKeyListParams extends ConversationCursorPageParams {
|
|
204
227
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.d.mts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EAAE,UAAU,EAAE,yCAAqC;AAC1D,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,WAAW,EACZ,wCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,iDAA6C;AAqHtE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAW5B
|
|
1
|
+
{"version":3,"file":"api-keys.d.mts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EAAE,UAAU,EAAE,yCAAqC;AAC1D,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,WAAW,EACZ,wCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,iDAA6C;AAqHtE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAW5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAYzG;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EACF,CAAC,gBAAgB,GACf,CACI;SAEI,CAAC,IACG,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MA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IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,gBAAiB,SAAQ,4BAA4B;IACpE;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAC;CACtD;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -17,8 +17,20 @@ export declare class APIKeys extends APIResource {
|
|
|
17
17
|
*/
|
|
18
18
|
retrieve(apiKeyID: string, params: APIKeyRetrieveParams, options?: RequestOptions): APIPromise<ProjectAPIKey>;
|
|
19
19
|
/**
|
|
20
|
-
* Updates the expiration of an existing API key in the project,
|
|
21
|
-
* service-account-owned key. Requires permission to write project API
|
|
20
|
+
* Updates the scopes and/or expiration of an existing API key in the project,
|
|
21
|
+
* including a service-account-owned key. Requires permission to write project API
|
|
22
|
+
* keys.
|
|
23
|
+
*
|
|
24
|
+
* Provide at least one of `scopes` or `expires_in_seconds`. Omitted fields stay
|
|
25
|
+
* unchanged; neither field accepts `null`. Both changes are saved together.
|
|
26
|
+
*
|
|
27
|
+
* `scopes` replaces the key's scope restrictions using the same scope identifiers
|
|
28
|
+
* as the dashboard. An empty array means All permissions, subject to the owner's
|
|
29
|
+
* effective access; it does not mean no access. Use `["api.all.read"]` for
|
|
30
|
+
* read-only access or specific scopes such as `["api.files.read"]` for restricted
|
|
31
|
+
* access. This does not change user or service-account roles or grant admin
|
|
32
|
+
* permissions. Scope changes follow the same authentication-cache propagation as
|
|
33
|
+
* dashboard edits.
|
|
22
34
|
*
|
|
23
35
|
* Provide `expires_in_seconds` to set the expiration relative to this request. The
|
|
24
36
|
* value must satisfy the organization's and project's expiry policies. Expired
|
|
@@ -30,7 +42,10 @@ export declare class APIKeys extends APIResource {
|
|
|
30
42
|
* const projectAPIKey =
|
|
31
43
|
* await client.admin.organization.projects.apiKeys.update(
|
|
32
44
|
* 'api_key_id',
|
|
33
|
-
* {
|
|
45
|
+
* {
|
|
46
|
+
* project_id: 'project_id',
|
|
47
|
+
* scopes: ['api.all.read'],
|
|
48
|
+
* },
|
|
34
49
|
* );
|
|
35
50
|
* ```
|
|
36
51
|
*/
|
|
@@ -196,9 +211,17 @@ export interface APIKeyUpdateParams {
|
|
|
196
211
|
/**
|
|
197
212
|
* Body param: Number of seconds from this request until the API key expires. Must
|
|
198
213
|
* comply with the organization and project expiry policies. Expired keys cannot be
|
|
199
|
-
* updated. Retrying resets the expiry relative to the new request.
|
|
214
|
+
* updated. Retrying resets the expiry relative to the new request. Omit to keep
|
|
215
|
+
* the current expiration.
|
|
216
|
+
*/
|
|
217
|
+
expires_in_seconds?: number;
|
|
218
|
+
/**
|
|
219
|
+
* Body param: Replace the API key scope restrictions. Omit to leave scopes
|
|
220
|
+
* unchanged. An empty array removes key restrictions (All permissions), subject to
|
|
221
|
+
* the owner's effective permissions. Use ["api.all.read"] for read-only access.
|
|
222
|
+
* Scopes do not change the owner's roles or grant administrative permissions.
|
|
200
223
|
*/
|
|
201
|
-
|
|
224
|
+
scopes?: Array<string>;
|
|
202
225
|
}
|
|
203
226
|
export interface APIKeyListParams extends ConversationCursorPageParams {
|
|
204
227
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,UAAU,EAAE,wCAAqC;AAC1D,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,WAAW,EACZ,uCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,gDAA6C;AAqHtE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAW5B
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/api-keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,UAAU,EAAE,wCAAqC;AAC1D,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,WAAW,EACZ,uCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,gDAA6C;AAqHtE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAW5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAYzG;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EACF,CAAC,gBAAgB,GACf,CACI;SAEI,CAAC,IACG,QAAQ,GACR,MAA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