@reverbia/sdk 1.0.0-next.20251113133026 → 1.0.0-next.20251113193348

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.
Files changed (85) hide show
  1. package/dist/index.cjs +869 -0
  2. package/dist/index.d.mts +556 -0
  3. package/dist/index.d.ts +556 -0
  4. package/dist/index.mjs +840 -0
  5. package/package.json +11 -11
  6. package/dist/cjs/client/client/client.gen.d.ts +0 -2
  7. package/dist/cjs/client/client/client.gen.js +0 -203
  8. package/dist/cjs/client/client/index.d.ts +0 -8
  9. package/dist/cjs/client/client/index.js +0 -16
  10. package/dist/cjs/client/client/types.gen.d.ts +0 -99
  11. package/dist/cjs/client/client/types.gen.js +0 -3
  12. package/dist/cjs/client/client/utils.gen.d.ts +0 -40
  13. package/dist/cjs/client/client/utils.gen.js +0 -314
  14. package/dist/cjs/client/client.gen.d.ts +0 -12
  15. package/dist/cjs/client/client.gen.js +0 -6
  16. package/dist/cjs/client/core/auth.gen.d.ts +0 -18
  17. package/dist/cjs/client/core/auth.gen.js +0 -18
  18. package/dist/cjs/client/core/bodySerializer.gen.d.ts +0 -25
  19. package/dist/cjs/client/core/bodySerializer.gen.js +0 -60
  20. package/dist/cjs/client/core/params.gen.d.ts +0 -43
  21. package/dist/cjs/client/core/params.gen.js +0 -104
  22. package/dist/cjs/client/core/pathSerializer.gen.d.ts +0 -33
  23. package/dist/cjs/client/core/pathSerializer.gen.js +0 -123
  24. package/dist/cjs/client/core/queryKeySerializer.gen.d.ts +0 -18
  25. package/dist/cjs/client/core/queryKeySerializer.gen.js +0 -105
  26. package/dist/cjs/client/core/serverSentEvents.gen.d.ts +0 -71
  27. package/dist/cjs/client/core/serverSentEvents.gen.js +0 -139
  28. package/dist/cjs/client/core/types.gen.d.ts +0 -78
  29. package/dist/cjs/client/core/types.gen.js +0 -3
  30. package/dist/cjs/client/core/utils.gen.d.ts +0 -19
  31. package/dist/cjs/client/core/utils.gen.js +0 -93
  32. package/dist/cjs/client/index.d.ts +0 -2
  33. package/dist/cjs/client/index.js +0 -18
  34. package/dist/cjs/client/sdk.gen.d.ts +0 -27
  35. package/dist/cjs/client/sdk.gen.js +0 -33
  36. package/dist/cjs/client/types.gen.d.ts +0 -120
  37. package/dist/cjs/client/types.gen.js +0 -3
  38. package/dist/esm/client/client/client.gen.d.ts +0 -2
  39. package/dist/esm/client/client/client.gen.js +0 -199
  40. package/dist/esm/client/client/index.d.ts +0 -8
  41. package/dist/esm/client/client/index.js +0 -6
  42. package/dist/esm/client/client/types.gen.d.ts +0 -99
  43. package/dist/esm/client/client/types.gen.js +0 -2
  44. package/dist/esm/client/client/utils.gen.d.ts +0 -40
  45. package/dist/esm/client/client/utils.gen.js +0 -302
  46. package/dist/esm/client/client.gen.d.ts +0 -12
  47. package/dist/esm/client/client.gen.js +0 -3
  48. package/dist/esm/client/core/auth.gen.d.ts +0 -18
  49. package/dist/esm/client/core/auth.gen.js +0 -14
  50. package/dist/esm/client/core/bodySerializer.gen.d.ts +0 -25
  51. package/dist/esm/client/core/bodySerializer.gen.js +0 -57
  52. package/dist/esm/client/core/params.gen.d.ts +0 -43
  53. package/dist/esm/client/core/params.gen.js +0 -100
  54. package/dist/esm/client/core/pathSerializer.gen.d.ts +0 -33
  55. package/dist/esm/client/core/pathSerializer.gen.js +0 -114
  56. package/dist/esm/client/core/queryKeySerializer.gen.d.ts +0 -18
  57. package/dist/esm/client/core/queryKeySerializer.gen.js +0 -99
  58. package/dist/esm/client/core/serverSentEvents.gen.d.ts +0 -71
  59. package/dist/esm/client/core/serverSentEvents.gen.js +0 -135
  60. package/dist/esm/client/core/types.gen.d.ts +0 -78
  61. package/dist/esm/client/core/types.gen.js +0 -2
  62. package/dist/esm/client/core/utils.gen.d.ts +0 -19
  63. package/dist/esm/client/core/utils.gen.js +0 -87
  64. package/dist/esm/client/index.d.ts +0 -2
  65. package/dist/esm/client/index.js +0 -2
  66. package/dist/esm/client/sdk.gen.d.ts +0 -27
  67. package/dist/esm/client/sdk.gen.js +0 -28
  68. package/dist/esm/client/types.gen.d.ts +0 -120
  69. package/dist/esm/client/types.gen.js +0 -2
  70. package/dist/types/client/client/client.gen.d.ts +0 -2
  71. package/dist/types/client/client/index.d.ts +0 -8
  72. package/dist/types/client/client/types.gen.d.ts +0 -99
  73. package/dist/types/client/client/utils.gen.d.ts +0 -40
  74. package/dist/types/client/client.gen.d.ts +0 -12
  75. package/dist/types/client/core/auth.gen.d.ts +0 -18
  76. package/dist/types/client/core/bodySerializer.gen.d.ts +0 -25
  77. package/dist/types/client/core/params.gen.d.ts +0 -43
  78. package/dist/types/client/core/pathSerializer.gen.d.ts +0 -33
  79. package/dist/types/client/core/queryKeySerializer.gen.d.ts +0 -18
  80. package/dist/types/client/core/serverSentEvents.gen.d.ts +0 -71
  81. package/dist/types/client/core/types.gen.d.ts +0 -78
  82. package/dist/types/client/core/utils.gen.d.ts +0 -19
  83. package/dist/types/client/index.d.ts +0 -2
  84. package/dist/types/client/sdk.gen.d.ts +0 -27
  85. package/dist/types/client/types.gen.d.ts +0 -120
@@ -0,0 +1,556 @@
1
+ type ClientOptions$1 = {
2
+ baseUrl: `${string}://${string}` | (string & {});
3
+ };
4
+ type HandlersHealthResponse = {
5
+ /**
6
+ * Status indicates the service health status
7
+ */
8
+ status?: string;
9
+ /**
10
+ * Timestamp is the Unix timestamp of the response
11
+ */
12
+ timestamp?: number;
13
+ /**
14
+ * Version is the current API version
15
+ */
16
+ version?: string;
17
+ };
18
+ type LlmapiChatCompletionRequest = {
19
+ /**
20
+ * Messages is the conversation history
21
+ */
22
+ messages?: Array<LlmapiMessage>;
23
+ /**
24
+ * Model is the model identifier
25
+ */
26
+ model?: string;
27
+ /**
28
+ * Stream indicates if response should be streamed
29
+ */
30
+ stream?: boolean;
31
+ };
32
+ type LlmapiChatCompletionResponse = {
33
+ /**
34
+ * Choices contains the completion choices
35
+ */
36
+ choices?: Array<LlmapiChoice>;
37
+ /**
38
+ * ID is the completion ID
39
+ */
40
+ id?: string;
41
+ /**
42
+ * Model is the model used
43
+ */
44
+ model?: string;
45
+ };
46
+ type LlmapiChoice = {
47
+ /**
48
+ * FinishReason indicates why the completion stopped
49
+ */
50
+ finish_reason?: string;
51
+ /**
52
+ * Index is the choice index
53
+ */
54
+ index?: number;
55
+ message?: LlmapiMessage;
56
+ };
57
+ type LlmapiEmbeddingData = {
58
+ /**
59
+ * Embedding vector
60
+ */
61
+ embedding?: Array<number>;
62
+ /**
63
+ * Index of the embedding
64
+ */
65
+ index?: number;
66
+ /**
67
+ * Object type identifier
68
+ */
69
+ object?: string;
70
+ };
71
+ /**
72
+ * ExtraFields contains additional metadata
73
+ */
74
+ type LlmapiEmbeddingExtraFields = {
75
+ /**
76
+ * ChunkIndex is the chunk index (0 for single requests)
77
+ */
78
+ chunk_index?: number;
79
+ /**
80
+ * Latency is the request latency in milliseconds
81
+ */
82
+ latency?: number;
83
+ /**
84
+ * ModelRequested is the model that was requested
85
+ */
86
+ model_requested?: string;
87
+ /**
88
+ * Provider is the LLM provider used (e.g., "openai", "anthropic")
89
+ */
90
+ provider?: string;
91
+ /**
92
+ * RequestType is always "embedding"
93
+ */
94
+ request_type?: string;
95
+ };
96
+ type LlmapiEmbeddingRequest = {
97
+ /**
98
+ * Dimensions is the number of dimensions the resulting output embeddings should have (optional)
99
+ */
100
+ dimensions?: number;
101
+ /**
102
+ * EncodingFormat is the format to return the embeddings in (optional: "float" or "base64")
103
+ */
104
+ encoding_format?: string;
105
+ /**
106
+ * Input text or tokens to embed (can be string, []string, []int, or [][]int)
107
+ */
108
+ input?: unknown;
109
+ /**
110
+ * Model identifier in 'provider/model' format
111
+ */
112
+ model?: string;
113
+ };
114
+ type LlmapiEmbeddingResponse = {
115
+ /**
116
+ * Data contains the embeddings
117
+ */
118
+ data?: Array<LlmapiEmbeddingData>;
119
+ extra_fields?: LlmapiEmbeddingExtraFields;
120
+ /**
121
+ * Model is the model used
122
+ */
123
+ model?: string;
124
+ /**
125
+ * Object is always "list"
126
+ */
127
+ object?: string;
128
+ usage?: LlmapiEmbeddingUsage;
129
+ };
130
+ /**
131
+ * Usage contains token usage information
132
+ */
133
+ type LlmapiEmbeddingUsage = {
134
+ /**
135
+ * PromptTokens is the number of tokens in the prompt
136
+ */
137
+ prompt_tokens?: number;
138
+ /**
139
+ * TotalTokens is the total number of tokens used
140
+ */
141
+ total_tokens?: number;
142
+ };
143
+ /**
144
+ * Message is the generated message
145
+ */
146
+ type LlmapiMessage = {
147
+ /**
148
+ * Content is the message content
149
+ */
150
+ content?: string;
151
+ role?: LlmapiRole;
152
+ };
153
+ /**
154
+ * Role is the message role (system, user, assistant)
155
+ */
156
+ type LlmapiRole = string;
157
+ type ResponseErrorResponse = {
158
+ error?: string;
159
+ };
160
+ type PostApiV1ChatCompletionsData = {
161
+ /**
162
+ * Chat completion request
163
+ */
164
+ body: LlmapiChatCompletionRequest;
165
+ path?: never;
166
+ query?: never;
167
+ url: '/api/v1/chat/completions';
168
+ };
169
+ type PostApiV1ChatCompletionsErrors = {
170
+ /**
171
+ * Bad Request
172
+ */
173
+ 400: ResponseErrorResponse;
174
+ /**
175
+ * Internal Server Error
176
+ */
177
+ 500: ResponseErrorResponse;
178
+ };
179
+ type PostApiV1ChatCompletionsError = PostApiV1ChatCompletionsErrors[keyof PostApiV1ChatCompletionsErrors];
180
+ type PostApiV1ChatCompletionsResponses = {
181
+ /**
182
+ * OK
183
+ */
184
+ 200: LlmapiChatCompletionResponse;
185
+ };
186
+ type PostApiV1ChatCompletionsResponse = PostApiV1ChatCompletionsResponses[keyof PostApiV1ChatCompletionsResponses];
187
+ type PostApiV1EmbeddingsData = {
188
+ /**
189
+ * Embedding request
190
+ */
191
+ body: LlmapiEmbeddingRequest;
192
+ path?: never;
193
+ query?: never;
194
+ url: '/api/v1/embeddings';
195
+ };
196
+ type PostApiV1EmbeddingsErrors = {
197
+ /**
198
+ * Bad Request
199
+ */
200
+ 400: ResponseErrorResponse;
201
+ /**
202
+ * Internal Server Error
203
+ */
204
+ 500: ResponseErrorResponse;
205
+ };
206
+ type PostApiV1EmbeddingsError = PostApiV1EmbeddingsErrors[keyof PostApiV1EmbeddingsErrors];
207
+ type PostApiV1EmbeddingsResponses = {
208
+ /**
209
+ * OK
210
+ */
211
+ 200: LlmapiEmbeddingResponse;
212
+ };
213
+ type PostApiV1EmbeddingsResponse = PostApiV1EmbeddingsResponses[keyof PostApiV1EmbeddingsResponses];
214
+ type GetHealthData = {
215
+ body?: never;
216
+ path?: never;
217
+ query?: never;
218
+ url: '/health';
219
+ };
220
+ type GetHealthErrors = {
221
+ /**
222
+ * Internal Server Error
223
+ */
224
+ 500: ResponseErrorResponse;
225
+ };
226
+ type GetHealthError = GetHealthErrors[keyof GetHealthErrors];
227
+ type GetHealthResponses = {
228
+ /**
229
+ * OK
230
+ */
231
+ 200: HandlersHealthResponse;
232
+ };
233
+ type GetHealthResponse = GetHealthResponses[keyof GetHealthResponses];
234
+
235
+ type AuthToken = string | undefined;
236
+ interface Auth {
237
+ /**
238
+ * Which part of the request do we use to send the auth?
239
+ *
240
+ * @default 'header'
241
+ */
242
+ in?: 'header' | 'query' | 'cookie';
243
+ /**
244
+ * Header or query parameter name.
245
+ *
246
+ * @default 'Authorization'
247
+ */
248
+ name?: string;
249
+ scheme?: 'basic' | 'bearer';
250
+ type: 'apiKey' | 'http';
251
+ }
252
+
253
+ interface SerializerOptions<T> {
254
+ /**
255
+ * @default true
256
+ */
257
+ explode: boolean;
258
+ style: T;
259
+ }
260
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
261
+ type ObjectStyle = 'form' | 'deepObject';
262
+
263
+ type QuerySerializer = (query: Record<string, unknown>) => string;
264
+ type BodySerializer = (body: any) => any;
265
+ type QuerySerializerOptionsObject = {
266
+ allowReserved?: boolean;
267
+ array?: Partial<SerializerOptions<ArrayStyle>>;
268
+ object?: Partial<SerializerOptions<ObjectStyle>>;
269
+ };
270
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
271
+ /**
272
+ * Per-parameter serialization overrides. When provided, these settings
273
+ * override the global array/object settings for specific parameter names.
274
+ */
275
+ parameters?: Record<string, QuerySerializerOptionsObject>;
276
+ };
277
+
278
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
279
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
280
+ /**
281
+ * Returns the final request URL.
282
+ */
283
+ buildUrl: BuildUrlFn;
284
+ getConfig: () => Config;
285
+ request: RequestFn;
286
+ setConfig: (config: Config) => Config;
287
+ } & {
288
+ [K in HttpMethod]: MethodFn;
289
+ } & ([SseFn] extends [never] ? {
290
+ sse?: never;
291
+ } : {
292
+ sse: {
293
+ [K in HttpMethod]: SseFn;
294
+ };
295
+ });
296
+ interface Config$1 {
297
+ /**
298
+ * Auth token or a function returning auth token. The resolved value will be
299
+ * added to the request payload as defined by its `security` array.
300
+ */
301
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
302
+ /**
303
+ * A function for serializing request body parameter. By default,
304
+ * {@link JSON.stringify()} will be used.
305
+ */
306
+ bodySerializer?: BodySerializer | null;
307
+ /**
308
+ * An object containing any HTTP headers that you want to pre-populate your
309
+ * `Headers` object with.
310
+ *
311
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
312
+ */
313
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
314
+ /**
315
+ * The request method.
316
+ *
317
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
318
+ */
319
+ method?: Uppercase<HttpMethod>;
320
+ /**
321
+ * A function for serializing request query parameters. By default, arrays
322
+ * will be exploded in form style, objects will be exploded in deepObject
323
+ * style, and reserved characters are percent-encoded.
324
+ *
325
+ * This method will have no effect if the native `paramsSerializer()` Axios
326
+ * API function is used.
327
+ *
328
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
329
+ */
330
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
331
+ /**
332
+ * A function validating request data. This is useful if you want to ensure
333
+ * the request conforms to the desired shape, so it can be safely sent to
334
+ * the server.
335
+ */
336
+ requestValidator?: (data: unknown) => Promise<unknown>;
337
+ /**
338
+ * A function transforming response data before it's returned. This is useful
339
+ * for post-processing data, e.g. converting ISO strings into Date objects.
340
+ */
341
+ responseTransformer?: (data: unknown) => Promise<unknown>;
342
+ /**
343
+ * A function validating response data. This is useful if you want to ensure
344
+ * the response conforms to the desired shape, so it can be safely passed to
345
+ * the transformers and returned to the user.
346
+ */
347
+ responseValidator?: (data: unknown) => Promise<unknown>;
348
+ }
349
+
350
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
351
+ /**
352
+ * Fetch API implementation. You can use this option to provide a custom
353
+ * fetch instance.
354
+ *
355
+ * @default globalThis.fetch
356
+ */
357
+ fetch?: typeof fetch;
358
+ /**
359
+ * Implementing clients can call request interceptors inside this hook.
360
+ */
361
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
362
+ /**
363
+ * Callback invoked when a network or parsing error occurs during streaming.
364
+ *
365
+ * This option applies only if the endpoint returns a stream of events.
366
+ *
367
+ * @param error The error that occurred.
368
+ */
369
+ onSseError?: (error: unknown) => void;
370
+ /**
371
+ * Callback invoked when an event is streamed from the server.
372
+ *
373
+ * This option applies only if the endpoint returns a stream of events.
374
+ *
375
+ * @param event Event streamed from the server.
376
+ * @returns Nothing (void).
377
+ */
378
+ onSseEvent?: (event: StreamEvent<TData>) => void;
379
+ serializedBody?: RequestInit['body'];
380
+ /**
381
+ * Default retry delay in milliseconds.
382
+ *
383
+ * This option applies only if the endpoint returns a stream of events.
384
+ *
385
+ * @default 3000
386
+ */
387
+ sseDefaultRetryDelay?: number;
388
+ /**
389
+ * Maximum number of retry attempts before giving up.
390
+ */
391
+ sseMaxRetryAttempts?: number;
392
+ /**
393
+ * Maximum retry delay in milliseconds.
394
+ *
395
+ * Applies only when exponential backoff is used.
396
+ *
397
+ * This option applies only if the endpoint returns a stream of events.
398
+ *
399
+ * @default 30000
400
+ */
401
+ sseMaxRetryDelay?: number;
402
+ /**
403
+ * Optional sleep function for retry backoff.
404
+ *
405
+ * Defaults to using `setTimeout`.
406
+ */
407
+ sseSleepFn?: (ms: number) => Promise<void>;
408
+ url: string;
409
+ };
410
+ interface StreamEvent<TData = unknown> {
411
+ data: TData;
412
+ event?: string;
413
+ id?: string;
414
+ retry?: number;
415
+ }
416
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
417
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
418
+ };
419
+
420
+ type ErrInterceptor<Err, Res, Options> = (error: Err, response: Res, options: Options) => Err | Promise<Err>;
421
+ type ReqInterceptor<Options> = (options: Options) => void | Promise<void>;
422
+ type ResInterceptor<Res, Options> = (response: Res, options: Options) => Res | Promise<Res>;
423
+ declare class Interceptors<Interceptor> {
424
+ fns: Array<Interceptor | null>;
425
+ clear(): void;
426
+ eject(id: number | Interceptor): void;
427
+ exists(id: number | Interceptor): boolean;
428
+ getInterceptorIndex(id: number | Interceptor): number;
429
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
430
+ use(fn: Interceptor): number;
431
+ }
432
+ interface Middleware<Res, Err, Options> {
433
+ error: Interceptors<ErrInterceptor<Err, Res, Options>>;
434
+ request: Interceptors<ReqInterceptor<Options>>;
435
+ response: Interceptors<ResInterceptor<Res, Options>>;
436
+ }
437
+
438
+ interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
439
+ /**
440
+ * Base URL for all requests made by this client.
441
+ */
442
+ baseUrl?: T['baseUrl'];
443
+ /**
444
+ * Fetch API implementation. You can use this option to provide a custom
445
+ * fetch instance.
446
+ *
447
+ * @default globalThis.fetch
448
+ */
449
+ fetch?: typeof fetch;
450
+ /**
451
+ * Return the response data parsed in a specified format. By default, `auto`
452
+ * will infer the appropriate method from the `Content-Type` response header.
453
+ * You can override this behavior with any of the {@link Body} methods.
454
+ * Select `stream` if you don't want to parse response data at all.
455
+ *
456
+ * @default 'auto'
457
+ */
458
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
459
+ /**
460
+ * Throw an error instead of returning it in the response?
461
+ *
462
+ * @default false
463
+ */
464
+ throwOnError?: T['throwOnError'];
465
+ }
466
+ interface RequestOptions<TData = unknown, ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
467
+ throwOnError: ThrowOnError;
468
+ }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
469
+ /**
470
+ * Any body that you want to add to your request.
471
+ *
472
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
473
+ */
474
+ body?: unknown;
475
+ path?: Record<string, unknown>;
476
+ query?: Record<string, unknown>;
477
+ /**
478
+ * Security mechanism(s) to use for the request.
479
+ */
480
+ security?: ReadonlyArray<Auth>;
481
+ url: Url;
482
+ }
483
+ interface ResolvedRequestOptions<ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, ThrowOnError, Url> {
484
+ serializedBody?: string;
485
+ }
486
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<{
487
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
488
+ response: Response;
489
+ }> : Promise<({
490
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
491
+ error: undefined;
492
+ } | {
493
+ data: undefined;
494
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
495
+ }) & {
496
+ response: Response;
497
+ }>;
498
+ interface ClientOptions {
499
+ baseUrl?: string;
500
+ throwOnError?: boolean;
501
+ }
502
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
503
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
504
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
505
+ type BuildUrlFn = <TData extends {
506
+ body?: unknown;
507
+ path?: Record<string, unknown>;
508
+ query?: Record<string, unknown>;
509
+ url: string;
510
+ }>(options: TData & Options$1<TData>) => string;
511
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
512
+ interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;
513
+ };
514
+ interface TDataShape {
515
+ body?: unknown;
516
+ headers?: unknown;
517
+ path?: unknown;
518
+ query?: unknown;
519
+ url: string;
520
+ }
521
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
522
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
523
+
524
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
525
+ /**
526
+ * You can provide a client instance returned by `createClient()` instead of
527
+ * individual options. This might be also useful if you want to implement a
528
+ * custom client.
529
+ */
530
+ client?: Client;
531
+ /**
532
+ * You can pass arbitrary values through the `meta` object. This can be
533
+ * used to access values that aren't defined as part of the SDK function.
534
+ */
535
+ meta?: Record<string, unknown>;
536
+ };
537
+ /**
538
+ * Create chat completion
539
+ *
540
+ * Generates a chat completion using the configured gateway.
541
+ */
542
+ declare const postApiV1ChatCompletions: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatCompletionsData, ThrowOnError>) => RequestResult<PostApiV1ChatCompletionsResponses, PostApiV1ChatCompletionsErrors, ThrowOnError>;
543
+ /**
544
+ * Create embeddings
545
+ *
546
+ * Generates embeddings using the configured gateway.
547
+ */
548
+ declare const postApiV1Embeddings: <ThrowOnError extends boolean = false>(options: Options<PostApiV1EmbeddingsData, ThrowOnError>) => RequestResult<PostApiV1EmbeddingsResponses, PostApiV1EmbeddingsErrors, ThrowOnError>;
549
+ /**
550
+ * Health check
551
+ *
552
+ * Returns the current health status of the service.
553
+ */
554
+ declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
555
+
556
+ export { type ClientOptions$1 as ClientOptions, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersHealthResponse, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiMessage, type LlmapiRole, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type ResponseErrorResponse, getHealth, postApiV1ChatCompletions, postApiV1Embeddings };