@transcodely/sdk 0.3.12 → 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 +15 -0
- package/README.md +35 -1
- package/dist/index.cjs +478 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +325 -14
- package/dist/index.d.ts +325 -14
- package/dist/index.mjs +478 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.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
|
+
|
|
15
|
+
## [0.3.13](https://github.com/transcodely/transcodely-js/compare/v0.3.12...v0.3.13) (2026-10-26)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* generate_insights from existing captions (api 5.26.0) ([#82](https://github.com/transcodely/transcodely-js/issues/82)) ([a3b4a8d](https://github.com/transcodely/transcodely-js/commit/a3b4a8da9db11748db6f9b9dd34900fb18b5e2be))
|
|
21
|
+
|
|
7
22
|
## [0.3.12](https://github.com/transcodely/transcodely-js/compare/v0.3.11...v0.3.12) (2026-10-25)
|
|
8
23
|
|
|
9
24
|
|
package/README.md
CHANGED
|
@@ -282,6 +282,20 @@ Jobs carry the same data on `job.subtitleResults[i].transcriptRenditions` and
|
|
|
282
282
|
`job.insights`. The `job.insights.ready` and `job.insights.failed` webhook events
|
|
283
283
|
tell you when an insights pass finishes.
|
|
284
284
|
|
|
285
|
+
A hosted video that already has AI captions can get insights without
|
|
286
|
+
transcribing again (EUR 0.02 per video + EUR 0.005 per source minute, charged
|
|
287
|
+
only when ready):
|
|
288
|
+
|
|
289
|
+
```ts
|
|
290
|
+
// `language` is needed only when the video has several AI caption tracks.
|
|
291
|
+
const ins = await client.videos.generateInsights({ id: "vid_a1b2c3d4e5f6g7" });
|
|
292
|
+
console.log(ins.id, ins.status); // ins_..., InsightsStatus.PENDING
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
The entry also appears on `video.insights`. The `video.insights.ready` and
|
|
296
|
+
`video.insights.failed` webhook events carry the entry itself as a
|
|
297
|
+
`TranscriptInsights` in `event.data`.
|
|
298
|
+
|
|
285
299
|
## Authentication
|
|
286
300
|
|
|
287
301
|
Pass your API key in the constructor:
|
|
@@ -299,7 +313,7 @@ client.videos // upload RPCs, multipart, createFromUrl, get / list / up
|
|
|
299
313
|
client.presets // create / get / getBySlug / list / update / duplicate / archive
|
|
300
314
|
client.origins // create / get / list / update / validate / archive
|
|
301
315
|
client.ingestRules // create / get / list / update / delete / listEvents / test / replayEvent
|
|
302
|
-
client.apps // create / get / list / update / archive / enableHosting
|
|
316
|
+
client.apps // create / get / list / update / archive / enableHosting / getSpend / getPricing
|
|
303
317
|
client.apiKeys // create / get / list / revoke
|
|
304
318
|
client.organizations // create / get / list / update / checkSlug
|
|
305
319
|
client.memberships // list / get / updateRole / remove
|
|
@@ -321,6 +335,26 @@ for (const component of health.components) {
|
|
|
321
335
|
}
|
|
322
336
|
```
|
|
323
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
|
+
|
|
324
358
|
## Origins
|
|
325
359
|
|
|
326
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";
|
|
@@ -4428,6 +4677,7 @@ var WebhookEndpoint = class _WebhookEndpoint extends protobuf.Message {
|
|
|
4428
4677
|
* "job.insights.failed", "output.created", "output.ready",
|
|
4429
4678
|
* "output.failed", "output.progress", "video.uploaded", "video.ready",
|
|
4430
4679
|
* "video.failed", "video.deleted", "video.source_scheduled_for_deletion",
|
|
4680
|
+
* "video.insights.ready", "video.insights.failed",
|
|
4431
4681
|
* "app.created", "app.updated", "app.spend_limit_warning",
|
|
4432
4682
|
* "app.spend_limit_exceeded", or "*".
|
|
4433
4683
|
* Keep in sync with domain.WebhookEventTypes() ("job.updated" does not exist).
|
|
@@ -7363,6 +7613,17 @@ protobuf.proto3.util.setEnumType(TranscriptFormat, "transcodely.v1.TranscriptFor
|
|
|
7363
7613
|
{ no: 2, name: "TRANSCRIPT_FORMAT_TXT" },
|
|
7364
7614
|
{ no: 3, name: "TRANSCRIPT_FORMAT_MD" }
|
|
7365
7615
|
]);
|
|
7616
|
+
var InsightsSource = /* @__PURE__ */ ((InsightsSource2) => {
|
|
7617
|
+
InsightsSource2[InsightsSource2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
7618
|
+
InsightsSource2[InsightsSource2["JOB"] = 1] = "JOB";
|
|
7619
|
+
InsightsSource2[InsightsSource2["VIDEO"] = 2] = "VIDEO";
|
|
7620
|
+
return InsightsSource2;
|
|
7621
|
+
})(InsightsSource || {});
|
|
7622
|
+
protobuf.proto3.util.setEnumType(InsightsSource, "transcodely.v1.InsightsSource", [
|
|
7623
|
+
{ no: 0, name: "INSIGHTS_SOURCE_UNSPECIFIED" },
|
|
7624
|
+
{ no: 1, name: "INSIGHTS_SOURCE_JOB" },
|
|
7625
|
+
{ no: 2, name: "INSIGHTS_SOURCE_VIDEO" }
|
|
7626
|
+
]);
|
|
7366
7627
|
var InsightsStatus = /* @__PURE__ */ ((InsightsStatus2) => {
|
|
7367
7628
|
InsightsStatus2[InsightsStatus2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
7368
7629
|
InsightsStatus2[InsightsStatus2["PENDING"] = 1] = "PENDING";
|
|
@@ -8255,7 +8516,8 @@ var InsightsHighlight = class _InsightsHighlight extends protobuf.Message {
|
|
|
8255
8516
|
};
|
|
8256
8517
|
var TranscriptInsights = class _TranscriptInsights extends protobuf.Message {
|
|
8257
8518
|
/**
|
|
8258
|
-
* The out_… output the generate track was configured on.
|
|
8519
|
+
* The out_… output the generate track was configured on. Empty for source
|
|
8520
|
+
* "video".
|
|
8259
8521
|
*
|
|
8260
8522
|
* @generated from field: string output_id = 1;
|
|
8261
8523
|
*/
|
|
@@ -8400,6 +8662,38 @@ var TranscriptInsights = class _TranscriptInsights extends protobuf.Message {
|
|
|
8400
8662
|
* @generated from field: string hint = 23;
|
|
8401
8663
|
*/
|
|
8402
8664
|
hint = "";
|
|
8665
|
+
/**
|
|
8666
|
+
* Unique identifier of this insights entry (ins_…).
|
|
8667
|
+
*
|
|
8668
|
+
* @generated from field: string id = 24;
|
|
8669
|
+
*/
|
|
8670
|
+
id = "";
|
|
8671
|
+
/**
|
|
8672
|
+
* job | video: requested on a captions job, or on a hosted video's existing
|
|
8673
|
+
* captions with VideoService.GenerateInsights.
|
|
8674
|
+
*
|
|
8675
|
+
* @generated from field: transcodely.v1.InsightsSource source = 25;
|
|
8676
|
+
*/
|
|
8677
|
+
source = 0 /* UNSPECIFIED */;
|
|
8678
|
+
/**
|
|
8679
|
+
* The hosted video (vid_…) the insights belong to, for source "video".
|
|
8680
|
+
* Empty for source "job" (see Video.insights for a hosted video's
|
|
8681
|
+
* job-sourced insights).
|
|
8682
|
+
*
|
|
8683
|
+
* @generated from field: string video_id = 26;
|
|
8684
|
+
*/
|
|
8685
|
+
videoId = "";
|
|
8686
|
+
/**
|
|
8687
|
+
* Price of this entry in EUR, for source "video": EUR 0.02 per video plus
|
|
8688
|
+
* EUR 0.005 per minute of source, fixed when the entry was created. Charged
|
|
8689
|
+
* only when status becomes "ready"; nothing is charged when it fails. An
|
|
8690
|
+
* entry that becomes "ready" after a newer entry for the same language was
|
|
8691
|
+
* already shown on the video is not charged either, and shows 0.
|
|
8692
|
+
* Absent for source "job", whose insights fees are listed on Job.fees.
|
|
8693
|
+
*
|
|
8694
|
+
* @generated from field: optional double fee_eur = 27;
|
|
8695
|
+
*/
|
|
8696
|
+
feeEur;
|
|
8403
8697
|
constructor(data) {
|
|
8404
8698
|
super();
|
|
8405
8699
|
protobuf.proto3.util.initPartial(data, this);
|
|
@@ -8495,7 +8789,23 @@ var TranscriptInsights = class _TranscriptInsights extends protobuf.Message {
|
|
|
8495
8789
|
kind: "scalar",
|
|
8496
8790
|
T: 9
|
|
8497
8791
|
/* ScalarType.STRING */
|
|
8498
|
-
}
|
|
8792
|
+
},
|
|
8793
|
+
{
|
|
8794
|
+
no: 24,
|
|
8795
|
+
name: "id",
|
|
8796
|
+
kind: "scalar",
|
|
8797
|
+
T: 9
|
|
8798
|
+
/* ScalarType.STRING */
|
|
8799
|
+
},
|
|
8800
|
+
{ no: 25, name: "source", kind: "enum", T: protobuf.proto3.getEnumType(InsightsSource) },
|
|
8801
|
+
{
|
|
8802
|
+
no: 26,
|
|
8803
|
+
name: "video_id",
|
|
8804
|
+
kind: "scalar",
|
|
8805
|
+
T: 9
|
|
8806
|
+
/* ScalarType.STRING */
|
|
8807
|
+
},
|
|
8808
|
+
{ no: 27, name: "fee_eur", kind: "scalar", T: 1, opt: true }
|
|
8499
8809
|
]);
|
|
8500
8810
|
static fromBinary(bytes, options) {
|
|
8501
8811
|
return new _TranscriptInsights().fromBinary(bytes, options);
|
|
@@ -14306,7 +14616,8 @@ var CreateJobRequest = class _CreateJobRequest extends protobuf.Message {
|
|
|
14306
14616
|
* Optional target app. API-key callers may omit it (their key's app is used)
|
|
14307
14617
|
* or pass their own app; a different app is rejected with PermissionDenied.
|
|
14308
14618
|
* Portal/JWT callers pass it to create in a specific app in their org;
|
|
14309
|
-
* omitted selects the org's first active app
|
|
14619
|
+
* omitted selects the org's first active app, or, when input_video_id
|
|
14620
|
+
* names a video in the org, that video's app.
|
|
14310
14621
|
*
|
|
14311
14622
|
* @generated from field: optional string app_id = 21;
|
|
14312
14623
|
*/
|
|
@@ -14979,9 +15290,14 @@ var Video = class _Video extends protobuf.Message {
|
|
|
14979
15290
|
textTracks = [];
|
|
14980
15291
|
/**
|
|
14981
15292
|
* AI insights for this video, one per transcript language, from the
|
|
14982
|
-
* captions job that requested them (SubtitleTrack.insights)
|
|
14983
|
-
* from "pending" to "ready" or "failed".
|
|
14984
|
-
*
|
|
15293
|
+
* captions job that requested them (SubtitleTrack.insights) or from
|
|
15294
|
+
* GenerateInsights. Each moves from "pending" to "ready" or "failed". A
|
|
15295
|
+
* GenerateInsights entry still pending for a language that already has
|
|
15296
|
+
* ready insights is listed first, ahead of the ready entry it will replace.
|
|
15297
|
+
* If that entry fails, the ready insights stay and the failed entry is no
|
|
15298
|
+
* longer listed; video.insights.failed reports it.
|
|
15299
|
+
* Signed URLs are computed per request under the same rules as text track
|
|
15300
|
+
* URLs and are never stored.
|
|
14985
15301
|
*
|
|
14986
15302
|
* @generated from field: repeated transcodely.v1.TranscriptInsights insights = 53;
|
|
14987
15303
|
*/
|
|
@@ -15024,12 +15340,13 @@ var Video = class _Video extends protobuf.Message {
|
|
|
15024
15340
|
/**
|
|
15025
15341
|
* Everything this video has cost, in EUR: the sum of the settled totals of
|
|
15026
15342
|
* every job billed for it — the transcode that produced it plus any later
|
|
15027
|
-
* job that took it as input (retro captions, for example)
|
|
15343
|
+
* job that took it as input (retro captions, for example) — plus the fee of
|
|
15344
|
+
* every ready GenerateInsights entry (TranscriptInsights.fee_eur).
|
|
15028
15345
|
*
|
|
15029
15346
|
* This is the authoritative per-video figure and the one to display. It is
|
|
15030
|
-
* built from the same
|
|
15347
|
+
* built from the same amounts the billing ledger is written from, so it
|
|
15031
15348
|
* reconciles with the invoice; captions_cost is a breakdown inside it.
|
|
15032
|
-
* Absent while
|
|
15349
|
+
* Absent while nothing linked to the video has been billed yet.
|
|
15033
15350
|
*
|
|
15034
15351
|
* @generated from field: optional double total_cost = 52;
|
|
15035
15352
|
*/
|
|
@@ -17790,6 +18107,100 @@ var GetSeoMarkupResponse = class _GetSeoMarkupResponse extends protobuf.Message
|
|
|
17790
18107
|
return protobuf.proto3.util.equals(_GetSeoMarkupResponse, a, b);
|
|
17791
18108
|
}
|
|
17792
18109
|
};
|
|
18110
|
+
var GenerateInsightsRequest = class _GenerateInsightsRequest extends protobuf.Message {
|
|
18111
|
+
/**
|
|
18112
|
+
* Video ID.
|
|
18113
|
+
*
|
|
18114
|
+
* @generated from field: string id = 1;
|
|
18115
|
+
*/
|
|
18116
|
+
id = "";
|
|
18117
|
+
/**
|
|
18118
|
+
* ISO 639-2 language of the AI caption track to use (e.g. "eng"). Optional
|
|
18119
|
+
* when the video has exactly one AI caption track; required when it has
|
|
18120
|
+
* several (refused with code parameter_required, listing the available
|
|
18121
|
+
* languages).
|
|
18122
|
+
*
|
|
18123
|
+
* @generated from field: optional string language = 2;
|
|
18124
|
+
*/
|
|
18125
|
+
language;
|
|
18126
|
+
/**
|
|
18127
|
+
* Optional free-text guidance about the content, its audience or the tone
|
|
18128
|
+
* you want, at most 300 characters. Same meaning as InsightsOptions.hint.
|
|
18129
|
+
*
|
|
18130
|
+
* @generated from field: optional string hint = 3;
|
|
18131
|
+
*/
|
|
18132
|
+
hint;
|
|
18133
|
+
/**
|
|
18134
|
+
* Optional app the video belongs to. API-key callers may omit it (their
|
|
18135
|
+
* key's app is used) or pass their own app; a different app is rejected
|
|
18136
|
+
* with PermissionDenied. Portal/JWT callers may pass it; omitted, the app
|
|
18137
|
+
* is resolved from the video.
|
|
18138
|
+
*
|
|
18139
|
+
* @generated from field: optional string app_id = 4;
|
|
18140
|
+
*/
|
|
18141
|
+
appId;
|
|
18142
|
+
constructor(data) {
|
|
18143
|
+
super();
|
|
18144
|
+
protobuf.proto3.util.initPartial(data, this);
|
|
18145
|
+
}
|
|
18146
|
+
static runtime = protobuf.proto3;
|
|
18147
|
+
static typeName = "transcodely.v1.GenerateInsightsRequest";
|
|
18148
|
+
static fields = protobuf.proto3.util.newFieldList(() => [
|
|
18149
|
+
{
|
|
18150
|
+
no: 1,
|
|
18151
|
+
name: "id",
|
|
18152
|
+
kind: "scalar",
|
|
18153
|
+
T: 9
|
|
18154
|
+
/* ScalarType.STRING */
|
|
18155
|
+
},
|
|
18156
|
+
{ no: 2, name: "language", kind: "scalar", T: 9, opt: true },
|
|
18157
|
+
{ no: 3, name: "hint", kind: "scalar", T: 9, opt: true },
|
|
18158
|
+
{ no: 4, name: "app_id", kind: "scalar", T: 9, opt: true }
|
|
18159
|
+
]);
|
|
18160
|
+
static fromBinary(bytes, options) {
|
|
18161
|
+
return new _GenerateInsightsRequest().fromBinary(bytes, options);
|
|
18162
|
+
}
|
|
18163
|
+
static fromJson(jsonValue, options) {
|
|
18164
|
+
return new _GenerateInsightsRequest().fromJson(jsonValue, options);
|
|
18165
|
+
}
|
|
18166
|
+
static fromJsonString(jsonString, options) {
|
|
18167
|
+
return new _GenerateInsightsRequest().fromJsonString(jsonString, options);
|
|
18168
|
+
}
|
|
18169
|
+
static equals(a, b) {
|
|
18170
|
+
return protobuf.proto3.util.equals(_GenerateInsightsRequest, a, b);
|
|
18171
|
+
}
|
|
18172
|
+
};
|
|
18173
|
+
var GenerateInsightsResponse = class _GenerateInsightsResponse extends protobuf.Message {
|
|
18174
|
+
/**
|
|
18175
|
+
* The insights entry: newly created, or the one already pending for this
|
|
18176
|
+
* video and language. Status is "pending"; poll VideoService.Get (or
|
|
18177
|
+
* Watch) or subscribe to video.insights.ready / video.insights.failed.
|
|
18178
|
+
*
|
|
18179
|
+
* @generated from field: transcodely.v1.TranscriptInsights insights = 1;
|
|
18180
|
+
*/
|
|
18181
|
+
insights;
|
|
18182
|
+
constructor(data) {
|
|
18183
|
+
super();
|
|
18184
|
+
protobuf.proto3.util.initPartial(data, this);
|
|
18185
|
+
}
|
|
18186
|
+
static runtime = protobuf.proto3;
|
|
18187
|
+
static typeName = "transcodely.v1.GenerateInsightsResponse";
|
|
18188
|
+
static fields = protobuf.proto3.util.newFieldList(() => [
|
|
18189
|
+
{ no: 1, name: "insights", kind: "message", T: TranscriptInsights }
|
|
18190
|
+
]);
|
|
18191
|
+
static fromBinary(bytes, options) {
|
|
18192
|
+
return new _GenerateInsightsResponse().fromBinary(bytes, options);
|
|
18193
|
+
}
|
|
18194
|
+
static fromJson(jsonValue, options) {
|
|
18195
|
+
return new _GenerateInsightsResponse().fromJson(jsonValue, options);
|
|
18196
|
+
}
|
|
18197
|
+
static fromJsonString(jsonString, options) {
|
|
18198
|
+
return new _GenerateInsightsResponse().fromJsonString(jsonString, options);
|
|
18199
|
+
}
|
|
18200
|
+
static equals(a, b) {
|
|
18201
|
+
return protobuf.proto3.util.equals(_GenerateInsightsResponse, a, b);
|
|
18202
|
+
}
|
|
18203
|
+
};
|
|
17793
18204
|
|
|
17794
18205
|
// src/webhooks/types.ts
|
|
17795
18206
|
var WEBHOOK_EVENT_TYPES = [
|
|
@@ -17809,6 +18220,8 @@ var WEBHOOK_EVENT_TYPES = [
|
|
|
17809
18220
|
"video.failed",
|
|
17810
18221
|
"video.deleted",
|
|
17811
18222
|
"video.source_scheduled_for_deletion",
|
|
18223
|
+
"video.insights.ready",
|
|
18224
|
+
"video.insights.failed",
|
|
17812
18225
|
"app.created",
|
|
17813
18226
|
"app.updated",
|
|
17814
18227
|
"app.spend_limit_warning",
|
|
@@ -17831,8 +18244,14 @@ var NOTIFICATION_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
17831
18244
|
"app.spend_limit_warning",
|
|
17832
18245
|
"app.spend_limit_exceeded"
|
|
17833
18246
|
]);
|
|
18247
|
+
var EXACT_TYPE_DECODERS = /* @__PURE__ */ new Map([
|
|
18248
|
+
["video.insights.ready", (json) => fromJson(json, TranscriptInsights)],
|
|
18249
|
+
["video.insights.failed", (json) => fromJson(json, TranscriptInsights)]
|
|
18250
|
+
]);
|
|
17834
18251
|
function decoderForType(type) {
|
|
17835
18252
|
if (NOTIFICATION_EVENT_TYPES.has(type)) return void 0;
|
|
18253
|
+
const exact = EXACT_TYPE_DECODERS.get(type);
|
|
18254
|
+
if (exact) return exact;
|
|
17836
18255
|
for (const entry of RESOURCE_DECODERS) {
|
|
17837
18256
|
if (type.startsWith(entry.prefix)) return entry.decode;
|
|
17838
18257
|
}
|
|
@@ -19982,7 +20401,7 @@ function backoff(attempt) {
|
|
|
19982
20401
|
}
|
|
19983
20402
|
|
|
19984
20403
|
// src/version.ts
|
|
19985
|
-
var SDK_VERSION = "0.3.
|
|
20404
|
+
var SDK_VERSION = "0.3.14";
|
|
19986
20405
|
var API_VERSION = "2026-05-03";
|
|
19987
20406
|
var DEFAULT_BASE_URL = "https://api.transcodely.com";
|
|
19988
20407
|
|
|
@@ -23791,6 +24210,31 @@ var VideoService = {
|
|
|
23791
24210
|
I: GetSeoMarkupRequest,
|
|
23792
24211
|
O: GetSeoMarkupResponse,
|
|
23793
24212
|
kind: protobuf.MethodKind.Unary
|
|
24213
|
+
},
|
|
24214
|
+
/**
|
|
24215
|
+
* Generate AI insights (title suggestions, summary, key points, chapters,
|
|
24216
|
+
* questions, key terms, highlights, topics) from a hosted video's existing
|
|
24217
|
+
* AI captions, without transcribing again. Billed EUR 0.02 per video plus
|
|
24218
|
+
* EUR 0.005 per minute of source, charged only when the insights become
|
|
24219
|
+
* ready. Returns the entry in "pending"; it also appears on Video.insights,
|
|
24220
|
+
* and video.insights.ready or video.insights.failed fires when it finishes.
|
|
24221
|
+
*
|
|
24222
|
+
* While an entry for the same video and language is pending, the call
|
|
24223
|
+
* returns that entry and bills nothing new. Once it is ready or failed, a
|
|
24224
|
+
* new call generates (and bills) a new entry; it replaces the ready one
|
|
24225
|
+
* only when it becomes ready itself.
|
|
24226
|
+
*
|
|
24227
|
+
* Refused with failed_precondition and code captions_required when the
|
|
24228
|
+
* video has no AI captions, and insights_transcript_unavailable when the
|
|
24229
|
+
* caption track has no transcript.
|
|
24230
|
+
*
|
|
24231
|
+
* @generated from rpc transcodely.v1.VideoService.GenerateInsights
|
|
24232
|
+
*/
|
|
24233
|
+
generateInsights: {
|
|
24234
|
+
name: "GenerateInsights",
|
|
24235
|
+
I: GenerateInsightsRequest,
|
|
24236
|
+
O: GenerateInsightsResponse,
|
|
24237
|
+
kind: protobuf.MethodKind.Unary
|
|
23794
24238
|
}
|
|
23795
24239
|
}
|
|
23796
24240
|
};
|
|
@@ -23963,6 +24407,29 @@ var Videos = class {
|
|
|
23963
24407
|
opts
|
|
23964
24408
|
);
|
|
23965
24409
|
}
|
|
24410
|
+
/**
|
|
24411
|
+
* Generate AI insights (title suggestions, summary, key points, chapters,
|
|
24412
|
+
* questions, key terms, highlights, topics) from a hosted video's existing
|
|
24413
|
+
* AI captions, without transcribing again. Returns the TranscriptInsights
|
|
24414
|
+
* entry in "pending"; it also appears on `video.insights`, and
|
|
24415
|
+
* `video.insights.ready` or `video.insights.failed` fires when it finishes.
|
|
24416
|
+
* Billed EUR 0.02 per video plus EUR 0.005 per minute of source, charged
|
|
24417
|
+
* only when the insights become ready.
|
|
24418
|
+
*
|
|
24419
|
+
* While an entry for the same video and language is pending, the call
|
|
24420
|
+
* returns that entry and bills nothing new. Pass `language` when the video
|
|
24421
|
+
* has several AI caption tracks. A video without AI captions is refused with
|
|
24422
|
+
* failed_precondition (code captions_required).
|
|
24423
|
+
*/
|
|
24424
|
+
async generateInsights(req, opts) {
|
|
24425
|
+
const res = await this.transport.unary(
|
|
24426
|
+
VideoService,
|
|
24427
|
+
VideoService.methods.generateInsights,
|
|
24428
|
+
new GenerateInsightsRequest(req),
|
|
24429
|
+
opts
|
|
24430
|
+
);
|
|
24431
|
+
return res.insights;
|
|
24432
|
+
}
|
|
23966
24433
|
};
|
|
23967
24434
|
|
|
23968
24435
|
// src/resources/uploads.ts
|
|
@@ -25347,6 +25814,7 @@ exports.HDRMode = HDRMode;
|
|
|
25347
25814
|
exports.HLSPlaylistType = HLSPlaylistType;
|
|
25348
25815
|
exports.HLSSegmentFormat = HLSSegmentFormat;
|
|
25349
25816
|
exports.HealthStatus = HealthStatus;
|
|
25817
|
+
exports.InsightsSource = InsightsSource;
|
|
25350
25818
|
exports.InsightsStatus = InsightsStatus;
|
|
25351
25819
|
exports.InvalidRequestError = InvalidRequestError;
|
|
25352
25820
|
exports.InvoiceLineType = InvoiceLineType;
|