@acedatacloud/sdk 2026.322.1 → 2026.418.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.
Files changed (40) hide show
  1. package/dist/index.d.mts +336 -0
  2. package/dist/index.d.ts +336 -4
  3. package/dist/index.js +713 -19
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +665 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +16 -2
  8. package/src/index.ts +4 -0
  9. package/src/resources/audio.ts +6 -3
  10. package/src/resources/images.ts +7 -3
  11. package/src/resources/tasks.ts +6 -0
  12. package/src/resources/video.ts +6 -3
  13. package/dist/client.d.ts +0 -31
  14. package/dist/client.js +0 -46
  15. package/dist/resources/audio.d.ts +0 -17
  16. package/dist/resources/audio.js +0 -30
  17. package/dist/resources/chat.d.ts +0 -30
  18. package/dist/resources/chat.js +0 -38
  19. package/dist/resources/files.d.ts +0 -9
  20. package/dist/resources/files.js +0 -59
  21. package/dist/resources/images.d.ts +0 -18
  22. package/dist/resources/images.js +0 -32
  23. package/dist/resources/openai.d.ts +0 -46
  24. package/dist/resources/openai.js +0 -59
  25. package/dist/resources/platform.d.ts +0 -41
  26. package/dist/resources/platform.js +0 -76
  27. package/dist/resources/search.d.ts +0 -14
  28. package/dist/resources/search.js +0 -22
  29. package/dist/resources/tasks.d.ts +0 -14
  30. package/dist/resources/tasks.js +0 -36
  31. package/dist/resources/video.d.ts +0 -17
  32. package/dist/resources/video.js +0 -30
  33. package/dist/runtime/errors.d.ts +0 -44
  34. package/dist/runtime/errors.js +0 -89
  35. package/dist/runtime/index.d.ts +0 -3
  36. package/dist/runtime/index.js +0 -19
  37. package/dist/runtime/tasks.d.ts +0 -17
  38. package/dist/runtime/tasks.js +0 -46
  39. package/dist/runtime/transport.d.ts +0 -31
  40. package/dist/runtime/transport.js +0 -213
@@ -0,0 +1,336 @@
1
+ /** HTTP transport for AceDataCloud SDK. Uses native fetch (Node 18+). */
2
+ interface TransportOptions {
3
+ apiToken?: string;
4
+ baseURL?: string;
5
+ platformBaseURL?: string;
6
+ timeout?: number;
7
+ maxRetries?: number;
8
+ headers?: Record<string, string>;
9
+ }
10
+ declare class Transport {
11
+ private baseURL;
12
+ private platformBaseURL;
13
+ private timeout;
14
+ private maxRetries;
15
+ private headers;
16
+ constructor(opts?: TransportOptions);
17
+ request(method: string, path: string, opts?: {
18
+ json?: Record<string, unknown>;
19
+ params?: Record<string, string>;
20
+ platform?: boolean;
21
+ timeout?: number;
22
+ headers?: Record<string, string>;
23
+ }): Promise<Record<string, unknown>>;
24
+ requestStream(method: string, path: string, opts?: {
25
+ json?: Record<string, unknown>;
26
+ timeout?: number;
27
+ }): AsyncGenerator<string, void, unknown>;
28
+ upload(path: string, fileData: Buffer | Uint8Array, filename: string, opts?: {
29
+ timeout?: number;
30
+ }): Promise<Record<string, unknown>>;
31
+ }
32
+
33
+ /** Chat resources — native provider APIs (Claude Messages). */
34
+
35
+ declare class Messages {
36
+ private transport;
37
+ constructor(transport: Transport);
38
+ create(opts: {
39
+ model: string;
40
+ messages: Array<Record<string, unknown>>;
41
+ maxTokens?: number;
42
+ stream?: false;
43
+ [key: string]: unknown;
44
+ }): Promise<Record<string, unknown>>;
45
+ create(opts: {
46
+ model: string;
47
+ messages: Array<Record<string, unknown>>;
48
+ maxTokens?: number;
49
+ stream: true;
50
+ [key: string]: unknown;
51
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
52
+ private stream;
53
+ countTokens(opts: {
54
+ model: string;
55
+ messages: Array<Record<string, unknown>>;
56
+ [key: string]: unknown;
57
+ }): Promise<Record<string, unknown>>;
58
+ }
59
+ declare class Chat {
60
+ readonly messages: Messages;
61
+ constructor(transport: Transport);
62
+ }
63
+
64
+ /** Task polling abstraction. */
65
+
66
+ interface TaskHandleOptions {
67
+ pollInterval?: number;
68
+ maxWait?: number;
69
+ }
70
+ declare class TaskHandle {
71
+ readonly id: string;
72
+ private pollEndpoint;
73
+ private transport;
74
+ private _result;
75
+ constructor(taskId: string, pollEndpoint: string, transport: Transport);
76
+ get(): Promise<Record<string, unknown>>;
77
+ isCompleted(): Promise<boolean>;
78
+ wait(opts?: TaskHandleOptions): Promise<Record<string, unknown>>;
79
+ get result(): Record<string, unknown> | null;
80
+ }
81
+
82
+ /** Image generation resources. */
83
+
84
+ type ImageProvider = 'nano-banana' | 'midjourney' | 'flux' | 'seedream' | (string & {});
85
+ declare class Images {
86
+ private transport;
87
+ constructor(transport: Transport);
88
+ generate(opts: {
89
+ prompt: string;
90
+ provider?: ImageProvider;
91
+ model?: string;
92
+ negativePrompt?: string;
93
+ imageUrl?: string;
94
+ callbackUrl?: string;
95
+ wait?: boolean;
96
+ pollInterval?: number;
97
+ maxWait?: number;
98
+ [key: string]: unknown;
99
+ }): Promise<Record<string, unknown> | TaskHandle>;
100
+ }
101
+
102
+ /** Audio/music generation resources. */
103
+
104
+ type AudioProvider = 'suno' | 'producer' | (string & {});
105
+ declare class Audio {
106
+ private transport;
107
+ constructor(transport: Transport);
108
+ generate(opts: {
109
+ prompt: string;
110
+ provider?: AudioProvider;
111
+ model?: string;
112
+ tags?: string;
113
+ callbackUrl?: string;
114
+ wait?: boolean;
115
+ pollInterval?: number;
116
+ maxWait?: number;
117
+ [key: string]: unknown;
118
+ }): Promise<Record<string, unknown> | TaskHandle>;
119
+ }
120
+
121
+ /** Video generation resources. */
122
+
123
+ type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});
124
+ declare class Video {
125
+ private transport;
126
+ constructor(transport: Transport);
127
+ generate(opts: {
128
+ prompt: string;
129
+ provider?: VideoProvider;
130
+ model?: string;
131
+ imageUrl?: string;
132
+ callbackUrl?: string;
133
+ wait?: boolean;
134
+ pollInterval?: number;
135
+ maxWait?: number;
136
+ [key: string]: unknown;
137
+ }): Promise<Record<string, unknown> | TaskHandle>;
138
+ }
139
+
140
+ /** Search resources. */
141
+
142
+ declare class Search {
143
+ private transport;
144
+ constructor(transport: Transport);
145
+ google(opts: {
146
+ query: string;
147
+ type?: string;
148
+ country?: string;
149
+ language?: string;
150
+ page?: number;
151
+ [key: string]: unknown;
152
+ }): Promise<Record<string, unknown>>;
153
+ }
154
+
155
+ /** Cross-service task retrieval. */
156
+
157
+ declare class Tasks {
158
+ private transport;
159
+ constructor(transport: Transport);
160
+ get(taskId: string, opts?: {
161
+ service?: string;
162
+ }): Promise<Record<string, unknown>>;
163
+ wait(taskId: string, opts?: {
164
+ service?: string;
165
+ pollInterval?: number;
166
+ maxWait?: number;
167
+ }): Promise<Record<string, unknown>>;
168
+ }
169
+
170
+ /** File upload resources. */
171
+
172
+ declare class Files {
173
+ private transport;
174
+ constructor(transport: Transport);
175
+ upload(file: string | Buffer | Uint8Array, opts?: {
176
+ filename?: string;
177
+ }): Promise<Record<string, unknown>>;
178
+ }
179
+
180
+ /** Management-plane resources. */
181
+
182
+ declare class Applications {
183
+ private transport;
184
+ constructor(transport: Transport);
185
+ list(params?: Record<string, string>): Promise<Record<string, unknown>>;
186
+ create(opts: {
187
+ serviceId: string;
188
+ [key: string]: unknown;
189
+ }): Promise<Record<string, unknown>>;
190
+ get(applicationId: string): Promise<Record<string, unknown>>;
191
+ }
192
+ declare class Credentials {
193
+ private transport;
194
+ constructor(transport: Transport);
195
+ list(params?: Record<string, string>): Promise<Record<string, unknown>>;
196
+ create(opts: {
197
+ applicationId: string;
198
+ [key: string]: unknown;
199
+ }): Promise<Record<string, unknown>>;
200
+ rotate(credentialId: string): Promise<Record<string, unknown>>;
201
+ delete(credentialId: string): Promise<Record<string, unknown>>;
202
+ }
203
+ declare class Models {
204
+ private transport;
205
+ constructor(transport: Transport);
206
+ list(params?: Record<string, string>): Promise<Record<string, unknown>>;
207
+ }
208
+ declare class Config {
209
+ private transport;
210
+ constructor(transport: Transport);
211
+ get(): Promise<Record<string, unknown>>;
212
+ }
213
+ declare class Platform {
214
+ readonly applications: Applications;
215
+ readonly credentials: Credentials;
216
+ readonly models: Models;
217
+ readonly config: Config;
218
+ constructor(transport: Transport);
219
+ }
220
+
221
+ /** OpenAI-compatible facade resources. */
222
+
223
+ declare class Completions {
224
+ private transport;
225
+ constructor(transport: Transport);
226
+ create(opts: {
227
+ model: string;
228
+ messages: Array<Record<string, unknown>>;
229
+ stream?: false;
230
+ [key: string]: unknown;
231
+ }): Promise<Record<string, unknown>>;
232
+ create(opts: {
233
+ model: string;
234
+ messages: Array<Record<string, unknown>>;
235
+ stream: true;
236
+ [key: string]: unknown;
237
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
238
+ private streamResponse;
239
+ }
240
+ declare class ChatNamespace {
241
+ readonly completions: Completions;
242
+ constructor(transport: Transport);
243
+ }
244
+ declare class Responses {
245
+ private transport;
246
+ constructor(transport: Transport);
247
+ create(opts: {
248
+ model: string;
249
+ input: string | Array<Record<string, unknown>>;
250
+ stream?: false;
251
+ [key: string]: unknown;
252
+ }): Promise<Record<string, unknown>>;
253
+ create(opts: {
254
+ model: string;
255
+ input: string | Array<Record<string, unknown>>;
256
+ stream: true;
257
+ [key: string]: unknown;
258
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
259
+ private streamResponse;
260
+ }
261
+ declare class OpenAI {
262
+ readonly chat: ChatNamespace;
263
+ readonly responses: Responses;
264
+ constructor(transport: Transport);
265
+ }
266
+
267
+ /** Top-level AceDataCloud client for TypeScript. */
268
+
269
+ interface AceDataCloudOptions {
270
+ apiToken?: string;
271
+ baseURL?: string;
272
+ platformBaseURL?: string;
273
+ timeout?: number;
274
+ maxRetries?: number;
275
+ headers?: Record<string, string>;
276
+ }
277
+ declare class AceDataCloud {
278
+ readonly chat: Chat;
279
+ readonly images: Images;
280
+ readonly audio: Audio;
281
+ readonly video: Video;
282
+ readonly search: Search;
283
+ readonly tasks: Tasks;
284
+ readonly files: Files;
285
+ readonly platform: Platform;
286
+ readonly openai: OpenAI;
287
+ private transport;
288
+ constructor(opts?: AceDataCloudOptions);
289
+ }
290
+
291
+ /** AceDataCloud SDK errors. */
292
+ declare class AceDataCloudError extends Error {
293
+ constructor(message: string);
294
+ }
295
+ declare class TransportError extends AceDataCloudError {
296
+ constructor(message: string);
297
+ }
298
+ declare class APIError extends AceDataCloudError {
299
+ statusCode: number;
300
+ code: string;
301
+ traceId?: string;
302
+ body: Record<string, unknown>;
303
+ constructor(opts: {
304
+ message: string;
305
+ statusCode: number;
306
+ code: string;
307
+ traceId?: string;
308
+ body?: Record<string, unknown>;
309
+ });
310
+ }
311
+ declare class AuthenticationError extends APIError {
312
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
313
+ }
314
+ declare class TokenMismatchError extends APIError {
315
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
316
+ }
317
+ declare class RateLimitError extends APIError {
318
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
319
+ }
320
+ declare class ValidationError extends APIError {
321
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
322
+ }
323
+ declare class InsufficientBalanceError extends APIError {
324
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
325
+ }
326
+ declare class ResourceDisabledError extends APIError {
327
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
328
+ }
329
+ declare class ModerationError extends APIError {
330
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
331
+ }
332
+ declare class TimeoutError extends APIError {
333
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
334
+ }
335
+
336
+ export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AudioProvider, AuthenticationError, type ImageProvider, InsufficientBalanceError, ModerationError, RateLimitError, ResourceDisabledError, TaskHandle, type TaskHandleOptions, TimeoutError, TokenMismatchError, TransportError, ValidationError, type VideoProvider };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,336 @@
1
- /** @acedatacloud/sdk Official TypeScript SDK for AceDataCloud. */
2
- export { AceDataCloud, AceDataCloudOptions } from './client';
3
- export { AceDataCloudError, APIError, AuthenticationError, InsufficientBalanceError, ModerationError, RateLimitError, ResourceDisabledError, TimeoutError, TokenMismatchError, TransportError, ValidationError, } from './runtime/errors';
4
- export { TaskHandle, TaskHandleOptions } from './runtime/tasks';
1
+ /** HTTP transport for AceDataCloud SDK. Uses native fetch (Node 18+). */
2
+ interface TransportOptions {
3
+ apiToken?: string;
4
+ baseURL?: string;
5
+ platformBaseURL?: string;
6
+ timeout?: number;
7
+ maxRetries?: number;
8
+ headers?: Record<string, string>;
9
+ }
10
+ declare class Transport {
11
+ private baseURL;
12
+ private platformBaseURL;
13
+ private timeout;
14
+ private maxRetries;
15
+ private headers;
16
+ constructor(opts?: TransportOptions);
17
+ request(method: string, path: string, opts?: {
18
+ json?: Record<string, unknown>;
19
+ params?: Record<string, string>;
20
+ platform?: boolean;
21
+ timeout?: number;
22
+ headers?: Record<string, string>;
23
+ }): Promise<Record<string, unknown>>;
24
+ requestStream(method: string, path: string, opts?: {
25
+ json?: Record<string, unknown>;
26
+ timeout?: number;
27
+ }): AsyncGenerator<string, void, unknown>;
28
+ upload(path: string, fileData: Buffer | Uint8Array, filename: string, opts?: {
29
+ timeout?: number;
30
+ }): Promise<Record<string, unknown>>;
31
+ }
32
+
33
+ /** Chat resources — native provider APIs (Claude Messages). */
34
+
35
+ declare class Messages {
36
+ private transport;
37
+ constructor(transport: Transport);
38
+ create(opts: {
39
+ model: string;
40
+ messages: Array<Record<string, unknown>>;
41
+ maxTokens?: number;
42
+ stream?: false;
43
+ [key: string]: unknown;
44
+ }): Promise<Record<string, unknown>>;
45
+ create(opts: {
46
+ model: string;
47
+ messages: Array<Record<string, unknown>>;
48
+ maxTokens?: number;
49
+ stream: true;
50
+ [key: string]: unknown;
51
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
52
+ private stream;
53
+ countTokens(opts: {
54
+ model: string;
55
+ messages: Array<Record<string, unknown>>;
56
+ [key: string]: unknown;
57
+ }): Promise<Record<string, unknown>>;
58
+ }
59
+ declare class Chat {
60
+ readonly messages: Messages;
61
+ constructor(transport: Transport);
62
+ }
63
+
64
+ /** Task polling abstraction. */
65
+
66
+ interface TaskHandleOptions {
67
+ pollInterval?: number;
68
+ maxWait?: number;
69
+ }
70
+ declare class TaskHandle {
71
+ readonly id: string;
72
+ private pollEndpoint;
73
+ private transport;
74
+ private _result;
75
+ constructor(taskId: string, pollEndpoint: string, transport: Transport);
76
+ get(): Promise<Record<string, unknown>>;
77
+ isCompleted(): Promise<boolean>;
78
+ wait(opts?: TaskHandleOptions): Promise<Record<string, unknown>>;
79
+ get result(): Record<string, unknown> | null;
80
+ }
81
+
82
+ /** Image generation resources. */
83
+
84
+ type ImageProvider = 'nano-banana' | 'midjourney' | 'flux' | 'seedream' | (string & {});
85
+ declare class Images {
86
+ private transport;
87
+ constructor(transport: Transport);
88
+ generate(opts: {
89
+ prompt: string;
90
+ provider?: ImageProvider;
91
+ model?: string;
92
+ negativePrompt?: string;
93
+ imageUrl?: string;
94
+ callbackUrl?: string;
95
+ wait?: boolean;
96
+ pollInterval?: number;
97
+ maxWait?: number;
98
+ [key: string]: unknown;
99
+ }): Promise<Record<string, unknown> | TaskHandle>;
100
+ }
101
+
102
+ /** Audio/music generation resources. */
103
+
104
+ type AudioProvider = 'suno' | 'producer' | (string & {});
105
+ declare class Audio {
106
+ private transport;
107
+ constructor(transport: Transport);
108
+ generate(opts: {
109
+ prompt: string;
110
+ provider?: AudioProvider;
111
+ model?: string;
112
+ tags?: string;
113
+ callbackUrl?: string;
114
+ wait?: boolean;
115
+ pollInterval?: number;
116
+ maxWait?: number;
117
+ [key: string]: unknown;
118
+ }): Promise<Record<string, unknown> | TaskHandle>;
119
+ }
120
+
121
+ /** Video generation resources. */
122
+
123
+ type VideoProvider = 'sora' | 'luma' | 'veo' | 'kling' | 'hailuo' | 'seedance' | 'wan' | 'pika' | 'pixverse' | (string & {});
124
+ declare class Video {
125
+ private transport;
126
+ constructor(transport: Transport);
127
+ generate(opts: {
128
+ prompt: string;
129
+ provider?: VideoProvider;
130
+ model?: string;
131
+ imageUrl?: string;
132
+ callbackUrl?: string;
133
+ wait?: boolean;
134
+ pollInterval?: number;
135
+ maxWait?: number;
136
+ [key: string]: unknown;
137
+ }): Promise<Record<string, unknown> | TaskHandle>;
138
+ }
139
+
140
+ /** Search resources. */
141
+
142
+ declare class Search {
143
+ private transport;
144
+ constructor(transport: Transport);
145
+ google(opts: {
146
+ query: string;
147
+ type?: string;
148
+ country?: string;
149
+ language?: string;
150
+ page?: number;
151
+ [key: string]: unknown;
152
+ }): Promise<Record<string, unknown>>;
153
+ }
154
+
155
+ /** Cross-service task retrieval. */
156
+
157
+ declare class Tasks {
158
+ private transport;
159
+ constructor(transport: Transport);
160
+ get(taskId: string, opts?: {
161
+ service?: string;
162
+ }): Promise<Record<string, unknown>>;
163
+ wait(taskId: string, opts?: {
164
+ service?: string;
165
+ pollInterval?: number;
166
+ maxWait?: number;
167
+ }): Promise<Record<string, unknown>>;
168
+ }
169
+
170
+ /** File upload resources. */
171
+
172
+ declare class Files {
173
+ private transport;
174
+ constructor(transport: Transport);
175
+ upload(file: string | Buffer | Uint8Array, opts?: {
176
+ filename?: string;
177
+ }): Promise<Record<string, unknown>>;
178
+ }
179
+
180
+ /** Management-plane resources. */
181
+
182
+ declare class Applications {
183
+ private transport;
184
+ constructor(transport: Transport);
185
+ list(params?: Record<string, string>): Promise<Record<string, unknown>>;
186
+ create(opts: {
187
+ serviceId: string;
188
+ [key: string]: unknown;
189
+ }): Promise<Record<string, unknown>>;
190
+ get(applicationId: string): Promise<Record<string, unknown>>;
191
+ }
192
+ declare class Credentials {
193
+ private transport;
194
+ constructor(transport: Transport);
195
+ list(params?: Record<string, string>): Promise<Record<string, unknown>>;
196
+ create(opts: {
197
+ applicationId: string;
198
+ [key: string]: unknown;
199
+ }): Promise<Record<string, unknown>>;
200
+ rotate(credentialId: string): Promise<Record<string, unknown>>;
201
+ delete(credentialId: string): Promise<Record<string, unknown>>;
202
+ }
203
+ declare class Models {
204
+ private transport;
205
+ constructor(transport: Transport);
206
+ list(params?: Record<string, string>): Promise<Record<string, unknown>>;
207
+ }
208
+ declare class Config {
209
+ private transport;
210
+ constructor(transport: Transport);
211
+ get(): Promise<Record<string, unknown>>;
212
+ }
213
+ declare class Platform {
214
+ readonly applications: Applications;
215
+ readonly credentials: Credentials;
216
+ readonly models: Models;
217
+ readonly config: Config;
218
+ constructor(transport: Transport);
219
+ }
220
+
221
+ /** OpenAI-compatible facade resources. */
222
+
223
+ declare class Completions {
224
+ private transport;
225
+ constructor(transport: Transport);
226
+ create(opts: {
227
+ model: string;
228
+ messages: Array<Record<string, unknown>>;
229
+ stream?: false;
230
+ [key: string]: unknown;
231
+ }): Promise<Record<string, unknown>>;
232
+ create(opts: {
233
+ model: string;
234
+ messages: Array<Record<string, unknown>>;
235
+ stream: true;
236
+ [key: string]: unknown;
237
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
238
+ private streamResponse;
239
+ }
240
+ declare class ChatNamespace {
241
+ readonly completions: Completions;
242
+ constructor(transport: Transport);
243
+ }
244
+ declare class Responses {
245
+ private transport;
246
+ constructor(transport: Transport);
247
+ create(opts: {
248
+ model: string;
249
+ input: string | Array<Record<string, unknown>>;
250
+ stream?: false;
251
+ [key: string]: unknown;
252
+ }): Promise<Record<string, unknown>>;
253
+ create(opts: {
254
+ model: string;
255
+ input: string | Array<Record<string, unknown>>;
256
+ stream: true;
257
+ [key: string]: unknown;
258
+ }): Promise<AsyncGenerator<Record<string, unknown>>>;
259
+ private streamResponse;
260
+ }
261
+ declare class OpenAI {
262
+ readonly chat: ChatNamespace;
263
+ readonly responses: Responses;
264
+ constructor(transport: Transport);
265
+ }
266
+
267
+ /** Top-level AceDataCloud client for TypeScript. */
268
+
269
+ interface AceDataCloudOptions {
270
+ apiToken?: string;
271
+ baseURL?: string;
272
+ platformBaseURL?: string;
273
+ timeout?: number;
274
+ maxRetries?: number;
275
+ headers?: Record<string, string>;
276
+ }
277
+ declare class AceDataCloud {
278
+ readonly chat: Chat;
279
+ readonly images: Images;
280
+ readonly audio: Audio;
281
+ readonly video: Video;
282
+ readonly search: Search;
283
+ readonly tasks: Tasks;
284
+ readonly files: Files;
285
+ readonly platform: Platform;
286
+ readonly openai: OpenAI;
287
+ private transport;
288
+ constructor(opts?: AceDataCloudOptions);
289
+ }
290
+
291
+ /** AceDataCloud SDK errors. */
292
+ declare class AceDataCloudError extends Error {
293
+ constructor(message: string);
294
+ }
295
+ declare class TransportError extends AceDataCloudError {
296
+ constructor(message: string);
297
+ }
298
+ declare class APIError extends AceDataCloudError {
299
+ statusCode: number;
300
+ code: string;
301
+ traceId?: string;
302
+ body: Record<string, unknown>;
303
+ constructor(opts: {
304
+ message: string;
305
+ statusCode: number;
306
+ code: string;
307
+ traceId?: string;
308
+ body?: Record<string, unknown>;
309
+ });
310
+ }
311
+ declare class AuthenticationError extends APIError {
312
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
313
+ }
314
+ declare class TokenMismatchError extends APIError {
315
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
316
+ }
317
+ declare class RateLimitError extends APIError {
318
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
319
+ }
320
+ declare class ValidationError extends APIError {
321
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
322
+ }
323
+ declare class InsufficientBalanceError extends APIError {
324
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
325
+ }
326
+ declare class ResourceDisabledError extends APIError {
327
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
328
+ }
329
+ declare class ModerationError extends APIError {
330
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
331
+ }
332
+ declare class TimeoutError extends APIError {
333
+ constructor(opts: ConstructorParameters<typeof APIError>[0]);
334
+ }
335
+
336
+ export { APIError, AceDataCloud, AceDataCloudError, type AceDataCloudOptions, type AudioProvider, AuthenticationError, type ImageProvider, InsufficientBalanceError, ModerationError, RateLimitError, ResourceDisabledError, TaskHandle, type TaskHandleOptions, TimeoutError, TokenMismatchError, TransportError, ValidationError, type VideoProvider };