@nodaro/sdk 2.76.0 → 2.78.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-HUYI5G3D.js → chunk-3NG4HPM5.js} +2 -2
- package/dist/{chunk-HUYI5G3D.js.map → chunk-3NG4HPM5.js.map} +1 -1
- package/dist/chunk-5QNCWXKG.cjs +22 -0
- package/dist/chunk-5QNCWXKG.cjs.map +1 -0
- package/dist/{chunk-IO7NEEZZ.cjs → chunk-6BPQYCUG.cjs} +54 -3
- package/dist/chunk-6BPQYCUG.cjs.map +1 -0
- package/dist/{chunk-TZFZDEWI.js → chunk-6ZKW7767.js} +54 -3
- package/dist/chunk-6ZKW7767.js.map +1 -0
- package/dist/{chunk-7PMOXQEO.cjs → chunk-7WVQZPUW.cjs} +51 -8
- package/dist/chunk-7WVQZPUW.cjs.map +1 -0
- package/dist/{chunk-GIQDM2MH.js → chunk-C3H3V5PN.js} +2 -2
- package/dist/{chunk-GIQDM2MH.js.map → chunk-C3H3V5PN.js.map} +1 -1
- package/dist/{chunk-CSNYBGHP.js → chunk-D45ATYCE.js} +2 -2
- package/dist/chunk-D45ATYCE.js.map +1 -0
- package/dist/{chunk-A3XA6UNM.cjs → chunk-FQHMDWSP.cjs} +2 -2
- package/dist/{chunk-A3XA6UNM.cjs.map → chunk-FQHMDWSP.cjs.map} +1 -1
- package/dist/{chunk-SGVTZ2J5.cjs → chunk-G6ASA5RQ.cjs} +18 -18
- package/dist/{chunk-SGVTZ2J5.cjs.map → chunk-G6ASA5RQ.cjs.map} +1 -1
- package/dist/{chunk-UPWAODYT.cjs → chunk-H6ZB7WYE.cjs} +26 -2
- package/dist/chunk-H6ZB7WYE.cjs.map +1 -0
- package/dist/{chunk-SGVJUVFD.cjs → chunk-HEJE6L3E.cjs} +3 -3
- package/dist/{chunk-SGVJUVFD.cjs.map → chunk-HEJE6L3E.cjs.map} +1 -1
- package/dist/{chunk-FOC4VPGK.js → chunk-IAHNPMIX.js} +3 -3
- package/dist/{chunk-FOC4VPGK.js.map → chunk-IAHNPMIX.js.map} +1 -1
- package/dist/{chunk-U2F6IHHY.js → chunk-JCLJRCMR.js} +10 -10
- package/dist/{chunk-U2F6IHHY.js.map → chunk-JCLJRCMR.js.map} +1 -1
- package/dist/{chunk-KNBZFWVO.cjs → chunk-JIFGF6PA.cjs} +13 -2
- package/dist/chunk-JIFGF6PA.cjs.map +1 -0
- package/dist/chunk-NDX4QUTI.js +3 -0
- package/dist/{chunk-CHZBONJJ.js.map → chunk-NDX4QUTI.js.map} +1 -1
- package/dist/{chunk-GWL4O3J2.js → chunk-PNTVCJZV.js} +13 -2
- package/dist/chunk-PNTVCJZV.js.map +1 -0
- package/dist/{chunk-AOHDYZSZ.js → chunk-QV4QD6XI.js} +26 -2
- package/dist/chunk-QV4QD6XI.js.map +1 -0
- package/dist/{chunk-6NIKAVI3.cjs → chunk-STKXUHEM.cjs} +2 -2
- package/dist/chunk-STKXUHEM.cjs.map +1 -0
- package/dist/{chunk-57GANTLV.cjs → chunk-USBDYHSO.cjs} +2 -2
- package/dist/{chunk-57GANTLV.cjs.map → chunk-USBDYHSO.cjs.map} +1 -1
- package/dist/{chunk-OO4AKYUN.js → chunk-VPBPVDKY.js} +52 -10
- package/dist/chunk-VPBPVDKY.js.map +1 -0
- package/dist/{chunk-D3F2BWD6.cjs → chunk-VZCCECKW.cjs} +2 -2
- package/dist/{chunk-D3F2BWD6.cjs.map → chunk-VZCCECKW.cjs.map} +1 -1
- package/dist/chunk-YPZCTRFB.js +12 -0
- package/dist/chunk-YPZCTRFB.js.map +1 -0
- package/dist/entries/cast-swap.cjs +2 -2
- package/dist/entries/cast-swap.d.cts +1 -1
- package/dist/entries/cast-swap.d.ts +1 -1
- package/dist/entries/cast-swap.js +1 -1
- package/dist/entries/characters.d.cts +2 -1
- package/dist/entries/characters.d.ts +2 -1
- package/dist/entries/client.cjs +14 -14
- package/dist/entries/client.d.cts +2 -2
- package/dist/entries/client.d.ts +2 -2
- package/dist/entries/client.js +9 -9
- package/dist/entries/core.cjs +5 -5
- package/dist/entries/core.js +1 -1
- package/dist/entries/creatures.cjs +6 -6
- package/dist/entries/creatures.d.cts +2 -3
- package/dist/entries/creatures.d.ts +2 -3
- package/dist/entries/creatures.js +1 -1
- package/dist/entries/edit.cjs +12 -8
- package/dist/entries/edit.d.cts +272 -71
- package/dist/entries/edit.d.ts +272 -71
- package/dist/entries/edit.js +2 -2
- package/dist/entries/locations.d.cts +2 -1
- package/dist/entries/locations.d.ts +2 -1
- package/dist/entries/media.cjs +2 -2
- package/dist/entries/media.d.cts +68 -2
- package/dist/entries/media.d.ts +68 -2
- package/dist/entries/media.js +1 -1
- package/dist/entries/nodes.cjs +9 -5
- package/dist/entries/nodes.d.cts +3 -2
- package/dist/entries/nodes.d.ts +3 -2
- package/dist/entries/nodes.js +2 -2
- package/dist/entries/objects.cjs +6 -6
- package/dist/entries/objects.d.cts +2 -3
- package/dist/entries/objects.d.ts +2 -3
- package/dist/entries/objects.js +1 -1
- package/dist/entries/scene3d.d.cts +3 -2
- package/dist/entries/scene3d.d.ts +3 -2
- package/dist/entries/trends.cjs +2 -2
- package/dist/entries/trends.d.cts +36 -17
- package/dist/entries/trends.d.ts +36 -17
- package/dist/entries/trends.js +1 -1
- package/dist/entries/video-remake.cjs +2 -2
- package/dist/entries/video-remake.d.cts +1 -1
- package/dist/entries/video-remake.d.ts +1 -1
- package/dist/entries/video-remake.js +1 -1
- package/dist/index.cjs +48 -40
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +11 -11
- package/dist/{nodes-BaRqRB2Z.d.ts → nodes-C6e2wign.d.ts} +86 -8
- package/dist/{nodes-BHtjh6gl.d.cts → nodes-D71Ec9b5.d.cts} +86 -8
- package/dist/{video-remake-C-KR7YtT.d.ts → video-remake-CnnJMGwj.d.ts} +166 -5
- package/dist/{video-remake-DTuCyhd9.d.cts → video-remake-EHwCWlUW.d.cts} +166 -5
- package/package.json +3 -3
- package/dist/chunk-6NIKAVI3.cjs.map +0 -1
- package/dist/chunk-7PMOXQEO.cjs.map +0 -1
- package/dist/chunk-AOHDYZSZ.js.map +0 -1
- package/dist/chunk-CHZBONJJ.js +0 -3
- package/dist/chunk-CSNYBGHP.js.map +0 -1
- package/dist/chunk-GWL4O3J2.js.map +0 -1
- package/dist/chunk-IO7NEEZZ.cjs.map +0 -1
- package/dist/chunk-KNBZFWVO.cjs.map +0 -1
- package/dist/chunk-OO4AKYUN.js.map +0 -1
- package/dist/chunk-RKYZY6NA.cjs +0 -16
- package/dist/chunk-RKYZY6NA.cjs.map +0 -1
- package/dist/chunk-TZFZDEWI.js.map +0 -1
- package/dist/chunk-UPWAODYT.cjs.map +0 -1
- package/dist/chunk-WFFVCGNU.js +0 -3
- package/dist/chunk-WFFVCGNU.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { CreatureAttachColumn, ObjectAspectRatio } from '@nodaro/shared/entities
|
|
|
2
2
|
export { OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn } from '@nodaro/shared/entities';
|
|
3
3
|
import { TtsProvider } from '@nodaro/shared/models';
|
|
4
4
|
import { N as NodaroClientCore } from '../developer-apps-D59GfAnO.js';
|
|
5
|
-
import { l as GenerationSessionParams, a4 as Subject } from '../nodes-
|
|
5
|
+
import { l as GenerationSessionParams, a4 as Subject } from '../nodes-C6e2wign.js';
|
|
6
6
|
import { SetKeeperCatalogInput, SetKeeperCatalogResult } from './keepers.js';
|
|
7
7
|
import '@nodaro/shared/apps';
|
|
8
8
|
import '@nodaro/shared/organizations';
|
|
@@ -13,6 +13,7 @@ import '@nodaro/shared/social';
|
|
|
13
13
|
import '@nodaro/shared/media';
|
|
14
14
|
import '@nodaro/shared/scene3d';
|
|
15
15
|
import '@nodaro/shared/credits';
|
|
16
|
+
import '../video-remake-CnnJMGwj.js';
|
|
16
17
|
import '@nodaro/shared/llm-models';
|
|
17
18
|
import './jobs.js';
|
|
18
19
|
import './errors.js';
|
|
@@ -421,8 +422,6 @@ interface GenerateCreatureMotionInput extends GenerationSessionParams {
|
|
|
421
422
|
sourceImageUrl: string;
|
|
422
423
|
provider?: string;
|
|
423
424
|
name: string;
|
|
424
|
-
/** Source clip URL — when set, worker routes to video-to-video refine. */
|
|
425
|
-
refineFromVideoUrl?: string;
|
|
426
425
|
category?: string;
|
|
427
426
|
style?: "realistic" | "anime" | "3d-pixar" | "illustration";
|
|
428
427
|
canonicalDescription?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../chunk-EXLAHZKF.js';
|
|
2
|
-
export { OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ASSET_TYPES, CREATURE_ATTACH_COLUMNS, CreaturesResource } from '../chunk-
|
|
2
|
+
export { OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ASSET_TYPES, CREATURE_ATTACH_COLUMNS, CreaturesResource } from '../chunk-3NG4HPM5.js';
|
|
3
3
|
//# sourceMappingURL=creatures.js.map
|
|
4
4
|
//# sourceMappingURL=creatures.js.map
|
package/dist/entries/edit.cjs
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkVZCCECKW_cjs = require('../chunk-VZCCECKW.cjs');
|
|
4
|
+
var chunk7WVQZPUW_cjs = require('../chunk-7WVQZPUW.cjs');
|
|
5
5
|
require('../chunk-E2NMFQNY.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "unwrapEditPlanOutput", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkVZCCECKW_cjs.unwrapEditPlanOutput; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "CLIP_PACK_MAX_TARGET_SEC", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk7WVQZPUW_cjs.CLIP_PACK_MAX_TARGET_SEC; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "CLIP_PACK_MIN_TARGET_SEC", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunk7WVQZPUW_cjs.CLIP_PACK_MIN_TARGET_SEC; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "EditResource", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunk7WVQZPUW_cjs.EditResource; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "PODCAST_PACK_TOOLS", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunk7WVQZPUW_cjs.PODCAST_PACK_TOOLS; }
|
|
24
28
|
});
|
|
25
29
|
Object.defineProperty(exports, "TRAILER_FORMATS", {
|
|
26
30
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunk7WVQZPUW_cjs.TRAILER_FORMATS; }
|
|
28
32
|
});
|
|
29
33
|
Object.defineProperty(exports, "USE_CASE_NODE_TYPES", {
|
|
30
34
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunk7WVQZPUW_cjs.USE_CASE_NODE_TYPES; }
|
|
32
36
|
});
|
|
33
37
|
//# sourceMappingURL=edit.cjs.map
|
|
34
38
|
//# sourceMappingURL=edit.cjs.map
|
package/dist/entries/edit.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Transcript, SpeakerEmphasisStyle, EdlTargetAspect, SpeakerSwitchId, EditPlanTier, Edl, SpeakerMapResult, EditPlanMode } from '@nodaro/shared/edl';
|
|
2
|
-
export { ChapterSet, EditPlanMode, EditPlanTier, Edl, EdlClipSet, SpeakerMapResult, Transcript, unwrapEditPlanOutput } from '@nodaro/shared/edl';
|
|
2
|
+
export { ChapterSet, ClipPackClip, ClipPackFailedClip, ClipPackOutputData, EditPlanMode, EditPlanTier, Edl, EdlClipSet, SpeakerLayoutOutputData, SpeakerMapResult, TightenEpisodeOutputData, Transcript, UseCaseOutputData, UseCaseSourceSpan, UseCaseSpeaker, unwrapEditPlanOutput } from '@nodaro/shared/edl';
|
|
3
3
|
import { N as NodaroClientCore } from '../developer-apps-D59GfAnO.cjs';
|
|
4
|
+
import { CaptionStyle } from '@nodaro/shared/captions';
|
|
4
5
|
import { UseCaseNodeType } from '@nodaro/shared/nodes';
|
|
5
6
|
export { USE_CASE_NODE_TYPES, UseCaseNodeType } from '@nodaro/shared/nodes';
|
|
6
|
-
import { CaptionStyle } from '@nodaro/shared/captions';
|
|
7
7
|
import '@nodaro/shared/apps';
|
|
8
8
|
import '@nodaro/shared/organizations';
|
|
9
9
|
|
|
@@ -132,6 +132,30 @@ interface TightenEpisodeInput extends UseCaseRecordingsInput {
|
|
|
132
132
|
styleGuide?: string;
|
|
133
133
|
/** How far the music dips under the voice, 0–100 (default 75). */
|
|
134
134
|
musicDuckAmount?: number;
|
|
135
|
+
/**
|
|
136
|
+
* How tightly the pauses are cut. `"light"` shortens pauses over 600 ms to
|
|
137
|
+
* 350 ms, `"standard"` (the default) pauses over 350 ms to 220 ms, and
|
|
138
|
+
* `"tight"` pauses over 250 ms to 150 ms. A pause is never cut away whole,
|
|
139
|
+
* and a shorter one is left as it is.
|
|
140
|
+
*/
|
|
141
|
+
tightness?: "light" | "standard" | "tight";
|
|
142
|
+
/** See {@link UseCaseSpeakerNamesInput.speakerNames}. */
|
|
143
|
+
speakerNames?: UseCaseSpeakerNamesInput["speakerNames"];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The speakers' names a Tighten Episode or Speaker Layout run reports back.
|
|
147
|
+
*/
|
|
148
|
+
interface UseCaseSpeakerNamesInput {
|
|
149
|
+
/**
|
|
150
|
+
* Speaker label (as the run's transcript names them, e.g. `"speaker_0"`) →
|
|
151
|
+
* the name to show (up to 80 characters; at most 32 speakers). The job keeps
|
|
152
|
+
* them and the finished job's `output_data.speakers[].name` carries them
|
|
153
|
+
* (`TightenEpisodeOutputData`, `SpeakerLayoutOutputData`); the
|
|
154
|
+
* run itself never reads them, so nothing is renamed in the captions, the
|
|
155
|
+
* transcript or the edit. A name is trimmed and a blank one dropped; a
|
|
156
|
+
* label nobody in the recording has is ignored. A continuation keeps them.
|
|
157
|
+
*/
|
|
158
|
+
speakerNames?: Record<string, string>;
|
|
135
159
|
}
|
|
136
160
|
/**
|
|
137
161
|
* Input for {@link EditResource.episodeChapters} and
|
|
@@ -271,6 +295,205 @@ interface SpeakerLayoutInput extends UseCaseRecordingsInput {
|
|
|
271
295
|
* (`mode: "render-final"`, no `editedEdl`: the layout has no cut to change).
|
|
272
296
|
*/
|
|
273
297
|
reviewBeforeRender?: boolean;
|
|
298
|
+
/** See {@link UseCaseSpeakerNamesInput.speakerNames}. */
|
|
299
|
+
speakerNames?: UseCaseSpeakerNamesInput["speakerNames"];
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* What the podcast use-case runs on the `edit` resource answer (the run's job
|
|
304
|
+
* to poll, an estimate) and the options and continuation input they take.
|
|
305
|
+
* Split from `edit.ts`, which holds the methods; every name here is
|
|
306
|
+
* re-exported from there.
|
|
307
|
+
*/
|
|
308
|
+
|
|
309
|
+
/** What a use-case run (`tightenEpisode`, `episodeChapters`, `episodeTrailer`, `clipPack`, `speakerLayout`) and `continueUseCase` answer: the run's job to poll. */
|
|
310
|
+
interface UseCaseJobResult extends EditJobResult {
|
|
311
|
+
/** The run's execution (absent on a deduplicated retry). */
|
|
312
|
+
executionId?: string;
|
|
313
|
+
/** `true` when an `Idempotency-Key` retry found the run already started: `jobId` is that run. */
|
|
314
|
+
deduped?: boolean;
|
|
315
|
+
}
|
|
316
|
+
/** What `tightenEpisode` answers (a {@link UseCaseJobResult}). */
|
|
317
|
+
type TightenEpisodeJobResult = UseCaseJobResult;
|
|
318
|
+
/**
|
|
319
|
+
* What a use-case run is estimated at (`data`). Every credit amount is 0
|
|
320
|
+
* on an edition without credits; `durationSec` is `null` when the recording's
|
|
321
|
+
* length could not be read.
|
|
322
|
+
*/
|
|
323
|
+
interface UseCaseEstimate {
|
|
324
|
+
/** The whole run: its steps plus the fee. */
|
|
325
|
+
totalCredits: number;
|
|
326
|
+
/** The steps at their own rates. */
|
|
327
|
+
stepsCredits: number;
|
|
328
|
+
/** The per-run fee. */
|
|
329
|
+
feeCredits: number;
|
|
330
|
+
/** A step is a metered LLM call's ESTIMATE (charged its actual usage), so the
|
|
331
|
+
* total is one: show it `≈N`. Absent for a fixed figure. */
|
|
332
|
+
estimate?: true;
|
|
333
|
+
/** The recording's length, in seconds. */
|
|
334
|
+
durationSec: number | null;
|
|
335
|
+
}
|
|
336
|
+
/** What a Tighten Episode run is estimated at (a {@link UseCaseEstimate}). */
|
|
337
|
+
type TightenEpisodeEstimate = UseCaseEstimate;
|
|
338
|
+
/** Input for `EditResource.continueUseCase`. */
|
|
339
|
+
interface UseCaseContinueInput {
|
|
340
|
+
/** The run to continue: the job `tightenEpisode`, `episodeChapters`, `episodeTrailer`, `clipPack` or `speakerLayout` (or an earlier continuation) answered. */
|
|
341
|
+
jobId: string;
|
|
342
|
+
/**
|
|
343
|
+
* `"from-failed"` re-runs what did not finish of a failed run;
|
|
344
|
+
* `"render-final"` renders the full-quality result after a review-on preview
|
|
345
|
+
* (a Chapters run has no preview: it is refused `render_final_not_preview`;
|
|
346
|
+
* a Clip Pack edit that drops every clip is refused `use_case_nothing_kept`).
|
|
347
|
+
*/
|
|
348
|
+
mode: "from-failed" | "render-final";
|
|
349
|
+
/** Render final only: the reviewer's edit of the plan (an EDL). A Speaker Layout run has no plan: an edit is refused `400 use_case_no_plan`. */
|
|
350
|
+
editedEdl?: unknown;
|
|
351
|
+
/**
|
|
352
|
+
* The run's node type: its continuation goes to `POST /v1/<nodeType>/continue`.
|
|
353
|
+
* Optional: when absent the job is read first (`GET /v1/jobs/:id`, which
|
|
354
|
+
* needs the `jobs:read` scope on an app token) for the type the run records.
|
|
355
|
+
* Required when that read cannot answer: a key without `jobs:read`, or a job
|
|
356
|
+
* that records no use-case type (the call rejects with `use_case_type_unknown`).
|
|
357
|
+
*/
|
|
358
|
+
nodeType?: UseCaseNodeType;
|
|
359
|
+
}
|
|
360
|
+
/** Per-call options for the use-case requests (Tighten Episode, Chapters, Trailer, Clip Pack, Speaker Layout, and their continuations). */
|
|
361
|
+
interface UseCaseRequestOptions {
|
|
362
|
+
/**
|
|
363
|
+
* Sent as the `Idempotency-Key` header. Reuse the same value when retrying
|
|
364
|
+
* the same request and the server answers the run it already started
|
|
365
|
+
* (`deduped: true`) instead of starting a second one.
|
|
366
|
+
*/
|
|
367
|
+
idempotencyKey?: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* The podcast pack on the `edit` resource (`POST /v1/podcast-pack`): several
|
|
372
|
+
* podcast tools on one recording, for one price. Its input (the recording
|
|
373
|
+
* once, and each tool's own settings), the body it sends and what it answers.
|
|
374
|
+
* Split from `edit.ts`, which holds the methods; every name here is
|
|
375
|
+
* re-exported from there.
|
|
376
|
+
*/
|
|
377
|
+
|
|
378
|
+
/** The tools a podcast pack can run, in the order the pack starts them. */
|
|
379
|
+
declare const PODCAST_PACK_TOOLS: readonly UseCaseNodeType[];
|
|
380
|
+
/** One tool a podcast pack can run (see {@link PODCAST_PACK_TOOLS}). */
|
|
381
|
+
type PodcastPackTool = (typeof PODCAST_PACK_TOOLS)[number];
|
|
382
|
+
/**
|
|
383
|
+
* The fields a tool's settings leave out in a pack: the recording and the
|
|
384
|
+
* speakers' names belong to the pack, sent once for every tool.
|
|
385
|
+
*/
|
|
386
|
+
type PodcastPackRecordingField = keyof UseCaseRecordingsInput | keyof UseCaseSpeakerNamesInput;
|
|
387
|
+
/** A tool's type spelled as its method's name: `tighten-episode` → `tightenEpisode`. */
|
|
388
|
+
type MethodNameOf<S extends string> = S extends `${infer Head}-${infer Tail}` ? `${Head}${Capitalize<MethodNameOf<Tail>>}` : S;
|
|
389
|
+
/**
|
|
390
|
+
* Each tool's settings in a pack: what its own method takes (`tightenEpisode`,
|
|
391
|
+
* `episodeChapters`, …), without the recording fields — read from the method
|
|
392
|
+
* itself, so a tool and its settings never drift (a tool with no method of its
|
|
393
|
+
* own fails to type here).
|
|
394
|
+
*/
|
|
395
|
+
type PodcastPackToolSettings = EveryPackToolHasAMethod extends true ? {
|
|
396
|
+
[T in PodcastPackTool]: Omit<ToolInputOf<T>, PodcastPackRecordingField>;
|
|
397
|
+
} : never;
|
|
398
|
+
/** What a tool's own method takes as its input. */
|
|
399
|
+
type ToolInputOf<T extends PodcastPackTool> = EditResource[MethodNameOf<T> & keyof EditResource] extends (input: infer I, ...rest: never[]) => unknown ? I : never;
|
|
400
|
+
/** Every tool has a method of its own: a type with none fails to compile here. */
|
|
401
|
+
type AssertTrue<T extends true> = T;
|
|
402
|
+
type EveryPackToolHasAMethod = AssertTrue<{
|
|
403
|
+
[T in PodcastPackTool]: MethodNameOf<T> extends keyof EditResource ? true : false;
|
|
404
|
+
}[PodcastPackTool]>;
|
|
405
|
+
/** The tools a pack runs, each with its settings (`{}` takes the tool's defaults). */
|
|
406
|
+
type PodcastPackTools = {
|
|
407
|
+
[T in PodcastPackTool]?: PodcastPackToolSettings[T];
|
|
408
|
+
};
|
|
409
|
+
/**
|
|
410
|
+
* Input for {@link EditResource.podcastPack} and
|
|
411
|
+
* {@link EditResource.estimatePodcastPack}: the recording (or the recordings
|
|
412
|
+
* of one conversation, see {@link UseCaseRecordingsInput}) once, and the tools
|
|
413
|
+
* to run on it. Each tool refuses in a pack what it refuses on its own (Chapters
|
|
414
|
+
* takes one recording, Trailer and Speaker Layout need a picture).
|
|
415
|
+
*/
|
|
416
|
+
interface PodcastPackInput extends UseCaseRecordingsInput {
|
|
417
|
+
/**
|
|
418
|
+
* The tools to run, at least one (an empty object is refused `400
|
|
419
|
+
* validation_error`). A tool's settings are what its own method takes,
|
|
420
|
+
* without the recording.
|
|
421
|
+
*/
|
|
422
|
+
tools: PodcastPackTools;
|
|
423
|
+
/**
|
|
424
|
+
* Speaker label → the name to show (see
|
|
425
|
+
* {@link UseCaseSpeakerNamesInput.speakerNames}); passed only to the tools
|
|
426
|
+
* that take it (Tighten Episode, Speaker Layout).
|
|
427
|
+
*/
|
|
428
|
+
speakerNames?: UseCaseSpeakerNamesInput["speakerNames"];
|
|
429
|
+
/** A workflow (its id) to tie the pack's job and its tools' runs to. */
|
|
430
|
+
workflowId?: string;
|
|
431
|
+
/** With `workflowId`: the node on it. */
|
|
432
|
+
nodeId?: string;
|
|
433
|
+
}
|
|
434
|
+
/** One tool of a pack that started: its own run, followed by its own job. */
|
|
435
|
+
interface PodcastPackToolRun {
|
|
436
|
+
tool: PodcastPackTool;
|
|
437
|
+
/** The tool's job: the same job its own method answers. Follow it with `client.jobs.getStatus(jobId)`. */
|
|
438
|
+
jobId: string;
|
|
439
|
+
/** The tool's run. */
|
|
440
|
+
executionId: string | null;
|
|
441
|
+
}
|
|
442
|
+
/** One tool of a pack that did not start, and why. */
|
|
443
|
+
interface PodcastPackNotStarted {
|
|
444
|
+
tool: PodcastPackTool;
|
|
445
|
+
error: {
|
|
446
|
+
code: string;
|
|
447
|
+
message: string;
|
|
448
|
+
tool?: PodcastPackTool;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* What a pack's job holds once its tools have started (its `output_data`),
|
|
453
|
+
* and what {@link EditResource.podcastPack} answers beside the pack's `jobId`.
|
|
454
|
+
*/
|
|
455
|
+
interface PodcastPackOutputData {
|
|
456
|
+
/** The tools that started, in the pack's order. */
|
|
457
|
+
tools: PodcastPackToolRun[];
|
|
458
|
+
/** The tools that did not start (absent when every tool started). */
|
|
459
|
+
notStarted?: PodcastPackNotStarted[];
|
|
460
|
+
/** The recording's length, in seconds. */
|
|
461
|
+
durationSec: number;
|
|
462
|
+
/** The units the pack is charged: every started 15 seconds of the recording. */
|
|
463
|
+
units: number;
|
|
464
|
+
}
|
|
465
|
+
/** A pack started by this request: its job, and each tool's. */
|
|
466
|
+
interface PodcastPackStarted extends EditJobResult, PodcastPackOutputData {
|
|
467
|
+
deduped?: false;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* An `Idempotency-Key` retry that found the pack already started: `jobId` is
|
|
471
|
+
* that pack's job, whose `output_data` lists its tools
|
|
472
|
+
* ({@link PodcastPackOutputData}).
|
|
473
|
+
*/
|
|
474
|
+
interface PodcastPackDeduped extends EditJobResult {
|
|
475
|
+
deduped: true;
|
|
476
|
+
}
|
|
477
|
+
/** What {@link EditResource.podcastPack} answers (`202`). */
|
|
478
|
+
type PodcastPackJobResult = PodcastPackStarted | PodcastPackDeduped;
|
|
479
|
+
/** What {@link EditResource.startPodcastPackTool} answers (`202`): the tool's run, followed like any run. */
|
|
480
|
+
interface PodcastPackToolStarted {
|
|
481
|
+
/** The tool's run: its job, to follow with `jobs.get` (and to continue free if it fails). */
|
|
482
|
+
jobId: string;
|
|
483
|
+
/** The run's execution, when it started one. */
|
|
484
|
+
executionId: string | null;
|
|
485
|
+
tool: PodcastPackTool;
|
|
486
|
+
}
|
|
487
|
+
/** What a pack is estimated at (`data`). Nothing is created or charged. */
|
|
488
|
+
interface PodcastPackEstimate {
|
|
489
|
+
/** The tools the pack would run, in the pack's order. */
|
|
490
|
+
tools: PodcastPackTool[];
|
|
491
|
+
/** The recording's length, in seconds. */
|
|
492
|
+
durationSec: number;
|
|
493
|
+
/** Every started 15 seconds of the recording. */
|
|
494
|
+
units: number;
|
|
495
|
+
/** The pack's price, every tool included: 0 on an edition without credits, `null` when this server has no price for it. */
|
|
496
|
+
credits: number | null;
|
|
274
497
|
}
|
|
275
498
|
|
|
276
499
|
/**
|
|
@@ -551,66 +774,6 @@ interface CameraSwitchInput {
|
|
|
551
774
|
workflowId?: string;
|
|
552
775
|
}
|
|
553
776
|
|
|
554
|
-
/** What a use-case run (`tightenEpisode`, `episodeChapters`, `episodeTrailer`, `clipPack`, `speakerLayout`) and `continueUseCase` answer: the run's job to poll. */
|
|
555
|
-
interface UseCaseJobResult extends EditJobResult {
|
|
556
|
-
/** The run's execution (absent on a deduplicated retry). */
|
|
557
|
-
executionId?: string;
|
|
558
|
-
/** `true` when an `Idempotency-Key` retry found the run already started: `jobId` is that run. */
|
|
559
|
-
deduped?: boolean;
|
|
560
|
-
}
|
|
561
|
-
/** What `tightenEpisode` answers (a {@link UseCaseJobResult}). */
|
|
562
|
-
type TightenEpisodeJobResult = UseCaseJobResult;
|
|
563
|
-
/**
|
|
564
|
-
* What a use-case run is estimated at (`data`). Every credit amount is 0
|
|
565
|
-
* on an edition without credits; `durationSec` is `null` when the recording's
|
|
566
|
-
* length could not be read.
|
|
567
|
-
*/
|
|
568
|
-
interface UseCaseEstimate {
|
|
569
|
-
/** The whole run: its steps plus the fee. */
|
|
570
|
-
totalCredits: number;
|
|
571
|
-
/** The steps at their own rates. */
|
|
572
|
-
stepsCredits: number;
|
|
573
|
-
/** The per-run fee. */
|
|
574
|
-
feeCredits: number;
|
|
575
|
-
/** A step is a metered LLM call's ESTIMATE (charged its actual usage), so the
|
|
576
|
-
* total is one: show it `≈N`. Absent for a fixed figure. */
|
|
577
|
-
estimate?: true;
|
|
578
|
-
/** The recording's length, in seconds. */
|
|
579
|
-
durationSec: number | null;
|
|
580
|
-
}
|
|
581
|
-
/** What a Tighten Episode run is estimated at (a {@link UseCaseEstimate}). */
|
|
582
|
-
type TightenEpisodeEstimate = UseCaseEstimate;
|
|
583
|
-
/** Input for {@link EditResource.continueUseCase}. */
|
|
584
|
-
interface UseCaseContinueInput {
|
|
585
|
-
/** The run to continue: the job `tightenEpisode`, `episodeChapters`, `episodeTrailer`, `clipPack` or `speakerLayout` (or an earlier continuation) answered. */
|
|
586
|
-
jobId: string;
|
|
587
|
-
/**
|
|
588
|
-
* `"from-failed"` re-runs what did not finish of a failed run;
|
|
589
|
-
* `"render-final"` renders the full-quality result after a review-on preview
|
|
590
|
-
* (a Chapters run has no preview: it is refused `render_final_not_preview`;
|
|
591
|
-
* a Clip Pack edit that drops every clip is refused `use_case_nothing_kept`).
|
|
592
|
-
*/
|
|
593
|
-
mode: "from-failed" | "render-final";
|
|
594
|
-
/** Render final only: the reviewer's edit of the plan (an EDL). A Speaker Layout run has no plan: an edit is refused `400 use_case_no_plan`. */
|
|
595
|
-
editedEdl?: unknown;
|
|
596
|
-
/**
|
|
597
|
-
* The run's node type: its continuation goes to `POST /v1/<nodeType>/continue`.
|
|
598
|
-
* Optional: when absent the job is read first (`GET /v1/jobs/:id`, which
|
|
599
|
-
* needs the `jobs:read` scope on an app token) for the type the run records.
|
|
600
|
-
* Required when that read cannot answer: a key without `jobs:read`, or a job
|
|
601
|
-
* that records no use-case type (the call rejects with `use_case_type_unknown`).
|
|
602
|
-
*/
|
|
603
|
-
nodeType?: UseCaseNodeType;
|
|
604
|
-
}
|
|
605
|
-
/** Per-call options for the use-case requests (Tighten Episode, Chapters, Trailer, Clip Pack, Speaker Layout, and their continuations). */
|
|
606
|
-
interface UseCaseRequestOptions {
|
|
607
|
-
/**
|
|
608
|
-
* Sent as the `Idempotency-Key` header. Reuse the same value when retrying
|
|
609
|
-
* the same request and the server answers the run it already started
|
|
610
|
-
* (`deduped: true`) instead of starting a second one.
|
|
611
|
-
*/
|
|
612
|
-
idempotencyKey?: string;
|
|
613
|
-
}
|
|
614
777
|
/**
|
|
615
778
|
* Editorial primitives for podcast / long-form video editing, single-camera
|
|
616
779
|
* and multicam: measure the cameras' offsets ({@link audioSync}), plan the cut
|
|
@@ -637,16 +800,20 @@ interface UseCaseRequestOptions {
|
|
|
637
800
|
* captioned by default) in one call; the same connection applies.
|
|
638
801
|
* - {@link speakerLayout} frames a whole recording by speaker (the same
|
|
639
802
|
* length, nothing cut) in one call; the same connection applies.
|
|
803
|
+
* - {@link podcastPack} runs several of those tools on one recording, for one
|
|
804
|
+
* price by its length; each tool runs as its own run, with its own job.
|
|
640
805
|
* - {@link remapTranscript} is a PURE local transform (no request) — the same
|
|
641
806
|
* remap `applyEdl` performs on its `transcript`, exposed for callers that hold
|
|
642
807
|
* an EDL and a transcript and only want the re-timed transcript.
|
|
643
808
|
*
|
|
644
809
|
* Every request method except the estimates ({@link estimateTightenEpisode},
|
|
645
810
|
* {@link estimateEpisodeChapters}, {@link estimateEpisodeTrailer},
|
|
646
|
-
* {@link estimateClipPack}, {@link estimateSpeakerLayout}
|
|
811
|
+
* {@link estimateClipPack}, {@link estimateSpeakerLayout},
|
|
812
|
+
* {@link estimatePodcastPack}: a quote, `{ data }`)
|
|
647
813
|
* and {@link editPlanCapabilities} (a read: {@link EditPlanCapabilities}) returns
|
|
648
|
-
* {@link EditJobResult} (the use-case runs a {@link UseCaseJobResult}
|
|
649
|
-
* `jobId` with
|
|
814
|
+
* {@link EditJobResult} (the use-case runs a {@link UseCaseJobResult}, the
|
|
815
|
+
* pack a {@link PodcastPackJobResult}); poll the `jobId` with
|
|
816
|
+
* `client.jobs.getStatus(jobId)`.
|
|
650
817
|
*/
|
|
651
818
|
declare class EditResource {
|
|
652
819
|
private client;
|
|
@@ -685,7 +852,10 @@ declare class EditResource {
|
|
|
685
852
|
* Tighten Episode (`POST /v1/tighten-episode`): tighten a podcast recording
|
|
686
853
|
* in one call — transcribe, cut the silences and filler, render, with
|
|
687
854
|
* optional captions, music and framing. Answers the run's job to poll; its
|
|
688
|
-
* `output_data` holds the episode
|
|
855
|
+
* `output_data` holds the episode, and `output_data.speakers` each speaker's
|
|
856
|
+
* label, the name `speakerNames` gave it and how long they talk across the
|
|
857
|
+
* recording (`{ label, name?, talkMs }[]`, `TightenEpisodeOutputData`).
|
|
858
|
+
* The run is priced as its steps at their own
|
|
689
859
|
* rates plus the listed per-run fee. Quote it first with
|
|
690
860
|
* {@link estimateTightenEpisode}.
|
|
691
861
|
*/
|
|
@@ -747,10 +917,12 @@ declare class EditResource {
|
|
|
747
917
|
* with the speakers stacked by default; `framing: null` keeps the
|
|
748
918
|
* recording's shape) and captioned. An audio recording makes audio clips.
|
|
749
919
|
* The finished job's `output_data.clips` is `{ url, title?, hook?, clipKey,
|
|
750
|
-
* thumbnailUrl?, captionsFailed
|
|
920
|
+
* thumbnailUrl?, captionsFailed?, sourceStartMs?, sourceEndMs?,
|
|
921
|
+
* sourceSpans? }[]` in plan order (`ClipPackClip`: where each clip is
|
|
922
|
+
* in the recording, on its clock), the first also
|
|
751
923
|
* `output_data.videoUrl` (`audioUrl` for audio clips). Every clip is tried:
|
|
752
|
-
* one that cannot be rendered is skipped, not charged
|
|
753
|
-
* `failedClips` (the pack keeps the others and its fee); a clip whose
|
|
924
|
+
* one that cannot be rendered is skipped, not charged, counted on
|
|
925
|
+
* `failedClips` and named on `failedClipList` (the pack keeps the others and its fee); a clip whose
|
|
754
926
|
* captions failed comes uncaptioned (`captionsFailed`, counted on
|
|
755
927
|
* `failedCaptions`). When no clip renders the run fails and its fee is
|
|
756
928
|
* refunded. With `reviewBeforeRender` the run stops at previews; Render
|
|
@@ -774,7 +946,9 @@ declare class EditResource {
|
|
|
774
946
|
* speaker framed in turn; several recordings of one conversation: lined up,
|
|
775
947
|
* each speaker shown on their own camera. The finished job's
|
|
776
948
|
* `output_data.videoUrl` is the framed video, `output_data.json` the edit
|
|
777
|
-
* Speaker View drew
|
|
949
|
+
* Speaker View drew, and `output_data.speakers` each speaker's label, the
|
|
950
|
+
* name `speakerNames` gave it and how long they talk (`{ label, name?,
|
|
951
|
+
* talkMs }[]`, `SpeakerLayoutOutputData`). With `reviewBeforeRender` the run stops at a preview;
|
|
778
952
|
* {@link continueUseCase} (`mode: "render-final"`, no `editedEdl`) renders
|
|
779
953
|
* it at full quality. Priced as its steps at their own rates plus the listed
|
|
780
954
|
* per-run fee; quote it first with {@link estimateSpeakerLayout}.
|
|
@@ -789,6 +963,33 @@ declare class EditResource {
|
|
|
789
963
|
estimateSpeakerLayout(input: SpeakerLayoutInput): Promise<{
|
|
790
964
|
data: UseCaseEstimate;
|
|
791
965
|
}>;
|
|
966
|
+
/**
|
|
967
|
+
* Podcast pack (`POST /v1/podcast-pack`): run several of the podcast tools
|
|
968
|
+
* on one recording for one price, every started 15 seconds of the
|
|
969
|
+
* recording with every chosen tool included. Every tool's own refusals come
|
|
970
|
+
* first (a refusal's `details.tool` names the tool), before anything is
|
|
971
|
+
* charged. Answers the pack's job and each tool's (`tools`: the same job
|
|
972
|
+
* its own method answers), plus the tools that did not start. A tool that
|
|
973
|
+
* fails is continued free with {@link continueUseCase} (`"from-failed"`).
|
|
974
|
+
* Quote it first with {@link estimatePodcastPack}.
|
|
975
|
+
*/
|
|
976
|
+
podcastPack(input: PodcastPackInput, options?: UseCaseRequestOptions): Promise<PodcastPackJobResult>;
|
|
977
|
+
/**
|
|
978
|
+
* What a podcast pack is charged (`POST /v1/podcast-pack/estimate`): the
|
|
979
|
+
* same refusals, then the recording's length, its units and the price.
|
|
980
|
+
* Nothing is created or charged.
|
|
981
|
+
*/
|
|
982
|
+
estimatePodcastPack(input: PodcastPackInput): Promise<{
|
|
983
|
+
data: PodcastPackEstimate;
|
|
984
|
+
}>;
|
|
985
|
+
/**
|
|
986
|
+
* Start, free, a tool a podcast pack paid for that did not start (`POST
|
|
987
|
+
* /v1/podcast-pack/:id/start`, the pack's `notStarted`): on the recording and
|
|
988
|
+
* the settings the pack kept. Once per tool — a tool that already has a run
|
|
989
|
+
* in its pack is refused (a failed run is continued with `continueUseCase`,
|
|
990
|
+
* free too); a pack held for review is refused (`pack_under_review`).
|
|
991
|
+
*/
|
|
992
|
+
startPodcastPackTool(packJobId: string, tool: PodcastPackTool): Promise<PodcastPackToolStarted>;
|
|
792
993
|
/**
|
|
793
994
|
* Continue a use-case run as a new job (`POST /v1/<type>/continue`, the
|
|
794
995
|
* run's own type: `input.nodeType`, else the type the job records, read with
|
|
@@ -850,4 +1051,4 @@ declare class EditResource {
|
|
|
850
1051
|
remapTranscript(edl: Edl, transcript: Transcript): Transcript;
|
|
851
1052
|
}
|
|
852
1053
|
|
|
853
|
-
export { type ApplyEdlInput, type AudioSyncInput, type AudioSyncOffset, type AudioSyncResult, type AudioSyncSource, CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, type CameraSwitchInput, type ClipPackEmphasis, type ClipPackInput, type EditJobResult, type EditPlanCapabilities, type EditPlanInput, type EditPlanSource, EditResource, type EpisodeChaptersInput, type EpisodeTrailerInput, type SilenceDetectInput, type SilenceRanges, type SpeakerLayoutInput, type SpeakerMapInput, type SpeakerMapSource, TRAILER_FORMATS, type TightenEpisodeEstimate, type TightenEpisodeInput, type TightenEpisodeJobResult, type TrailerFormat, type UseCaseContinueInput, type UseCaseEstimate, type UseCaseJobResult, type UseCaseRecordingsInput, type UseCaseRequestOptions };
|
|
1054
|
+
export { type ApplyEdlInput, type AudioSyncInput, type AudioSyncOffset, type AudioSyncResult, type AudioSyncSource, CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, type CameraSwitchInput, type ClipPackEmphasis, type ClipPackInput, type EditJobResult, type EditPlanCapabilities, type EditPlanInput, type EditPlanSource, EditResource, type EpisodeChaptersInput, type EpisodeTrailerInput, PODCAST_PACK_TOOLS, type PodcastPackDeduped, type PodcastPackEstimate, type PodcastPackInput, type PodcastPackJobResult, type PodcastPackNotStarted, type PodcastPackOutputData, type PodcastPackRecordingField, type PodcastPackStarted, type PodcastPackTool, type PodcastPackToolRun, type PodcastPackToolSettings, type PodcastPackToolStarted, type PodcastPackTools, type SilenceDetectInput, type SilenceRanges, type SpeakerLayoutInput, type SpeakerMapInput, type SpeakerMapSource, TRAILER_FORMATS, type TightenEpisodeEstimate, type TightenEpisodeInput, type TightenEpisodeJobResult, type TrailerFormat, type UseCaseContinueInput, type UseCaseEstimate, type UseCaseJobResult, type UseCaseRecordingsInput, type UseCaseRequestOptions, type UseCaseSpeakerNamesInput };
|