@acedatacloud/sdk 2026.805.0 → 2026.809.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/sdk",
3
- "version": "2026.805.0",
3
+ "version": "2026.809.0",
4
4
  "description": "Official TypeScript SDK for AceDataCloud — AI-powered data services",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/client.ts CHANGED
@@ -4,6 +4,7 @@ import { Transport, TransportOptions } from './runtime/transport';
4
4
  import type { PaymentHandler } from './runtime/payment';
5
5
  import { AiChat } from './resources/aichat';
6
6
  import { Chat } from './resources/chat';
7
+ import { Captcha } from './resources/captcha';
7
8
  import { Images } from './resources/images';
8
9
  import { Audio } from './resources/audio';
9
10
  import { Video } from './resources/video';
@@ -38,6 +39,7 @@ export interface AceDataCloudOptions {
38
39
  export class AceDataCloud {
39
40
  readonly aichat: AiChat;
40
41
  readonly chat: Chat;
42
+ readonly captcha: Captcha;
41
43
  readonly images: Images;
42
44
  readonly audio: Audio;
43
45
  readonly video: Video;
@@ -68,6 +70,7 @@ export class AceDataCloud {
68
70
 
69
71
  this.aichat = new AiChat(this.transport);
70
72
  this.chat = new Chat(this.transport);
73
+ this.captcha = new Captcha(this.transport);
71
74
  this.images = new Images(this.transport);
72
75
  this.audio = new Audio(this.transport);
73
76
  this.video = new Video(this.transport);
@@ -0,0 +1,66 @@
1
+ /** Captcha resources (`/captcha/*`). */
2
+
3
+ import { Transport } from '../runtime/transport';
4
+
5
+ class Recognition {
6
+ constructor(private transport: Transport) {}
7
+
8
+ hcaptcha(opts: {
9
+ queries?: string[];
10
+ question?: string;
11
+ async?: boolean;
12
+ [key: string]: unknown;
13
+ } = {}): Promise<Record<string, unknown>> {
14
+ const { queries, question, ...rest } = opts;
15
+ const body: Record<string, unknown> = { ...rest };
16
+ if (queries !== undefined) body.queries = queries;
17
+ if (question !== undefined) body.question = question;
18
+ return this.transport.request('POST', '/captcha/recognition/hcaptcha', { json: body });
19
+ }
20
+ }
21
+
22
+ class Token {
23
+ constructor(private transport: Transport) {}
24
+
25
+ hcaptcha(opts: {
26
+ websiteKey: string;
27
+ websiteUrl: string;
28
+ rqdata?: string;
29
+ proxy?: string;
30
+ async?: boolean;
31
+ [key: string]: unknown;
32
+ }): Promise<Record<string, unknown>> {
33
+ const { websiteKey, websiteUrl, rqdata, proxy, ...rest } = opts;
34
+ const body: Record<string, unknown> = {
35
+ website_key: websiteKey,
36
+ website_url: websiteUrl,
37
+ ...rest,
38
+ };
39
+ if (rqdata !== undefined) body.rqdata = rqdata;
40
+ if (proxy !== undefined) body.proxy = proxy;
41
+ return this.transport.request('POST', '/captcha/token/hcaptcha', { json: body });
42
+ }
43
+ }
44
+
45
+ class Tasks {
46
+ constructor(private transport: Transport) {}
47
+
48
+ retrieve(opts: { taskId: string; [key: string]: unknown }): Promise<Record<string, unknown>> {
49
+ const { taskId, ...rest } = opts;
50
+ return this.transport.request('POST', '/captcha/tasks', {
51
+ json: { task_id: taskId, ...rest },
52
+ });
53
+ }
54
+ }
55
+
56
+ export class Captcha {
57
+ readonly recognition: Recognition;
58
+ readonly token: Token;
59
+ readonly tasks: Tasks;
60
+
61
+ constructor(transport: Transport) {
62
+ this.recognition = new Recognition(transport);
63
+ this.token = new Token(transport);
64
+ this.tasks = new Tasks(transport);
65
+ }
66
+ }
@@ -9,6 +9,7 @@ export { Happyhorse } from './happyhorse';
9
9
  export { Localization } from './localization';
10
10
  export { Luma } from './luma';
11
11
  export { Maestro } from './maestro';
12
+ export { Minimax } from './minimax';
12
13
  export { NanoBanana } from './nano-banana';
13
14
  export { Producer } from './producer';
14
15
  export { Seedance } from './seedance';
@@ -26,6 +27,7 @@ import { Happyhorse } from './happyhorse';
26
27
  import { Localization } from './localization';
27
28
  import { Luma } from './luma';
28
29
  import { Maestro } from './maestro';
30
+ import { Minimax } from './minimax';
29
31
  import { NanoBanana } from './nano-banana';
30
32
  import { Producer } from './producer';
31
33
  import { Seedance } from './seedance';
@@ -44,6 +46,7 @@ export function attachProviders(client: Record<string, unknown>, transport: Tran
44
46
  client.localization = new Localization(transport);
45
47
  client.luma = new Luma(transport);
46
48
  client.maestro = new Maestro(transport);
49
+ client.minimax = new Minimax(transport);
47
50
  client.nanobanana = new NanoBanana(transport);
48
51
  client.producer = new Producer(transport);
49
52
  client.seedance = new Seedance(transport);
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Minimax (minimax) — generated from the platform OpenAPI spec.
3
+ *
4
+ * Do not edit by hand: run `python scripts/generate_providers.py`. Parameter
5
+ * names, types, enums and required-ness all come from the live spec.
6
+ */
7
+
8
+ import { Transport } from '../../runtime/transport';
9
+ import { TaskHandle } from '../../runtime/tasks';
10
+
11
+ function taskId(result: Record<string, unknown>): string {
12
+ if (typeof result?.task_id === 'string') return result.task_id;
13
+ const data = result?.data as Record<string, unknown> | undefined;
14
+ if (data && typeof data.task_id === 'string') return data.task_id;
15
+ return typeof result?.id === 'string' ? result.id : '';
16
+ }
17
+
18
+
19
+ export interface MinimaxGenerateOptions {
20
+ /** Minimax Videos Model */
21
+ model: "MiniMax-H3";
22
+ /** Minimax Videos Content */
23
+ content: Array<Record<string, unknown>>;
24
+ /** Minimax Videos Resolution */
25
+ resolution: "768P" | "2K";
26
+ /** Minimax Videos Duration */
27
+ duration: number;
28
+ /** Minimax Videos Ratio */
29
+ ratio?: "adaptive" | "21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
30
+ async?: boolean;
31
+ wait?: boolean;
32
+ pollInterval?: number;
33
+ maxWait?: number;
34
+ callbackUrl?: string;
35
+ /** Any parameter added upstream before the SDK is regenerated. */
36
+ [key: string]: unknown;
37
+ }
38
+
39
+ /** minimax client. */
40
+ export class Minimax {
41
+ constructor(private transport: Transport) {}
42
+
43
+ /** Minimax Videos */
44
+ async generate(options: MinimaxGenerateOptions): Promise<TaskHandle> {
45
+ const body: Record<string, unknown> = {};
46
+ body["model"] = options.model;
47
+ body["content"] = options.content;
48
+ body["resolution"] = options.resolution;
49
+ body["duration"] = options.duration;
50
+ if (options.ratio !== undefined) body["ratio"] = options.ratio;
51
+ for (const [key, value] of Object.entries(options)) {
52
+ if (!["async", "callbackUrl", "content", "duration", "maxWait", "model", "pollInterval", "ratio", "resolution", "wait"].includes(key) && value !== undefined) {
53
+ body[key] = value;
54
+ }
55
+ }
56
+ if (options.callbackUrl !== undefined) body.callback_url = options.callbackUrl;
57
+ body.async = options.async ?? true;
58
+ const result = (await this.transport.request('POST', "/minimax/videos", { json: body })) as Record<string, unknown>;
59
+ const handle = new TaskHandle(taskId(result), "/minimax/tasks", this.transport, result);
60
+ if (options.wait) {
61
+ await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
62
+ }
63
+ return handle;
64
+ }
65
+
66
+ }
@@ -20,6 +20,7 @@ const SERVICE_TASK_ENDPOINTS: Record<string, string> = {
20
20
  pika: '/pika/tasks',
21
21
  pixverse: '/pixverse/tasks',
22
22
  webextrator: '/webextrator/tasks',
23
+ captcha: '/captcha/tasks',
23
24
  };
24
25
 
25
26
  export class Tasks {