@speechos/core 0.2.8 → 0.2.9
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/dist/config.d.cts +1 -8
- package/dist/config.d.ts +1 -8
- package/dist/index.cjs +1 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +0 -42
- package/dist/types.d.ts +0 -42
- package/package.json +1 -1
package/dist/types.d.cts
CHANGED
|
@@ -42,13 +42,6 @@ export interface SpeechOSCoreConfig {
|
|
|
42
42
|
* If not provided, uses the native WebSocket constructor.
|
|
43
43
|
*/
|
|
44
44
|
webSocketFactory?: WebSocketFactory;
|
|
45
|
-
/**
|
|
46
|
-
* Custom fetch handler for making HTTP requests.
|
|
47
|
-
* Used by the Chrome extension to route fetch traffic through the
|
|
48
|
-
* service worker, bypassing page CSP restrictions.
|
|
49
|
-
* If not provided, uses the native fetch function.
|
|
50
|
-
*/
|
|
51
|
-
fetchHandler?: FetchHandler;
|
|
52
45
|
/**
|
|
53
46
|
* JWT token for server-side settings persistence.
|
|
54
47
|
* When provided, user settings (language, vocabulary, snippets) are synced to the server.
|
|
@@ -294,38 +287,3 @@ export interface WebSocketLike {
|
|
|
294
287
|
* Used by extensions to provide a proxy WebSocket that bypasses page CSP.
|
|
295
288
|
*/
|
|
296
289
|
export type WebSocketFactory = (url: string) => WebSocketLike;
|
|
297
|
-
/**
|
|
298
|
-
* Options for fetch requests (subset of RequestInit used by settings sync).
|
|
299
|
-
* Used by extensions to route fetch traffic through the service worker.
|
|
300
|
-
*/
|
|
301
|
-
export interface FetchOptions {
|
|
302
|
-
/** HTTP method (GET, POST, PUT, DELETE, etc.) */
|
|
303
|
-
method?: string;
|
|
304
|
-
/** Request headers */
|
|
305
|
-
headers?: Record<string, string>;
|
|
306
|
-
/** Request body (JSON string) */
|
|
307
|
-
body?: string;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Response from fetch handler (subset of Response used by settings sync).
|
|
311
|
-
* Provides a Response-like interface that can be serialized through message passing.
|
|
312
|
-
*/
|
|
313
|
-
export interface FetchResponse {
|
|
314
|
-
/** Whether the response was successful (status 200-299) */
|
|
315
|
-
ok: boolean;
|
|
316
|
-
/** HTTP status code */
|
|
317
|
-
status: number;
|
|
318
|
-
/** HTTP status text */
|
|
319
|
-
statusText: string;
|
|
320
|
-
/** Parse response body as JSON */
|
|
321
|
-
json(): Promise<unknown>;
|
|
322
|
-
/** Get response body as text */
|
|
323
|
-
text(): Promise<string>;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Custom fetch handler for making HTTP requests.
|
|
327
|
-
* Used by the Chrome extension to route fetch traffic through the
|
|
328
|
-
* service worker, bypassing page CSP restrictions.
|
|
329
|
-
* If not provided, uses the native fetch function.
|
|
330
|
-
*/
|
|
331
|
-
export type FetchHandler = (url: string, options?: FetchOptions) => Promise<FetchResponse>;
|
package/dist/types.d.ts
CHANGED
|
@@ -42,13 +42,6 @@ export interface SpeechOSCoreConfig {
|
|
|
42
42
|
* If not provided, uses the native WebSocket constructor.
|
|
43
43
|
*/
|
|
44
44
|
webSocketFactory?: WebSocketFactory;
|
|
45
|
-
/**
|
|
46
|
-
* Custom fetch handler for making HTTP requests.
|
|
47
|
-
* Used by the Chrome extension to route fetch traffic through the
|
|
48
|
-
* service worker, bypassing page CSP restrictions.
|
|
49
|
-
* If not provided, uses the native fetch function.
|
|
50
|
-
*/
|
|
51
|
-
fetchHandler?: FetchHandler;
|
|
52
45
|
/**
|
|
53
46
|
* JWT token for server-side settings persistence.
|
|
54
47
|
* When provided, user settings (language, vocabulary, snippets) are synced to the server.
|
|
@@ -294,38 +287,3 @@ export interface WebSocketLike {
|
|
|
294
287
|
* Used by extensions to provide a proxy WebSocket that bypasses page CSP.
|
|
295
288
|
*/
|
|
296
289
|
export type WebSocketFactory = (url: string) => WebSocketLike;
|
|
297
|
-
/**
|
|
298
|
-
* Options for fetch requests (subset of RequestInit used by settings sync).
|
|
299
|
-
* Used by extensions to route fetch traffic through the service worker.
|
|
300
|
-
*/
|
|
301
|
-
export interface FetchOptions {
|
|
302
|
-
/** HTTP method (GET, POST, PUT, DELETE, etc.) */
|
|
303
|
-
method?: string;
|
|
304
|
-
/** Request headers */
|
|
305
|
-
headers?: Record<string, string>;
|
|
306
|
-
/** Request body (JSON string) */
|
|
307
|
-
body?: string;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Response from fetch handler (subset of Response used by settings sync).
|
|
311
|
-
* Provides a Response-like interface that can be serialized through message passing.
|
|
312
|
-
*/
|
|
313
|
-
export interface FetchResponse {
|
|
314
|
-
/** Whether the response was successful (status 200-299) */
|
|
315
|
-
ok: boolean;
|
|
316
|
-
/** HTTP status code */
|
|
317
|
-
status: number;
|
|
318
|
-
/** HTTP status text */
|
|
319
|
-
statusText: string;
|
|
320
|
-
/** Parse response body as JSON */
|
|
321
|
-
json(): Promise<unknown>;
|
|
322
|
-
/** Get response body as text */
|
|
323
|
-
text(): Promise<string>;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Custom fetch handler for making HTTP requests.
|
|
327
|
-
* Used by the Chrome extension to route fetch traffic through the
|
|
328
|
-
* service worker, bypassing page CSP restrictions.
|
|
329
|
-
* If not provided, uses the native fetch function.
|
|
330
|
-
*/
|
|
331
|
-
export type FetchHandler = (url: string, options?: FetchOptions) => Promise<FetchResponse>;
|