@nodaro/sdk 2.34.0 → 2.39.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/{chunk-JMOKD6ZP.js → chunk-7CUWAVWB.js} +3 -3
- package/dist/{chunk-JMOKD6ZP.js.map → chunk-7CUWAVWB.js.map} +1 -1
- package/dist/{chunk-E5BM4BLO.js → chunk-7IWVDWSP.js} +20 -3
- package/dist/chunk-7IWVDWSP.js.map +1 -0
- package/dist/{chunk-RHJRLXKY.cjs → chunk-7XOK277W.cjs} +9 -9
- package/dist/{chunk-RHJRLXKY.cjs.map → chunk-7XOK277W.cjs.map} +1 -1
- package/dist/{chunk-3QBH2VE2.cjs → chunk-A7QSOD2S.cjs} +20 -3
- package/dist/chunk-A7QSOD2S.cjs.map +1 -0
- package/dist/chunk-AQHU7EI5.js +54 -0
- package/dist/chunk-AQHU7EI5.js.map +1 -0
- package/dist/{chunk-VV4TZG5S.js → chunk-AUKHMT53.js} +3 -3
- package/dist/chunk-AUKHMT53.js.map +1 -0
- package/dist/{chunk-CWH642B2.js → chunk-CIUZMTER.js} +22 -18
- package/dist/chunk-CIUZMTER.js.map +1 -0
- package/dist/{chunk-I6CXC345.js → chunk-D2ILCSOQ.js} +3 -3
- package/dist/{chunk-I6CXC345.js.map → chunk-D2ILCSOQ.js.map} +1 -1
- package/dist/{chunk-4NLVBYMW.js → chunk-DQAYIVVS.js} +42 -8
- package/dist/chunk-DQAYIVVS.js.map +1 -0
- package/dist/{chunk-5ALNFATQ.cjs → chunk-EK672FFM.cjs} +2 -2
- package/dist/chunk-EK672FFM.cjs.map +1 -0
- package/dist/{chunk-OXQKE5EG.cjs → chunk-ETX3TLNB.cjs} +43 -9
- package/dist/{chunk-4NLVBYMW.js.map → chunk-ETX3TLNB.cjs.map} +1 -1
- package/dist/{chunk-BRV7Z4GD.cjs → chunk-FHVNTS4E.cjs} +2 -2
- package/dist/{chunk-BRV7Z4GD.cjs.map → chunk-FHVNTS4E.cjs.map} +1 -1
- package/dist/{chunk-N6GLZOE4.cjs → chunk-FM2KM5TY.cjs} +52 -10
- package/dist/chunk-FM2KM5TY.cjs.map +1 -0
- package/dist/{chunk-53SXNN3A.js → chunk-FQNCIP6K.js} +2 -2
- package/dist/chunk-FQNCIP6K.js.map +1 -0
- package/dist/{chunk-KNMW722T.cjs → chunk-FRQJNGJS.cjs} +5 -5
- package/dist/{chunk-KNMW722T.cjs.map → chunk-FRQJNGJS.cjs.map} +1 -1
- package/dist/{chunk-4CXB7RA6.js → chunk-IGMWFEFB.js} +6 -4
- package/dist/chunk-IGMWFEFB.js.map +1 -0
- package/dist/{chunk-6OGGJQVA.js → chunk-ILG5DHQQ.js} +2 -2
- package/dist/chunk-ILG5DHQQ.js.map +1 -0
- package/dist/{chunk-CFY6XXOT.cjs → chunk-IXCJ26F5.cjs} +37 -33
- package/dist/chunk-IXCJ26F5.cjs.map +1 -0
- package/dist/{chunk-ZQQABQMH.cjs → chunk-JTOEHQQJ.cjs} +12 -2
- package/dist/chunk-JTOEHQQJ.cjs.map +1 -0
- package/dist/{chunk-ZXJQSFIA.js → chunk-JUON5NXA.js} +2 -2
- package/dist/{chunk-ZXJQSFIA.js.map → chunk-JUON5NXA.js.map} +1 -1
- package/dist/{chunk-JGS6YBDW.js → chunk-L6T44A3G.js} +51 -11
- package/dist/chunk-L6T44A3G.js.map +1 -0
- package/dist/{chunk-U4T3Z3K7.cjs → chunk-NKH2UFSD.cjs} +5 -5
- package/dist/chunk-NKH2UFSD.cjs.map +1 -0
- package/dist/{chunk-VFMWBW2Q.js → chunk-NU4QSOMH.js} +4 -4
- package/dist/{chunk-VFMWBW2Q.js.map → chunk-NU4QSOMH.js.map} +1 -1
- package/dist/{chunk-E2ZXHS6E.js → chunk-OIPPTBW4.js} +2 -2
- package/dist/chunk-OIPPTBW4.js.map +1 -0
- package/dist/{chunk-DKEYSJCE.cjs → chunk-OIYMTGYN.cjs} +2 -2
- package/dist/chunk-OIYMTGYN.cjs.map +1 -0
- package/dist/{chunk-NLQQHJ25.cjs → chunk-OSMKIRKI.cjs} +4 -4
- package/dist/{chunk-NLQQHJ25.cjs.map → chunk-OSMKIRKI.cjs.map} +1 -1
- package/dist/chunk-PG2GBS3K.cjs +4 -0
- package/dist/chunk-PG2GBS3K.cjs.map +1 -0
- package/dist/{chunk-GB724HW2.cjs → chunk-PQ7OKM3E.cjs} +6 -4
- package/dist/chunk-PQ7OKM3E.cjs.map +1 -0
- package/dist/chunk-QGOEQGAE.js +102 -0
- package/dist/chunk-QGOEQGAE.js.map +1 -0
- package/dist/{chunk-EAGD6NEE.cjs → chunk-QZHRXPN5.cjs} +22 -22
- package/dist/chunk-QZHRXPN5.cjs.map +1 -0
- package/dist/{chunk-5MTCKWKA.cjs → chunk-QZMI7364.cjs} +5 -5
- package/dist/{chunk-5MTCKWKA.cjs.map → chunk-QZMI7364.cjs.map} +1 -1
- package/dist/chunk-SRBYCGRC.cjs +56 -0
- package/dist/chunk-SRBYCGRC.cjs.map +1 -0
- package/dist/{chunk-KGKCAGRD.cjs → chunk-TCLNSVYA.cjs} +2 -2
- package/dist/chunk-TCLNSVYA.cjs.map +1 -0
- package/dist/chunk-VCEYLJ2Q.cjs +104 -0
- package/dist/chunk-VCEYLJ2Q.cjs.map +1 -0
- package/dist/{chunk-VGWOIWRQ.cjs → chunk-VHSMOBU7.cjs} +2 -2
- package/dist/{chunk-VGWOIWRQ.cjs.map → chunk-VHSMOBU7.cjs.map} +1 -1
- package/dist/{chunk-T3SYREY4.js → chunk-WY4QRJZW.js} +12 -2
- package/dist/chunk-WY4QRJZW.js.map +1 -0
- package/dist/chunk-YCVRQZT3.js +3 -0
- package/dist/chunk-YCVRQZT3.js.map +1 -0
- package/dist/{chunk-DPSMVOM3.js → chunk-YSZM3N7Q.js} +2 -2
- package/dist/chunk-YSZM3N7Q.js.map +1 -0
- package/dist/{chunk-5A7J24LN.js → chunk-Z7UZ3FD3.js} +3 -3
- package/dist/{chunk-5A7J24LN.js.map → chunk-Z7UZ3FD3.js.map} +1 -1
- package/dist/{chunk-4JKI6JRC.js → chunk-ZDSC6KBT.js} +3 -3
- package/dist/chunk-ZDSC6KBT.js.map +1 -0
- package/dist/entries/apps.cjs +2 -2
- package/dist/entries/apps.d.cts +4 -0
- package/dist/entries/apps.d.ts +4 -0
- package/dist/entries/apps.js +1 -1
- package/dist/entries/cast-swap.cjs +2 -2
- package/dist/entries/cast-swap.d.cts +278 -18
- package/dist/entries/cast-swap.d.ts +278 -18
- package/dist/entries/cast-swap.js +1 -1
- package/dist/entries/characters.d.cts +2 -2
- package/dist/entries/characters.d.ts +2 -2
- package/dist/entries/client.cjs +25 -24
- package/dist/entries/client.d.cts +5 -2
- package/dist/entries/client.d.ts +5 -2
- package/dist/entries/client.js +20 -19
- package/dist/entries/copilot.cjs +4 -4
- package/dist/entries/copilot.js +3 -3
- package/dist/entries/core.cjs +6 -6
- package/dist/entries/core.js +2 -2
- package/dist/entries/creatures.d.cts +2 -2
- package/dist/entries/creatures.d.ts +2 -2
- package/dist/entries/credits.cjs +2 -2
- package/dist/entries/credits.d.cts +37 -2
- package/dist/entries/credits.d.ts +37 -2
- package/dist/entries/credits.js +1 -1
- package/dist/entries/edit.cjs +7 -7
- package/dist/entries/edit.d.cts +3 -0
- package/dist/entries/edit.d.ts +3 -0
- package/dist/entries/edit.js +2 -2
- package/dist/entries/errors.cjs +30 -22
- package/dist/entries/errors.d.cts +42 -4
- package/dist/entries/errors.d.ts +42 -4
- package/dist/entries/errors.js +1 -1
- package/dist/entries/jobs.cjs +2 -2
- package/dist/entries/jobs.d.cts +76 -4
- package/dist/entries/jobs.d.ts +76 -4
- package/dist/entries/jobs.js +1 -1
- package/dist/entries/locations.d.cts +2 -2
- package/dist/entries/locations.d.ts +2 -2
- package/dist/entries/media.cjs +4 -4
- package/dist/entries/media.d.cts +39 -5
- package/dist/entries/media.d.ts +39 -5
- package/dist/entries/media.js +3 -3
- package/dist/entries/nodes.cjs +3 -3
- package/dist/entries/nodes.d.cts +2 -2
- package/dist/entries/nodes.d.ts +2 -2
- package/dist/entries/nodes.js +2 -2
- package/dist/entries/objects.d.cts +2 -2
- package/dist/entries/objects.d.ts +2 -2
- package/dist/entries/prompt-helper.cjs +2 -2
- package/dist/entries/prompt-helper.d.cts +3 -1
- package/dist/entries/prompt-helper.d.ts +3 -1
- package/dist/entries/prompt-helper.js +1 -1
- package/dist/entries/scene3d.d.cts +3 -3
- package/dist/entries/scene3d.d.ts +3 -3
- package/dist/entries/studio.cjs +5 -5
- package/dist/entries/studio.d.cts +2 -2
- package/dist/entries/studio.d.ts +2 -2
- package/dist/entries/studio.js +2 -2
- package/dist/entries/templates.cjs +2 -2
- package/dist/entries/templates.d.cts +4 -0
- package/dist/entries/templates.d.ts +4 -0
- package/dist/entries/templates.js +1 -1
- package/dist/entries/trends.cjs +13 -0
- package/dist/entries/trends.cjs.map +1 -0
- package/dist/entries/trends.d.cts +295 -0
- package/dist/entries/trends.d.ts +295 -0
- package/dist/entries/trends.js +4 -0
- package/dist/entries/trends.js.map +1 -0
- package/dist/entries/tutorials.cjs +2 -2
- package/dist/entries/tutorials.d.cts +4 -0
- package/dist/entries/tutorials.d.ts +4 -0
- package/dist/entries/tutorials.js +1 -1
- package/dist/entries/uploads.cjs +2 -2
- package/dist/entries/uploads.d.cts +14 -1
- package/dist/entries/uploads.d.ts +14 -1
- package/dist/entries/uploads.js +1 -1
- package/dist/entries/workflows.cjs +2 -2
- package/dist/entries/workflows.d.cts +6 -0
- package/dist/entries/workflows.d.ts +6 -0
- package/dist/entries/workflows.js +1 -1
- package/dist/index.cjs +85 -71
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +22 -20
- package/dist/{nodes-D2tbtzt7.d.ts → nodes-9WpYNWtS.d.ts} +13 -1
- package/dist/{nodes-CTujw6Qd.d.cts → nodes-BDUk5Aej.d.cts} +13 -1
- package/dist/{studio-productions-vbCNSbtf.d.ts → studio-productions-DtTE8mdl.d.ts} +35 -1
- package/dist/{studio-productions-DUHvdSvk.d.cts → studio-productions-r2-VZsKj.d.cts} +35 -1
- package/package.json +7 -2
- package/dist/chunk-3QBH2VE2.cjs.map +0 -1
- package/dist/chunk-4CXB7RA6.js.map +0 -1
- package/dist/chunk-4JKI6JRC.js.map +0 -1
- package/dist/chunk-53SXNN3A.js.map +0 -1
- package/dist/chunk-5ALNFATQ.cjs.map +0 -1
- package/dist/chunk-6OGGJQVA.js.map +0 -1
- package/dist/chunk-CFY6XXOT.cjs.map +0 -1
- package/dist/chunk-CWH642B2.js.map +0 -1
- package/dist/chunk-DKEYSJCE.cjs.map +0 -1
- package/dist/chunk-DPSMVOM3.js.map +0 -1
- package/dist/chunk-E2ZXHS6E.js.map +0 -1
- package/dist/chunk-E5BM4BLO.js.map +0 -1
- package/dist/chunk-EAGD6NEE.cjs.map +0 -1
- package/dist/chunk-GB724HW2.cjs.map +0 -1
- package/dist/chunk-GDXS4EJ5.js +0 -28
- package/dist/chunk-GDXS4EJ5.js.map +0 -1
- package/dist/chunk-GVBSOZDI.cjs +0 -30
- package/dist/chunk-GVBSOZDI.cjs.map +0 -1
- package/dist/chunk-JGS6YBDW.js.map +0 -1
- package/dist/chunk-KGKCAGRD.cjs.map +0 -1
- package/dist/chunk-N6GLZOE4.cjs.map +0 -1
- package/dist/chunk-OXQKE5EG.cjs.map +0 -1
- package/dist/chunk-T3SYREY4.js.map +0 -1
- package/dist/chunk-U4T3Z3K7.cjs.map +0 -1
- package/dist/chunk-VV4TZG5S.js.map +0 -1
- package/dist/chunk-ZQQABQMH.cjs.map +0 -1
package/dist/entries/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as StudioOpsResponse } from '../studio-productions-
|
|
1
|
+
import { x as StudioOpsResponse } from '../studio-productions-DtTE8mdl.js';
|
|
2
2
|
import '../developer-apps-zSQXWmEG.js';
|
|
3
3
|
import '@nodaro/shared/apps';
|
|
4
4
|
import '@nodaro/shared/organizations';
|
|
@@ -6,7 +6,15 @@ import '@nodaro/shared/organizations';
|
|
|
6
6
|
declare class NodaroError extends Error {
|
|
7
7
|
readonly code: string;
|
|
8
8
|
readonly status: number;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Every other field of the server's error envelope (`{ error: { code,
|
|
11
|
+
* message, … } }`), as it was sent: for example a trend refusal's `slot`, a
|
|
12
|
+
* publish refusal's `reasons`, a validation error's `issues`. Empty when the
|
|
13
|
+
* envelope had nothing else, or for an error the SDK made itself. A copy —
|
|
14
|
+
* changing it changes nothing else.
|
|
15
|
+
*/
|
|
16
|
+
readonly details: Readonly<Record<string, unknown>>;
|
|
17
|
+
constructor(message: string, code: string, status: number, details?: Readonly<Record<string, unknown>>);
|
|
10
18
|
}
|
|
11
19
|
declare class UnauthorizedError extends NodaroError {
|
|
12
20
|
constructor(message?: string);
|
|
@@ -21,10 +29,38 @@ declare class NotFoundError extends NodaroError {
|
|
|
21
29
|
declare class RateLimitedError extends NodaroError {
|
|
22
30
|
constructor(message?: string);
|
|
23
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* HTTP 402: the run costs more than the caller may spend. `code` is the
|
|
34
|
+
* refusal's own code — `insufficient_credits` for the caller's own balance, or
|
|
35
|
+
* another 402 code such as `free_video_limit`. A spending cap someone else set
|
|
36
|
+
* (a workspace budget, a member cap, a per-user allowance) is the subclass
|
|
37
|
+
* {@link CreditCapExceededError}, so `instanceof InsufficientCreditsError`
|
|
38
|
+
* still catches every 402.
|
|
39
|
+
*/
|
|
24
40
|
declare class InsufficientCreditsError extends NodaroError {
|
|
25
41
|
readonly required?: number | undefined;
|
|
26
42
|
readonly available?: number | undefined;
|
|
27
|
-
constructor(message?: string, required?: number | undefined, available?: number | undefined);
|
|
43
|
+
constructor(message?: string, required?: number | undefined, available?: number | undefined, code?: string);
|
|
44
|
+
}
|
|
45
|
+
/** The 402 codes of a spending cap set by someone other than the caller. */
|
|
46
|
+
type CreditCapCode = "budget_exceeded" | "member_cap_exceeded" | "user_allowance_exceeded";
|
|
47
|
+
/**
|
|
48
|
+
* The 402 codes {@link CreditCapExceededError} carries: the workspace's budget
|
|
49
|
+
* (`budget_exceeded`), the caller's cap in that workspace
|
|
50
|
+
* (`member_cap_exceeded`), the deployment's per-user allowance
|
|
51
|
+
* (`user_allowance_exceeded`).
|
|
52
|
+
*/
|
|
53
|
+
declare const CREDIT_CAP_CODES: ReadonlySet<CreditCapCode>;
|
|
54
|
+
/**
|
|
55
|
+
* HTTP 402 from a spending cap, not from the caller's own balance: topping up
|
|
56
|
+
* does not help — whoever set the cap (the workspace's owner, the deployment's
|
|
57
|
+
* operator) has to raise it. An {@link InsufficientCreditsError}, so existing
|
|
58
|
+
* catches keep working; `code` says which cap. `available`, when sent, is what
|
|
59
|
+
* the cap has left.
|
|
60
|
+
*/
|
|
61
|
+
declare class CreditCapExceededError extends InsufficientCreditsError {
|
|
62
|
+
readonly code: CreditCapCode;
|
|
63
|
+
constructor(code: CreditCapCode, message?: string, required?: number, available?: number);
|
|
28
64
|
}
|
|
29
65
|
declare class StorageExceededError extends NodaroError {
|
|
30
66
|
readonly limitBytes?: number | undefined;
|
|
@@ -329,10 +365,12 @@ interface ApiErrorBody {
|
|
|
329
365
|
required?: unknown;
|
|
330
366
|
/** …and what the caller has (withheld on a deployment-paid instance). */
|
|
331
367
|
balance?: unknown;
|
|
368
|
+
/** A per-user allowance's 402: what the allowance has left. */
|
|
369
|
+
remaining?: unknown;
|
|
332
370
|
/** `app_run_version_changed`: the version the run ran, and the one the caller is on. */
|
|
333
371
|
runVersion?: unknown;
|
|
334
372
|
appVersion?: unknown;
|
|
335
373
|
}
|
|
336
374
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
337
375
|
|
|
338
|
-
export { AlreadyRunningError, AppRunVersionChangedError, ContinuationPreviewPendingError, ContinuationRefusedError, ForbiddenError, type HeldFinalRun, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, type WorkflowConflictCode, WorkflowConflictError, throwFromResponse };
|
|
376
|
+
export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, type CreditCapCode, CreditCapExceededError, ForbiddenError, type HeldFinalRun, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, type WorkflowConflictCode, WorkflowConflictError, throwFromResponse };
|
package/dist/entries/errors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../chunk-CJFIOVBA.js';
|
|
2
|
-
export { AlreadyRunningError, AppRunVersionChangedError, ContinuationPreviewPendingError, ContinuationRefusedError, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from '../chunk-
|
|
2
|
+
export { AlreadyRunningError, AppRunVersionChangedError, CREDIT_CAP_CODES, ContinuationPreviewPendingError, ContinuationRefusedError, CreditCapExceededError, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobBlockedError, JobFailedError, JobHeldError, JobTimeoutError, NodaroError, NotFoundError, RateLimitedError, StorageExceededError, StudioOpError, StudioPreviewAppliedError, StudioPreviewUnavailable, UnauthorizedError, WorkflowConflictError, throwFromResponse } from '../chunk-L6T44A3G.js';
|
|
3
3
|
//# sourceMappingURL=errors.js.map
|
|
4
4
|
//# sourceMappingURL=errors.js.map
|
package/dist/entries/jobs.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-EHRWTYGR.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkA7QSOD2S_cjs = require('../chunk-A7QSOD2S.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "JobsResource", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkA7QSOD2S_cjs.JobsResource; }
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=jobs.cjs.map
|
|
13
13
|
//# sourceMappingURL=jobs.cjs.map
|
package/dist/entries/jobs.d.cts
CHANGED
|
@@ -31,6 +31,11 @@ type SafetyBlockHint = {
|
|
|
31
31
|
class: "copyright" | "likeness" | "safety";
|
|
32
32
|
retried: boolean;
|
|
33
33
|
suggestedProvider?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Present when the provider refused the INPUT VIDEO itself — not the prompt,
|
|
36
|
+
* a reference image or the output. Sending a different clip is the fix.
|
|
37
|
+
*/
|
|
38
|
+
subject?: "input_video";
|
|
34
39
|
};
|
|
35
40
|
/**
|
|
36
41
|
* A NODARO-side verdict, not a provider's: a job policy registered by the
|
|
@@ -50,10 +55,36 @@ type PolicyBlockHint = {
|
|
|
50
55
|
reason: string;
|
|
51
56
|
hookPoint: "request" | "result";
|
|
52
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* The job ran out of credits partway: a step that reserves its own credits
|
|
60
|
+
* (for example, the video a Cast Swap or trend run dispatches) was refused —
|
|
61
|
+
* the balance could not cover it, or a plan or workspace cap was reached. The
|
|
62
|
+
* job failed and its credits were refunded; ask the person to top up (or raise
|
|
63
|
+
* the cap), then run it again.
|
|
64
|
+
*
|
|
65
|
+
* `code` is the refusal's own code, a lowercase snake_case token — for
|
|
66
|
+
* example `insufficient_credits`, `free_video_limit`, `instance_cap_reached`,
|
|
67
|
+
* `budget_exceeded`, `member_cap_exceeded` or `user_allowance_exceeded`. Treat
|
|
68
|
+
* an unknown code like `insufficient_credits`.
|
|
69
|
+
*/
|
|
70
|
+
type CreditsHint = {
|
|
71
|
+
kind: "credits";
|
|
72
|
+
code: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The provider refused the job's input video without naming a content-policy
|
|
76
|
+
* class (its message is about the file, not a policy). Treat it like any
|
|
77
|
+
* other failure — no fallback model is offered — except that the input to
|
|
78
|
+
* change is known: send a different clip.
|
|
79
|
+
*/
|
|
80
|
+
type InputRefusedHint = {
|
|
81
|
+
kind: "input-refused";
|
|
82
|
+
subject: "input_video";
|
|
83
|
+
};
|
|
53
84
|
/**
|
|
54
85
|
* A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable
|
|
55
86
|
* failure verdict, so a caller can act on it without parsing `error_message`
|
|
56
|
-
* prose. One column,
|
|
87
|
+
* prose. One column, several verdict sources; `kind` is the discriminant.
|
|
57
88
|
*
|
|
58
89
|
* HAND-COPIED MIRROR of `ErrorHint` in the platform's
|
|
59
90
|
* `backend/src/lib/safety-block.ts` (which names this file in its own
|
|
@@ -61,7 +92,7 @@ type PolicyBlockHint = {
|
|
|
61
92
|
* pasted here verbatim in the same change, with a changeset.
|
|
62
93
|
* `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.
|
|
63
94
|
*/
|
|
64
|
-
type JobErrorHint = SafetyBlockHint | PolicyBlockHint;
|
|
95
|
+
type JobErrorHint = SafetyBlockHint | PolicyBlockHint | CreditsHint | InputRefusedHint;
|
|
65
96
|
/**
|
|
66
97
|
* The billing lifecycle of a job's credit reservation — `usage_logs.status`
|
|
67
98
|
* for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a
|
|
@@ -145,6 +176,12 @@ interface Job {
|
|
|
145
176
|
interface CancelJobResult {
|
|
146
177
|
success: true;
|
|
147
178
|
cancelled: number;
|
|
179
|
+
/**
|
|
180
|
+
* `true` when the job could not be stopped because its provider call is
|
|
181
|
+
* already running — a metered LLM job's call, an external provider task. It
|
|
182
|
+
* finishes and is charged only what it used.
|
|
183
|
+
*/
|
|
184
|
+
inFlight?: boolean;
|
|
148
185
|
}
|
|
149
186
|
interface DeleteJobResult {
|
|
150
187
|
success: true;
|
|
@@ -175,6 +212,24 @@ interface RateJobResult {
|
|
|
175
212
|
rating: JobRating | null;
|
|
176
213
|
};
|
|
177
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* {@link JobsResource.fromUpload}'s body: an image edited in the browser,
|
|
217
|
+
* already stored with `client.uploads.upload`, and what it was made from.
|
|
218
|
+
*/
|
|
219
|
+
interface JobFromUploadParams {
|
|
220
|
+
/** The edited image's `assetId`, as `client.uploads.upload` returned it. */
|
|
221
|
+
assetId: string;
|
|
222
|
+
/** The job whose image was edited. */
|
|
223
|
+
sourceJobId?: string;
|
|
224
|
+
/** Which of `sourceJobId`'s images was edited, when it made several. Default: its `imageUrl`. */
|
|
225
|
+
sourceImageUrl?: string;
|
|
226
|
+
/** The upload that was edited, when the source is not a job. Not with `sourceJobId`. */
|
|
227
|
+
sourceAssetId?: string;
|
|
228
|
+
/** The editor's design state, stored with `client.uploads.uploadJson`, so the edit can be reopened. */
|
|
229
|
+
editStateUrl?: string;
|
|
230
|
+
/** The generation session to file the job in. */
|
|
231
|
+
sessionId?: string;
|
|
232
|
+
}
|
|
178
233
|
interface ListJobsPage {
|
|
179
234
|
/**
|
|
180
235
|
* A page may hold fewer than `limit` rows — even none — and still carry a
|
|
@@ -219,6 +274,18 @@ declare class JobsResource {
|
|
|
219
274
|
* carries `favorited` and `rating`.
|
|
220
275
|
*/
|
|
221
276
|
list(params?: ListJobsParams): Promise<ListJobsPage>;
|
|
277
|
+
/**
|
|
278
|
+
* Record an image edited in the browser as a job (`POST /v1/jobs/from-upload`):
|
|
279
|
+
* a completed, private, free `image-edit` job whose `output_data.imageUrl` is
|
|
280
|
+
* the upload, linked to its source in `input_data` (`sourceJobId` /
|
|
281
|
+
* `sourceAssetId`, `sourceImageUrl`). It then lists, rates, favorites and
|
|
282
|
+
* files into a session like any image job. One upload is one job: the same
|
|
283
|
+
* `assetId` again returns the same job. OAuth apps need the `assets:write`
|
|
284
|
+
* scope. A deployment's job policy can refuse the image ({@link JobBlockedError}).
|
|
285
|
+
*/
|
|
286
|
+
fromUpload(params: JobFromUploadParams): Promise<{
|
|
287
|
+
data: Job;
|
|
288
|
+
}>;
|
|
222
289
|
/**
|
|
223
290
|
* Rate one of your jobs `"good"` or `"bad"`, or clear the rating with
|
|
224
291
|
* `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone
|
|
@@ -237,7 +304,12 @@ declare class JobsResource {
|
|
|
237
304
|
}>;
|
|
238
305
|
/**
|
|
239
306
|
* Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.
|
|
240
|
-
* Refunds any reserved credit holds.
|
|
307
|
+
* Refunds any reserved credit holds. A running LLM job priced per model
|
|
308
|
+
* (metered) whose call has already started answers
|
|
309
|
+
* `{ success: true, cancelled: 0, inFlight: true }`: it finishes and is
|
|
310
|
+
* charged only what it used. A job stopped before its call starts is
|
|
311
|
+
* refunded, except for what an earlier attempt of the same job already used
|
|
312
|
+
* (a retry after a billed attempt): that is charged.
|
|
241
313
|
*/
|
|
242
314
|
cancel(id: string): Promise<CancelJobResult>;
|
|
243
315
|
/**
|
|
@@ -249,4 +321,4 @@ declare class JobsResource {
|
|
|
249
321
|
delete(id: string): Promise<DeleteJobResult>;
|
|
250
322
|
}
|
|
251
323
|
|
|
252
|
-
export { type CancelJobResult, type CreditStatus, type DeleteJobResult, type Job, type JobErrorHint, type JobRating, type JobRatingFilter, type JobStatus, type JobStatusResult, JobsResource, type ListJobsPage, type ListJobsParams, type PolicyBlockHint, type RateJobResult, type SafetyBlockHint };
|
|
324
|
+
export { type CancelJobResult, type CreditStatus, type CreditsHint, type DeleteJobResult, type InputRefusedHint, type Job, type JobErrorHint, type JobFromUploadParams, type JobRating, type JobRatingFilter, type JobStatus, type JobStatusResult, JobsResource, type ListJobsPage, type ListJobsParams, type PolicyBlockHint, type RateJobResult, type SafetyBlockHint };
|
package/dist/entries/jobs.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ type SafetyBlockHint = {
|
|
|
31
31
|
class: "copyright" | "likeness" | "safety";
|
|
32
32
|
retried: boolean;
|
|
33
33
|
suggestedProvider?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Present when the provider refused the INPUT VIDEO itself — not the prompt,
|
|
36
|
+
* a reference image or the output. Sending a different clip is the fix.
|
|
37
|
+
*/
|
|
38
|
+
subject?: "input_video";
|
|
34
39
|
};
|
|
35
40
|
/**
|
|
36
41
|
* A NODARO-side verdict, not a provider's: a job policy registered by the
|
|
@@ -50,10 +55,36 @@ type PolicyBlockHint = {
|
|
|
50
55
|
reason: string;
|
|
51
56
|
hookPoint: "request" | "result";
|
|
52
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* The job ran out of credits partway: a step that reserves its own credits
|
|
60
|
+
* (for example, the video a Cast Swap or trend run dispatches) was refused —
|
|
61
|
+
* the balance could not cover it, or a plan or workspace cap was reached. The
|
|
62
|
+
* job failed and its credits were refunded; ask the person to top up (or raise
|
|
63
|
+
* the cap), then run it again.
|
|
64
|
+
*
|
|
65
|
+
* `code` is the refusal's own code, a lowercase snake_case token — for
|
|
66
|
+
* example `insufficient_credits`, `free_video_limit`, `instance_cap_reached`,
|
|
67
|
+
* `budget_exceeded`, `member_cap_exceeded` or `user_allowance_exceeded`. Treat
|
|
68
|
+
* an unknown code like `insufficient_credits`.
|
|
69
|
+
*/
|
|
70
|
+
type CreditsHint = {
|
|
71
|
+
kind: "credits";
|
|
72
|
+
code: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* The provider refused the job's input video without naming a content-policy
|
|
76
|
+
* class (its message is about the file, not a policy). Treat it like any
|
|
77
|
+
* other failure — no fallback model is offered — except that the input to
|
|
78
|
+
* change is known: send a different clip.
|
|
79
|
+
*/
|
|
80
|
+
type InputRefusedHint = {
|
|
81
|
+
kind: "input-refused";
|
|
82
|
+
subject: "input_video";
|
|
83
|
+
};
|
|
53
84
|
/**
|
|
54
85
|
* A job's `jobs.error_hint` (migration 376) — a user-safe, machine-readable
|
|
55
86
|
* failure verdict, so a caller can act on it without parsing `error_message`
|
|
56
|
-
* prose. One column,
|
|
87
|
+
* prose. One column, several verdict sources; `kind` is the discriminant.
|
|
57
88
|
*
|
|
58
89
|
* HAND-COPIED MIRROR of `ErrorHint` in the platform's
|
|
59
90
|
* `backend/src/lib/safety-block.ts` (which names this file in its own
|
|
@@ -61,7 +92,7 @@ type PolicyBlockHint = {
|
|
|
61
92
|
* pasted here verbatim in the same change, with a changeset.
|
|
62
93
|
* `packages/client/dist/index.d.ts` is REBUILT, never hand-edited.
|
|
63
94
|
*/
|
|
64
|
-
type JobErrorHint = SafetyBlockHint | PolicyBlockHint;
|
|
95
|
+
type JobErrorHint = SafetyBlockHint | PolicyBlockHint | CreditsHint | InputRefusedHint;
|
|
65
96
|
/**
|
|
66
97
|
* The billing lifecycle of a job's credit reservation — `usage_logs.status`
|
|
67
98
|
* for the job's `usage_log_id`. `null` when the job has no usage log (e.g. a
|
|
@@ -145,6 +176,12 @@ interface Job {
|
|
|
145
176
|
interface CancelJobResult {
|
|
146
177
|
success: true;
|
|
147
178
|
cancelled: number;
|
|
179
|
+
/**
|
|
180
|
+
* `true` when the job could not be stopped because its provider call is
|
|
181
|
+
* already running — a metered LLM job's call, an external provider task. It
|
|
182
|
+
* finishes and is charged only what it used.
|
|
183
|
+
*/
|
|
184
|
+
inFlight?: boolean;
|
|
148
185
|
}
|
|
149
186
|
interface DeleteJobResult {
|
|
150
187
|
success: true;
|
|
@@ -175,6 +212,24 @@ interface RateJobResult {
|
|
|
175
212
|
rating: JobRating | null;
|
|
176
213
|
};
|
|
177
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* {@link JobsResource.fromUpload}'s body: an image edited in the browser,
|
|
217
|
+
* already stored with `client.uploads.upload`, and what it was made from.
|
|
218
|
+
*/
|
|
219
|
+
interface JobFromUploadParams {
|
|
220
|
+
/** The edited image's `assetId`, as `client.uploads.upload` returned it. */
|
|
221
|
+
assetId: string;
|
|
222
|
+
/** The job whose image was edited. */
|
|
223
|
+
sourceJobId?: string;
|
|
224
|
+
/** Which of `sourceJobId`'s images was edited, when it made several. Default: its `imageUrl`. */
|
|
225
|
+
sourceImageUrl?: string;
|
|
226
|
+
/** The upload that was edited, when the source is not a job. Not with `sourceJobId`. */
|
|
227
|
+
sourceAssetId?: string;
|
|
228
|
+
/** The editor's design state, stored with `client.uploads.uploadJson`, so the edit can be reopened. */
|
|
229
|
+
editStateUrl?: string;
|
|
230
|
+
/** The generation session to file the job in. */
|
|
231
|
+
sessionId?: string;
|
|
232
|
+
}
|
|
178
233
|
interface ListJobsPage {
|
|
179
234
|
/**
|
|
180
235
|
* A page may hold fewer than `limit` rows — even none — and still carry a
|
|
@@ -219,6 +274,18 @@ declare class JobsResource {
|
|
|
219
274
|
* carries `favorited` and `rating`.
|
|
220
275
|
*/
|
|
221
276
|
list(params?: ListJobsParams): Promise<ListJobsPage>;
|
|
277
|
+
/**
|
|
278
|
+
* Record an image edited in the browser as a job (`POST /v1/jobs/from-upload`):
|
|
279
|
+
* a completed, private, free `image-edit` job whose `output_data.imageUrl` is
|
|
280
|
+
* the upload, linked to its source in `input_data` (`sourceJobId` /
|
|
281
|
+
* `sourceAssetId`, `sourceImageUrl`). It then lists, rates, favorites and
|
|
282
|
+
* files into a session like any image job. One upload is one job: the same
|
|
283
|
+
* `assetId` again returns the same job. OAuth apps need the `assets:write`
|
|
284
|
+
* scope. A deployment's job policy can refuse the image ({@link JobBlockedError}).
|
|
285
|
+
*/
|
|
286
|
+
fromUpload(params: JobFromUploadParams): Promise<{
|
|
287
|
+
data: Job;
|
|
288
|
+
}>;
|
|
222
289
|
/**
|
|
223
290
|
* Rate one of your jobs `"good"` or `"bad"`, or clear the rating with
|
|
224
291
|
* `null` (`PUT /v1/jobs/:id/rating`). Only the job's owner rates it — anyone
|
|
@@ -237,7 +304,12 @@ declare class JobsResource {
|
|
|
237
304
|
}>;
|
|
238
305
|
/**
|
|
239
306
|
* Cancel a job. Server route is `POST /v1/jobs/:jobId/cancel`.
|
|
240
|
-
* Refunds any reserved credit holds.
|
|
307
|
+
* Refunds any reserved credit holds. A running LLM job priced per model
|
|
308
|
+
* (metered) whose call has already started answers
|
|
309
|
+
* `{ success: true, cancelled: 0, inFlight: true }`: it finishes and is
|
|
310
|
+
* charged only what it used. A job stopped before its call starts is
|
|
311
|
+
* refunded, except for what an earlier attempt of the same job already used
|
|
312
|
+
* (a retry after a billed attempt): that is charged.
|
|
241
313
|
*/
|
|
242
314
|
cancel(id: string): Promise<CancelJobResult>;
|
|
243
315
|
/**
|
|
@@ -249,4 +321,4 @@ declare class JobsResource {
|
|
|
249
321
|
delete(id: string): Promise<DeleteJobResult>;
|
|
250
322
|
}
|
|
251
323
|
|
|
252
|
-
export { type CancelJobResult, type CreditStatus, type DeleteJobResult, type Job, type JobErrorHint, type JobRating, type JobRatingFilter, type JobStatus, type JobStatusResult, JobsResource, type ListJobsPage, type ListJobsParams, type PolicyBlockHint, type RateJobResult, type SafetyBlockHint };
|
|
324
|
+
export { type CancelJobResult, type CreditStatus, type CreditsHint, type DeleteJobResult, type InputRefusedHint, type Job, type JobErrorHint, type JobFromUploadParams, type JobRating, type JobRatingFilter, type JobStatus, type JobStatusResult, JobsResource, type ListJobsPage, type ListJobsParams, type PolicyBlockHint, type RateJobResult, type SafetyBlockHint };
|
package/dist/entries/jobs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LocationAssetType, CharacterAspectRatio, LocationAttachColumn, SurroundDirection } from '@nodaro/shared/entities';
|
|
2
2
|
export { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, SURROUND_DIRECTIONS, SurroundDirection } from '@nodaro/shared/entities';
|
|
3
3
|
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.cjs';
|
|
4
|
-
import { l as GenerationSessionParams } from '../nodes-
|
|
4
|
+
import { l as GenerationSessionParams } from '../nodes-BDUk5Aej.cjs';
|
|
5
5
|
import '@nodaro/shared/apps';
|
|
6
6
|
import '@nodaro/shared/organizations';
|
|
7
7
|
import '@nodaro/shared/types';
|
|
@@ -14,7 +14,7 @@ import '@nodaro/shared/scene3d';
|
|
|
14
14
|
import '@nodaro/shared/credits';
|
|
15
15
|
import './jobs.cjs';
|
|
16
16
|
import './errors.cjs';
|
|
17
|
-
import '../studio-productions-
|
|
17
|
+
import '../studio-productions-r2-VZsKj.cjs';
|
|
18
18
|
import '@nodaro/shared/model-catalog';
|
|
19
19
|
import '@nodaro/prompts/prompt-builder';
|
|
20
20
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LocationAssetType, CharacterAspectRatio, LocationAttachColumn, SurroundDirection } from '@nodaro/shared/entities';
|
|
2
2
|
export { LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, SURROUND_DIRECTIONS, SurroundDirection } from '@nodaro/shared/entities';
|
|
3
3
|
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.js';
|
|
4
|
-
import { l as GenerationSessionParams } from '../nodes-
|
|
4
|
+
import { l as GenerationSessionParams } from '../nodes-9WpYNWtS.js';
|
|
5
5
|
import '@nodaro/shared/apps';
|
|
6
6
|
import '@nodaro/shared/organizations';
|
|
7
7
|
import '@nodaro/shared/types';
|
|
@@ -14,7 +14,7 @@ import '@nodaro/shared/scene3d';
|
|
|
14
14
|
import '@nodaro/shared/credits';
|
|
15
15
|
import './jobs.js';
|
|
16
16
|
import './errors.js';
|
|
17
|
-
import '../studio-productions-
|
|
17
|
+
import '../studio-productions-DtTE8mdl.js';
|
|
18
18
|
import '@nodaro/shared/model-catalog';
|
|
19
19
|
import '@nodaro/prompts/prompt-builder';
|
|
20
20
|
|
package/dist/entries/media.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-RHETJOUM.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkETX3TLNB_cjs = require('../chunk-ETX3TLNB.cjs');
|
|
5
|
+
require('../chunk-FRQJNGJS.cjs');
|
|
6
|
+
require('../chunk-FM2KM5TY.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MediaResource", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkETX3TLNB_cjs.MediaResource; }
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=media.cjs.map
|
|
15
15
|
//# sourceMappingURL=media.cjs.map
|
package/dist/entries/media.d.cts
CHANGED
|
@@ -431,8 +431,32 @@ declare class MediaResource {
|
|
|
431
431
|
* to 5 minutes at 30 fps (a faster clip counts
|
|
432
432
|
* proportionally longer), priced by the clip's length. Poll
|
|
433
433
|
* `jobs.get(jobId)`: the output carries `videoUrl` (the mask), `width`,
|
|
434
|
-
* `height`, `frames
|
|
435
|
-
*
|
|
434
|
+
* `height`, `frames`, `coverage` (the fraction of pixels selected, rounded
|
|
435
|
+
* to 4 decimals) and `kept` (any region left on any frame: false only when
|
|
436
|
+
* the size / zone filters left an empty mask — read it rather than
|
|
437
|
+
* `coverage`, which a few pixels round to 0). Feed the mask to
|
|
438
|
+
* {@link MediaResource.maskComposite}.
|
|
439
|
+
*
|
|
440
|
+
* `holdLastMask: true` keeps the last mask on frames where the subject is
|
|
441
|
+
* lost (a mask covering under 0.002 % of the frame, e.g. a face behind a
|
|
442
|
+
* hand): each such frame after the first detection repeats the most recent
|
|
443
|
+
* non-empty one; the output then also carries `heldFrames`.
|
|
444
|
+
* `minSubjectHeightPct` (0–100, default 0 = off) drops every connected
|
|
445
|
+
* region whose bounding box is shorter than that % of the frame height
|
|
446
|
+
* (extras' small faces behind the main subject); it runs before
|
|
447
|
+
* `holdLastMask`, and the output then carries `droppedRegions`.
|
|
448
|
+
* `maxSubjectHeightPct` (0–100, default 0 = off) is its mirror: it drops
|
|
449
|
+
* regions TALLER than that % (keep only the small background faces). With
|
|
450
|
+
* both set a region is kept when min ≤ height ≤ max; min > max is a 400.
|
|
451
|
+
* `zone` (`{ leftPct, rightPct, topPct, bottomPct }`, each 0–49 % of the
|
|
452
|
+
* frame, a margin left out = 0; default null = off) keeps only the regions
|
|
453
|
+
* whose bounding-box centre lies inside the frame minus those margins (after
|
|
454
|
+
* the size cuts, before `holdLastMask`). `perShot: true` finds the clip's
|
|
455
|
+
* scene cuts first and segments each shot on its own: the subject is
|
|
456
|
+
* detected again after every cut, `holdLastMask` never crosses a cut, and
|
|
457
|
+
* each shot's mask is fitted to that shot's exact frame count; on a clip
|
|
458
|
+
* with no cut it gives the same mask, fitted to the clip's exact frame
|
|
459
|
+
* count. The output carries `shots` (1 when off).
|
|
436
460
|
*/
|
|
437
461
|
videoMask(input: VideoMaskRequest): Promise<{
|
|
438
462
|
jobId: string;
|
|
@@ -443,9 +467,19 @@ declare class MediaResource {
|
|
|
443
467
|
* The result follows the foreground's size, frame rate and length; the
|
|
444
468
|
* background is fitted (`backgroundFit`, default cover) and loops when
|
|
445
469
|
* shorter; the mask holds its last frame when shorter. Optional
|
|
446
|
-
* `invertMask`, `feather` (0–20 px), `grow` (−10–10 px)
|
|
447
|
-
*
|
|
448
|
-
*
|
|
470
|
+
* `invertMask`, `feather` (0–20 px), `grow` (−10–10 px), `opacity` (0–1,
|
|
471
|
+
* default 1: how strongly the foreground covers the background inside the
|
|
472
|
+
* mask) and `audioSource` (foreground / background / mix / none). Priced per started 5 seconds of
|
|
473
|
+
* the result (the video it follows up to 300 s). Poll `jobs.get(jobId)` for `videoUrl`.
|
|
474
|
+
*
|
|
475
|
+
* `fill` picks what fills the masked area: `video` (default — the
|
|
476
|
+
* foreground, required then), `pixelate` (the background itself in
|
|
477
|
+
* blocks of `pixelSizePct` % of the frame width, 0.2–10, default 1.25) or
|
|
478
|
+
* `blur` (the background blurred, sigma `blurStrengthPct` % of the frame
|
|
479
|
+
* width, 0.1–5, default 2). Pixelate and blur take no
|
|
480
|
+
* `foregroundUrl` (one sent is ignored): the result follows the background
|
|
481
|
+
* and is priced on its length, and it always carries the background's sound
|
|
482
|
+
* (`audioSource` is ignored).
|
|
449
483
|
*/
|
|
450
484
|
maskComposite(input: MaskCompositeRequest): Promise<{
|
|
451
485
|
jobId: string;
|
package/dist/entries/media.d.ts
CHANGED
|
@@ -431,8 +431,32 @@ declare class MediaResource {
|
|
|
431
431
|
* to 5 minutes at 30 fps (a faster clip counts
|
|
432
432
|
* proportionally longer), priced by the clip's length. Poll
|
|
433
433
|
* `jobs.get(jobId)`: the output carries `videoUrl` (the mask), `width`,
|
|
434
|
-
* `height`, `frames
|
|
435
|
-
*
|
|
434
|
+
* `height`, `frames`, `coverage` (the fraction of pixels selected, rounded
|
|
435
|
+
* to 4 decimals) and `kept` (any region left on any frame: false only when
|
|
436
|
+
* the size / zone filters left an empty mask — read it rather than
|
|
437
|
+
* `coverage`, which a few pixels round to 0). Feed the mask to
|
|
438
|
+
* {@link MediaResource.maskComposite}.
|
|
439
|
+
*
|
|
440
|
+
* `holdLastMask: true` keeps the last mask on frames where the subject is
|
|
441
|
+
* lost (a mask covering under 0.002 % of the frame, e.g. a face behind a
|
|
442
|
+
* hand): each such frame after the first detection repeats the most recent
|
|
443
|
+
* non-empty one; the output then also carries `heldFrames`.
|
|
444
|
+
* `minSubjectHeightPct` (0–100, default 0 = off) drops every connected
|
|
445
|
+
* region whose bounding box is shorter than that % of the frame height
|
|
446
|
+
* (extras' small faces behind the main subject); it runs before
|
|
447
|
+
* `holdLastMask`, and the output then carries `droppedRegions`.
|
|
448
|
+
* `maxSubjectHeightPct` (0–100, default 0 = off) is its mirror: it drops
|
|
449
|
+
* regions TALLER than that % (keep only the small background faces). With
|
|
450
|
+
* both set a region is kept when min ≤ height ≤ max; min > max is a 400.
|
|
451
|
+
* `zone` (`{ leftPct, rightPct, topPct, bottomPct }`, each 0–49 % of the
|
|
452
|
+
* frame, a margin left out = 0; default null = off) keeps only the regions
|
|
453
|
+
* whose bounding-box centre lies inside the frame minus those margins (after
|
|
454
|
+
* the size cuts, before `holdLastMask`). `perShot: true` finds the clip's
|
|
455
|
+
* scene cuts first and segments each shot on its own: the subject is
|
|
456
|
+
* detected again after every cut, `holdLastMask` never crosses a cut, and
|
|
457
|
+
* each shot's mask is fitted to that shot's exact frame count; on a clip
|
|
458
|
+
* with no cut it gives the same mask, fitted to the clip's exact frame
|
|
459
|
+
* count. The output carries `shots` (1 when off).
|
|
436
460
|
*/
|
|
437
461
|
videoMask(input: VideoMaskRequest): Promise<{
|
|
438
462
|
jobId: string;
|
|
@@ -443,9 +467,19 @@ declare class MediaResource {
|
|
|
443
467
|
* The result follows the foreground's size, frame rate and length; the
|
|
444
468
|
* background is fitted (`backgroundFit`, default cover) and loops when
|
|
445
469
|
* shorter; the mask holds its last frame when shorter. Optional
|
|
446
|
-
* `invertMask`, `feather` (0–20 px), `grow` (−10–10 px)
|
|
447
|
-
*
|
|
448
|
-
*
|
|
470
|
+
* `invertMask`, `feather` (0–20 px), `grow` (−10–10 px), `opacity` (0–1,
|
|
471
|
+
* default 1: how strongly the foreground covers the background inside the
|
|
472
|
+
* mask) and `audioSource` (foreground / background / mix / none). Priced per started 5 seconds of
|
|
473
|
+
* the result (the video it follows up to 300 s). Poll `jobs.get(jobId)` for `videoUrl`.
|
|
474
|
+
*
|
|
475
|
+
* `fill` picks what fills the masked area: `video` (default — the
|
|
476
|
+
* foreground, required then), `pixelate` (the background itself in
|
|
477
|
+
* blocks of `pixelSizePct` % of the frame width, 0.2–10, default 1.25) or
|
|
478
|
+
* `blur` (the background blurred, sigma `blurStrengthPct` % of the frame
|
|
479
|
+
* width, 0.1–5, default 2). Pixelate and blur take no
|
|
480
|
+
* `foregroundUrl` (one sent is ignored): the result follows the background
|
|
481
|
+
* and is priced on its length, and it always carries the background's sound
|
|
482
|
+
* (`audioSource` is ignored).
|
|
449
483
|
*/
|
|
450
484
|
maskComposite(input: MaskCompositeRequest): Promise<{
|
|
451
485
|
jobId: string;
|
package/dist/entries/media.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../chunk-ES2E65HT.js';
|
|
2
|
-
export { MediaResource } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { MediaResource } from '../chunk-DQAYIVVS.js';
|
|
3
|
+
import '../chunk-7CUWAVWB.js';
|
|
4
|
+
import '../chunk-L6T44A3G.js';
|
|
5
5
|
//# sourceMappingURL=media.js.map
|
|
6
6
|
//# sourceMappingURL=media.js.map
|
package/dist/entries/nodes.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk7CK6I4CT_cjs = require('../chunk-7CK6I4CT.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var chunkQZHRXPN5_cjs = require('../chunk-QZHRXPN5.cjs');
|
|
5
|
+
require('../chunk-FM2KM5TY.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ Object.defineProperty(exports, "PROMPT_SUFFIX_KEY", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "NodesResource", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkQZHRXPN5_cjs.NodesResource; }
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=nodes.cjs.map
|
|
22
22
|
//# sourceMappingURL=nodes.cjs.map
|
package/dist/entries/nodes.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ export { GeminiOmniVoicePresetId, ImageAspectRatio, ImageEditProvider, ImageEdit
|
|
|
4
4
|
export { PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PromptAffixFields } from '@nodaro/shared/nodes';
|
|
5
5
|
export { SocialPlatform, SocialPost, SocialPostAuthor, SocialPostMedia, SocialPostMetrics, SocialSearchCount, SocialSearchMode, SocialSearchParams, SocialSearchPeriod, SocialSearchSort, SocialSearchVideoKind } from '@nodaro/shared/social';
|
|
6
6
|
export { GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
|
|
7
|
-
export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from '../nodes-
|
|
7
|
+
export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from '../nodes-BDUk5Aej.cjs';
|
|
8
8
|
export { TopazUpscaleFactor } from '@nodaro/shared/credits';
|
|
9
9
|
export { ImageToImageAttachColumn } from '@nodaro/shared/entities';
|
|
10
10
|
import '@nodaro/shared/scene3d';
|
|
@@ -13,6 +13,6 @@ import '@nodaro/shared/apps';
|
|
|
13
13
|
import '@nodaro/shared/organizations';
|
|
14
14
|
import './jobs.cjs';
|
|
15
15
|
import './errors.cjs';
|
|
16
|
-
import '../studio-productions-
|
|
16
|
+
import '../studio-productions-r2-VZsKj.cjs';
|
|
17
17
|
import '@nodaro/shared/model-catalog';
|
|
18
18
|
import '@nodaro/prompts/prompt-builder';
|
package/dist/entries/nodes.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { GeminiOmniVoicePresetId, ImageAspectRatio, ImageEditProvider, ImageEdit
|
|
|
4
4
|
export { PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PromptAffixFields } from '@nodaro/shared/nodes';
|
|
5
5
|
export { SocialPlatform, SocialPost, SocialPostAuthor, SocialPostMedia, SocialPostMetrics, SocialSearchCount, SocialSearchMode, SocialSearchParams, SocialSearchPeriod, SocialSearchSort, SocialSearchVideoKind } from '@nodaro/shared/social';
|
|
6
6
|
export { GenerateMaskOutput, GenerateMaskRequest, VideoDepthColormap, VideoDepthModelSize, VideoDepthProvider, VideoDepthResolution } from '@nodaro/shared/media';
|
|
7
|
-
export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from '../nodes-
|
|
7
|
+
export { A as AssembleNarratedVideoParams, B as BatchJobOutcome, E as EditImageCommonParams, a as EditImageFromTaskParams, b as EditImageFromUrlParams, c as EditImageParams, G as GenerateImageBatchGroup, e as GenerateImageBatchOutput, f as GenerateImageBatchResult, g as GenerateImageParams, h as GenerateMaskJobOutput, i as GenerateMaskParams, k as GenerateVideoParams, l as GenerationSessionParams, I as ImageJobStarted, m as ImageToImageParams, J as JobOutputImage, N as NodeCategory, n as NodeCreditRate, o as NodeDescriptor, p as NodeInputField, q as NodeInputSchema, r as NodeJobOutput, s as NodeQuote, t as NodesResource, O as OutputType, Q as QuoteAdjustment, y as QuoteWarning, R as ReferenceCaptionParams, F as RunAndWaitOptions, H as RunManyResult, K as RunNodeAdjustment, L as RunNodeOptions, M as RunNodeResult, S as RunNodeWarning, _ as SocialSearchJobOutput, $ as SplitImageParams, a0 as SplitImageResult, a1 as SplitImageTile, a2 as StructuredReferenceParams, a3 as Subject, a4 as TextToSpeechParams, a5 as TextToVideoParams, a6 as VideoDepthParams, a7 as VideoToVideoParams, a8 as VideoUpscaleParams } from '../nodes-9WpYNWtS.js';
|
|
8
8
|
export { TopazUpscaleFactor } from '@nodaro/shared/credits';
|
|
9
9
|
export { ImageToImageAttachColumn } from '@nodaro/shared/entities';
|
|
10
10
|
import '@nodaro/shared/scene3d';
|
|
@@ -13,6 +13,6 @@ import '@nodaro/shared/apps';
|
|
|
13
13
|
import '@nodaro/shared/organizations';
|
|
14
14
|
import './jobs.js';
|
|
15
15
|
import './errors.js';
|
|
16
|
-
import '../studio-productions-
|
|
16
|
+
import '../studio-productions-DtTE8mdl.js';
|
|
17
17
|
import '@nodaro/shared/model-catalog';
|
|
18
18
|
import '@nodaro/prompts/prompt-builder';
|
package/dist/entries/nodes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY } from '../chunk-ZYPH2FPT.js';
|
|
2
|
-
export { NodesResource } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { NodesResource } from '../chunk-ZDSC6KBT.js';
|
|
3
|
+
import '../chunk-L6T44A3G.js';
|
|
4
4
|
//# sourceMappingURL=nodes.js.map
|
|
5
5
|
//# sourceMappingURL=nodes.js.map
|