@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 +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/producer.ts +4 -4
- package/src/runtime/tasks.ts +11 -0
package/dist/index.mjs
CHANGED
|
@@ -517,6 +517,11 @@ function taskStatus(state) {
|
|
|
517
517
|
return artifactUrls(state).length > 0 ? "succeeded" : "failed";
|
|
518
518
|
}
|
|
519
519
|
if (words.length > 0) return "";
|
|
520
|
+
if (response.success === false) {
|
|
521
|
+
const error = response.error;
|
|
522
|
+
const structured = !!error && typeof error === "object" && !!error.code;
|
|
523
|
+
if (artifactUrls(state).length > 0 || structured) return "failed";
|
|
524
|
+
}
|
|
520
525
|
const finished = response.finished_at !== void 0 && response.finished_at !== null || state.finished_at !== void 0 && state.finished_at !== null;
|
|
521
526
|
if (finished) {
|
|
522
527
|
if (response.success === true) return "succeeded";
|
|
@@ -1802,7 +1807,7 @@ var Producer = class {
|
|
|
1802
1807
|
return await this.transport.request("POST", "/producer/upload", { json: body });
|
|
1803
1808
|
}
|
|
1804
1809
|
/** AceData Producer MP4 retrieval API. Pass an audio_id to receive an MP4 video download link with cover art. */
|
|
1805
|
-
async
|
|
1810
|
+
async videos(options) {
|
|
1806
1811
|
const body = {};
|
|
1807
1812
|
body["audio_id"] = options.audioId;
|
|
1808
1813
|
for (const [key, value] of Object.entries(options)) {
|
|
@@ -1826,7 +1831,7 @@ var Producer = class {
|
|
|
1826
1831
|
return await this.transport.request("POST", "/producer/wav", { json: body });
|
|
1827
1832
|
}
|
|
1828
1833
|
/** Producer AI music generation API, generates 1 song per request. */
|
|
1829
|
-
async
|
|
1834
|
+
async generate(options) {
|
|
1830
1835
|
const body = {};
|
|
1831
1836
|
body["lyric"] = options.lyric;
|
|
1832
1837
|
body["action"] = options.action;
|