File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 2323 "types" : " ./dist/WebRTC/index.d.ts" ,
2424 "import" : " ./dist/WebRTC/index.js"
2525 },
26+ "./openai" : {
27+ "types" : " ./dist/openai/index.d.ts"
28+ },
2629 "./*" : {
2730 "types" : " ./dist/*.d.ts" ,
2831 "import" : " ./dist/*.js"
3538 },
3639 "devDependencies" : {
3740 "@tsconfig/node20" : " ^20.1.4" ,
41+ "@types/lodash-es" : " ^4.17.12" ,
3842 "type-fest" : " ^4.33.0"
3943 },
4044 "dependencies" : {
45+ "lodash-es" : " ^4.17.21" ,
4146 "typescript-event-target" : " ^1.1.1"
4247 }
4348}
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ parent_dir=$(cd "${this_dir}/.."; pwd)
99# https://github.com/openai/openai-openapi
1010# https://raw.githubusercontent.com/openai/openai-openapi/25be47865ea2df1179a46be045c2f6b65f38e982/openapi.yaml
1111
12- npx openapi-typescript " https://raw.githubusercontent.com/openai/openai-openapi/25be47865ea2df1179a46be045c2f6b65f38e982/openapi.yaml" -o " ${parent_dir} /src/types/ openai/openapi.d .ts"
12+ npx openapi-typescript " https://raw.githubusercontent.com/openai/openai-openapi/25be47865ea2df1179a46be045c2f6b65f38e982/openapi.yaml" -o " ${parent_dir} /src/openai/openapi.ts"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type {
33 RealtimeServerEvent ,
44 RealtimeConversationItem ,
55 RealtimeSession ,
6- } from "../types/ openai"
6+ } from "../openai"
77
88// Add this index signature allows the key to be string
99// & {
@@ -19,15 +19,15 @@ type RealtimeClientEventObjects =
1919 RealtimeClientEventMap [ RealtimeClientEventNames ]
2020
2121class BaseEvent <
22- TType extends keyof RealtimeClientEventMap | RealtimeServerEvent [ "type" ]
22+ TType extends keyof RealtimeClientEventMap | RealtimeServerEvent [ "type" ] ,
2323> extends Event {
2424 constructor ( public readonly type : TType ) {
2525 super ( type )
2626 }
2727}
2828
2929export class RealtimeServerEventEvent <
30- T extends RealtimeServerEvent = RealtimeServerEvent
30+ T extends RealtimeServerEvent = RealtimeServerEvent ,
3131> extends BaseEvent < "serverEvent" > {
3232 constructor ( public readonly event : T ) {
3333 super ( "serverEvent" )
@@ -60,7 +60,7 @@ export class SessionCreatedEvent extends BaseEvent<"sessionCreated"> {
6060}
6161
6262export interface EventTargetListener <
63- TEvent extends RealtimeClientEventObjects
63+ TEvent extends RealtimeClientEventObjects ,
6464> {
6565 ( evt : TEvent ) : void
6666}
You can’t perform that action at this time.
0 commit comments