@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.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";
|
|
@@ -2030,6 +2035,7 @@ var Suno = class {
|
|
|
2030
2035
|
if (options.custom !== void 0) body["custom"] = options.custom;
|
|
2031
2036
|
body["prompt"] = options.prompt ?? "A song for Christmas";
|
|
2032
2037
|
if (options.audioId !== void 0) body["audio_id"] = options.audioId;
|
|
2038
|
+
if (options.duration !== void 0) body["duration"] = options.duration;
|
|
2033
2039
|
if (options.weirdness !== void 0) body["weirdness"] = options.weirdness;
|
|
2034
2040
|
body["audio_urls"] = options.audioUrls ?? ["https://cdn1.suno.ai/b481b17a-bf50-4e10-8adc-4d5635050893.mp3"];
|
|
2035
2041
|
if (options.personaId !== void 0) body["persona_id"] = options.personaId;
|
|
@@ -2051,7 +2057,7 @@ var Suno = class {
|
|
|
2051
2057
|
if (options.underpaintingStart !== void 0) body["underpainting_start"] = options.underpaintingStart;
|
|
2052
2058
|
if (options.replaceSectionStart !== void 0) body["replace_section_start"] = options.replaceSectionStart;
|
|
2053
2059
|
for (const [key, value] of Object.entries(options)) {
|
|
2054
|
-
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) {
|
|
2060
|
+
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) {
|
|
2055
2061
|
body[key] = value;
|
|
2056
2062
|
}
|
|
2057
2063
|
}
|