@dvina/sdk 4.1.111 → 4.1.173
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 +37 -134
- package/dist/_generated_documents-6WGCKLGZ.js +1 -0
- package/dist/_generated_sdk-7_X86mtI.d.ts +17341 -0
- package/dist/adapters/react/index.d.ts +36 -24
- package/dist/adapters/react/index.js +1 -1
- package/dist/ai/index.d.ts +570 -0
- package/dist/ai/index.js +3 -0
- package/dist/billing/index.d.ts +43 -15
- package/dist/billing/index.js +1 -1
- package/dist/chunk-32KGDH2Q.js +1 -0
- package/dist/chunk-37LLNIGO.js +1 -0
- package/dist/chunk-OCM5W3JH.js +1 -0
- package/dist/chunk-W764PDVJ.js +31 -0
- package/dist/chunk-Z2ADTQ64.js +1 -0
- package/dist/{sync-engine-DYHreGOv.d.ts → connection-ClMdDUce.d.ts} +223 -11
- package/dist/{error-CsVoUTY8.d.ts → error-Bk0Jmuzd.d.ts} +11 -3
- package/dist/index.d.ts +24 -3523
- package/dist/index.js +4 -1
- package/dist/package.json +8 -13
- package/dist/pagination/index.d.ts +18 -4
- package/dist/pagination/index.js +1 -1
- package/dist/{types-Chg8ASmf.d.ts → types-BfiQdtra.d.ts} +1 -9
- package/package.json +26 -21
- package/dist/_generated_documents-HFKWCKIO.js +0 -1
- package/dist/adapters/angular/index.d.ts +0 -254
- package/dist/adapters/angular/index.js +0 -1
- package/dist/chunk-2EXM4BMP.js +0 -1
- package/dist/chunk-5E7LX4YQ.js +0 -1
- package/dist/chunk-G34ETQUN.js +0 -1
- package/dist/chunk-H3TI6B7T.js +0 -1
- package/dist/chunk-IIQ3WGOJ.js +0 -1
- package/dist/chunk-V5FAQENQ.js +0 -5
- package/dist/chunk-YUQTEBYO.js +0 -31
- package/dist/client-Bb2gD6Iz.d.ts +0 -488
- package/dist/client-OupfxAUq.d.ts +0 -7949
- package/dist/index-DoGg4ya_.d.ts +0 -79
- package/dist/inference/index.d.ts +0 -80
- package/dist/inference/index.js +0 -1
package/dist/index-DoGg4ya_.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { b as DvinaRequest, c as DvinaSubscribe, P as PageInfoData, C as ConnectionVariables, F as FetchOptions } from './types-Chg8ASmf.js';
|
|
2
|
-
import { S as SyncEngine } from './sync-engine-DYHreGOv.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Base class that holds the transport functions.
|
|
6
|
-
* Every generated model, connection, query, and the root SDK class extend this.
|
|
7
|
-
*
|
|
8
|
-
* Operation classes use `_syncEngine` for queries/mutations/watch.
|
|
9
|
-
* Subscription classes use `_subscribe` for WebSocket streaming.
|
|
10
|
-
* Model classes use `_request` for compatibility (lazy fetch).
|
|
11
|
-
*/
|
|
12
|
-
declare class Request {
|
|
13
|
-
protected _request: DvinaRequest;
|
|
14
|
-
protected _syncEngine?: SyncEngine;
|
|
15
|
-
protected _subscribe?: DvinaSubscribe;
|
|
16
|
-
protected _baseUrl?: string;
|
|
17
|
-
constructor(request: DvinaRequest, syncEngine?: SyncEngine, subscribe?: DvinaSubscribe, baseUrl?: string);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Default connection variables when paginating.
|
|
22
|
-
* Ensures `first` or `last` is set when a cursor is provided.
|
|
23
|
-
*/
|
|
24
|
-
declare function defaultConnection<V extends ConnectionVariables>(variables: V): V;
|
|
25
|
-
/**
|
|
26
|
-
* PageInfo model following the Relay spec.
|
|
27
|
-
*/
|
|
28
|
-
declare class PageInfo {
|
|
29
|
-
hasNextPage: boolean;
|
|
30
|
-
hasPreviousPage: boolean;
|
|
31
|
-
startCursor?: string | null;
|
|
32
|
-
endCursor?: string | null;
|
|
33
|
-
constructor(data: PageInfoData);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Abstract base class for connection types.
|
|
37
|
-
* Holds nodes and page info, used for type checking.
|
|
38
|
-
*/
|
|
39
|
-
declare abstract class AbstractConnection<Node> extends Request {
|
|
40
|
-
pageInfo: PageInfo;
|
|
41
|
-
nodes: Node[];
|
|
42
|
-
totalCount?: number;
|
|
43
|
-
constructor(request: DvinaRequest);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Concrete connection class with pagination helpers.
|
|
47
|
-
* Generated connection subclasses extend this.
|
|
48
|
-
*
|
|
49
|
-
* The `_fetch` closure is created by the query class and allows re-fetching
|
|
50
|
-
* with different pagination variables.
|
|
51
|
-
*/
|
|
52
|
-
declare class Connection<Node> extends AbstractConnection<Node> {
|
|
53
|
-
private _fetch;
|
|
54
|
-
constructor(request: DvinaRequest, fetch: (variables?: ConnectionVariables, options?: FetchOptions) => Promise<Connection<Node> | undefined>, nodes: Node[], pageInfo: PageInfo, totalCount?: number);
|
|
55
|
-
/**
|
|
56
|
-
* Fetch the next page and append nodes.
|
|
57
|
-
* Mutates this connection instance in place (nodes are appended, pageInfo updated).
|
|
58
|
-
*/
|
|
59
|
-
fetchNext(options?: FetchOptions): Promise<this>;
|
|
60
|
-
/**
|
|
61
|
-
* Fetch the previous page and prepend nodes.
|
|
62
|
-
* Mutates this connection instance in place (nodes are prepended, pageInfo updated).
|
|
63
|
-
*/
|
|
64
|
-
fetchPrevious(options?: FetchOptions): Promise<this>;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Extract all nodes from a connection.
|
|
69
|
-
*/
|
|
70
|
-
declare function extractNodes<T>(connection: Connection<T>): T[];
|
|
71
|
-
/**
|
|
72
|
-
* Merge two connections into a new connection. Appends the second connection's
|
|
73
|
-
* nodes after the first's. Uses the second connection's end cursor and hasNextPage.
|
|
74
|
-
*
|
|
75
|
-
* Neither input connection is modified.
|
|
76
|
-
*/
|
|
77
|
-
declare function mergeConnections<T>(first: Connection<T>, second: Connection<T>): Connection<T>;
|
|
78
|
-
|
|
79
|
-
export { AbstractConnection as A, Connection as C, PageInfo as P, Request as R, defaultConnection as d, extractNodes as e, mergeConnections as m };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export { C as Chat, a as ChatCompletionChoice, b as ChatCompletionChunk, c as ChatCompletionRequest, d as ChatCompletionResponse, e as ChatCompletionStream, f as ChatCompletionStreamRequest, g as ChatCompletions, h as ChatMessage, i as ContentPart, H as HealthResponse, I as InferenceClient, j as InferenceClientOptions, k as InferenceErrorResponse, M as Model, l as ModelListResponse, m as Models, R as Responses, n as ResponsesRequest, o as ResponsesStreamRequest, S as StreamChunkChoice, p as StreamDelta, T as Tool, q as ToolCall, r as ToolChoice, U as Usage, s as createInferenceClient, t as createInferenceClientInternal, u as parseSSEStream } from '../client-Bb2gD6Iz.js';
|
|
2
|
-
import { D as DvinaError } from '../error-CsVoUTY8.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Base error class for inference API errors.
|
|
6
|
-
* Contains the OpenAI-compatible error shape returned by the server.
|
|
7
|
-
*/
|
|
8
|
-
declare class DvinaInferenceError extends DvinaError {
|
|
9
|
-
/** HTTP status code from the server */
|
|
10
|
-
readonly status: number;
|
|
11
|
-
/** OpenAI-compatible error type (e.g. 'invalid_request_error') */
|
|
12
|
-
readonly type: string;
|
|
13
|
-
/** Machine-readable error code (e.g. 'model_not_found') */
|
|
14
|
-
readonly code: string;
|
|
15
|
-
constructor(message: string, status: number, type: string, code: string, cause?: Error);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Error thrown when the inference API returns 429 (rate limited).
|
|
19
|
-
*/
|
|
20
|
-
declare class DvinaRateLimitError extends DvinaInferenceError {
|
|
21
|
-
/** Retry-After header value in seconds, if provided by the server */
|
|
22
|
-
readonly retryAfter?: number;
|
|
23
|
-
constructor(message: string, retryAfter?: number, cause?: Error);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Error thrown when the workspace token quota is exceeded (403 with code 'token_limit_reached').
|
|
27
|
-
*/
|
|
28
|
-
declare class DvinaQuotaError extends DvinaInferenceError {
|
|
29
|
-
constructor(message?: string, cause?: Error);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Error thrown when inference API authentication fails (401/403).
|
|
33
|
-
*/
|
|
34
|
-
declare class DvinaInferenceAuthError extends DvinaInferenceError {
|
|
35
|
-
constructor(message?: string, status?: number, cause?: Error);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Error thrown during an SSE stream when the connection drops or a mid-stream error occurs.
|
|
39
|
-
*/
|
|
40
|
-
declare class DvinaStreamError extends DvinaInferenceError {
|
|
41
|
-
constructor(message: string, cause?: Error);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Error thrown when the prompt exceeds the model's context window (400, code 'context_length_exceeded').
|
|
45
|
-
*/
|
|
46
|
-
declare class DvinaContextLengthError extends DvinaInferenceError {
|
|
47
|
-
constructor(message?: string, cause?: Error);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Error thrown when the inference request times out (400, code 'request_timeout').
|
|
51
|
-
*/
|
|
52
|
-
declare class DvinaTimeoutError extends DvinaInferenceError {
|
|
53
|
-
constructor(message?: string, cause?: Error);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Error thrown when the upstream provider is unreachable (502, code 'provider_unavailable').
|
|
57
|
-
*/
|
|
58
|
-
declare class DvinaProviderUnavailableError extends DvinaInferenceError {
|
|
59
|
-
constructor(message?: string, cause?: Error);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Error thrown when the upstream provider returns an error (502/400, code 'provider_error').
|
|
63
|
-
*/
|
|
64
|
-
declare class DvinaProviderError extends DvinaInferenceError {
|
|
65
|
-
constructor(message?: string, status?: number, cause?: Error);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Error thrown when a requested deployment is not found (502, code 'deployment_not_found').
|
|
69
|
-
*/
|
|
70
|
-
declare class DvinaDeploymentError extends DvinaInferenceError {
|
|
71
|
-
constructor(message?: string, cause?: Error);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Error thrown when a requested model is not supported (400, code 'unsupported_model').
|
|
75
|
-
*/
|
|
76
|
-
declare class DvinaUnsupportedModelError extends DvinaInferenceError {
|
|
77
|
-
constructor(message?: string, cause?: Error);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { DvinaContextLengthError, DvinaDeploymentError, DvinaInferenceAuthError, DvinaInferenceError, DvinaProviderError, DvinaProviderUnavailableError, DvinaQuotaError, DvinaRateLimitError, DvinaStreamError, DvinaTimeoutError, DvinaUnsupportedModelError };
|
package/dist/inference/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{m as ChatCompletionStream,f as DvinaContextLengthError,j as DvinaDeploymentError,d as DvinaInferenceAuthError,a as DvinaInferenceError,i as DvinaProviderError,h as DvinaProviderUnavailableError,c as DvinaQuotaError,b as DvinaRateLimitError,e as DvinaStreamError,g as DvinaTimeoutError,k as DvinaUnsupportedModelError,o as createInferenceClient,n as createInferenceClientInternal,l as parseSSEStream}from'../chunk-IIQ3WGOJ.js';import'../chunk-5E7LX4YQ.js';import'../chunk-EK7ODJWE.js';
|