@transcodely/sdk 0.3.13 → 0.3.14

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,14 @@ 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.14](https://github.com/transcodely/transcodely-js/compare/v0.3.13...v0.3.14) (2026-10-27)
8
+
9
+
10
+ ### Features
11
+
12
+ * rate cards — GetPricing (your effective prices) and resynced protos ([b9554f3](https://github.com/transcodely/transcodely-js/commit/b9554f31612b8080e51de75f055c061fa1f661ac))
13
+ * sync protos for rate cards; add getPricing ([e7d5591](https://github.com/transcodely/transcodely-js/commit/e7d5591eff446ccb70c3f32207f17a74ca3f2ac0))
14
+
7
15
  ## [0.3.13](https://github.com/transcodely/transcodely-js/compare/v0.3.12...v0.3.13) (2026-10-26)
8
16
 
9
17
 
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
@@ -2228,6 +2228,228 @@ var GetSpendResponse = class _GetSpendResponse extends protobuf.Message {
2228
2228
  return protobuf.proto3.util.equals(_GetSpendResponse, a, b);
2229
2229
  }
2230
2230
  };
2231
+ var GetPricingRequest = class _GetPricingRequest extends protobuf.Message {
2232
+ /**
2233
+ * App ID. API-key callers may omit it or pass their own app; a different app
2234
+ * is rejected with PermissionDenied. Dashboard callers pass it to pick an app
2235
+ * in their organization; omitted selects the organization's first active
2236
+ * app in list order (the same default every app-scoped read uses).
2237
+ *
2238
+ * @generated from field: optional string app_id = 1;
2239
+ */
2240
+ appId;
2241
+ constructor(data) {
2242
+ super();
2243
+ protobuf.proto3.util.initPartial(data, this);
2244
+ }
2245
+ static runtime = protobuf.proto3;
2246
+ static typeName = "transcodely.v1.GetPricingRequest";
2247
+ static fields = protobuf.proto3.util.newFieldList(() => [
2248
+ { no: 1, name: "app_id", kind: "scalar", T: 9, opt: true }
2249
+ ]);
2250
+ static fromBinary(bytes, options) {
2251
+ return new _GetPricingRequest().fromBinary(bytes, options);
2252
+ }
2253
+ static fromJson(jsonValue, options) {
2254
+ return new _GetPricingRequest().fromJson(jsonValue, options);
2255
+ }
2256
+ static fromJsonString(jsonString, options) {
2257
+ return new _GetPricingRequest().fromJsonString(jsonString, options);
2258
+ }
2259
+ static equals(a, b) {
2260
+ return protobuf.proto3.util.equals(_GetPricingRequest, a, b);
2261
+ }
2262
+ };
2263
+ var PricingEntry = class _PricingEntry extends protobuf.Message {
2264
+ /**
2265
+ * Charge class: codec, resolution, quality, feature, fee, storage, egress.
2266
+ * Other values may appear as new charges are introduced.
2267
+ *
2268
+ * @generated from field: string rule_type = 1;
2269
+ */
2270
+ ruleType = "";
2271
+ /**
2272
+ * Charge within its class, e.g. h264, 1080p, captions, processing_m.
2273
+ *
2274
+ * @generated from field: string rule_key = 2;
2275
+ */
2276
+ ruleKey = "";
2277
+ /**
2278
+ * Human label, e.g. "H.264".
2279
+ *
2280
+ * @generated from field: string label = 3;
2281
+ */
2282
+ label = "";
2283
+ /**
2284
+ * Human label of the class, e.g. "Encoding".
2285
+ *
2286
+ * @generated from field: string group_label = 4;
2287
+ */
2288
+ groupLabel = "";
2289
+ /**
2290
+ * What base_price is per: eur_per_output_minute, eur_per_source_minute,
2291
+ * eur_per_video, eur_per_job, eur_per_gb_month, eur_per_gb, or eur_per_unit
2292
+ * for a charge whose unit is not known yet. Empty for a charge that has only
2293
+ * a multiplier.
2294
+ *
2295
+ * @generated from field: string unit = 5;
2296
+ */
2297
+ unit = "";
2298
+ /**
2299
+ * The price per unit, in EUR, this app pays. Absent for a charge that has
2300
+ * only a multiplier.
2301
+ *
2302
+ * @generated from field: optional double base_price = 6;
2303
+ */
2304
+ basePrice;
2305
+ /**
2306
+ * The multiplier this app pays. Absent for a charge that has only a per-unit
2307
+ * price.
2308
+ *
2309
+ * @generated from field: optional double multiplier = 7;
2310
+ */
2311
+ multiplier;
2312
+ /**
2313
+ * True when this account has a custom rate for this charge, so base_price or
2314
+ * multiplier differs from the list price.
2315
+ *
2316
+ * @generated from field: bool custom = 8;
2317
+ */
2318
+ custom = false;
2319
+ /**
2320
+ * The public list price per unit, in EUR. Absent when base_price is.
2321
+ *
2322
+ * @generated from field: optional double list_base_price = 9;
2323
+ */
2324
+ listBasePrice;
2325
+ /**
2326
+ * The public list multiplier. Absent when multiplier is.
2327
+ *
2328
+ * @generated from field: optional double list_multiplier = 10;
2329
+ */
2330
+ listMultiplier;
2331
+ constructor(data) {
2332
+ super();
2333
+ protobuf.proto3.util.initPartial(data, this);
2334
+ }
2335
+ static runtime = protobuf.proto3;
2336
+ static typeName = "transcodely.v1.PricingEntry";
2337
+ static fields = protobuf.proto3.util.newFieldList(() => [
2338
+ {
2339
+ no: 1,
2340
+ name: "rule_type",
2341
+ kind: "scalar",
2342
+ T: 9
2343
+ /* ScalarType.STRING */
2344
+ },
2345
+ {
2346
+ no: 2,
2347
+ name: "rule_key",
2348
+ kind: "scalar",
2349
+ T: 9
2350
+ /* ScalarType.STRING */
2351
+ },
2352
+ {
2353
+ no: 3,
2354
+ name: "label",
2355
+ kind: "scalar",
2356
+ T: 9
2357
+ /* ScalarType.STRING */
2358
+ },
2359
+ {
2360
+ no: 4,
2361
+ name: "group_label",
2362
+ kind: "scalar",
2363
+ T: 9
2364
+ /* ScalarType.STRING */
2365
+ },
2366
+ {
2367
+ no: 5,
2368
+ name: "unit",
2369
+ kind: "scalar",
2370
+ T: 9
2371
+ /* ScalarType.STRING */
2372
+ },
2373
+ { no: 6, name: "base_price", kind: "scalar", T: 1, opt: true },
2374
+ { no: 7, name: "multiplier", kind: "scalar", T: 1, opt: true },
2375
+ {
2376
+ no: 8,
2377
+ name: "custom",
2378
+ kind: "scalar",
2379
+ T: 8
2380
+ /* ScalarType.BOOL */
2381
+ },
2382
+ { no: 9, name: "list_base_price", kind: "scalar", T: 1, opt: true },
2383
+ { no: 10, name: "list_multiplier", kind: "scalar", T: 1, opt: true }
2384
+ ]);
2385
+ static fromBinary(bytes, options) {
2386
+ return new _PricingEntry().fromBinary(bytes, options);
2387
+ }
2388
+ static fromJson(jsonValue, options) {
2389
+ return new _PricingEntry().fromJson(jsonValue, options);
2390
+ }
2391
+ static fromJsonString(jsonString, options) {
2392
+ return new _PricingEntry().fromJsonString(jsonString, options);
2393
+ }
2394
+ static equals(a, b) {
2395
+ return protobuf.proto3.util.equals(_PricingEntry, a, b);
2396
+ }
2397
+ };
2398
+ var GetPricingResponse = class _GetPricingResponse extends protobuf.Message {
2399
+ /**
2400
+ * The app these prices are for.
2401
+ *
2402
+ * @generated from field: string app_id = 1;
2403
+ */
2404
+ appId = "";
2405
+ /**
2406
+ * Currency of every price. Always "EUR".
2407
+ *
2408
+ * @generated from field: string currency = 2;
2409
+ */
2410
+ currency = "";
2411
+ /**
2412
+ * Every chargeable item, grouped by class in display order.
2413
+ *
2414
+ * @generated from field: repeated transcodely.v1.PricingEntry entries = 3;
2415
+ */
2416
+ entries = [];
2417
+ constructor(data) {
2418
+ super();
2419
+ protobuf.proto3.util.initPartial(data, this);
2420
+ }
2421
+ static runtime = protobuf.proto3;
2422
+ static typeName = "transcodely.v1.GetPricingResponse";
2423
+ static fields = protobuf.proto3.util.newFieldList(() => [
2424
+ {
2425
+ no: 1,
2426
+ name: "app_id",
2427
+ kind: "scalar",
2428
+ T: 9
2429
+ /* ScalarType.STRING */
2430
+ },
2431
+ {
2432
+ no: 2,
2433
+ name: "currency",
2434
+ kind: "scalar",
2435
+ T: 9
2436
+ /* ScalarType.STRING */
2437
+ },
2438
+ { no: 3, name: "entries", kind: "message", T: PricingEntry, repeated: true }
2439
+ ]);
2440
+ static fromBinary(bytes, options) {
2441
+ return new _GetPricingResponse().fromBinary(bytes, options);
2442
+ }
2443
+ static fromJson(jsonValue, options) {
2444
+ return new _GetPricingResponse().fromJson(jsonValue, options);
2445
+ }
2446
+ static fromJsonString(jsonString, options) {
2447
+ return new _GetPricingResponse().fromJsonString(jsonString, options);
2448
+ }
2449
+ static equals(a, b) {
2450
+ return protobuf.proto3.util.equals(_GetPricingResponse, a, b);
2451
+ }
2452
+ };
2231
2453
  var AppService = {
2232
2454
  typeName: "transcodely.v1.AppService",
2233
2455
  methods: {
@@ -2350,6 +2572,18 @@ var AppService = {
2350
2572
  I: GetSpendRequest,
2351
2573
  O: GetSpendResponse,
2352
2574
  kind: protobuf.MethodKind.Unary
2575
+ },
2576
+ /**
2577
+ * Get the prices an app pays: every chargeable item with its effective rate,
2578
+ * whether the account has a custom rate for it, and the public list price.
2579
+ *
2580
+ * @generated from rpc transcodely.v1.AppService.GetPricing
2581
+ */
2582
+ getPricing: {
2583
+ name: "GetPricing",
2584
+ I: GetPricingRequest,
2585
+ O: GetPricingResponse,
2586
+ kind: protobuf.MethodKind.Unary
2353
2587
  }
2354
2588
  }
2355
2589
  };
@@ -2474,6 +2708,21 @@ var Apps = class {
2474
2708
  opts
2475
2709
  );
2476
2710
  }
2711
+ /**
2712
+ * Get the prices an app pays: every chargeable item with its effective EUR
2713
+ * rate, whether the account has a custom rate for it (`custom`), and the
2714
+ * public list price. Omit `id` to price the API key's own app (dashboard
2715
+ * callers: the organization's first active app). Prices are fixed when a job is
2716
+ * created, so a price change applies to jobs created after it.
2717
+ */
2718
+ getPricing(id, opts) {
2719
+ return this.transport.unary(
2720
+ AppService,
2721
+ AppService.methods.getPricing,
2722
+ new GetPricingRequest(id ? { appId: id } : {}),
2723
+ opts
2724
+ );
2725
+ }
2477
2726
  };
2478
2727
  var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
2479
2728
  InvoiceStatus2[InvoiceStatus2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
@@ -20152,7 +20401,7 @@ function backoff(attempt) {
20152
20401
  }
20153
20402
 
20154
20403
  // src/version.ts
20155
- var SDK_VERSION = "0.3.13";
20404
+ var SDK_VERSION = "0.3.14";
20156
20405
  var API_VERSION = "2026-05-03";
20157
20406
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
20158
20407