@transcodely/sdk 0.3.15 → 0.3.16
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 +18 -0
- package/README.md +8 -0
- package/dist/index.cjs +44 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -40
- package/dist/index.d.ts +104 -40
- package/dist/index.mjs +44 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.16](https://github.com/transcodely/transcodely-js/compare/v0.3.15...v0.3.16) (2026-10-31)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* resync protos — auto_abr accepted, tone-mapping refusal rule, validation error envelope ([8f88507](https://github.com/transcodely/transcodely-js/commit/8f8850782adc63ef789ec852a5feac5aeebb1c12))
|
|
13
|
+
* resync protos — auto_abr accepted, tone-mapping refusal rule, validation error envelope ([de3f67b](https://github.com/transcodely/transcodely-js/commit/de3f67b48ffc8c472674bc5f03850616d796d41a))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* read the ErrorDetails detail by type, and document type as the Connect code ([f6af4e9](https://github.com/transcodely/transcodely-js/commit/f6af4e9c80398768f8fe5883d18e199ca746b386))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
|
|
23
|
+
* describe the validation error envelope and pin it with a test ([1c44049](https://github.com/transcodely/transcodely-js/commit/1c4404907b4a01577960e1d832c9c25928fc5db3))
|
|
24
|
+
|
|
7
25
|
## [0.3.15](https://github.com/transcodely/transcodely-js/compare/v0.3.14...v0.3.15) (2026-10-30)
|
|
8
26
|
|
|
9
27
|
|
package/README.md
CHANGED
|
@@ -652,6 +652,14 @@ try {
|
|
|
652
652
|
}
|
|
653
653
|
```
|
|
654
654
|
|
|
655
|
+
Every validation refusal, whether the request schema, a codec check or a feature
|
|
656
|
+
rule caught it, comes back as an `InvalidRequestError` listing every bad field
|
|
657
|
+
at once. Each violation's `description` starts with that field's error code in
|
|
658
|
+
brackets, for example `[parameter_out_of_range] value must be ...`, and `code`
|
|
659
|
+
holds the error type, such as `validation_error`, `invalid_request_error`,
|
|
660
|
+
`codec_error` or `feature_error`. A refusal that names no field carries no
|
|
661
|
+
detail, so its code is empty. `type` holds the Connect code, `invalid_argument`.
|
|
662
|
+
|
|
655
663
|
The hierarchy:
|
|
656
664
|
|
|
657
665
|
| Class | Status | When |
|
package/dist/index.cjs
CHANGED
|
@@ -7304,7 +7304,8 @@ protobuf.proto3.util.setEnumType(ToneMapping, "transcodely.v1.ToneMapping", [
|
|
|
7304
7304
|
]);
|
|
7305
7305
|
var HDRConfig = class _HDRConfig extends protobuf.Message {
|
|
7306
7306
|
/**
|
|
7307
|
-
* Target HDR format (required for passthrough and force modes).
|
|
7307
|
+
* Target HDR format (required for passthrough and force modes). In tonemap
|
|
7308
|
+
* mode it names the HDR format of the source.
|
|
7308
7309
|
* `dolby_vision_5` and `dolby_vision_8` are refused at create until the
|
|
7309
7310
|
* worker produces Dolby Vision output; a refused request creates no job and
|
|
7310
7311
|
* is neither quoted nor billed.
|
|
@@ -7319,14 +7320,17 @@ var HDRConfig = class _HDRConfig extends protobuf.Message {
|
|
|
7319
7320
|
*/
|
|
7320
7321
|
mode = 0 /* HDR_MODE_UNSPECIFIED */;
|
|
7321
7322
|
/**
|
|
7322
|
-
* Tone mapping algorithm (
|
|
7323
|
+
* Tone mapping algorithm (tonemap mode only). Unset means `bt2390`, which,
|
|
7324
|
+
* like an explicit `bt2390`, is approximated with `hable` on CPU.
|
|
7323
7325
|
*
|
|
7324
7326
|
* @generated from field: transcodely.v1.ToneMapping tone_mapping = 3;
|
|
7325
7327
|
*/
|
|
7326
7328
|
toneMapping = 0 /* UNSPECIFIED */;
|
|
7327
7329
|
/**
|
|
7328
|
-
* Target peak brightness in nits
|
|
7329
|
-
*
|
|
7330
|
+
* Target peak brightness in nits. Range: 100-10000. Applies to HDR output
|
|
7331
|
+
* only: refused with `parameter_forbidden` in tonemap mode, whose SDR target
|
|
7332
|
+
* has a fixed peak. Accepted in passthrough and force modes, where the
|
|
7333
|
+
* encoder does not currently read it, so it has no effect on the output.
|
|
7330
7334
|
*
|
|
7331
7335
|
* @generated from field: optional int32 target_peak_nits = 4;
|
|
7332
7336
|
*/
|
|
@@ -9058,27 +9062,43 @@ protobuf.proto3.util.setEnumType(ContentAwareMode, "transcodely.v1.ContentAwareM
|
|
|
9058
9062
|
]);
|
|
9059
9063
|
var AutoABRConfig = class _AutoABRConfig extends protobuf.Message {
|
|
9060
9064
|
/**
|
|
9061
|
-
*
|
|
9062
|
-
*
|
|
9065
|
+
* Fewest rungs the ladder may be pruned to. Default: 2.
|
|
9066
|
+
*
|
|
9067
|
+
* A ladder can never hold more rungs than the source allows: only one tier
|
|
9068
|
+
* at or above the source's short side is kept, so a 480-line source yields
|
|
9069
|
+
* one rung whatever this says. When pruning would leave fewer rungs than
|
|
9070
|
+
* this, rungs are put back from the bottom of the ladder up. Set it to 1 to
|
|
9071
|
+
* say a single rung is an acceptable result for any source. Must not exceed
|
|
9072
|
+
* max_variants, nor the number of standard rungs between min_resolution and
|
|
9073
|
+
* max_resolution.
|
|
9063
9074
|
*
|
|
9064
9075
|
* @generated from field: optional int32 min_variants = 1;
|
|
9065
9076
|
*/
|
|
9066
9077
|
minVariants;
|
|
9067
9078
|
/**
|
|
9068
|
-
*
|
|
9069
|
-
*
|
|
9079
|
+
* Most rungs the ladder may hold. A ceiling longer than this keeps its TOP
|
|
9080
|
+
* rung (quality) and its BOTTOM rung (reach) and drops interior rungs from
|
|
9081
|
+
* the highest down: 2160p..480p capped at 3 is 2160p, 720p, 480p. Default:
|
|
9082
|
+
* no cap beyond the standard rungs in range (at most five).
|
|
9070
9083
|
*
|
|
9071
9084
|
* @generated from field: optional int32 max_variants = 2;
|
|
9072
9085
|
*/
|
|
9073
9086
|
maxVariants;
|
|
9074
9087
|
/**
|
|
9075
|
-
* Lowest
|
|
9088
|
+
* Lowest rung the ladder may contain. Default: 480p. When the source's short
|
|
9089
|
+
* side is below this, the ladder is one rung: the smallest tier at or above
|
|
9090
|
+
* the source's short side, rendered at the source's own size.
|
|
9076
9091
|
*
|
|
9077
9092
|
* @generated from field: transcodely.v1.Resolution min_resolution = 3;
|
|
9078
9093
|
*/
|
|
9079
9094
|
minResolution = 0 /* RESOLUTION_UNSPECIFIED */;
|
|
9080
9095
|
/**
|
|
9081
|
-
* Highest
|
|
9096
|
+
* Highest rung the ladder may contain. Default: 1080p, NOT the highest the
|
|
9097
|
+
* source allows — 1440p and 2160p rungs must be asked for here. The worker
|
|
9098
|
+
* that renders the job is sized from this ceiling before the source is
|
|
9099
|
+
* known, and a default that sized every job for 4K would bill nobody more
|
|
9100
|
+
* but waste a large machine on most sources. 4320p is accepted and behaves
|
|
9101
|
+
* as 2160p, the largest standard rung.
|
|
9082
9102
|
*
|
|
9083
9103
|
* @generated from field: transcodely.v1.Resolution max_resolution = 4;
|
|
9084
9104
|
*/
|
|
@@ -9110,8 +9130,7 @@ var AutoABRConfig = class _AutoABRConfig extends protobuf.Message {
|
|
|
9110
9130
|
};
|
|
9111
9131
|
var ContentAwareConfig = class _ContentAwareConfig extends protobuf.Message {
|
|
9112
9132
|
/**
|
|
9113
|
-
* Encoding mode (required)
|
|
9114
|
-
* at create.
|
|
9133
|
+
* Encoding mode (required): `per_title` or `auto_abr`.
|
|
9115
9134
|
*
|
|
9116
9135
|
* @generated from field: transcodely.v1.ContentAwareMode mode = 1;
|
|
9117
9136
|
*/
|
|
@@ -9132,8 +9151,8 @@ var ContentAwareConfig = class _ContentAwareConfig extends protobuf.Message {
|
|
|
9132
9151
|
*/
|
|
9133
9152
|
vmafTarget;
|
|
9134
9153
|
/**
|
|
9135
|
-
*
|
|
9136
|
-
*
|
|
9154
|
+
* Ladder bounds, only for `auto_abr` mode. Refused with
|
|
9155
|
+
* `parameter_forbidden` on `per_title`.
|
|
9137
9156
|
*
|
|
9138
9157
|
* @generated from field: optional transcodely.v1.AutoABRConfig auto_abr = 3;
|
|
9139
9158
|
*/
|
|
@@ -12076,7 +12095,9 @@ var OutputSpec = class _OutputSpec extends protobuf.Message {
|
|
|
12076
12095
|
* Enables per-title encoding, which tunes this output's CRF to the source
|
|
12077
12096
|
* rather than to its quality tier. Requires at least one video rendition that
|
|
12078
12097
|
* is not pinned to an explicit bitrate, and a source of at least 120 seconds.
|
|
12079
|
-
* `auto_abr` mode
|
|
12098
|
+
* `auto_abr` mode (choose which rungs of a standard ladder to render, for
|
|
12099
|
+
* streaming outputs) is defined but not accepted yet: it is rejected with
|
|
12100
|
+
* `parameter_unsupported`.
|
|
12080
12101
|
*
|
|
12081
12102
|
* @generated from field: optional transcodely.v1.ContentAwareConfig content_aware = 13;
|
|
12082
12103
|
*/
|
|
@@ -20344,9 +20365,9 @@ var JobService = {
|
|
|
20344
20365
|
|
|
20345
20366
|
// src/errors.ts
|
|
20346
20367
|
var TranscodelyError = class extends Error {
|
|
20347
|
-
/** Server-side error code (e.g. "
|
|
20368
|
+
/** Server-side error code (e.g. "validation_error"). */
|
|
20348
20369
|
code;
|
|
20349
|
-
/**
|
|
20370
|
+
/** Connect error code (e.g. "invalid_argument"). */
|
|
20350
20371
|
type;
|
|
20351
20372
|
/** Field-level validation violations. */
|
|
20352
20373
|
errors;
|
|
@@ -20444,7 +20465,7 @@ function backoff(attempt) {
|
|
|
20444
20465
|
}
|
|
20445
20466
|
|
|
20446
20467
|
// src/version.ts
|
|
20447
|
-
var SDK_VERSION = "0.3.
|
|
20468
|
+
var SDK_VERSION = "0.3.16";
|
|
20448
20469
|
var API_VERSION = "2026-05-03";
|
|
20449
20470
|
var DEFAULT_BASE_URL = "https://api.transcodely.com";
|
|
20450
20471
|
|
|
@@ -25269,7 +25290,7 @@ function mapHttpError({ status, body, headers }) {
|
|
|
25269
25290
|
const requestId = headers.get("x-request-id") ?? void 0;
|
|
25270
25291
|
const parsed = parseBody(body);
|
|
25271
25292
|
const message = parsed.message ?? `HTTP ${status}`;
|
|
25272
|
-
const detail = parsed.details?.
|
|
25293
|
+
const detail = parsed.details?.find(isErrorDetails)?.debug;
|
|
25273
25294
|
const code = detail?.code;
|
|
25274
25295
|
const violations = detail?.field_violations ?? detail?.fieldViolations ?? [];
|
|
25275
25296
|
const opts = {
|
|
@@ -25300,6 +25321,10 @@ function connectionError(cause, message) {
|
|
|
25300
25321
|
const msg = (cause instanceof Error ? cause.message : "network request failed");
|
|
25301
25322
|
return new APIConnectionError({ message: msg, cause });
|
|
25302
25323
|
}
|
|
25324
|
+
var ERROR_DETAILS_TYPE = "transcodely.v1.ErrorDetails";
|
|
25325
|
+
function isErrorDetails(d) {
|
|
25326
|
+
return d.type === void 0 || d.type === ERROR_DETAILS_TYPE || d.type.endsWith(`/${ERROR_DETAILS_TYPE}`);
|
|
25327
|
+
}
|
|
25303
25328
|
function parseBody(body) {
|
|
25304
25329
|
if (typeof body === "string") {
|
|
25305
25330
|
try {
|