@transcodely/sdk 0.1.3 → 0.2.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 +24 -0
- package/README.md +16 -2
- package/dist/index.cjs +153 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +117 -62
- package/dist/index.d.ts +117 -62
- package/dist/index.mjs +154 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,30 @@ 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.2.0](https://github.com/transcodely/transcodely-js/compare/v0.1.4...v0.2.0) (2026-07-12)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* 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.
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* 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))
|
|
17
|
+
* 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))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
|
|
22
|
+
* commit CLAUDE.md (was untracked — the routine fleet reads it via the GitHub API) ([3a494f3](https://github.com/transcodely/transcodely-js/commit/3a494f36d7f2416984097ec9cec72a58efb6ea37))
|
|
23
|
+
|
|
24
|
+
## [0.1.4](https://github.com/transcodely/transcodely-js/compare/v0.1.3...v0.1.4) (2026-07-07)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
* **examples:** add S3-compatible (custom-endpoint) origin example ([#11](https://github.com/transcodely/transcodely-js/issues/11)) ([1d262f7](https://github.com/transcodely/transcodely-js/commit/1d262f7193fefd09f63279921d8781c6f45ae14f))
|
|
30
|
+
|
|
7
31
|
## [0.1.3](https://github.com/transcodely/transcodely-js/compare/v0.1.2...v0.1.3) (2026-07-02)
|
|
8
32
|
|
|
9
33
|
|
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.
|
package/dist/index.cjs
CHANGED
|
@@ -357,17 +357,6 @@ var FieldViolation = class _FieldViolation extends protobuf.Message {
|
|
|
357
357
|
};
|
|
358
358
|
|
|
359
359
|
// src/gen/transcodely/v1/api_key_pb.ts
|
|
360
|
-
var APIKeyEnvironment = /* @__PURE__ */ ((APIKeyEnvironment2) => {
|
|
361
|
-
APIKeyEnvironment2[APIKeyEnvironment2["API_KEY_ENVIRONMENT_UNSPECIFIED"] = 0] = "API_KEY_ENVIRONMENT_UNSPECIFIED";
|
|
362
|
-
APIKeyEnvironment2[APIKeyEnvironment2["API_KEY_ENVIRONMENT_LIVE"] = 1] = "API_KEY_ENVIRONMENT_LIVE";
|
|
363
|
-
APIKeyEnvironment2[APIKeyEnvironment2["API_KEY_ENVIRONMENT_TEST"] = 2] = "API_KEY_ENVIRONMENT_TEST";
|
|
364
|
-
return APIKeyEnvironment2;
|
|
365
|
-
})(APIKeyEnvironment || {});
|
|
366
|
-
protobuf.proto3.util.setEnumType(APIKeyEnvironment, "transcodely.v1.APIKeyEnvironment", [
|
|
367
|
-
{ no: 0, name: "API_KEY_ENVIRONMENT_UNSPECIFIED" },
|
|
368
|
-
{ no: 1, name: "API_KEY_ENVIRONMENT_LIVE" },
|
|
369
|
-
{ no: 2, name: "API_KEY_ENVIRONMENT_TEST" }
|
|
370
|
-
]);
|
|
371
360
|
var APIKey = class _APIKey extends protobuf.Message {
|
|
372
361
|
/**
|
|
373
362
|
* Unique API key identifier (e.g., "ak_a1b2c3d4...").
|
|
@@ -388,7 +377,7 @@ var APIKey = class _APIKey extends protobuf.Message {
|
|
|
388
377
|
*/
|
|
389
378
|
description = "";
|
|
390
379
|
/**
|
|
391
|
-
* Key prefix for identification (e.g., "
|
|
380
|
+
* Key prefix for identification (e.g., "ak_...").
|
|
392
381
|
* Safe to display in logs and dashboards.
|
|
393
382
|
*
|
|
394
383
|
* @generated from field: string key_prefix = 4;
|
|
@@ -401,12 +390,6 @@ var APIKey = class _APIKey extends protobuf.Message {
|
|
|
401
390
|
* @generated from field: string key_hint = 5;
|
|
402
391
|
*/
|
|
403
392
|
keyHint = "";
|
|
404
|
-
/**
|
|
405
|
-
* Environment the key is valid for.
|
|
406
|
-
*
|
|
407
|
-
* @generated from field: transcodely.v1.APIKeyEnvironment environment = 6;
|
|
408
|
-
*/
|
|
409
|
-
environment = 0 /* API_KEY_ENVIRONMENT_UNSPECIFIED */;
|
|
410
393
|
/**
|
|
411
394
|
* Permission scopes (empty means full access).
|
|
412
395
|
* Future: granular permissions like "jobs:read", "jobs:write".
|
|
@@ -486,7 +469,6 @@ var APIKey = class _APIKey extends protobuf.Message {
|
|
|
486
469
|
T: 9
|
|
487
470
|
/* ScalarType.STRING */
|
|
488
471
|
},
|
|
489
|
-
{ no: 6, name: "environment", kind: "enum", T: protobuf.proto3.getEnumType(APIKeyEnvironment) },
|
|
490
472
|
{ no: 7, name: "scopes", kind: "scalar", T: 9, repeated: true },
|
|
491
473
|
{ no: 8, name: "last_used_at", kind: "message", T: protobuf.Timestamp, opt: true },
|
|
492
474
|
{ no: 9, name: "expires_at", kind: "message", T: protobuf.Timestamp, opt: true },
|
|
@@ -526,12 +508,6 @@ var CreateAPIKeyRequest = class _CreateAPIKeyRequest extends protobuf.Message {
|
|
|
526
508
|
* @generated from field: string description = 2;
|
|
527
509
|
*/
|
|
528
510
|
description = "";
|
|
529
|
-
/**
|
|
530
|
-
* Environment for the key.
|
|
531
|
-
*
|
|
532
|
-
* @generated from field: transcodely.v1.APIKeyEnvironment environment = 3;
|
|
533
|
-
*/
|
|
534
|
-
environment = 0 /* API_KEY_ENVIRONMENT_UNSPECIFIED */;
|
|
535
511
|
/**
|
|
536
512
|
* Optional expiration time. Null means the key never expires.
|
|
537
513
|
*
|
|
@@ -566,7 +542,6 @@ var CreateAPIKeyRequest = class _CreateAPIKeyRequest extends protobuf.Message {
|
|
|
566
542
|
T: 9
|
|
567
543
|
/* ScalarType.STRING */
|
|
568
544
|
},
|
|
569
|
-
{ no: 3, name: "environment", kind: "enum", T: protobuf.proto3.getEnumType(APIKeyEnvironment) },
|
|
570
545
|
{ no: 4, name: "expires_at", kind: "message", T: protobuf.Timestamp, opt: true },
|
|
571
546
|
{
|
|
572
547
|
no: 5,
|
|
@@ -698,12 +673,6 @@ var GetAPIKeyResponse = class _GetAPIKeyResponse extends protobuf.Message {
|
|
|
698
673
|
}
|
|
699
674
|
};
|
|
700
675
|
var ListAPIKeysRequest = class _ListAPIKeysRequest extends protobuf.Message {
|
|
701
|
-
/**
|
|
702
|
-
* Optional filter by environment.
|
|
703
|
-
*
|
|
704
|
-
* @generated from field: optional transcodely.v1.APIKeyEnvironment environment = 1;
|
|
705
|
-
*/
|
|
706
|
-
environment;
|
|
707
676
|
/**
|
|
708
677
|
* If true, include revoked keys in the response.
|
|
709
678
|
*
|
|
@@ -723,7 +692,6 @@ var ListAPIKeysRequest = class _ListAPIKeysRequest extends protobuf.Message {
|
|
|
723
692
|
static runtime = protobuf.proto3;
|
|
724
693
|
static typeName = "transcodely.v1.ListAPIKeysRequest";
|
|
725
694
|
static fields = protobuf.proto3.util.newFieldList(() => [
|
|
726
|
-
{ no: 1, name: "environment", kind: "enum", T: protobuf.proto3.getEnumType(APIKeyEnvironment), opt: true },
|
|
727
695
|
{
|
|
728
696
|
no: 2,
|
|
729
697
|
name: "include_revoked",
|
|
@@ -2379,13 +2347,6 @@ var Event = class _Event extends protobuf.Message {
|
|
|
2379
2347
|
* @generated from field: string api_version = 8;
|
|
2380
2348
|
*/
|
|
2381
2349
|
apiVersion = "";
|
|
2382
|
-
/**
|
|
2383
|
-
* True when the event was emitted from production (live mode) traffic.
|
|
2384
|
-
* Reserved for a future test-mode concept; always `true` today.
|
|
2385
|
-
*
|
|
2386
|
-
* @generated from field: bool livemode = 9;
|
|
2387
|
-
*/
|
|
2388
|
-
livemode = false;
|
|
2389
2350
|
/**
|
|
2390
2351
|
* Resource type discriminator. Always "event" for this message.
|
|
2391
2352
|
* Mirrored into the webhook envelope as the top-level `object`.
|
|
@@ -2444,13 +2405,6 @@ var Event = class _Event extends protobuf.Message {
|
|
|
2444
2405
|
T: 9
|
|
2445
2406
|
/* ScalarType.STRING */
|
|
2446
2407
|
},
|
|
2447
|
-
{
|
|
2448
|
-
no: 9,
|
|
2449
|
-
name: "livemode",
|
|
2450
|
-
kind: "scalar",
|
|
2451
|
-
T: 8
|
|
2452
|
-
/* ScalarType.BOOL */
|
|
2453
|
-
},
|
|
2454
2408
|
{
|
|
2455
2409
|
no: 10,
|
|
2456
2410
|
name: "object",
|
|
@@ -2492,8 +2446,11 @@ var WebhookDelivery = class _WebhookDelivery extends protobuf.Message {
|
|
|
2492
2446
|
*/
|
|
2493
2447
|
eventId = "";
|
|
2494
2448
|
/**
|
|
2495
|
-
* Delivery status: "pending", "succeeded", or "
|
|
2496
|
-
*
|
|
2449
|
+
* Delivery status: "pending", "succeeded", "failed", or "exhausted".
|
|
2450
|
+
* "exhausted" means the retry curve ran out (attempt 15) without a success;
|
|
2451
|
+
* "failed" is a single failed attempt (a retry may still be scheduled) or an
|
|
2452
|
+
* early stop on a non-retryable 4xx. Wire value is lowercase per project
|
|
2453
|
+
* convention.
|
|
2497
2454
|
*
|
|
2498
2455
|
* @generated from field: string status = 4;
|
|
2499
2456
|
*/
|
|
@@ -2546,7 +2503,8 @@ var WebhookDelivery = class _WebhookDelivery extends protobuf.Message {
|
|
|
2546
2503
|
latencyMs;
|
|
2547
2504
|
/**
|
|
2548
2505
|
* Reason a response was not received. Absent when response_status is set.
|
|
2549
|
-
* One of: "timeout", "connection_refused", "
|
|
2506
|
+
* One of: "timeout", "connection_refused", "connection_reset",
|
|
2507
|
+
* "connection_closed", "host_unreachable", "dns_failure",
|
|
2550
2508
|
* "tls_handshake_failed", "ssrf_blocked", "unknown".
|
|
2551
2509
|
* Wire value is lowercase per project convention.
|
|
2552
2510
|
*
|
|
@@ -2565,6 +2523,15 @@ var WebhookDelivery = class _WebhookDelivery extends protobuf.Message {
|
|
|
2565
2523
|
* @generated from field: optional string response_headers = 13;
|
|
2566
2524
|
*/
|
|
2567
2525
|
responseHeaders;
|
|
2526
|
+
/**
|
|
2527
|
+
* Human-readable detail for the failure: the transport error text when
|
|
2528
|
+
* transport_error is set, or "non-2xx response: <status>" for a completed
|
|
2529
|
+
* request that the endpoint rejected. Absent for pending or succeeded
|
|
2530
|
+
* deliveries.
|
|
2531
|
+
*
|
|
2532
|
+
* @generated from field: optional string error_message = 14;
|
|
2533
|
+
*/
|
|
2534
|
+
errorMessage;
|
|
2568
2535
|
constructor(data) {
|
|
2569
2536
|
super();
|
|
2570
2537
|
protobuf.proto3.util.initPartial(data, this);
|
|
@@ -2614,7 +2581,8 @@ var WebhookDelivery = class _WebhookDelivery extends protobuf.Message {
|
|
|
2614
2581
|
{ no: 10, name: "updated_at", kind: "message", T: protobuf.Timestamp },
|
|
2615
2582
|
{ no: 11, name: "latency_ms", kind: "scalar", T: 5, opt: true },
|
|
2616
2583
|
{ no: 12, name: "transport_error", kind: "scalar", T: 9, opt: true },
|
|
2617
|
-
{ no: 13, name: "response_headers", kind: "scalar", T: 9, opt: true }
|
|
2584
|
+
{ no: 13, name: "response_headers", kind: "scalar", T: 9, opt: true },
|
|
2585
|
+
{ no: 14, name: "error_message", kind: "scalar", T: 9, opt: true }
|
|
2618
2586
|
]);
|
|
2619
2587
|
static fromBinary(bytes, options) {
|
|
2620
2588
|
return new _WebhookDelivery().fromBinary(bytes, options);
|
|
@@ -3438,7 +3406,7 @@ var ListWebhookDeliveriesRequest = class _ListWebhookDeliveriesRequest extends p
|
|
|
3438
3406
|
*/
|
|
3439
3407
|
eventId;
|
|
3440
3408
|
/**
|
|
3441
|
-
* Filter by status: "pending", "succeeded", or "
|
|
3409
|
+
* Filter by status: "pending", "succeeded", "failed", or "exhausted".
|
|
3442
3410
|
*
|
|
3443
3411
|
* @generated from field: optional string status = 3;
|
|
3444
3412
|
*/
|
|
@@ -6975,13 +6943,16 @@ var VideoStreamInfo = class _VideoStreamInfo extends protobuf.Message {
|
|
|
6975
6943
|
*/
|
|
6976
6944
|
codec = "";
|
|
6977
6945
|
/**
|
|
6978
|
-
* Frame width in pixels.
|
|
6946
|
+
* Frame width in pixels, as displayed (container rotation applied).
|
|
6947
|
+
* For a portrait phone recording stored as 1920x1440 with a 90° rotation
|
|
6948
|
+
* side-matrix this is 1440 — matching the media players render and the
|
|
6949
|
+
* outputs Transcodely produces. See `rotation` for the stored orientation.
|
|
6979
6950
|
*
|
|
6980
6951
|
* @generated from field: int32 width = 2;
|
|
6981
6952
|
*/
|
|
6982
6953
|
width = 0;
|
|
6983
6954
|
/**
|
|
6984
|
-
* Frame height in pixels.
|
|
6955
|
+
* Frame height in pixels, as displayed (container rotation applied).
|
|
6985
6956
|
*
|
|
6986
6957
|
* @generated from field: int32 height = 3;
|
|
6987
6958
|
*/
|
|
@@ -7053,7 +7024,9 @@ var VideoStreamInfo = class _VideoStreamInfo extends protobuf.Message {
|
|
|
7053
7024
|
*/
|
|
7054
7025
|
frameCount;
|
|
7055
7026
|
/**
|
|
7056
|
-
* Display aspect ratio as string (e.g., "16:9", "2.35:1")
|
|
7027
|
+
* Display aspect ratio as string (e.g., "16:9", "2.35:1"), rotation-aware:
|
|
7028
|
+
* for a 90°/270° rotated stream the ratio describes the displayed frame
|
|
7029
|
+
* (consistent with width/height above), not the coded one.
|
|
7057
7030
|
*
|
|
7058
7031
|
* @generated from field: optional string display_aspect_ratio = 15;
|
|
7059
7032
|
*/
|
|
@@ -7064,6 +7037,16 @@ var VideoStreamInfo = class _VideoStreamInfo extends protobuf.Message {
|
|
|
7064
7037
|
* @generated from field: optional string sample_aspect_ratio = 16;
|
|
7065
7038
|
*/
|
|
7066
7039
|
sampleAspectRatio;
|
|
7040
|
+
/**
|
|
7041
|
+
* Container-level rotation metadata in degrees clockwise: 0, 90, 180 or
|
|
7042
|
+
* 270. Parsed from the display-matrix side data (or legacy rotate tag).
|
|
7043
|
+
* width/height/display_aspect_ratio already have this rotation applied;
|
|
7044
|
+
* the field is informational so callers can recover the coded orientation.
|
|
7045
|
+
* Absent when the stream carries no rotation metadata.
|
|
7046
|
+
*
|
|
7047
|
+
* @generated from field: optional int32 rotation = 17;
|
|
7048
|
+
*/
|
|
7049
|
+
rotation;
|
|
7067
7050
|
constructor(data) {
|
|
7068
7051
|
super();
|
|
7069
7052
|
protobuf.proto3.util.initPartial(data, this);
|
|
@@ -7128,7 +7111,8 @@ var VideoStreamInfo = class _VideoStreamInfo extends protobuf.Message {
|
|
|
7128
7111
|
{ no: 13, name: "interlaced", kind: "scalar", T: 8, opt: true },
|
|
7129
7112
|
{ no: 14, name: "frame_count", kind: "scalar", T: 3, opt: true },
|
|
7130
7113
|
{ no: 15, name: "display_aspect_ratio", kind: "scalar", T: 9, opt: true },
|
|
7131
|
-
{ no: 16, name: "sample_aspect_ratio", kind: "scalar", T: 9, opt: true }
|
|
7114
|
+
{ no: 16, name: "sample_aspect_ratio", kind: "scalar", T: 9, opt: true },
|
|
7115
|
+
{ no: 17, name: "rotation", kind: "scalar", T: 5, opt: true }
|
|
7132
7116
|
]);
|
|
7133
7117
|
static fromBinary(bytes, options) {
|
|
7134
7118
|
return new _VideoStreamInfo().fromBinary(bytes, options);
|
|
@@ -8606,6 +8590,38 @@ var JobOutput = class _JobOutput extends protobuf.Message {
|
|
|
8606
8590
|
* @generated from field: string object = 21;
|
|
8607
8591
|
*/
|
|
8608
8592
|
object = "";
|
|
8593
|
+
/**
|
|
8594
|
+
* Actual encoded frame width in pixels, measured from the produced media
|
|
8595
|
+
* (rotation applied, so it matches what players display). For multi-variant
|
|
8596
|
+
* outputs (ABR ladders) this is the highest-resolution variant's width;
|
|
8597
|
+
* per-variant dimensions are in variant_results. Set when completed.
|
|
8598
|
+
*
|
|
8599
|
+
* @generated from field: optional int32 width = 22;
|
|
8600
|
+
*/
|
|
8601
|
+
width;
|
|
8602
|
+
/**
|
|
8603
|
+
* Actual encoded frame height in pixels (see width for semantics).
|
|
8604
|
+
*
|
|
8605
|
+
* @generated from field: optional int32 height = 23;
|
|
8606
|
+
*/
|
|
8607
|
+
height;
|
|
8608
|
+
/**
|
|
8609
|
+
* Measured average bitrate of the encoded output in kbps
|
|
8610
|
+
* (total bytes × 8 / encoded duration). For multi-variant outputs this
|
|
8611
|
+
* aggregates all variants; per-variant bitrates are in variant_results.
|
|
8612
|
+
* Set when completed.
|
|
8613
|
+
*
|
|
8614
|
+
* @generated from field: optional int32 average_bitrate_kbps = 24;
|
|
8615
|
+
*/
|
|
8616
|
+
averageBitrateKbps;
|
|
8617
|
+
/**
|
|
8618
|
+
* Per-variant encode results for multi-variant outputs (ABR ladders),
|
|
8619
|
+
* indexed like variant_pricing. Empty for single-variant outputs (use
|
|
8620
|
+
* width/height/average_bitrate_kbps instead). Set when completed.
|
|
8621
|
+
*
|
|
8622
|
+
* @generated from field: repeated transcodely.v1.OutputVariantResult variant_results = 25;
|
|
8623
|
+
*/
|
|
8624
|
+
variantResults = [];
|
|
8609
8625
|
constructor(data) {
|
|
8610
8626
|
super();
|
|
8611
8627
|
protobuf.proto3.util.initPartial(data, this);
|
|
@@ -8649,7 +8665,11 @@ var JobOutput = class _JobOutput extends protobuf.Message {
|
|
|
8649
8665
|
kind: "scalar",
|
|
8650
8666
|
T: 9
|
|
8651
8667
|
/* ScalarType.STRING */
|
|
8652
|
-
}
|
|
8668
|
+
},
|
|
8669
|
+
{ no: 22, name: "width", kind: "scalar", T: 5, opt: true },
|
|
8670
|
+
{ no: 23, name: "height", kind: "scalar", T: 5, opt: true },
|
|
8671
|
+
{ no: 24, name: "average_bitrate_kbps", kind: "scalar", T: 5, opt: true },
|
|
8672
|
+
{ no: 25, name: "variant_results", kind: "message", T: OutputVariantResult, repeated: true }
|
|
8653
8673
|
]);
|
|
8654
8674
|
static fromBinary(bytes, options) {
|
|
8655
8675
|
return new _JobOutput().fromBinary(bytes, options);
|
|
@@ -8664,6 +8684,81 @@ var JobOutput = class _JobOutput extends protobuf.Message {
|
|
|
8664
8684
|
return protobuf.proto3.util.equals(_JobOutput, a, b);
|
|
8665
8685
|
}
|
|
8666
8686
|
};
|
|
8687
|
+
var OutputVariantResult = class _OutputVariantResult extends protobuf.Message {
|
|
8688
|
+
/**
|
|
8689
|
+
* Variant index within the output (0-based).
|
|
8690
|
+
*
|
|
8691
|
+
* @generated from field: int32 index = 1;
|
|
8692
|
+
*/
|
|
8693
|
+
index = 0;
|
|
8694
|
+
/**
|
|
8695
|
+
* Actual encoded frame width in pixels.
|
|
8696
|
+
*
|
|
8697
|
+
* @generated from field: int32 width = 2;
|
|
8698
|
+
*/
|
|
8699
|
+
width = 0;
|
|
8700
|
+
/**
|
|
8701
|
+
* Actual encoded frame height in pixels.
|
|
8702
|
+
*
|
|
8703
|
+
* @generated from field: int32 height = 3;
|
|
8704
|
+
*/
|
|
8705
|
+
height = 0;
|
|
8706
|
+
/**
|
|
8707
|
+
* Measured average bitrate for this variant in kbps.
|
|
8708
|
+
*
|
|
8709
|
+
* @generated from field: optional int32 average_bitrate_kbps = 4;
|
|
8710
|
+
*/
|
|
8711
|
+
averageBitrateKbps;
|
|
8712
|
+
/**
|
|
8713
|
+
* Total encoded size of this variant in bytes.
|
|
8714
|
+
*
|
|
8715
|
+
* @generated from field: optional int64 size_bytes = 5;
|
|
8716
|
+
*/
|
|
8717
|
+
sizeBytes;
|
|
8718
|
+
constructor(data) {
|
|
8719
|
+
super();
|
|
8720
|
+
protobuf.proto3.util.initPartial(data, this);
|
|
8721
|
+
}
|
|
8722
|
+
static runtime = protobuf.proto3;
|
|
8723
|
+
static typeName = "transcodely.v1.OutputVariantResult";
|
|
8724
|
+
static fields = protobuf.proto3.util.newFieldList(() => [
|
|
8725
|
+
{
|
|
8726
|
+
no: 1,
|
|
8727
|
+
name: "index",
|
|
8728
|
+
kind: "scalar",
|
|
8729
|
+
T: 5
|
|
8730
|
+
/* ScalarType.INT32 */
|
|
8731
|
+
},
|
|
8732
|
+
{
|
|
8733
|
+
no: 2,
|
|
8734
|
+
name: "width",
|
|
8735
|
+
kind: "scalar",
|
|
8736
|
+
T: 5
|
|
8737
|
+
/* ScalarType.INT32 */
|
|
8738
|
+
},
|
|
8739
|
+
{
|
|
8740
|
+
no: 3,
|
|
8741
|
+
name: "height",
|
|
8742
|
+
kind: "scalar",
|
|
8743
|
+
T: 5
|
|
8744
|
+
/* ScalarType.INT32 */
|
|
8745
|
+
},
|
|
8746
|
+
{ no: 4, name: "average_bitrate_kbps", kind: "scalar", T: 5, opt: true },
|
|
8747
|
+
{ no: 5, name: "size_bytes", kind: "scalar", T: 3, opt: true }
|
|
8748
|
+
]);
|
|
8749
|
+
static fromBinary(bytes, options) {
|
|
8750
|
+
return new _OutputVariantResult().fromBinary(bytes, options);
|
|
8751
|
+
}
|
|
8752
|
+
static fromJson(jsonValue, options) {
|
|
8753
|
+
return new _OutputVariantResult().fromJson(jsonValue, options);
|
|
8754
|
+
}
|
|
8755
|
+
static fromJsonString(jsonString, options) {
|
|
8756
|
+
return new _OutputVariantResult().fromJsonString(jsonString, options);
|
|
8757
|
+
}
|
|
8758
|
+
static equals(a, b) {
|
|
8759
|
+
return protobuf.proto3.util.equals(_OutputVariantResult, a, b);
|
|
8760
|
+
}
|
|
8761
|
+
};
|
|
8667
8762
|
var ExecutionTiming = class _ExecutionTiming extends protobuf.Message {
|
|
8668
8763
|
/**
|
|
8669
8764
|
* Worker instance details
|
|
@@ -11505,7 +11600,6 @@ function protoEventToSdk(proto) {
|
|
|
11505
11600
|
created: proto.createdAt ? proto.createdAt.toDate().toISOString() : "",
|
|
11506
11601
|
type: proto.type,
|
|
11507
11602
|
data,
|
|
11508
|
-
livemode: proto.livemode,
|
|
11509
11603
|
pendingWebhooks: proto.pendingWebhooks,
|
|
11510
11604
|
// proto Event carries only `request_id`; `idempotency_key` is always
|
|
11511
11605
|
// null until JobService.Create propagates it (out-of-scope feature).
|
|
@@ -11857,7 +11951,7 @@ function backoff(attempt) {
|
|
|
11857
11951
|
}
|
|
11858
11952
|
|
|
11859
11953
|
// src/version.ts
|
|
11860
|
-
var SDK_VERSION = "0.
|
|
11954
|
+
var SDK_VERSION = "0.2.0";
|
|
11861
11955
|
var API_VERSION = "2026-05-03";
|
|
11862
11956
|
var DEFAULT_BASE_URL = "https://api.transcodely.com";
|
|
11863
11957
|
|
|
@@ -16230,13 +16324,6 @@ function requireString(obj, key) {
|
|
|
16230
16324
|
}
|
|
16231
16325
|
return v;
|
|
16232
16326
|
}
|
|
16233
|
-
function requireBoolean(obj, key) {
|
|
16234
|
-
const v = obj[key];
|
|
16235
|
-
if (typeof v !== "boolean") {
|
|
16236
|
-
throw new WebhookPayloadError(`Webhook envelope field \`${key}\` must be a boolean`);
|
|
16237
|
-
}
|
|
16238
|
-
return v;
|
|
16239
|
-
}
|
|
16240
16327
|
function requireNumber(obj, key) {
|
|
16241
16328
|
const v = obj[key];
|
|
16242
16329
|
if (typeof v !== "number" || !Number.isFinite(v)) {
|
|
@@ -16255,7 +16342,6 @@ function buildEvent(parsed) {
|
|
|
16255
16342
|
const apiVersion = requireString(parsed, "api_version");
|
|
16256
16343
|
const created = requireString(parsed, "created");
|
|
16257
16344
|
const type = requireString(parsed, "type");
|
|
16258
|
-
const livemode = requireBoolean(parsed, "livemode");
|
|
16259
16345
|
const pendingWebhooks = requireNumber(parsed, "pending_webhooks");
|
|
16260
16346
|
const dataRaw = parsed["data"];
|
|
16261
16347
|
if (!isPlainObject(dataRaw)) {
|
|
@@ -16286,7 +16372,6 @@ function buildEvent(parsed) {
|
|
|
16286
16372
|
created,
|
|
16287
16373
|
type,
|
|
16288
16374
|
data,
|
|
16289
|
-
livemode,
|
|
16290
16375
|
pendingWebhooks,
|
|
16291
16376
|
request: { id: requestIdRaw, idempotencyKey: idempotencyKeyRaw }
|
|
16292
16377
|
};
|
|
@@ -16376,7 +16461,6 @@ Transcodely.SDK_VERSION = SDK_VERSION;
|
|
|
16376
16461
|
|
|
16377
16462
|
exports.APIConnectionError = APIConnectionError;
|
|
16378
16463
|
exports.APIError = APIError;
|
|
16379
|
-
exports.APIKeyEnvironment = APIKeyEnvironment;
|
|
16380
16464
|
exports.API_VERSION = API_VERSION;
|
|
16381
16465
|
exports.AppStatus = AppStatus;
|
|
16382
16466
|
exports.AudioCodec = AudioCodec;
|