@byte_fluffy/nexra-sdk 0.1.0-alpha.4 → 0.1.0-alpha.40
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/README.md +333 -11
- package/dist/assets-Cusrjj7_.d.ts +61 -0
- package/dist/catalog.d.ts +47 -1
- package/dist/catalog.js +18 -3
- package/dist/chunk-Q4A3HJBX.js +53677 -0
- package/dist/chunk-SIBYK5IX.js +819 -0
- package/dist/errors-DJZuAKoO.d.ts +33 -0
- package/dist/index.d.ts +76 -968
- package/dist/index.js +128 -1044
- package/dist/json-Cz0MkWQn.d.ts +11 -0
- package/dist/language.d.ts +38 -0
- package/dist/language.js +718 -0
- package/dist/{index-mytCeh5t.d.ts → media-geometry-YD9Y_CFw.d.ts} +138 -87
- package/dist/media.d.ts +213 -0
- package/dist/media.js +26 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +0 -0
- package/dist/voices-BHzDQ5xH.d.ts +340 -0
- package/package.json +38 -1
- package/dist/chunk-AV3GN4TV.js +0 -6239
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type JsonPrimitive = boolean | number | string | null;
|
|
2
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
3
|
+
interface JsonObject {
|
|
4
|
+
[key: string]: JsonValue;
|
|
5
|
+
}
|
|
6
|
+
interface CursorPage<T> {
|
|
7
|
+
data: T[];
|
|
8
|
+
nextCursor?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type { CursorPage as C, JsonValue as J, JsonObject as a, JsonPrimitive as b };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { APICallError, LanguageModelV4 } from '@ai-sdk/provider';
|
|
2
|
+
import { NexraLanguageProtocol } from './catalog.js';
|
|
3
|
+
export { NexraLanguageModelBinding } from './catalog.js';
|
|
4
|
+
import { F as FetchLike } from './media-geometry-YD9Y_CFw.js';
|
|
5
|
+
import { N as NexraError } from './errors-DJZuAKoO.js';
|
|
6
|
+
import './json-Cz0MkWQn.js';
|
|
7
|
+
|
|
8
|
+
type NativeErrorContext = {
|
|
9
|
+
url: string;
|
|
10
|
+
statusCode?: number;
|
|
11
|
+
headers?: HeadersInit;
|
|
12
|
+
body: unknown;
|
|
13
|
+
responseBody?: string;
|
|
14
|
+
acceptLanguage?: string | null;
|
|
15
|
+
};
|
|
16
|
+
/** Native response IDs may belong to the provider; only the classification header is platform-owned. */
|
|
17
|
+
declare class NexraNativeError extends APICallError {
|
|
18
|
+
readonly nexraError?: NexraError;
|
|
19
|
+
constructor(context: NativeErrorContext);
|
|
20
|
+
get code(): string | undefined;
|
|
21
|
+
get status(): number | undefined;
|
|
22
|
+
}
|
|
23
|
+
/** Reusable by native provider factories; native request bodies and successful response bytes remain untouched. */
|
|
24
|
+
declare function createNexraNativeFetch(options?: {
|
|
25
|
+
fetch?: FetchLike;
|
|
26
|
+
headers?: HeadersInit;
|
|
27
|
+
}): FetchLike;
|
|
28
|
+
|
|
29
|
+
type NexraLanguageModelOptions = {
|
|
30
|
+
apiKey: string;
|
|
31
|
+
baseUrl?: string;
|
|
32
|
+
fetch?: FetchLike;
|
|
33
|
+
headers?: HeadersInit;
|
|
34
|
+
protocol?: NexraLanguageProtocol;
|
|
35
|
+
};
|
|
36
|
+
declare function createNexraLanguageModel(modelId: string, options: NexraLanguageModelOptions): LanguageModelV4;
|
|
37
|
+
|
|
38
|
+
export { type NexraLanguageModelOptions, NexraLanguageProtocol, NexraNativeError, createNexraLanguageModel, createNexraNativeFetch };
|