@nodaro/sdk 2.14.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2342,6 +2342,25 @@ var MediaResource = class {
2342
2342
  slideshow(input) {
2343
2343
  return this.client.request("POST", "/v1/slideshow", { body: input });
2344
2344
  }
2345
+ /**
2346
+ * Place 1–20 timed image layers over a video (`POST /v1/video-overlay`) —
2347
+ * rendered locally (FFmpeg) in one pass, no AI; the base audio is kept
2348
+ * untouched. Each layer has an `imageUrl`, a `start` and an optional `end`
2349
+ * in seconds (no `end` = to the end of the video) and a placement: a
2350
+ * `preset` (`"card"`, `"corner-badge"` with a `corner`, `"full-frame"`) or
2351
+ * an explicit box in {@link MediaResource.imageOverlay}'s percent vocabulary
2352
+ * (`anchor`, `x`, `y`, `width`, `height`, `fit`) — an explicit box field
2353
+ * overrides the preset, and a layer with neither is a corner badge
2354
+ * (bottom-right, or the `corner` it names). `outputAspect` renders onto a
2355
+ * 16:9 / 9:16 / 1:1 / 4:5 canvas
2356
+ * (`baseFit` cover by default; `backgroundColor` pads `contain`). Poll
2357
+ * `jobs.get(jobId)`: the output carries `videoUrl`, `thumbnailUrl`, `width`,
2358
+ * `height`, `durationSec` and `warnings[]` (a layer clipped or skipped at the
2359
+ * video's end, an animated image's first frame, re-encoded audio).
2360
+ */
2361
+ videoOverlay(input) {
2362
+ return this.client.request("POST", "/v1/video-overlay", { body: input });
2363
+ }
2345
2364
  /**
2346
2365
  * Probe a social video's metadata (`POST /v1/video-metadata`) — duration,
2347
2366
  * dimensions, title, live status — WITHOUT downloading it. A direct read, not a
@@ -3547,6 +3566,24 @@ var EditResource = class {
3547
3566
  }
3548
3567
  });
3549
3568
  }
3569
+ /**
3570
+ * Measure how far apart the clocks of 2–6 recordings of one conversation are
3571
+ * (`POST /v1/audio-sync`), by cross-correlating their audio — keyless, one
3572
+ * ffmpeg decode per source. The finished job's `output_data.json` is an
3573
+ * {@link AudioSyncResult}. A malformed request (fewer than 2 or more than 6
3574
+ * sources, a repeated id, a `reference` that is not one of the ids) throws a
3575
+ * typed `NodaroError` (400, `code: "validation_error"`) before any credits
3576
+ * are reserved.
3577
+ */
3578
+ audioSync(input) {
3579
+ return this.client.request("POST", "/v1/audio-sync", {
3580
+ body: {
3581
+ sources: input.sources.map((s) => ({ id: s.id, url: s.url })),
3582
+ ...input.reference !== void 0 ? { reference: input.reference } : {},
3583
+ ...input.workflowId !== void 0 ? { workflowId: input.workflowId } : {}
3584
+ }
3585
+ });
3586
+ }
3550
3587
  /**
3551
3588
  * Render an edit decision list into a video or audio cut (`POST /v1/apply-edl`).
3552
3589
  * The EDL is validated at ingress — an unresolvable source or a picture-less
@@ -3606,7 +3643,7 @@ var EditResource = class {
3606
3643
  return shared.remapTranscriptThroughEdl(edl, transcript);
3607
3644
  }
3608
3645
  };
3609
- var SDK_VERSION = "2.14.0" ;
3646
+ var SDK_VERSION = "2.16.0" ;
3610
3647
  var CLIENT_HEADER = "X-Nodaro-Client";
3611
3648
  var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
3612
3649
  var NodaroClient = class _NodaroClient {