@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.
Files changed (112) hide show
  1. package/dist/{chunk-HUYI5G3D.js → chunk-3NG4HPM5.js} +2 -2
  2. package/dist/{chunk-HUYI5G3D.js.map → chunk-3NG4HPM5.js.map} +1 -1
  3. package/dist/chunk-5QNCWXKG.cjs +22 -0
  4. package/dist/chunk-5QNCWXKG.cjs.map +1 -0
  5. package/dist/{chunk-IO7NEEZZ.cjs → chunk-6BPQYCUG.cjs} +54 -3
  6. package/dist/chunk-6BPQYCUG.cjs.map +1 -0
  7. package/dist/{chunk-TZFZDEWI.js → chunk-6ZKW7767.js} +54 -3
  8. package/dist/chunk-6ZKW7767.js.map +1 -0
  9. package/dist/{chunk-7PMOXQEO.cjs → chunk-7WVQZPUW.cjs} +51 -8
  10. package/dist/chunk-7WVQZPUW.cjs.map +1 -0
  11. package/dist/{chunk-GIQDM2MH.js → chunk-C3H3V5PN.js} +2 -2
  12. package/dist/{chunk-GIQDM2MH.js.map → chunk-C3H3V5PN.js.map} +1 -1
  13. package/dist/{chunk-CSNYBGHP.js → chunk-D45ATYCE.js} +2 -2
  14. package/dist/chunk-D45ATYCE.js.map +1 -0
  15. package/dist/{chunk-A3XA6UNM.cjs → chunk-FQHMDWSP.cjs} +2 -2
  16. package/dist/{chunk-A3XA6UNM.cjs.map → chunk-FQHMDWSP.cjs.map} +1 -1
  17. package/dist/{chunk-SGVTZ2J5.cjs → chunk-G6ASA5RQ.cjs} +18 -18
  18. package/dist/{chunk-SGVTZ2J5.cjs.map → chunk-G6ASA5RQ.cjs.map} +1 -1
  19. package/dist/{chunk-UPWAODYT.cjs → chunk-H6ZB7WYE.cjs} +26 -2
  20. package/dist/chunk-H6ZB7WYE.cjs.map +1 -0
  21. package/dist/{chunk-SGVJUVFD.cjs → chunk-HEJE6L3E.cjs} +3 -3
  22. package/dist/{chunk-SGVJUVFD.cjs.map → chunk-HEJE6L3E.cjs.map} +1 -1
  23. package/dist/{chunk-FOC4VPGK.js → chunk-IAHNPMIX.js} +3 -3
  24. package/dist/{chunk-FOC4VPGK.js.map → chunk-IAHNPMIX.js.map} +1 -1
  25. package/dist/{chunk-U2F6IHHY.js → chunk-JCLJRCMR.js} +10 -10
  26. package/dist/{chunk-U2F6IHHY.js.map → chunk-JCLJRCMR.js.map} +1 -1
  27. package/dist/{chunk-KNBZFWVO.cjs → chunk-JIFGF6PA.cjs} +13 -2
  28. package/dist/chunk-JIFGF6PA.cjs.map +1 -0
  29. package/dist/chunk-NDX4QUTI.js +3 -0
  30. package/dist/{chunk-CHZBONJJ.js.map → chunk-NDX4QUTI.js.map} +1 -1
  31. package/dist/{chunk-GWL4O3J2.js → chunk-PNTVCJZV.js} +13 -2
  32. package/dist/chunk-PNTVCJZV.js.map +1 -0
  33. package/dist/{chunk-AOHDYZSZ.js → chunk-QV4QD6XI.js} +26 -2
  34. package/dist/chunk-QV4QD6XI.js.map +1 -0
  35. package/dist/{chunk-6NIKAVI3.cjs → chunk-STKXUHEM.cjs} +2 -2
  36. package/dist/chunk-STKXUHEM.cjs.map +1 -0
  37. package/dist/{chunk-57GANTLV.cjs → chunk-USBDYHSO.cjs} +2 -2
  38. package/dist/{chunk-57GANTLV.cjs.map → chunk-USBDYHSO.cjs.map} +1 -1
  39. package/dist/{chunk-OO4AKYUN.js → chunk-VPBPVDKY.js} +52 -10
  40. package/dist/chunk-VPBPVDKY.js.map +1 -0
  41. package/dist/{chunk-D3F2BWD6.cjs → chunk-VZCCECKW.cjs} +2 -2
  42. package/dist/{chunk-D3F2BWD6.cjs.map → chunk-VZCCECKW.cjs.map} +1 -1
  43. package/dist/chunk-YPZCTRFB.js +12 -0
  44. package/dist/chunk-YPZCTRFB.js.map +1 -0
  45. package/dist/entries/cast-swap.cjs +2 -2
  46. package/dist/entries/cast-swap.d.cts +1 -1
  47. package/dist/entries/cast-swap.d.ts +1 -1
  48. package/dist/entries/cast-swap.js +1 -1
  49. package/dist/entries/characters.d.cts +2 -1
  50. package/dist/entries/characters.d.ts +2 -1
  51. package/dist/entries/client.cjs +14 -14
  52. package/dist/entries/client.d.cts +2 -2
  53. package/dist/entries/client.d.ts +2 -2
  54. package/dist/entries/client.js +9 -9
  55. package/dist/entries/core.cjs +5 -5
  56. package/dist/entries/core.js +1 -1
  57. package/dist/entries/creatures.cjs +6 -6
  58. package/dist/entries/creatures.d.cts +2 -3
  59. package/dist/entries/creatures.d.ts +2 -3
  60. package/dist/entries/creatures.js +1 -1
  61. package/dist/entries/edit.cjs +12 -8
  62. package/dist/entries/edit.d.cts +272 -71
  63. package/dist/entries/edit.d.ts +272 -71
  64. package/dist/entries/edit.js +2 -2
  65. package/dist/entries/locations.d.cts +2 -1
  66. package/dist/entries/locations.d.ts +2 -1
  67. package/dist/entries/media.cjs +2 -2
  68. package/dist/entries/media.d.cts +68 -2
  69. package/dist/entries/media.d.ts +68 -2
  70. package/dist/entries/media.js +1 -1
  71. package/dist/entries/nodes.cjs +9 -5
  72. package/dist/entries/nodes.d.cts +3 -2
  73. package/dist/entries/nodes.d.ts +3 -2
  74. package/dist/entries/nodes.js +2 -2
  75. package/dist/entries/objects.cjs +6 -6
  76. package/dist/entries/objects.d.cts +2 -3
  77. package/dist/entries/objects.d.ts +2 -3
  78. package/dist/entries/objects.js +1 -1
  79. package/dist/entries/scene3d.d.cts +3 -2
  80. package/dist/entries/scene3d.d.ts +3 -2
  81. package/dist/entries/trends.cjs +2 -2
  82. package/dist/entries/trends.d.cts +36 -17
  83. package/dist/entries/trends.d.ts +36 -17
  84. package/dist/entries/trends.js +1 -1
  85. package/dist/entries/video-remake.cjs +2 -2
  86. package/dist/entries/video-remake.d.cts +1 -1
  87. package/dist/entries/video-remake.d.ts +1 -1
  88. package/dist/entries/video-remake.js +1 -1
  89. package/dist/index.cjs +48 -40
  90. package/dist/index.d.cts +5 -5
  91. package/dist/index.d.ts +5 -5
  92. package/dist/index.js +11 -11
  93. package/dist/{nodes-BaRqRB2Z.d.ts → nodes-C6e2wign.d.ts} +86 -8
  94. package/dist/{nodes-BHtjh6gl.d.cts → nodes-D71Ec9b5.d.cts} +86 -8
  95. package/dist/{video-remake-C-KR7YtT.d.ts → video-remake-CnnJMGwj.d.ts} +166 -5
  96. package/dist/{video-remake-DTuCyhd9.d.cts → video-remake-EHwCWlUW.d.cts} +166 -5
  97. package/package.json +3 -3
  98. package/dist/chunk-6NIKAVI3.cjs.map +0 -1
  99. package/dist/chunk-7PMOXQEO.cjs.map +0 -1
  100. package/dist/chunk-AOHDYZSZ.js.map +0 -1
  101. package/dist/chunk-CHZBONJJ.js +0 -3
  102. package/dist/chunk-CSNYBGHP.js.map +0 -1
  103. package/dist/chunk-GWL4O3J2.js.map +0 -1
  104. package/dist/chunk-IO7NEEZZ.cjs.map +0 -1
  105. package/dist/chunk-KNBZFWVO.cjs.map +0 -1
  106. package/dist/chunk-OO4AKYUN.js.map +0 -1
  107. package/dist/chunk-RKYZY6NA.cjs +0 -16
  108. package/dist/chunk-RKYZY6NA.cjs.map +0 -1
  109. package/dist/chunk-TZFZDEWI.js.map +0 -1
  110. package/dist/chunk-UPWAODYT.cjs.map +0 -1
  111. package/dist/chunk-WFFVCGNU.js +0 -3
  112. package/dist/chunk-WFFVCGNU.js.map +0 -1
@@ -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.js';
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}: a quote, `{ data }`)
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}); poll the
649
- * `jobId` with `client.jobs.getStatus(jobId)`.
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. The run is priced as its steps at their own
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? }[]` in plan order, the first also
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 and counted on
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. With `reviewBeforeRender` the run stops at a preview;
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 };
@@ -1,5 +1,5 @@
1
- export { unwrapEditPlanOutput } from '../chunk-WFFVCGNU.js';
2
- export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from '../chunk-OO4AKYUN.js';
1
+ export { unwrapEditPlanOutput } from '../chunk-NDX4QUTI.js';
2
+ export { CLIP_PACK_MAX_TARGET_SEC, CLIP_PACK_MIN_TARGET_SEC, EditResource, PODCAST_PACK_TOOLS, TRAILER_FORMATS, USE_CASE_NODE_TYPES } from '../chunk-VPBPVDKY.js';
3
3
  import '../chunk-4Q3XZE5O.js';
4
4
  //# sourceMappingURL=edit.js.map
5
5
  //# sourceMappingURL=edit.js.map
@@ -2,7 +2,7 @@ import { LocationAssetType, CharacterAspectRatio, LocationAttachColumn, Surround
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-D59GfAnO.cjs';
4
4
  import { SetKeeperCatalogInput, SetKeeperCatalogResult } from './keepers.cjs';
5
- import { l as GenerationSessionParams } from '../nodes-BHtjh6gl.cjs';
5
+ import { l as GenerationSessionParams } from '../nodes-D71Ec9b5.cjs';
6
6
  import '@nodaro/shared/apps';
7
7
  import '@nodaro/shared/organizations';
8
8
  import '@nodaro/shared/types';
@@ -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-EHwCWlUW.cjs';
16
17
  import '@nodaro/shared/llm-models';
17
18
  import './jobs.cjs';
18
19
  import './errors.cjs';
@@ -2,7 +2,7 @@ import { LocationAssetType, CharacterAspectRatio, LocationAttachColumn, Surround
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-D59GfAnO.js';
4
4
  import { SetKeeperCatalogInput, SetKeeperCatalogResult } from './keepers.js';
5
- import { l as GenerationSessionParams } from '../nodes-BaRqRB2Z.js';
5
+ import { l as GenerationSessionParams } from '../nodes-C6e2wign.js';
6
6
  import '@nodaro/shared/apps';
7
7
  import '@nodaro/shared/organizations';
8
8
  import '@nodaro/shared/types';
@@ -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';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../chunk-RHETJOUM.cjs');
4
- var chunkUPWAODYT_cjs = require('../chunk-UPWAODYT.cjs');
4
+ var chunkH6ZB7WYE_cjs = require('../chunk-H6ZB7WYE.cjs');
5
5
  require('../chunk-XWPYN2VX.cjs');
6
6
  require('../chunk-E2NMFQNY.cjs');
7
7
 
@@ -9,7 +9,7 @@ require('../chunk-E2NMFQNY.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "MediaResource", {
11
11
  enumerable: true,
12
- get: function () { return chunkUPWAODYT_cjs.MediaResource; }
12
+ get: function () { return chunkH6ZB7WYE_cjs.MediaResource; }
13
13
  });
14
14
  //# sourceMappingURL=media.cjs.map
15
15
  //# sourceMappingURL=media.cjs.map
@@ -4,7 +4,7 @@ import { CaptionLookId, SupportedFontName, CaptionStyle } from '@nodaro/shared/c
4
4
  import { CaptionTranscribeLane } from '@nodaro/shared/models';
5
5
  export { CaptionTranscribeLane, TranscribeLane } from '@nodaro/shared/models';
6
6
  import { VideoOverlayRequest } from '@nodaro/shared/video';
7
- import { l as GenerationSessionParams, M as RunNodeOptions } from '../nodes-BHtjh6gl.cjs';
7
+ import { l as GenerationSessionParams, M as RunNodeOptions } from '../nodes-D71Ec9b5.cjs';
8
8
  import '@nodaro/shared/apps';
9
9
  import '@nodaro/shared/organizations';
10
10
  import '@nodaro/shared/types';
@@ -13,6 +13,7 @@ import '@nodaro/shared/social';
13
13
  import '@nodaro/shared/scene3d';
14
14
  import '@nodaro/shared/credits';
15
15
  import '@nodaro/shared/entities';
16
+ import '../video-remake-EHwCWlUW.cjs';
16
17
  import '@nodaro/shared/llm-models';
17
18
  import './jobs.cjs';
18
19
  import './errors.cjs';
@@ -421,6 +422,25 @@ declare class MediaResource {
421
422
  * second one.
422
423
  */
423
424
  splitIntoLayers(input: SplitIntoLayersInput, options?: MediaRunOptions): Promise<MediaJobStarted>;
425
+ /**
426
+ * Replace a video's music and keep its speech, as one job
427
+ * (`POST /v1/replace-audio`, Nodaro Cloud only): the speech is separated
428
+ * from the rest of the sound, the new music dips under it while someone
429
+ * talks, and the mix replaces the video's sound, as long as the video.
430
+ * `mode: "replace-all"` replaces all the sound with the new music instead.
431
+ * The music is a file (`musicUrl`: an audio, or a video whose sound is used)
432
+ * or `musicPrompt` (an instrumental track as long as the video is made from
433
+ * it) — exactly one. Priced per run by mode and music source; a keep-speech
434
+ * run on a video with no sound is charged as replace-all. Poll
435
+ * `jobs.get(jobId)`; the completed job's output is a {@link ReplaceAudioOutput}.
436
+ *
437
+ * With `options.idempotencyKey` (sent as the `Idempotency-Key` header, at
438
+ * least 8 characters) a retry of the same request answers the job it
439
+ * already started instead of starting and charging a second one.
440
+ */
441
+ replaceAudio(input: ReplaceAudioInput, options?: MediaRunOptions): Promise<{
442
+ jobId: string;
443
+ }>;
424
444
  /**
425
445
  * Turn one still image + one audio track into an MP4
426
446
  * (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,
@@ -738,6 +758,52 @@ interface MediaRunOptions extends RunNodeOptions {
738
758
  /** This request's timeout in ms, in place of the client's `timeoutMs`. */
739
759
  readonly timeoutMs?: number;
740
760
  }
761
+ /** Body of {@link MediaResource.replaceAudio} (`POST /v1/replace-audio`). Exactly one of `musicUrl` and `musicPrompt`. */
762
+ interface ReplaceAudioInput {
763
+ /** The video whose sound is replaced (videos up to 10 minutes, files up to 500 MB). */
764
+ videoUrl: string;
765
+ /** The new music: an audio, or a video whose sound is used. */
766
+ musicUrl?: string;
767
+ /** Make the music from this description instead (up to 1,000 characters; a video up to 6 minutes). */
768
+ musicPrompt?: string;
769
+ /** `keep-speech` (default): keep the speech, replace the music. `replace-all`: replace all the sound. */
770
+ mode?: "keep-speech" | "replace-all";
771
+ /** The music's volume in percent, 0–200 (default 80). */
772
+ musicVolume?: number;
773
+ /** The speech's volume in percent, 0–200 (default 100). */
774
+ speechVolume?: number;
775
+ /** How far the music dips under the speech, 0–100 (default 70; 0 = not at all). */
776
+ duckAmount?: number;
777
+ /** A generation session to file the job under. */
778
+ sessionId?: string;
779
+ /** A slug naming where the request comes from. */
780
+ origin?: string;
781
+ }
782
+ /** One step a Replace Audio job ran, and how long it took (ms). */
783
+ interface ReplaceAudioRunStep {
784
+ step: string;
785
+ ms: number;
786
+ }
787
+ /** The completed job's output of {@link MediaResource.replaceAudio}. */
788
+ interface ReplaceAudioOutput {
789
+ /** The video with its new sound. */
790
+ videoUrl: string;
791
+ thumbnailUrl?: string;
792
+ width: number;
793
+ height: number;
794
+ /** Seconds. */
795
+ duration: number;
796
+ /** The final mix (the video's new sound). */
797
+ audioUrl: string;
798
+ /** The separated speech, normalized; absent when no speech was kept. */
799
+ speechUrl?: string;
800
+ /** The new music, normalized. */
801
+ musicUrl: string;
802
+ /** Whether the speech was kept (false for replace-all, and for a video with no sound). */
803
+ speechKept: boolean;
804
+ /** The steps the job ran, in order. */
805
+ runSteps: ReplaceAudioRunStep[];
806
+ }
741
807
  /** A media job started: its id, and `deduped: true` when an `Idempotency-Key` retry found the job already started. */
742
808
  interface MediaJobStarted {
743
809
  jobId: string;
@@ -832,4 +898,4 @@ interface MediaProcessResult {
832
898
  metadata: Record<string, unknown>;
833
899
  }
834
900
 
835
- export { type AddCaptionsInput, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type DownloadVideoProgress, type MediaDiscardResult, type MediaJobStarted, type MediaProcessInput, type MediaProcessResult, MediaResource, type MediaRunOptions, type OverlayPlacement, type ShotCutsInput, type ShotCutsOutput, type ShotCutsResult, type ShotCutsShot, type SplitIntoLayersInput, type SplitIntoLayersOutput, type SplitIntoLayersSize, type SplitLayer, type SplitLayerBox, type SplitMediaByDurationInput, type SplitMediaByShotsInput, type SplitMediaInput, type SplitMediaOutput, type SplitMediaShot, type VideoMetadata };
901
+ export { type AddCaptionsInput, type CaptionEntry, type CaptionLookInput, type CaptionSegmentInput, type DownloadVideoProgress, type MediaDiscardResult, type MediaJobStarted, type MediaProcessInput, type MediaProcessResult, MediaResource, type MediaRunOptions, type OverlayPlacement, type ReplaceAudioInput, type ReplaceAudioOutput, type ReplaceAudioRunStep, type ShotCutsInput, type ShotCutsOutput, type ShotCutsResult, type ShotCutsShot, type SplitIntoLayersInput, type SplitIntoLayersOutput, type SplitIntoLayersSize, type SplitLayer, type SplitLayerBox, type SplitMediaByDurationInput, type SplitMediaByShotsInput, type SplitMediaInput, type SplitMediaOutput, type SplitMediaShot, type VideoMetadata };