@transcodely/sdk 0.3.13 → 0.3.15

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 CHANGED
@@ -4,6 +4,21 @@ 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.15](https://github.com/transcodely/transcodely-js/compare/v0.3.14...v0.3.15) (2026-10-30)
8
+
9
+
10
+ ### Features
11
+
12
+ * resync protos to api master — usage hosting_estimated_from, encoding_mode echo ([f1f6bee](https://github.com/transcodely/transcodely-js/commit/f1f6bee811da5c86e3a74021ba42fcab8bffb6a8))
13
+
14
+ ## [0.3.14](https://github.com/transcodely/transcodely-js/compare/v0.3.13...v0.3.14) (2026-10-27)
15
+
16
+
17
+ ### Features
18
+
19
+ * rate cards — GetPricing (your effective prices) and resynced protos ([b9554f3](https://github.com/transcodely/transcodely-js/commit/b9554f31612b8080e51de75f055c061fa1f661ac))
20
+ * sync protos for rate cards; add getPricing ([e7d5591](https://github.com/transcodely/transcodely-js/commit/e7d5591eff446ccb70c3f32207f17a74ca3f2ac0))
21
+
7
22
  ## [0.3.13](https://github.com/transcodely/transcodely-js/compare/v0.3.12...v0.3.13) (2026-10-26)
8
23
 
9
24
 
package/README.md CHANGED
@@ -313,7 +313,7 @@ client.videos // upload RPCs, multipart, createFromUrl, get / list / up
313
313
  client.presets // create / get / getBySlug / list / update / duplicate / archive
314
314
  client.origins // create / get / list / update / validate / archive
315
315
  client.ingestRules // create / get / list / update / delete / listEvents / test / replayEvent
316
- client.apps // create / get / list / update / archive / enableHosting
316
+ client.apps // create / get / list / update / archive / enableHosting / getSpend / getPricing
317
317
  client.apiKeys // create / get / list / revoke
318
318
  client.organizations // create / get / list / update / checkSlug
319
319
  client.memberships // list / get / updateRole / remove
@@ -335,6 +335,26 @@ for (const component of health.components) {
335
335
  }
336
336
  ```
337
337
 
338
+ ## Your prices
339
+
340
+ `client.apps.getPricing()` lists every chargeable item with the EUR rate your app
341
+ pays, whether your account has a custom rate for it, and the public list price.
342
+ Omit the app id to price the API key's own app.
343
+
344
+ ```ts
345
+ const pricing = await client.apps.getPricing();
346
+ for (const entry of pricing.entries) {
347
+ if (entry.basePrice !== undefined) {
348
+ console.log(`${entry.groupLabel} / ${entry.label}: ${entry.basePrice} ${pricing.currency} (${entry.unit})`, entry.custom ? "custom" : "");
349
+ }
350
+ if (entry.multiplier !== undefined) {
351
+ console.log(`${entry.groupLabel} / ${entry.label}: x${entry.multiplier}`, entry.custom ? "custom" : "");
352
+ }
353
+ }
354
+ ```
355
+
356
+ Prices are fixed when a job is created, so a price change applies to jobs created after it.
357
+
338
358
  ## Origins
339
359
 
340
360
  An origin tells Transcodely where to read source media from and where to write outputs. Every origin belongs to a single provider; pass exactly one provider-config field (`s3`, `gcs`, `http`, or `r2`) on create.
package/dist/index.cjs CHANGED
@@ -1918,9 +1918,10 @@ var AutoProfileDefaults = class _AutoProfileDefaults extends protobuf.Message {
1918
1918
  */
1919
1919
  qualityTier;
1920
1920
  /**
1921
- * Encoding mode: "fixed" (default, static CRF) or "auto" (input-aware constrained CRF).
1921
+ * Encoding mode: "auto" (default, input-aware constrained CRF) or "fixed" (static CRF).
1922
1922
  * In "auto" mode, the worker caps each variant's bitrate based on the input's bitrate
1923
- * and resolution ratio, preventing output from exceeding the input's quality ceiling.
1923
+ * and resolution ratio, preventing output from exceeding the input's quality ceiling,
1924
+ * and skips any ladder rung larger than the source instead of upscaling it.
1924
1925
  *
1925
1926
  * @generated from field: optional string encoding_mode = 5;
1926
1927
  */
@@ -2228,6 +2229,228 @@ var GetSpendResponse = class _GetSpendResponse extends protobuf.Message {
2228
2229
  return protobuf.proto3.util.equals(_GetSpendResponse, a, b);
2229
2230
  }
2230
2231
  };
2232
+ var GetPricingRequest = class _GetPricingRequest extends protobuf.Message {
2233
+ /**
2234
+ * App ID. API-key callers may omit it or pass their own app; a different app
2235
+ * is rejected with PermissionDenied. Dashboard callers pass it to pick an app
2236
+ * in their organization; omitted selects the organization's first active
2237
+ * app in list order (the same default every app-scoped read uses).
2238
+ *
2239
+ * @generated from field: optional string app_id = 1;
2240
+ */
2241
+ appId;
2242
+ constructor(data) {
2243
+ super();
2244
+ protobuf.proto3.util.initPartial(data, this);
2245
+ }
2246
+ static runtime = protobuf.proto3;
2247
+ static typeName = "transcodely.v1.GetPricingRequest";
2248
+ static fields = protobuf.proto3.util.newFieldList(() => [
2249
+ { no: 1, name: "app_id", kind: "scalar", T: 9, opt: true }
2250
+ ]);
2251
+ static fromBinary(bytes, options) {
2252
+ return new _GetPricingRequest().fromBinary(bytes, options);
2253
+ }
2254
+ static fromJson(jsonValue, options) {
2255
+ return new _GetPricingRequest().fromJson(jsonValue, options);
2256
+ }
2257
+ static fromJsonString(jsonString, options) {
2258
+ return new _GetPricingRequest().fromJsonString(jsonString, options);
2259
+ }
2260
+ static equals(a, b) {
2261
+ return protobuf.proto3.util.equals(_GetPricingRequest, a, b);
2262
+ }
2263
+ };
2264
+ var PricingEntry = class _PricingEntry extends protobuf.Message {
2265
+ /**
2266
+ * Charge class: codec, resolution, quality, feature, fee, storage, egress.
2267
+ * Other values may appear as new charges are introduced.
2268
+ *
2269
+ * @generated from field: string rule_type = 1;
2270
+ */
2271
+ ruleType = "";
2272
+ /**
2273
+ * Charge within its class, e.g. h264, 1080p, captions, processing_m.
2274
+ *
2275
+ * @generated from field: string rule_key = 2;
2276
+ */
2277
+ ruleKey = "";
2278
+ /**
2279
+ * Human label, e.g. "H.264".
2280
+ *
2281
+ * @generated from field: string label = 3;
2282
+ */
2283
+ label = "";
2284
+ /**
2285
+ * Human label of the class, e.g. "Encoding".
2286
+ *
2287
+ * @generated from field: string group_label = 4;
2288
+ */
2289
+ groupLabel = "";
2290
+ /**
2291
+ * What base_price is per: eur_per_output_minute, eur_per_source_minute,
2292
+ * eur_per_video, eur_per_job, eur_per_gb_month, eur_per_gb, or eur_per_unit
2293
+ * for a charge whose unit is not known yet. Empty for a charge that has only
2294
+ * a multiplier.
2295
+ *
2296
+ * @generated from field: string unit = 5;
2297
+ */
2298
+ unit = "";
2299
+ /**
2300
+ * The price per unit, in EUR, this app pays. Absent for a charge that has
2301
+ * only a multiplier.
2302
+ *
2303
+ * @generated from field: optional double base_price = 6;
2304
+ */
2305
+ basePrice;
2306
+ /**
2307
+ * The multiplier this app pays. Absent for a charge that has only a per-unit
2308
+ * price.
2309
+ *
2310
+ * @generated from field: optional double multiplier = 7;
2311
+ */
2312
+ multiplier;
2313
+ /**
2314
+ * True when this account has a custom rate for this charge, so base_price or
2315
+ * multiplier differs from the list price.
2316
+ *
2317
+ * @generated from field: bool custom = 8;
2318
+ */
2319
+ custom = false;
2320
+ /**
2321
+ * The public list price per unit, in EUR. Absent when base_price is.
2322
+ *
2323
+ * @generated from field: optional double list_base_price = 9;
2324
+ */
2325
+ listBasePrice;
2326
+ /**
2327
+ * The public list multiplier. Absent when multiplier is.
2328
+ *
2329
+ * @generated from field: optional double list_multiplier = 10;
2330
+ */
2331
+ listMultiplier;
2332
+ constructor(data) {
2333
+ super();
2334
+ protobuf.proto3.util.initPartial(data, this);
2335
+ }
2336
+ static runtime = protobuf.proto3;
2337
+ static typeName = "transcodely.v1.PricingEntry";
2338
+ static fields = protobuf.proto3.util.newFieldList(() => [
2339
+ {
2340
+ no: 1,
2341
+ name: "rule_type",
2342
+ kind: "scalar",
2343
+ T: 9
2344
+ /* ScalarType.STRING */
2345
+ },
2346
+ {
2347
+ no: 2,
2348
+ name: "rule_key",
2349
+ kind: "scalar",
2350
+ T: 9
2351
+ /* ScalarType.STRING */
2352
+ },
2353
+ {
2354
+ no: 3,
2355
+ name: "label",
2356
+ kind: "scalar",
2357
+ T: 9
2358
+ /* ScalarType.STRING */
2359
+ },
2360
+ {
2361
+ no: 4,
2362
+ name: "group_label",
2363
+ kind: "scalar",
2364
+ T: 9
2365
+ /* ScalarType.STRING */
2366
+ },
2367
+ {
2368
+ no: 5,
2369
+ name: "unit",
2370
+ kind: "scalar",
2371
+ T: 9
2372
+ /* ScalarType.STRING */
2373
+ },
2374
+ { no: 6, name: "base_price", kind: "scalar", T: 1, opt: true },
2375
+ { no: 7, name: "multiplier", kind: "scalar", T: 1, opt: true },
2376
+ {
2377
+ no: 8,
2378
+ name: "custom",
2379
+ kind: "scalar",
2380
+ T: 8
2381
+ /* ScalarType.BOOL */
2382
+ },
2383
+ { no: 9, name: "list_base_price", kind: "scalar", T: 1, opt: true },
2384
+ { no: 10, name: "list_multiplier", kind: "scalar", T: 1, opt: true }
2385
+ ]);
2386
+ static fromBinary(bytes, options) {
2387
+ return new _PricingEntry().fromBinary(bytes, options);
2388
+ }
2389
+ static fromJson(jsonValue, options) {
2390
+ return new _PricingEntry().fromJson(jsonValue, options);
2391
+ }
2392
+ static fromJsonString(jsonString, options) {
2393
+ return new _PricingEntry().fromJsonString(jsonString, options);
2394
+ }
2395
+ static equals(a, b) {
2396
+ return protobuf.proto3.util.equals(_PricingEntry, a, b);
2397
+ }
2398
+ };
2399
+ var GetPricingResponse = class _GetPricingResponse extends protobuf.Message {
2400
+ /**
2401
+ * The app these prices are for.
2402
+ *
2403
+ * @generated from field: string app_id = 1;
2404
+ */
2405
+ appId = "";
2406
+ /**
2407
+ * Currency of every price. Always "EUR".
2408
+ *
2409
+ * @generated from field: string currency = 2;
2410
+ */
2411
+ currency = "";
2412
+ /**
2413
+ * Every chargeable item, grouped by class in display order.
2414
+ *
2415
+ * @generated from field: repeated transcodely.v1.PricingEntry entries = 3;
2416
+ */
2417
+ entries = [];
2418
+ constructor(data) {
2419
+ super();
2420
+ protobuf.proto3.util.initPartial(data, this);
2421
+ }
2422
+ static runtime = protobuf.proto3;
2423
+ static typeName = "transcodely.v1.GetPricingResponse";
2424
+ static fields = protobuf.proto3.util.newFieldList(() => [
2425
+ {
2426
+ no: 1,
2427
+ name: "app_id",
2428
+ kind: "scalar",
2429
+ T: 9
2430
+ /* ScalarType.STRING */
2431
+ },
2432
+ {
2433
+ no: 2,
2434
+ name: "currency",
2435
+ kind: "scalar",
2436
+ T: 9
2437
+ /* ScalarType.STRING */
2438
+ },
2439
+ { no: 3, name: "entries", kind: "message", T: PricingEntry, repeated: true }
2440
+ ]);
2441
+ static fromBinary(bytes, options) {
2442
+ return new _GetPricingResponse().fromBinary(bytes, options);
2443
+ }
2444
+ static fromJson(jsonValue, options) {
2445
+ return new _GetPricingResponse().fromJson(jsonValue, options);
2446
+ }
2447
+ static fromJsonString(jsonString, options) {
2448
+ return new _GetPricingResponse().fromJsonString(jsonString, options);
2449
+ }
2450
+ static equals(a, b) {
2451
+ return protobuf.proto3.util.equals(_GetPricingResponse, a, b);
2452
+ }
2453
+ };
2231
2454
  var AppService = {
2232
2455
  typeName: "transcodely.v1.AppService",
2233
2456
  methods: {
@@ -2350,6 +2573,18 @@ var AppService = {
2350
2573
  I: GetSpendRequest,
2351
2574
  O: GetSpendResponse,
2352
2575
  kind: protobuf.MethodKind.Unary
2576
+ },
2577
+ /**
2578
+ * Get the prices an app pays: every chargeable item with its effective rate,
2579
+ * whether the account has a custom rate for it, and the public list price.
2580
+ *
2581
+ * @generated from rpc transcodely.v1.AppService.GetPricing
2582
+ */
2583
+ getPricing: {
2584
+ name: "GetPricing",
2585
+ I: GetPricingRequest,
2586
+ O: GetPricingResponse,
2587
+ kind: protobuf.MethodKind.Unary
2353
2588
  }
2354
2589
  }
2355
2590
  };
@@ -2474,6 +2709,21 @@ var Apps = class {
2474
2709
  opts
2475
2710
  );
2476
2711
  }
2712
+ /**
2713
+ * Get the prices an app pays: every chargeable item with its effective EUR
2714
+ * rate, whether the account has a custom rate for it (`custom`), and the
2715
+ * public list price. Omit `id` to price the API key's own app (dashboard
2716
+ * callers: the organization's first active app). Prices are fixed when a job is
2717
+ * created, so a price change applies to jobs created after it.
2718
+ */
2719
+ getPricing(id, opts) {
2720
+ return this.transport.unary(
2721
+ AppService,
2722
+ AppService.methods.getPricing,
2723
+ new GetPricingRequest(id ? { appId: id } : {}),
2724
+ opts
2725
+ );
2726
+ }
2477
2727
  };
2478
2728
  var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
2479
2729
  InvoiceStatus2[InvoiceStatus2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
@@ -7055,6 +7305,9 @@ protobuf.proto3.util.setEnumType(ToneMapping, "transcodely.v1.ToneMapping", [
7055
7305
  var HDRConfig = class _HDRConfig extends protobuf.Message {
7056
7306
  /**
7057
7307
  * Target HDR format (required for passthrough and force modes).
7308
+ * `dolby_vision_5` and `dolby_vision_8` are refused at create until the
7309
+ * worker produces Dolby Vision output; a refused request creates no job and
7310
+ * is neither quoted nor billed.
7058
7311
  *
7059
7312
  * @generated from field: transcodely.v1.HDRFormat format = 1;
7060
7313
  */
@@ -7093,7 +7346,9 @@ var HDRConfig = class _HDRConfig extends protobuf.Message {
7093
7346
  */
7094
7347
  contentLightLevel;
7095
7348
  /**
7096
- * Dolby Vision RPU file URL (for DV metadata injection).
7349
+ * Dolby Vision RPU file URL. Only accepted with a `dolby_vision_*` format,
7350
+ * which is refused at create until the worker produces Dolby Vision output,
7351
+ * so this field is currently unreachable.
7097
7352
  *
7098
7353
  * @generated from field: optional string rpu_url = 7;
7099
7354
  */
@@ -11830,6 +12085,10 @@ var OutputSpec = class _OutputSpec extends protobuf.Message {
11830
12085
  * Encoding mode: "fixed" (default, static CRF) or "auto" (input-aware constrained CRF).
11831
12086
  * In "auto" mode, the worker caps each variant's bitrate based on the input's bitrate
11832
12087
  * and resolution ratio, preventing output from exceeding the input's quality ceiling.
12088
+ * "auto" also skips any ABR rung larger than the source instead of upscaling it.
12089
+ * A skipped rung is reported with status "skipped" and is not billed.
12090
+ * Outputs created since 2026-10-27 echo the resolved mode on responses (unset
12091
+ * resolves to "fixed"). Outputs created before then omit it: their mode was not stored.
11833
12092
  *
11834
12093
  * @generated from field: optional string encoding_mode = 14;
11835
12094
  */
@@ -12138,7 +12397,10 @@ var VariantPricingSnapshot = class _VariantPricingSnapshot extends protobuf.Mess
12138
12397
  */
12139
12398
  actualCost;
12140
12399
  /**
12141
- * Variant encoding status: "pending", "processing", "completed", "failed".
12400
+ * Variant encoding status: "pending", "processing", "completed", "failed",
12401
+ * "canceled", or "skipped". A rung is "skipped" when `encoding_mode: auto`
12402
+ * left it unencoded because it would have upscaled the source. A skipped
12403
+ * rung has actual_cost 0 and is not billed.
12142
12404
  *
12143
12405
  * @generated from field: string status = 20;
12144
12406
  */
@@ -17077,6 +17339,13 @@ var UsageSummary = class _UsageSummary extends protobuf.Message {
17077
17339
  */
17078
17340
  storageGbAvg = 0;
17079
17341
  /**
17342
+ * Storage cost of the period so far, as your invoice will carry it. Each
17343
+ * day is one GB-day: the day's stored bytes at the day's monthly price
17344
+ * divided by the days in that month. Days already billed are reported at
17345
+ * the rate they were billed at, so a later price or rate-card change never
17346
+ * re-prices them; the remaining days (see hosting_estimated_from) are
17347
+ * estimated the same way at your current rate.
17348
+ *
17080
17349
  * @generated from field: double storage_cost = 11;
17081
17350
  */
17082
17351
  storageCost = 0;
@@ -17091,6 +17360,10 @@ var UsageSummary = class _UsageSummary extends protobuf.Message {
17091
17360
  */
17092
17361
  egressGb = 0;
17093
17362
  /**
17363
+ * Delivery cost of the period so far, as your invoice will carry it:
17364
+ * billed delivery at the rate it was billed at, delivery not billed yet
17365
+ * estimated at your current rate.
17366
+ *
17094
17367
  * @generated from field: double egress_cost = 21;
17095
17368
  */
17096
17369
  egressCost = 0;
@@ -17110,6 +17383,18 @@ var UsageSummary = class _UsageSummary extends protobuf.Message {
17110
17383
  * @generated from field: string currency = 31;
17111
17384
  */
17112
17385
  currency = "";
17386
+ /**
17387
+ * First day (YYYY-MM-DD, UTC) whose storage or delivery cost is an
17388
+ * estimate rather than billed usage. Hosting is billed daily, through the
17389
+ * previous day, so while you store or deliver video the current period has
17390
+ * an estimated tail, and the estimate turns into the billed amount as each
17391
+ * day is billed. Empty when no day with hosting usage in the period is
17392
+ * still unbilled, which is when storage_cost and egress_cost match your
17393
+ * invoice (to within the sub-cent remainder carried to the next charge).
17394
+ *
17395
+ * @generated from field: string hosting_estimated_from = 32;
17396
+ */
17397
+ hostingEstimatedFrom = "";
17113
17398
  /**
17114
17399
  * Per-day usage breakdown for the billing period identified by
17115
17400
  * billing_month, oldest day first. With a billing anchor day other than 1,
@@ -17214,6 +17499,13 @@ var UsageSummary = class _UsageSummary extends protobuf.Message {
17214
17499
  T: 9
17215
17500
  /* ScalarType.STRING */
17216
17501
  },
17502
+ {
17503
+ no: 32,
17504
+ name: "hosting_estimated_from",
17505
+ kind: "scalar",
17506
+ T: 9
17507
+ /* ScalarType.STRING */
17508
+ },
17217
17509
  { no: 40, name: "daily", kind: "message", T: DailyUsage, repeated: true }
17218
17510
  ]);
17219
17511
  static fromBinary(bytes, options) {
@@ -20152,7 +20444,7 @@ function backoff(attempt) {
20152
20444
  }
20153
20445
 
20154
20446
  // src/version.ts
20155
- var SDK_VERSION = "0.3.13";
20447
+ var SDK_VERSION = "0.3.15";
20156
20448
  var API_VERSION = "2026-05-03";
20157
20449
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
20158
20450