@transcodely/sdk 0.1.4 → 0.3.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/CHANGELOG.md +28 -0
- package/README.md +16 -2
- package/dist/index.cjs +299 -298
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +217 -214
- package/dist/index.d.ts +217 -214
- package/dist/index.mjs +300 -298
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ All notable changes to the Transcodely JavaScript / TypeScript SDK will be docum
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Breaking changes are allowed on minor bumps until 1.0.0.
|
|
6
6
|
|
|
7
|
+
## [0.3.0](https://github.com/transcodely/transcodely-js/compare/v0.2.0...v0.3.0) (2026-07-15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* App.webhook, CreateAppRequest.webhook, and UpdateAppRequest.webhook (WebhookConfig / CreateWebhookConfig / UpdateWebhookConfig) are removed. App-level webhook configuration is superseded by the WebhookService endpoints API, already exposed in this SDK as client.webhookEndpoints (create / update / rotateSecret / list / sendTest) and client.webhooks.constructEvent for signature verification.
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* sync protos — explicit app scoping; remove legacy app webhook config ([#21](https://github.com/transcodely/transcodely-js/issues/21)) ([10b65fe](https://github.com/transcodely/transcodely-js/commit/10b65fece1c090c0298f24ff9f34554fdfbe9bd5))
|
|
17
|
+
|
|
18
|
+
## [0.2.0](https://github.com/transcodely/transcodely-js/compare/v0.1.4...v0.2.0) (2026-07-12)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ⚠ BREAKING CHANGES
|
|
22
|
+
|
|
23
|
+
* The APIKeyEnvironment enum and its API-key `environment` field are removed, and webhook events no longer expose `livemode`. Code that read `event.livemode` or referenced `APIKeyEnvironment` must be updated.
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* proto resync (rotation + measured output metrics), null request.id vector, wire-type docs ([#15](https://github.com/transcodely/transcodely-js/issues/15)) ([b50fac9](https://github.com/transcodely/transcodely-js/commit/b50fac9a5778642ab5887347bd117fed32ac5a2d))
|
|
28
|
+
* remove API-key environment and webhook livemode ([#18](https://github.com/transcodely/transcodely-js/issues/18)) ([80d05ab](https://github.com/transcodely/transcodely-js/commit/80d05ab5a45a592e8b42487c420074d23f2228e1))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Documentation
|
|
32
|
+
|
|
33
|
+
* commit CLAUDE.md (was untracked — the routine fleet reads it via the GitHub API) ([3a494f3](https://github.com/transcodely/transcodely-js/commit/3a494f36d7f2416984097ec9cec72a58efb6ea37))
|
|
34
|
+
|
|
7
35
|
## [0.1.4](https://github.com/transcodely/transcodely-js/compare/v0.1.3...v0.1.4) (2026-07-07)
|
|
8
36
|
|
|
9
37
|
|
package/README.md
CHANGED
|
@@ -42,8 +42,6 @@ Pass your API key in the constructor:
|
|
|
42
42
|
const client = new Transcodely({ apiKey: process.env.TRANSCODELY_API_KEY! });
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Test-mode keys (`ak_test_*`) and live-mode keys (`ak_live_*`) hit the same base URL — the environment is encoded in the key prefix.
|
|
46
|
-
|
|
47
45
|
## Resources
|
|
48
46
|
|
|
49
47
|
```ts
|
|
@@ -202,6 +200,10 @@ app.post(
|
|
|
202
200
|
|
|
203
201
|
The signed payload is the **raw HTTP body** — use `express.raw()` (or the equivalent in your framework) to receive a `Buffer`, never `express.json()`.
|
|
204
202
|
|
|
203
|
+
Every event carries a `request` object. Events emitted **inside** an API request scope (e.g. `job.created`, from your `jobs.create` call) set `request.id` to the originating `req_*` ID. Events emitted **outside** a request scope — every worker-driven `job.*` / `output.*` event (`job.succeeded`, `job.failed`, `job.canceled`, `job.progress`, `output.ready`, …) — set `request.id` to `null`. `request.idempotencyKey` is `null` whenever the originating request didn't supply one.
|
|
204
|
+
|
|
205
|
+
`constructEvent` accepts `request.id: null` from **v0.1.3** onward. v0.1.2 and earlier rejected such deliveries with a `WebhookPayloadError` — upgrade if you validate worker-driven events.
|
|
206
|
+
|
|
205
207
|
### Multi-secret rotation
|
|
206
208
|
|
|
207
209
|
Pass an array to verify against both your previous and current secrets during a rotation window:
|
|
@@ -354,6 +356,18 @@ catch (err) {
|
|
|
354
356
|
|
|
355
357
|
The SDK uses Connect-RPC over HTTP+JSON with snake_case field names and lowercase simplified enum values (e.g. `"pending"` instead of `"JOB_STATUS_PENDING"`). A custom codec handles the transformation transparently — the surface you write against is fully typed.
|
|
356
358
|
|
|
359
|
+
A few in-memory vs. on-the-wire representations are worth knowing:
|
|
360
|
+
|
|
361
|
+
- **64-bit integers** (byte sizes, millisecond durations — e.g. `sizeBytes`) are `bigint` in memory and serialize as decimal **strings** on the wire.
|
|
362
|
+
- **Enums** are numeric in memory but serialize to their lowercase string names via `toJSON()` (`JobStatus.COMPLETED` ⇄ `"completed"`).
|
|
363
|
+
- **`output_url` and thumbnail URL values are storage URLs** (e.g. `s3://bucket/key`, `gs://bucket/key`), not HTTP URLs — resolve them through your origin or CDN to fetch bytes.
|
|
364
|
+
|
|
365
|
+
### Measured output & input metadata
|
|
366
|
+
|
|
367
|
+
When an output completes, its `JobOutput` reports the real encoded geometry measured from the produced media — `width`, `height`, and `averageBitrateKbps`. For multi-variant outputs (ABR ladders) those aggregate the ladder, and `variantResults` (an `OutputVariantResult[]`, indexed like `variantPricing`) carries per-variant `width` / `height` / `averageBitrateKbps` / `sizeBytes`. Thumbnail results (`ThumbnailResult`) likewise carry their real rendered `width` / `height`.
|
|
368
|
+
|
|
369
|
+
On the input side, `VideoStreamInfo.rotation` exposes container rotation in degrees clockwise (`0` / `90` / `180` / `270`, absent when the stream has no rotation metadata), and `width` / `height` / `displayAspectRatio` are **display-oriented** — rotation is already applied, so they match what a player shows.
|
|
370
|
+
|
|
357
371
|
## Versioning
|
|
358
372
|
|
|
359
373
|
The SDK is versioned independently with semver, starting at `0.1.0`. Breaking changes are allowed on minor bumps until `1.0.0`. Each release pins a specific calendar-versioned API (`Transcodely.API_VERSION`) and sends `Transcodely-Version` on every request.
|