@nodaro/sdk 2.4.0 → 2.5.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 +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2138,6 +2138,22 @@ var MediaResource = class {
|
|
|
2138
2138
|
imageCollage(input) {
|
|
2139
2139
|
return this.client.request("POST", "/v1/image-collage", { body: input });
|
|
2140
2140
|
}
|
|
2141
|
+
/**
|
|
2142
|
+
* Place 1–12 layers — pictures, real text, QR codes, shapes — on a base image,
|
|
2143
|
+
* pixel-exactly (`POST /v1/image-overlay`) — local, deterministic, no AI.
|
|
2144
|
+
* Every layer position/size is a PERCENT of the base image: `anchor` (nine
|
|
2145
|
+
* positions, default `"center"`), `x`/`y` (offset from the anchor in % of
|
|
2146
|
+
* the base width/height; negative on a right/bottom anchor moves inward),
|
|
2147
|
+
* `width` (% of the base width, default 25 — height follows the layer's
|
|
2148
|
+
* aspect unless `height` is set). Plus `opacity` (0..1), `rotation`
|
|
2149
|
+
* (degrees), `blend` (`"over"` | `"multiply"` | `"screen"`), `fit`,
|
|
2150
|
+
* `shadow` and `roundedCorners`. The output keeps the base's pixel size
|
|
2151
|
+
* unless `canvas` is set. Flat credit cost. Poll `jobs.get(jobId)` for the
|
|
2152
|
+
* finished image.
|
|
2153
|
+
*/
|
|
2154
|
+
imageOverlay(input) {
|
|
2155
|
+
return this.client.request("POST", "/v1/image-overlay", { body: input });
|
|
2156
|
+
}
|
|
2141
2157
|
/**
|
|
2142
2158
|
* Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
|
|
2143
2159
|
* unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
|
|
@@ -3232,7 +3248,7 @@ var WorkspacesResource = class {
|
|
|
3232
3248
|
return this.client.requestText("GET", `/v1/workspaces/${encodeURIComponent(id)}/usage`, { query: { ...opts, format: "csv" } });
|
|
3233
3249
|
}
|
|
3234
3250
|
};
|
|
3235
|
-
var SDK_VERSION = "2.
|
|
3251
|
+
var SDK_VERSION = "2.5.0" ;
|
|
3236
3252
|
var CLIENT_HEADER = "X-Nodaro-Client";
|
|
3237
3253
|
var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
3238
3254
|
var NodaroClient = class _NodaroClient {
|