@picsart/ai-sdk 6.51.1 → 6.51.2
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/index.d.ts +3 -9
- package/index.js +4 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1872,8 +1872,6 @@ type ModelInputById = {
|
|
|
1872
1872
|
draft?: boolean;
|
|
1873
1873
|
draftTask?: {
|
|
1874
1874
|
id: string;
|
|
1875
|
-
video_input: boolean;
|
|
1876
|
-
signature: string;
|
|
1877
1875
|
};
|
|
1878
1876
|
omniReferenceTaskType?: "auto" | "reference" | "edit" | "extend";
|
|
1879
1877
|
imageUrls?: string[];
|
|
@@ -1917,8 +1915,6 @@ type ModelInputById = {
|
|
|
1917
1915
|
draft?: boolean;
|
|
1918
1916
|
draftTask?: {
|
|
1919
1917
|
id: string;
|
|
1920
|
-
video_input: boolean;
|
|
1921
|
-
signature: string;
|
|
1922
1918
|
};
|
|
1923
1919
|
omniReferenceTaskType?: "auto" | "reference" | "edit" | "extend";
|
|
1924
1920
|
imageUrls?: string[];
|
|
@@ -2805,15 +2801,13 @@ interface GenerateResultItemMetadata {
|
|
|
2805
2801
|
lastFrameUrl?: string;
|
|
2806
2802
|
/** The draft a Seedance 2.5 Draft generation produced — pass it back
|
|
2807
2803
|
* unchanged as `draftTask` to the matching `-draft-final` model to render
|
|
2808
|
-
* the final 1080p video (valid 7 days).
|
|
2809
|
-
* worker signs it, so any change is rejected. */
|
|
2804
|
+
* the final 1080p video (valid 7 days). */
|
|
2810
2805
|
draftTask?: SeedanceDraftTask;
|
|
2811
2806
|
}
|
|
2812
|
-
/** A Seedance 2.5 draft reference, as the worker issues it.
|
|
2807
|
+
/** A Seedance 2.5 draft reference, as the worker issues it. The final step
|
|
2808
|
+
* needs only the draft `id`; the worker resolves the rest from it. */
|
|
2813
2809
|
interface SeedanceDraftTask {
|
|
2814
2810
|
id: string;
|
|
2815
|
-
video_input: boolean;
|
|
2816
|
-
signature: string;
|
|
2817
2811
|
}
|
|
2818
2812
|
|
|
2819
2813
|
/**
|
package/index.js
CHANGED
|
@@ -4754,9 +4754,7 @@ var seedance25DraftTaskParam = {
|
|
|
4754
4754
|
descriptor: {
|
|
4755
4755
|
kind: "object",
|
|
4756
4756
|
fields: {
|
|
4757
|
-
id: { kind: "text" }
|
|
4758
|
-
video_input: { kind: "boolean", default: false },
|
|
4759
|
-
signature: { kind: "text" }
|
|
4757
|
+
id: { kind: "text" }
|
|
4760
4758
|
}
|
|
4761
4759
|
}
|
|
4762
4760
|
}
|
|
@@ -11764,7 +11762,7 @@ var extractAllResults = (result) => {
|
|
|
11764
11762
|
};
|
|
11765
11763
|
var isSeedanceDraftTask = (value) => {
|
|
11766
11764
|
const v = value;
|
|
11767
|
-
return !!v && typeof v === "object" && typeof v.id === "string"
|
|
11765
|
+
return !!v && typeof v === "object" && typeof v.id === "string";
|
|
11768
11766
|
};
|
|
11769
11767
|
function buildItemMetadata(parsed, item, _index, provider) {
|
|
11770
11768
|
const meta = {};
|
|
@@ -11776,7 +11774,7 @@ function buildItemMetadata(parsed, item, _index, provider) {
|
|
|
11776
11774
|
if (typeof lastFrame === "string") meta.lastFrameUrl = lastFrame;
|
|
11777
11775
|
const draftTask = top?.draft_task;
|
|
11778
11776
|
if (provider === "bytedance" && isSeedanceDraftTask(draftTask)) {
|
|
11779
|
-
meta.draftTask = { id: draftTask.id
|
|
11777
|
+
meta.draftTask = { id: draftTask.id };
|
|
11780
11778
|
}
|
|
11781
11779
|
return Object.keys(meta).length > 0 ? meta : void 0;
|
|
11782
11780
|
}
|
|
@@ -13849,7 +13847,7 @@ function parseDraftInfo(attrs) {
|
|
|
13849
13847
|
const draftTask = parseJsonAttr(attrs[DRAFT_TASK_ATTR]);
|
|
13850
13848
|
if (!isSeedanceDraftTask(draftTask)) return {};
|
|
13851
13849
|
return {
|
|
13852
|
-
draftTask: { id: draftTask.id
|
|
13850
|
+
draftTask: { id: draftTask.id },
|
|
13853
13851
|
...attrs[DRAFT_EXPIRES_AT_ATTR] ? { draftExpiresAt: attrs[DRAFT_EXPIRES_AT_ATTR] } : {}
|
|
13854
13852
|
};
|
|
13855
13853
|
}
|