@acedatacloud/sdk 2026.810.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.js CHANGED
@@ -527,9 +527,9 @@ var Tasks = class {
527
527
  }
528
528
  transport;
529
529
  retrieve(opts) {
530
- const { taskId: taskId15, ...rest } = opts;
530
+ const { taskId: taskId16, ...rest } = opts;
531
531
  return this.transport.request("POST", "/captcha/tasks", {
532
- json: { task_id: taskId15, ...rest }
532
+ json: { task_id: taskId16, ...rest }
533
533
  });
534
534
  }
535
535
  };
@@ -637,8 +637,8 @@ var TaskHandle = class {
637
637
  pollEndpoint;
638
638
  transport;
639
639
  _result = null;
640
- constructor(taskId15, pollEndpoint, transport, submitted) {
641
- this.id = taskId15;
640
+ constructor(taskId16, pollEndpoint, transport, submitted) {
641
+ this.id = taskId16;
642
642
  this.pollEndpoint = pollEndpoint;
643
643
  this.transport = transport;
644
644
  if (submitted && artifactUrls({ response: submitted }).length > 0) {
@@ -716,9 +716,9 @@ var Images = class {
716
716
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
717
717
  const endpoint = `/${provider}/images`;
718
718
  const result = await this.transport.request("POST", endpoint, { json: body });
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
  }
@@ -764,9 +764,9 @@ var Audio = class {
764
764
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
765
765
  result = await this.transport.request("POST", `/${provider}/audios`, { json: body });
766
766
  }
767
- const taskId15 = result.task_id;
768
- if (!taskId15 || result.data && !shouldWait) return result;
769
- const handle = new TaskHandle(taskId15, `/${provider}/tasks`, this.transport);
767
+ const taskId16 = result.task_id;
768
+ if (!taskId16 || result.data && !shouldWait) return result;
769
+ const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
770
770
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
771
771
  return handle;
772
772
  }
@@ -785,9 +785,9 @@ var Video = class {
785
785
  if (imageUrl !== void 0) body.image_url = imageUrl;
786
786
  if (callbackUrl !== void 0) body.callback_url = callbackUrl;
787
787
  const result = await this.transport.request("POST", `/${provider}/videos`, { json: body });
788
- const taskId15 = result.task_id;
789
- if (!taskId15 || result.data && !shouldWait) return result;
790
- const handle = new TaskHandle(taskId15, `/${provider}/tasks`, this.transport);
788
+ const taskId16 = result.task_id;
789
+ if (!taskId16 || result.data && !shouldWait) return result;
790
+ const handle = new TaskHandle(taskId16, `/${provider}/tasks`, this.transport);
791
791
  if (shouldWait) return handle.wait({ pollInterval, maxWait });
792
792
  return handle;
793
793
  }
@@ -834,17 +834,17 @@ var Tasks2 = class {
834
834
  this.transport = transport;
835
835
  }
836
836
  transport;
837
- async get(taskId15, opts = {}) {
837
+ async get(taskId16, opts = {}) {
838
838
  const service = opts.service ?? "suno";
839
839
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
840
840
  return this.transport.request("POST", endpoint, {
841
- json: { id: taskId15, action: "retrieve" }
841
+ json: { id: taskId16, action: "retrieve" }
842
842
  });
843
843
  }
844
- async wait(taskId15, opts = {}) {
844
+ async wait(taskId16, opts = {}) {
845
845
  const service = opts.service ?? "suno";
846
846
  const endpoint = SERVICE_TASK_ENDPOINTS[service] ?? `/${service}/tasks`;
847
- const handle = new TaskHandle(taskId15, endpoint, this.transport);
847
+ const handle = new TaskHandle(taskId16, endpoint, this.transport);
848
848
  return handle.wait({ pollInterval: opts.pollInterval, maxWait: opts.maxWait });
849
849
  }
850
850
  };
@@ -1807,48 +1807,49 @@ var Luma = class {
1807
1807
  };
1808
1808
 
1809
1809
  // src/resources/providers/maestro.ts
1810
+ function taskId8(result) {
1811
+ if (typeof result?.task_id === "string") return result.task_id;
1812
+ const data = result?.data;
1813
+ if (data && typeof data.task_id === "string") return data.task_id;
1814
+ return typeof result?.id === "string" ? result.id : "";
1815
+ }
1810
1816
  var Maestro = class {
1811
1817
  constructor(transport) {
1812
1818
  this.transport = transport;
1813
1819
  }
1814
1820
  transport;
1815
- /** Maestro Video Generation API */
1821
+ /** Call /maestro/videos. */
1816
1822
  async generate(options) {
1817
1823
  const body = {};
1818
1824
  body["prompt"] = options.prompt;
1819
- body["langs"] = options.langs ?? ["zh-cn"];
1820
- body["style"] = options.style ?? "auto";
1821
- body["voice"] = options.voice ?? "auto";
1822
1825
  body["action"] = options.action ?? "generate";
1826
+ if (options.refTaskId !== void 0) body["ref_task_id"] = options.refTaskId;
1827
+ if (options.fileUrls !== void 0) body["file_urls"] = options.fileUrls;
1828
+ body["langs"] = options.langs ?? ["zh-cn"];
1823
1829
  body["aspect"] = options.aspect ?? "9:16";
1824
- body["quality"] = options.quality ?? "standard";
1825
1830
  body["duration"] = options.duration ?? 30;
1831
+ body["quality"] = options.quality ?? "standard";
1826
1832
  body["scenario"] = options.scenario ?? "auto";
1827
- if (options.fileUrls !== void 0) body["file_urls"] = options.fileUrls;
1828
- if (options.refTaskId !== void 0) body["ref_task_id"] = options.refTaskId;
1833
+ body["style"] = options.style ?? "auto";
1834
+ body["voice"] = options.voice ?? "auto";
1829
1835
  for (const [key, value] of Object.entries(options)) {
1830
1836
  if (!["action", "aspect", "async", "callbackUrl", "duration", "fileUrls", "langs", "maxWait", "pollInterval", "prompt", "quality", "refTaskId", "scenario", "style", "voice", "wait"].includes(key) && value !== void 0) {
1831
1837
  body[key] = value;
1832
1838
  }
1833
1839
  }
1834
1840
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1835
- return await this.transport.request("POST", "/maestro/videos", { json: body });
1836
- }
1837
- /** Call /maestro/estimates. */
1838
- async estimates(options = {}) {
1839
- const body = {};
1840
- for (const [key, value] of Object.entries(options)) {
1841
- if (!["async", "callbackUrl", "maxWait", "pollInterval", "wait"].includes(key) && value !== void 0) {
1842
- body[key] = value;
1843
- }
1841
+ body.async = options.async ?? true;
1842
+ const result = await this.transport.request("POST", "/maestro/videos", { json: body });
1843
+ const handle = new TaskHandle(taskId8(result), "/maestro/tasks", this.transport, result);
1844
+ if (options.wait) {
1845
+ await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1844
1846
  }
1845
- if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1846
- return await this.transport.request("POST", "/maestro/estimates", { json: body });
1847
+ return handle;
1847
1848
  }
1848
1849
  };
1849
1850
 
1850
1851
  // src/resources/providers/minimax.ts
1851
- function taskId8(result) {
1852
+ function taskId9(result) {
1852
1853
  if (typeof result?.task_id === "string") return result.task_id;
1853
1854
  const data = result?.data;
1854
1855
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -1875,7 +1876,7 @@ var Minimax = class {
1875
1876
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1876
1877
  body.async = options.async ?? true;
1877
1878
  const result = await this.transport.request("POST", "/minimax/videos", { json: body });
1878
- const handle = new TaskHandle(taskId8(result), "/minimax/tasks", this.transport, result);
1879
+ const handle = new TaskHandle(taskId9(result), "/minimax/tasks", this.transport, result);
1879
1880
  if (options.wait) {
1880
1881
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1881
1882
  }
@@ -1884,7 +1885,7 @@ var Minimax = class {
1884
1885
  };
1885
1886
 
1886
1887
  // src/resources/providers/nano-banana.ts
1887
- function taskId9(result) {
1888
+ function taskId10(result) {
1888
1889
  if (typeof result?.task_id === "string") return result.task_id;
1889
1890
  const data = result?.data;
1890
1891
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -1913,7 +1914,7 @@ var NanoBanana = class {
1913
1914
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1914
1915
  body.async = options.async ?? true;
1915
1916
  const result = await this.transport.request("POST", "/nano-banana/images", { json: body });
1916
- const handle = new TaskHandle(taskId9(result), "/nano-banana/tasks", this.transport, result);
1917
+ const handle = new TaskHandle(taskId10(result), "/nano-banana/tasks", this.transport, result);
1917
1918
  if (options.wait) {
1918
1919
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
1919
1920
  }
@@ -1922,7 +1923,7 @@ var NanoBanana = class {
1922
1923
  };
1923
1924
 
1924
1925
  // src/resources/providers/producer.ts
1925
- function taskId10(result) {
1926
+ function taskId11(result) {
1926
1927
  if (typeof result?.task_id === "string") return result.task_id;
1927
1928
  const data = result?.data;
1928
1929
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -1995,7 +1996,7 @@ var Producer = class {
1995
1996
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
1996
1997
  body.async = options.async ?? true;
1997
1998
  const result = await this.transport.request("POST", "/producer/audios", { json: body });
1998
- const handle = new TaskHandle(taskId10(result), "/producer/tasks", this.transport, result);
1999
+ const handle = new TaskHandle(taskId11(result), "/producer/tasks", this.transport, result);
1999
2000
  if (options.wait) {
2000
2001
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2001
2002
  }
@@ -2016,7 +2017,7 @@ var Producer = class {
2016
2017
  };
2017
2018
 
2018
2019
  // src/resources/providers/seedance.ts
2019
- function taskId11(result) {
2020
+ function taskId12(result) {
2020
2021
  if (typeof result?.task_id === "string") return result.task_id;
2021
2022
  const data = result?.data;
2022
2023
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2050,7 +2051,7 @@ var Seedance = class {
2050
2051
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2051
2052
  body.async = options.async ?? true;
2052
2053
  const result = await this.transport.request("POST", "/seedance/videos", { json: body });
2053
- const handle = new TaskHandle(taskId11(result), "/seedance/tasks", this.transport, result);
2054
+ const handle = new TaskHandle(taskId12(result), "/seedance/tasks", this.transport, result);
2054
2055
  if (options.wait) {
2055
2056
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2056
2057
  }
@@ -2059,7 +2060,7 @@ var Seedance = class {
2059
2060
  };
2060
2061
 
2061
2062
  // src/resources/providers/seedream.ts
2062
- function taskId12(result) {
2063
+ function taskId13(result) {
2063
2064
  if (typeof result?.task_id === "string") return result.task_id;
2064
2065
  const data = result?.data;
2065
2066
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2095,7 +2096,7 @@ var Seedream = class {
2095
2096
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2096
2097
  body.async = options.async ?? true;
2097
2098
  const result = await this.transport.request("POST", "/seedream/images", { json: body });
2098
- const handle = new TaskHandle(taskId12(result), "/seedream/tasks", this.transport, result);
2099
+ const handle = new TaskHandle(taskId13(result), "/seedream/tasks", this.transport, result);
2099
2100
  if (options.wait) {
2100
2101
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2101
2102
  }
@@ -2104,7 +2105,7 @@ var Seedream = class {
2104
2105
  };
2105
2106
 
2106
2107
  // src/resources/providers/suno.ts
2107
- function taskId13(result) {
2108
+ function taskId14(result) {
2108
2109
  if (typeof result?.task_id === "string") return result.task_id;
2109
2110
  const data = result?.data;
2110
2111
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2155,7 +2156,7 @@ var Suno = class {
2155
2156
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2156
2157
  body.async = options.async ?? true;
2157
2158
  const result = await this.transport.request("POST", "/suno/audios", { json: body });
2158
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2159
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2159
2160
  if (options.wait) {
2160
2161
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2161
2162
  }
@@ -2230,7 +2231,7 @@ var Suno = class {
2230
2231
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2231
2232
  body.async = options.async ?? true;
2232
2233
  const result = await this.transport.request("POST", "/suno/vox", { json: body });
2233
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2234
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2234
2235
  if (options.wait) {
2235
2236
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2236
2237
  }
@@ -2248,7 +2249,7 @@ var Suno = class {
2248
2249
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2249
2250
  body.async = options.async ?? true;
2250
2251
  const result = await this.transport.request("POST", "/suno/wav", { json: body });
2251
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2252
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2252
2253
  if (options.wait) {
2253
2254
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2254
2255
  }
@@ -2266,7 +2267,7 @@ var Suno = class {
2266
2267
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2267
2268
  body.async = options.async ?? true;
2268
2269
  const result = await this.transport.request("POST", "/suno/midi", { json: body });
2269
- const handle = new TaskHandle(taskId13(result), "/suno/tasks", this.transport, result);
2270
+ const handle = new TaskHandle(taskId14(result), "/suno/tasks", this.transport, result);
2270
2271
  if (options.wait) {
2271
2272
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2272
2273
  }
@@ -2325,7 +2326,7 @@ var Suno = class {
2325
2326
  };
2326
2327
 
2327
2328
  // src/resources/providers/wan.ts
2328
- function taskId14(result) {
2329
+ function taskId15(result) {
2329
2330
  if (typeof result?.task_id === "string") return result.task_id;
2330
2331
  const data = result?.data;
2331
2332
  if (data && typeof data.task_id === "string") return data.task_id;
@@ -2360,7 +2361,7 @@ var Wan = class {
2360
2361
  if (options.callbackUrl !== void 0) body.callback_url = options.callbackUrl;
2361
2362
  body.async = options.async ?? true;
2362
2363
  const result = await this.transport.request("POST", "/wan/videos", { json: body });
2363
- const handle = new TaskHandle(taskId14(result), "/wan/tasks", this.transport, result);
2364
+ const handle = new TaskHandle(taskId15(result), "/wan/tasks", this.transport, result);
2364
2365
  if (options.wait) {
2365
2366
  await handle.wait({ pollInterval: options.pollInterval, maxWait: options.maxWait });
2366
2367
  }