@acedatacloud/sdk 2026.727.1 → 2026.728.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
@@ -565,6 +565,11 @@ function taskStatus(state) {
565
565
  return artifactUrls(state).length > 0 ? "succeeded" : "failed";
566
566
  }
567
567
  if (words.length > 0) return "";
568
+ if (response.success === false) {
569
+ const error = response.error;
570
+ const structured = !!error && typeof error === "object" && !!error.code;
571
+ if (artifactUrls(state).length > 0 || structured) return "failed";
572
+ }
568
573
  const finished = response.finished_at !== void 0 && response.finished_at !== null || state.finished_at !== void 0 && state.finished_at !== null;
569
574
  if (finished) {
570
575
  if (response.success === true) return "succeeded";
@@ -1850,7 +1855,7 @@ var Producer = class {
1850
1855
  return await this.transport.request("POST", "/producer/upload", { json: body });
1851
1856
  }
1852
1857
  /** AceData Producer MP4 retrieval API. Pass an audio_id to receive an MP4 video download link with cover art. */
1853
- async generate(options) {
1858
+ async videos(options) {
1854
1859
  const body = {};
1855
1860
  body["audio_id"] = options.audioId;
1856
1861
  for (const [key, value] of Object.entries(options)) {
@@ -1874,7 +1879,7 @@ var Producer = class {
1874
1879
  return await this.transport.request("POST", "/producer/wav", { json: body });
1875
1880
  }
1876
1881
  /** Producer AI music generation API, generates 1 song per request. */
1877
- async producer_audios(options) {
1882
+ async generate(options) {
1878
1883
  const body = {};
1879
1884
  body["lyric"] = options.lyric;
1880
1885
  body["action"] = options.action;