wispr-flow-sdk-unofficial 0.1.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/LICENSE +21 -0
- package/README.md +375 -0
- package/dist/core/auth.d.ts +422 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/client.d.ts +99 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/constants.d.ts +53 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4730 -0
- package/dist/types/index.d.ts +862 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts +43 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,iBAAiB;IAC5B,mDAAmD;;IAEnD,8BAA8B;;IAE9B,qEAAqE;;IAErE,mCAAmC;;IAEnC,kCAAkC;;IAElC,sCAAsC;;IAEtC,2BAA2B;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,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C;AAED,qBAAa,aAAc,SAAQ,UAAU;gBAC/B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAInE;AAED,qBAAa,oBAAqB,SAAQ,UAAU;gBACtC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,iBAAkB,SAAQ,UAAU;gBACnC,OAAO,SAAsB;CAI1C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a UUID v4
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateUuid(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Create an abort signal with timeout
|
|
7
|
+
*/
|
|
8
|
+
export declare function createTimeoutSignal(timeoutMs: number): AbortSignal;
|
|
9
|
+
/**
|
|
10
|
+
* Base64 encode a string or buffer
|
|
11
|
+
*/
|
|
12
|
+
export declare function toBase64(data: string | ArrayBuffer | Uint8Array): string;
|
|
13
|
+
/**
|
|
14
|
+
* Base64 decode to string
|
|
15
|
+
*/
|
|
16
|
+
export declare function fromBase64(base64: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Base64 decode to Uint8Array
|
|
19
|
+
*/
|
|
20
|
+
export declare function fromBase64ToBytes(base64: string): Uint8Array;
|
|
21
|
+
/**
|
|
22
|
+
* Simple debug logger
|
|
23
|
+
*/
|
|
24
|
+
export declare function createLogger(debug: boolean): {
|
|
25
|
+
debug: (...args: unknown[]) => void;
|
|
26
|
+
info: (...args: unknown[]) => void;
|
|
27
|
+
warn: (...args: unknown[]) => void;
|
|
28
|
+
error: (...args: unknown[]) => void;
|
|
29
|
+
};
|
|
30
|
+
export type Logger = ReturnType<typeof createLogger>;
|
|
31
|
+
/**
|
|
32
|
+
* Sleep for a given number of milliseconds
|
|
33
|
+
*/
|
|
34
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Retry a function with exponential backoff
|
|
37
|
+
*/
|
|
38
|
+
export declare function retry<T>(fn: () => Promise<T>, options?: {
|
|
39
|
+
maxRetries?: number;
|
|
40
|
+
baseDelayMs?: number;
|
|
41
|
+
maxDelayMs?: number;
|
|
42
|
+
}): Promise<T>;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAElE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAUxE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAO5D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO;qBAEtB,OAAO,EAAE;oBAKV,OAAO,EAAE;oBAKT,OAAO,EAAE;qBAGR,OAAO,EAAE;EAI7B;AAED,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAErD;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE;IACP,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CAChB,GACL,OAAO,CAAC,CAAC,CAAC,CAqBZ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wispr-flow-sdk-unofficial",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Unofficial TypeScript SDK for Wispr Flow voice-to-text API. Not affiliated with Wispr Inc.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target node",
|
|
20
|
+
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
21
|
+
"dev": "bun --watch src/index.ts",
|
|
22
|
+
"lint": "bunx @biomejs/biome lint src",
|
|
23
|
+
"lint:fix": "bunx @biomejs/biome lint src --write",
|
|
24
|
+
"format": "bunx @biomejs/biome format src --write",
|
|
25
|
+
"check": "bunx @biomejs/biome check src",
|
|
26
|
+
"test": "bun test",
|
|
27
|
+
"test:coverage": "bun test --coverage",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"prepublishOnly": "bun run build && bun run build:types"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"wispr",
|
|
33
|
+
"wispr-flow",
|
|
34
|
+
"voice-to-text",
|
|
35
|
+
"speech-to-text",
|
|
36
|
+
"transcription",
|
|
37
|
+
"dictation",
|
|
38
|
+
"sdk",
|
|
39
|
+
"typescript",
|
|
40
|
+
"unofficial"
|
|
41
|
+
],
|
|
42
|
+
"author": "Sahil Chouksey",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"homepage": "https://github.com/sahilchouksey/unofficial-wispr-flow-sdk#readme",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/sahilchouksey/unofficial-wispr-flow-sdk/issues"
|
|
47
|
+
},
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/sahilchouksey/unofficial-wispr-flow-sdk.git"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@biomejs/biome": "^1.9.4",
|
|
54
|
+
"@types/bun": "^1.1.14",
|
|
55
|
+
"@types/ws": "8.18.1",
|
|
56
|
+
"typescript": "^5.7.2"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"wav-decoder": "1.3.0",
|
|
60
|
+
"ws": "8.19.0",
|
|
61
|
+
"zod": "^3.24.1"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"bun": ">=1.0.0"
|
|
65
|
+
}
|
|
66
|
+
}
|