@acedatacloud/sdk 2026.727.2 → 2026.804.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 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/providers/suno.ts +4 -1
- 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";
|
|
@@ -1982,6 +1987,7 @@ var Suno = class {
|
|
|
1982
1987
|
if (options.custom !== void 0) body["custom"] = options.custom;
|
|
1983
1988
|
body["prompt"] = options.prompt ?? "A song for Christmas";
|
|
1984
1989
|
if (options.audioId !== void 0) body["audio_id"] = options.audioId;
|
|
1990
|
+
if (options.duration !== void 0) body["duration"] = options.duration;
|
|
1985
1991
|
if (options.weirdness !== void 0) body["weirdness"] = options.weirdness;
|
|
1986
1992
|
body["audio_urls"] = options.audioUrls ?? ["https://cdn1.suno.ai/b481b17a-bf50-4e10-8adc-4d5635050893.mp3"];
|
|
1987
1993
|
if (options.personaId !== void 0) body["persona_id"] = options.personaId;
|
|
@@ -2003,7 +2009,7 @@ var Suno = class {
|
|
|
2003
2009
|
if (options.underpaintingStart !== void 0) body["underpainting_start"] = options.underpaintingStart;
|
|
2004
2010
|
if (options.replaceSectionStart !== void 0) body["replace_section_start"] = options.replaceSectionStart;
|
|
2005
2011
|
for (const [key, value] of Object.entries(options)) {
|
|
2006
|
-
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "styleNegative", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== void 0) {
|
|
2012
|
+
if (!["action", "async", "audioId", "audioUrls", "audioWeight", "callbackUrl", "continueAt", "custom", "duration", "instrumental", "lyric", "lyricPrompt", "mashupAudioIds", "maxWait", "model", "overpaintingEnd", "overpaintingStart", "personaId", "pollInterval", "prompt", "replaceSectionEnd", "replaceSectionStart", "samplesEnd", "samplesStart", "style", "styleInfluence", "styleNegative", "title", "underpaintingEnd", "underpaintingStart", "variationCategory", "vocalGender", "wait", "weirdness"].includes(key) && value !== void 0) {
|
|
2007
2013
|
body[key] = value;
|
|
2008
2014
|
}
|
|
2009
2015
|
}
|