@acedatacloud/sdk 2026.809.0 → 2026.811.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.mjs CHANGED
@@ -479,9 +479,9 @@ var Tasks = class {
479
479
  }
480
480
  transport;
481
481
  retrieve(opts) {
482
- const { taskId: taskId15, ...rest } = opts;
482
+ const { taskId: taskId16, ...rest } = opts;
483
483
  return this.transport.request("POST", "/captcha/tasks", {
484
- json: { task_id: taskId15, ...rest }
484
+ json: { task_id: taskId16, ...rest }
485
485
  });
486
486
  }
487
487
  };
@@ -589,8 +589,8 @@ var TaskHandle = class {
589
589
  pollEndpoint;
590
590
  transport;
591
591
  _result = null;
592
- constructor(taskId15, pollEndpoint, transport, submitted) {
593
- this.id = taskId15;
592
+ constructor(taskId16, pollEndpoint, transport, submitted) {
593
+ this.id = taskId16;
594
594
  this.pollEndpoint = pollEndpoint;
595
595
  this.transport = transport;
596
596
  if (submitted && artifactUrls({ response: submitted }).length > 0) {
@@ -668,9 +668,9 @@ var Images = class {
668
668
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
669
669
  const endpoint = `/${provider}/images`;
670
670
  const result = await this.transport.request("POST", endpoint, { json: body });
671
- const taskId15 = result.task_id;
672
- if (!taskId15 || result.data && !shouldWait) return result;
673
- const handle = new TaskHandle(taskId15, `/${provider}/tasks`, this.transport);
671
+ const taskId16 = result.task_id;
672
+ if (!taskId16 || result.data && !shouldWait) return result;
673
+ const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
674
674
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
675
675
  return handle;
676
676
  }
@@ -716,9 +716,9 @@ var Audio = class {
716
716
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
717
717
  result = await this.transport.request("POST", `/${provider}/audios`, { json: body });
718
718
  }
719
- const taskId15 = result.task_id;
720
- if (!taskId15 || result.data && !shouldWait) return result;
721
- const handle = new TaskHandle(taskId15, `/${provider}/tasks`, this.transport);
719
+ const taskId16 = result.task_id;
720
+ if (!taskId16 || result.data && !shouldWait) return result;
721
+ const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
722
722
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
723
723
  return handle;
724
724
  }
@@ -737,9 +737,9 @@ var Video = class {
737
737
  if (imageUrl !== void 0) body.image_url = imageUrl;
738
738
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
739
739
  const result = await this.transport.request("POST", `/${provider}/videos`, { json: body });
740
- const taskId15 = result.task_id;
741
- if (!taskId15 || result.data && !shouldWait) return result;
742
- const handle = new TaskHandle(taskId15, `/${provider}/tasks`, this.transport);
740
+ const taskId16 = result.task_id;
741
+ if (!taskId16 || result.data && !shouldWait) return result;
742
+ const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
743
743
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
744
744
  return handle;
745
745
  }
@@ -786,17 +786,17 @@ var Tasks2 = class {
786
786
  this.transport = transport;
787
787
  }
788
788
  transport;
789
- async get(taskId15, opts = {}) {
789
+ async get(taskId16, opts = {}) {
790
790
  const service = opts.service ?? "suno";
791
791
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
792
792
  return this.transport.request("POST", endpoint, {
793
- json: { id: taskId15, action: "retrieve" }
793
+ json: { id: taskId16, action: "retrieve" }
794
794
  });
795
795
  }
796
- async wait(taskId15, opts = {}) {
796
+ async wait(taskId16, opts = {}) {
797
797
  const service = opts.service ?? "suno";
798
798
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
799
- const handle = new TaskHandle(taskId15, endpoint, this.transport);
799
+ const handle = new TaskHandle(taskId16, endpoint, this.transport);
800
800
  return handle.wait({ pollInterval: opts.pollInterval, maxWait: opts.maxWait });
801
801
  }
802
802
  };
@@ -1759,48 +1759,49 @@ var Luma = class {
1759
1759
  };
1760
1760
 
1761
1761
  // src/resources/providers/maestro.ts
1762
+ function taskId8(result) {
1763
+ if (typeof result?.task_id === "string") return result.task_id;
1764
+ const data = result?.data;
1765
+ if (data && typeof data.task_id === "string") return data.task_id;
1766
+ return typeof result?.id === "string" ? result.id : "";
1767
+ }
1762
1768
  var Maestro = class {
1763
1769
  constructor(transport) {
1764
1770
  this.transport = transport;
1765
1771
  }
1766
1772
  transport;
1767
- /** Maestro Video Generation API */
1773
+ /** Call /maestro/videos. */
1768
1774
  async generate(options) {
1769
1775
  const body = {};
1770
1776
  body["prompt"] = options.prompt;
1771
- body["langs"] = options.langs ?? ["zh-cn"];
1772
- body["style"] = options.style ?? "auto";
1773
- body["voice"] = options.voice ?? "auto";
1774
1777
  body["action"] = options.action ?? "generate";
1778
+ if (options.refTaskId !== void 0) body["ref_task_id"] = options.refTaskId;
1779
+ if (options.fileUrls !== void 0) body["file_urls"] = options.fileUrls;
1780
+ body["langs"] = options.langs ?? ["zh-cn"];
1775
1781
  body["aspect"] = options.aspect ?? "9:16";
1776
- body["quality"] = options.quality ?? "standard";
1777
1782
  body["duration"] = options.duration ?? 30;
1783
+ body["quality"] = options.quality ?? "standard";
1778
1784
  body["scenario"] = options.scenario ?? "auto";
1779
- if (options.fileUrls !== void 0) body["file_urls"] = options.fileUrls;
1780
- if (options.refTaskId !== void 0) body["ref_task_id"] = options.refTaskId;
1785
+ body["style"] = options.style ?? "auto";
1786
+ body["voice"] = options.voice ?? "auto";
1781
1787
  for (const [key, value] of Object.entries(options)) {
1782
1788
  if (!["action", "aspect", "async", "callbackUrl", "duration", "fileUrls", "langs", "maxWait", "pollInterval", "prompt", "quality", "refTaskId", "scenario", "style", "voice", "wait"].includes(key) && value !== void 0) {
1783
1789
  body[key] = value;
1784
1790
  }
1785
1791
  }
1786
1792
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1787
- return await this.transport.request("POST", "/maestro/videos", { json: body });
1788
- }
1789
- /** Call /maestro/estimates. */
1790
- async estimates(options = {}) {
1791
- const body = {};
1792
- for (const [key, value] of Object.entries(options)) {
1793
- if (!["async", "callbackUrl", "maxWait", "pollInterval", "wait"].includes(key) && value !== void 0) {
1794
- body[key] = value;
1795
- }
1793
+ body.async = options.async ?? true;
1794
+ const result = await this.transport.request("POST", "/maestro/videos", { json: body });
1795
+ const handle = new TaskHandle(taskId8(result), "/maestro/tasks", this.transport, result);
1796
+ if (options.wait) {
1797
+ await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1796
1798
  }
1797
- if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1798
- return await this.transport.request("POST", "/maestro/estimates", { json: body });
1799
+ return handle;
1799
1800
  }
1800
1801
  };
1801
1802
 
1802
1803
  // src/resources/providers/minimax.ts
1803
- function taskId8(result) {
1804
+ function taskId9(result) {
1804
1805
  if (typeof result?.task_id === "string") return result.task_id;
1805
1806
  const data = result?.data;
1806
1807
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -1827,7 +1828,7 @@ var Minimax = class {
1827
1828
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1828
1829
  body.async = options.async ?? true;
1829
1830
  const result = await this.transport.request("POST", "/minimax/videos", { json: body });
1830
- const handle = new TaskHandle(taskId8(result), "/minimax/tasks", this.transport, result);
1831
+ const handle = new TaskHandle(taskId9(result), "/minimax/tasks", this.transport, result);
1831
1832
  if (options.wait) {
1832
1833
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1833
1834
  }
@@ -1836,7 +1837,7 @@ var Minimax = class {
1836
1837
  };
1837
1838
 
1838
1839
  // src/resources/providers/nano-banana.ts
1839
- function taskId9(result) {
1840
+ function taskId10(result) {
1840
1841
  if (typeof result?.task_id === "string") return result.task_id;
1841
1842
  const data = result?.data;
1842
1843
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -1865,7 +1866,7 @@ var NanoBanana = class {
1865
1866
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1866
1867
  body.async = options.async ?? true;
1867
1868
  const result = await this.transport.request("POST", "/nano-banana/images", { json: body });
1868
- const handle = new TaskHandle(taskId9(result), "/nano-banana/tasks", this.transport, result);
1869
+ const handle = new TaskHandle(taskId10(result), "/nano-banana/tasks", this.transport, result);
1869
1870
  if (options.wait) {
1870
1871
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1871
1872
  }
@@ -1874,7 +1875,7 @@ var NanoBanana = class {
1874
1875
  };
1875
1876
 
1876
1877
  // src/resources/providers/producer.ts
1877
- function taskId10(result) {
1878
+ function taskId11(result) {
1878
1879
  if (typeof result?.task_id === "string") return result.task_id;
1879
1880
  const data = result?.data;
1880
1881
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -1947,7 +1948,7 @@ var Producer = class {
1947
1948
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1948
1949
  body.async = options.async ?? true;
1949
1950
  const result = await this.transport.request("POST", "/producer/audios", { json: body });
1950
- const handle = new TaskHandle(taskId10(result), "/producer/tasks", this.transport, result);
1951
+ const handle = new TaskHandle(taskId11(result), "/producer/tasks", this.transport, result);
1951
1952
  if (options.wait) {
1952
1953
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1953
1954
  }
@@ -1968,7 +1969,7 @@ var Producer = class {
1968
1969
  };
1969
1970
 
1970
1971
  // src/resources/providers/seedance.ts
1971
- function taskId11(result) {
1972
+ function taskId12(result) {
1972
1973
  if (typeof result?.task_id === "string") return result.task_id;
1973
1974
  const data = result?.data;
1974
1975
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2002,7 +2003,7 @@ var Seedance = class {
2002
2003
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2003
2004
  body.async = options.async ?? true;
2004
2005
  const result = await this.transport.request("POST", "/seedance/videos", { json: body });
2005
- const handle = new TaskHandle(taskId11(result), "/seedance/tasks", this.transport, result);
2006
+ const handle = new TaskHandle(taskId12(result), "/seedance/tasks", this.transport, result);
2006
2007
  if (options.wait) {
2007
2008
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2008
2009
  }
@@ -2011,7 +2012,7 @@ var Seedance = class {
2011
2012
  };
2012
2013
 
2013
2014
  // src/resources/providers/seedream.ts
2014
- function taskId12(result) {
2015
+ function taskId13(result) {
2015
2016
  if (typeof result?.task_id === "string") return result.task_id;
2016
2017
  const data = result?.data;
2017
2018
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2028,7 +2029,7 @@ var Seedream = class {
2028
2029
  body["model"] = options.model;
2029
2030
  body["prompt"] = options.prompt;
2030
2031
  if (options.seed !== void 0) body["seed"] = options.seed;
2031
- body["size"] = options.size ?? "2K";
2032
+ if (options.size !== void 0) body["size"] = options.size;
2032
2033
  if (options.image !== void 0) body["image"] = options.image;
2033
2034
  if (options.tools !== void 0) body["tools"] = options.tools;
2034
2035
  if (options.stream !== void 0) body["stream"] = options.stream;
@@ -2047,7 +2048,7 @@ var Seedream = class {
2047
2048
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2048
2049
  body.async = options.async ?? true;
2049
2050
  const result = await this.transport.request("POST", "/seedream/images", { json: body });
2050
- const handle = new TaskHandle(taskId12(result), "/seedream/tasks", this.transport, result);
2051
+ const handle = new TaskHandle(taskId13(result), "/seedream/tasks", this.transport, result);
2051
2052
  if (options.wait) {
2052
2053
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2053
2054
  }
@@ -2056,7 +2057,7 @@ var Seedream = class {
2056
2057
  };
2057
2058
 
2058
2059
  // src/resources/providers/suno.ts
2059
- function taskId13(result) {
2060
+ function taskId14(result) {
2060
2061
  if (typeof result?.task_id === "string") return result.task_id;
2061
2062
  const data = result?.data;
2062
2063
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2107,7 +2108,7 @@ var Suno = class {
2107
2108
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2108
2109
  body.async = options.async ?? true;
2109
2110
  const result = await this.transport.request("POST", "/suno/audios", { json: body });
2110
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2111
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2111
2112
  if (options.wait) {
2112
2113
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2113
2114
  }
@@ -2182,7 +2183,7 @@ var Suno = class {
2182
2183
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2183
2184
  body.async = options.async ?? true;
2184
2185
  const result = await this.transport.request("POST", "/suno/vox", { json: body });
2185
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2186
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2186
2187
  if (options.wait) {
2187
2188
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2188
2189
  }
@@ -2200,7 +2201,7 @@ var Suno = class {
2200
2201
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2201
2202
  body.async = options.async ?? true;
2202
2203
  const result = await this.transport.request("POST", "/suno/wav", { json: body });
2203
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2204
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2204
2205
  if (options.wait) {
2205
2206
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2206
2207
  }
@@ -2218,7 +2219,7 @@ var Suno = class {
2218
2219
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2219
2220
  body.async = options.async ?? true;
2220
2221
  const result = await this.transport.request("POST", "/suno/midi", { json: body });
2221
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2222
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2222
2223
  if (options.wait) {
2223
2224
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2224
2225
  }
@@ -2277,7 +2278,7 @@ var Suno = class {
2277
2278
  };
2278
2279
 
2279
2280
  // src/resources/providers/wan.ts
2280
- function taskId14(result) {
2281
+ function taskId15(result) {
2281
2282
  if (typeof result?.task_id === "string") return result.task_id;
2282
2283
  const data = result?.data;
2283
2284
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2312,7 +2313,7 @@ var Wan = class {
2312
2313
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2313
2314
  body.async = options.async ?? true;
2314
2315
  const result = await this.transport.request("POST", "/wan/videos", { json: body });
2315
- const handle = new TaskHandle(taskId14(result), "/wan/tasks", this.transport, result);
2316
+ const handle = new TaskHandle(taskId15(result), "/wan/tasks", this.transport, result);
2316
2317
  if (options.wait) {
2317
2318
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2318
2319
  }