@synova-cloud/sdk 1.0.0 → 1.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/dist/index.d.cts +20 -8
- package/dist/index.d.ts +20 -8
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type TSynovaMessageRole = 'system' | 'user' | 'assistant' | 'tool';
|
|
2
|
-
type TSynovaResponseType = 'message' | 'tool_calls' | 'image' | 'error';
|
|
2
|
+
type TSynovaResponseType = 'message' | 'tool_calls' | 'image' | 'audio' | 'error';
|
|
3
3
|
type TSynovaModelType = 'text' | 'image';
|
|
4
|
+
type TSynovaUsageType = 'tokens' | 'images' | 'time';
|
|
4
5
|
interface ISynovaLogger {
|
|
5
6
|
debug: (message: string, ...args: unknown[]) => void;
|
|
6
7
|
info: (message: string, ...args: unknown[]) => void;
|
|
@@ -99,10 +100,21 @@ interface ISynovaExecuteOptions {
|
|
|
99
100
|
/** JSON Schema for structured output */
|
|
100
101
|
responseSchema?: Record<string, unknown>;
|
|
101
102
|
}
|
|
102
|
-
interface
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
interface ISynovaExecutionUsage {
|
|
104
|
+
/** Usage type: 'tokens' for LLM, 'images' for image generation, 'time' for time-based billing */
|
|
105
|
+
type: TSynovaUsageType;
|
|
106
|
+
/** Input tokens (when type='tokens') */
|
|
107
|
+
inputTokens?: number;
|
|
108
|
+
/** Output tokens (when type='tokens') */
|
|
109
|
+
outputTokens?: number;
|
|
110
|
+
/** Total tokens (when type='tokens') */
|
|
111
|
+
totalTokens?: number;
|
|
112
|
+
/** Number of images generated (when type='images') */
|
|
113
|
+
imageCount?: number;
|
|
114
|
+
/** Image resolution (when type='images') */
|
|
115
|
+
resolution?: string;
|
|
116
|
+
/** Prediction time in seconds (when type='time') */
|
|
117
|
+
predictTimeSeconds?: number;
|
|
106
118
|
}
|
|
107
119
|
interface ISynovaExecutionError {
|
|
108
120
|
code: string;
|
|
@@ -142,8 +154,8 @@ interface ISynovaExecuteResponse {
|
|
|
142
154
|
files?: ISynovaFileAttachment[];
|
|
143
155
|
/** Error details (when type='error') */
|
|
144
156
|
error?: ISynovaExecutionError;
|
|
145
|
-
/**
|
|
146
|
-
|
|
157
|
+
/** Execution usage statistics (tokens, images, or time-based) */
|
|
158
|
+
executionUsage?: ISynovaExecutionUsage;
|
|
147
159
|
}
|
|
148
160
|
interface ISynovaModelCapabilities {
|
|
149
161
|
text_generation?: boolean;
|
|
@@ -561,4 +573,4 @@ declare class ServerSynovaError extends SynovaError {
|
|
|
561
573
|
constructor(httpCode: number, message?: string);
|
|
562
574
|
}
|
|
563
575
|
|
|
564
|
-
export { ApiSynovaError, AuthSynovaError, type ISynovaConfig, type ISynovaExecuteOptions, type ISynovaExecuteResponse, type ISynovaExecutionError, type ISynovaFileAttachment, type ISynovaFileThumbnails, type ISynovaGetPromptOptions, type ISynovaListModelsOptions, type ISynovaLogger, type ISynovaMessage, type ISynovaModel, type ISynovaModelCapabilities, type ISynovaModelLimits, type ISynovaModelPricing, type ISynovaModelsResponse, type ISynovaPrompt, type ISynovaPromptVariable, type ISynovaProvider, type ISynovaRetryConfig, type ISynovaToolCall, type ISynovaToolResult, type ISynovaUploadOptions, type ISynovaUploadResponse, type ISynovaUploadedFile,
|
|
576
|
+
export { ApiSynovaError, AuthSynovaError, type ISynovaConfig, type ISynovaExecuteOptions, type ISynovaExecuteResponse, type ISynovaExecutionError, type ISynovaExecutionUsage, type ISynovaFileAttachment, type ISynovaFileThumbnails, type ISynovaGetPromptOptions, type ISynovaListModelsOptions, type ISynovaLogger, type ISynovaMessage, type ISynovaModel, type ISynovaModelCapabilities, type ISynovaModelLimits, type ISynovaModelPricing, type ISynovaModelsResponse, type ISynovaPrompt, type ISynovaPromptVariable, type ISynovaProvider, type ISynovaRetryConfig, type ISynovaToolCall, type ISynovaToolResult, type ISynovaUploadOptions, type ISynovaUploadResponse, type ISynovaUploadedFile, NetworkSynovaError, NotFoundSynovaError, RateLimitSynovaError, ServerSynovaError, SynovaCloudSdk, SynovaError, type TSynovaMessageRole, type TSynovaModelType, type TSynovaResponseType, type TSynovaRetryStrategy, type TSynovaUsageType, TimeoutSynovaError };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type TSynovaMessageRole = 'system' | 'user' | 'assistant' | 'tool';
|
|
2
|
-
type TSynovaResponseType = 'message' | 'tool_calls' | 'image' | 'error';
|
|
2
|
+
type TSynovaResponseType = 'message' | 'tool_calls' | 'image' | 'audio' | 'error';
|
|
3
3
|
type TSynovaModelType = 'text' | 'image';
|
|
4
|
+
type TSynovaUsageType = 'tokens' | 'images' | 'time';
|
|
4
5
|
interface ISynovaLogger {
|
|
5
6
|
debug: (message: string, ...args: unknown[]) => void;
|
|
6
7
|
info: (message: string, ...args: unknown[]) => void;
|
|
@@ -99,10 +100,21 @@ interface ISynovaExecuteOptions {
|
|
|
99
100
|
/** JSON Schema for structured output */
|
|
100
101
|
responseSchema?: Record<string, unknown>;
|
|
101
102
|
}
|
|
102
|
-
interface
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
interface ISynovaExecutionUsage {
|
|
104
|
+
/** Usage type: 'tokens' for LLM, 'images' for image generation, 'time' for time-based billing */
|
|
105
|
+
type: TSynovaUsageType;
|
|
106
|
+
/** Input tokens (when type='tokens') */
|
|
107
|
+
inputTokens?: number;
|
|
108
|
+
/** Output tokens (when type='tokens') */
|
|
109
|
+
outputTokens?: number;
|
|
110
|
+
/** Total tokens (when type='tokens') */
|
|
111
|
+
totalTokens?: number;
|
|
112
|
+
/** Number of images generated (when type='images') */
|
|
113
|
+
imageCount?: number;
|
|
114
|
+
/** Image resolution (when type='images') */
|
|
115
|
+
resolution?: string;
|
|
116
|
+
/** Prediction time in seconds (when type='time') */
|
|
117
|
+
predictTimeSeconds?: number;
|
|
106
118
|
}
|
|
107
119
|
interface ISynovaExecutionError {
|
|
108
120
|
code: string;
|
|
@@ -142,8 +154,8 @@ interface ISynovaExecuteResponse {
|
|
|
142
154
|
files?: ISynovaFileAttachment[];
|
|
143
155
|
/** Error details (when type='error') */
|
|
144
156
|
error?: ISynovaExecutionError;
|
|
145
|
-
/**
|
|
146
|
-
|
|
157
|
+
/** Execution usage statistics (tokens, images, or time-based) */
|
|
158
|
+
executionUsage?: ISynovaExecutionUsage;
|
|
147
159
|
}
|
|
148
160
|
interface ISynovaModelCapabilities {
|
|
149
161
|
text_generation?: boolean;
|
|
@@ -561,4 +573,4 @@ declare class ServerSynovaError extends SynovaError {
|
|
|
561
573
|
constructor(httpCode: number, message?: string);
|
|
562
574
|
}
|
|
563
575
|
|
|
564
|
-
export { ApiSynovaError, AuthSynovaError, type ISynovaConfig, type ISynovaExecuteOptions, type ISynovaExecuteResponse, type ISynovaExecutionError, type ISynovaFileAttachment, type ISynovaFileThumbnails, type ISynovaGetPromptOptions, type ISynovaListModelsOptions, type ISynovaLogger, type ISynovaMessage, type ISynovaModel, type ISynovaModelCapabilities, type ISynovaModelLimits, type ISynovaModelPricing, type ISynovaModelsResponse, type ISynovaPrompt, type ISynovaPromptVariable, type ISynovaProvider, type ISynovaRetryConfig, type ISynovaToolCall, type ISynovaToolResult, type ISynovaUploadOptions, type ISynovaUploadResponse, type ISynovaUploadedFile,
|
|
576
|
+
export { ApiSynovaError, AuthSynovaError, type ISynovaConfig, type ISynovaExecuteOptions, type ISynovaExecuteResponse, type ISynovaExecutionError, type ISynovaExecutionUsage, type ISynovaFileAttachment, type ISynovaFileThumbnails, type ISynovaGetPromptOptions, type ISynovaListModelsOptions, type ISynovaLogger, type ISynovaMessage, type ISynovaModel, type ISynovaModelCapabilities, type ISynovaModelLimits, type ISynovaModelPricing, type ISynovaModelsResponse, type ISynovaPrompt, type ISynovaPromptVariable, type ISynovaProvider, type ISynovaRetryConfig, type ISynovaToolCall, type ISynovaToolResult, type ISynovaUploadOptions, type ISynovaUploadResponse, type ISynovaUploadedFile, NetworkSynovaError, NotFoundSynovaError, RateLimitSynovaError, ServerSynovaError, SynovaCloudSdk, SynovaError, type TSynovaMessageRole, type TSynovaModelType, type TSynovaResponseType, type TSynovaRetryStrategy, type TSynovaUsageType, TimeoutSynovaError };
|