Skip to content

Commit 34e158a

Browse files
committed
build dist
1 parent 5b5a3ae commit 34e158a

12 files changed

+792
-0
lines changed

dist/index.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { RealtimeAPI } from './lib/api.js';
2+
import { RealtimeConversation } from './lib/conversation.js';
3+
import { RealtimeClient } from './lib/client.js';
4+
import { RealtimeUtils } from './lib/utils.js';
5+
export { RealtimeAPI, RealtimeConversation, RealtimeClient, RealtimeUtils };
6+
//# sourceMappingURL=index.d.ts.map

dist/index.d.ts.map

+1
Original file line numberDiff line numberDiff line change

dist/lib/api.d.ts

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
export class RealtimeAPI extends RealtimeEventHandler {
2+
/**
3+
* Create a new RealtimeAPI instance
4+
* @param {{url?: string, apiKey?: string, dangerouslyAllowAPIKeyInBrowser?: boolean, debug?: boolean}} [settings]
5+
* @returns {RealtimeAPI}
6+
*/
7+
constructor({ url, apiKey, dangerouslyAllowAPIKeyInBrowser, debug }?: {
8+
url?: string;
9+
apiKey?: string;
10+
dangerouslyAllowAPIKeyInBrowser?: boolean;
11+
debug?: boolean;
12+
});
13+
defaultUrl: string;
14+
url: string;
15+
apiKey: string;
16+
debug: boolean;
17+
ws: any;
18+
/**
19+
* Tells us whether or not the WebSocket is connected
20+
* @returns {boolean}
21+
*/
22+
isConnected(): boolean;
23+
/**
24+
* Writes WebSocket logs to console
25+
* @param {...any} args
26+
* @returns {true}
27+
*/
28+
log(...args: any[]): true;
29+
/**
30+
* Connects to Realtime API Websocket Server
31+
* @param {{model?: string}} [settings]
32+
* @returns {Promise<true>}
33+
*/
34+
connect(model?: string): Promise<true>;
35+
/**
36+
* Disconnects from Realtime API server
37+
* @param {WebSocket} [ws]
38+
* @returns {true}
39+
*/
40+
disconnect(ws?: WebSocket): true;
41+
/**
42+
* Receives an event from WebSocket and dispatches as "server.{eventName}" and "server.*" events
43+
* @param {string} eventName
44+
* @param {{[key: string]: any}} event
45+
* @returns {true}
46+
*/
47+
receive(eventName: string, event: {
48+
[key: string]: any;
49+
}): true;
50+
/**
51+
* Sends an event to WebSocket and dispatches as "client.{eventName}" and "client.*" events
52+
* @param {string} eventName
53+
* @param {{[key: string]: any}} event
54+
* @returns {true}
55+
*/
56+
send(eventName: string, data: any): true;
57+
}
58+
import { RealtimeEventHandler } from './event_handler.js';
59+
//# sourceMappingURL=api.d.ts.map

dist/lib/api.d.ts.map

+1
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)