@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/dist/index.mjs CHANGED
@@ -2226,6 +2226,228 @@ var GetSpendResponse = class _GetSpendResponse extends Message {
2226
2226
  return proto3.util.equals(_GetSpendResponse, a, b);
2227
2227
  }
2228
2228
  };
2229
+ var GetPricingRequest = class _GetPricingRequest extends Message {
2230
+ /**
2231
+ * App ID. API-key callers may omit it or pass their own app; a different app
2232
+ * is rejected with PermissionDenied. Dashboard callers pass it to pick an app
2233
+ * in their organization; omitted selects the organization's first active
2234
+ * app in list order (the same default every app-scoped read uses).
2235
+ *
2236
+ * @generated from field: optional string app_id = 1;
2237
+ */
2238
+ appId;
2239
+ constructor(data) {
2240
+ super();
2241
+ proto3.util.initPartial(data, this);
2242
+ }
2243
+ static runtime = proto3;
2244
+ static typeName = "transcodely.v1.GetPricingRequest";
2245
+ static fields = proto3.util.newFieldList(() => [
2246
+ { no: 1, name: "app_id", kind: "scalar", T: 9, opt: true }
2247
+ ]);
2248
+ static fromBinary(bytes, options) {
2249
+ return new _GetPricingRequest().fromBinary(bytes, options);
2250
+ }
2251
+ static fromJson(jsonValue, options) {
2252
+ return new _GetPricingRequest().fromJson(jsonValue, options);
2253
+ }
2254
+ static fromJsonString(jsonString, options) {
2255
+ return new _GetPricingRequest().fromJsonString(jsonString, options);
2256
+ }
2257
+ static equals(a, b) {
2258
+ return proto3.util.equals(_GetPricingRequest, a, b);
2259
+ }
2260
+ };
2261
+ var PricingEntry = class _PricingEntry extends Message {
2262
+ /**
2263
+ * Charge class: codec, resolution, quality, feature, fee, storage, egress.
2264
+ * Other values may appear as new charges are introduced.
2265
+ *
2266
+ * @generated from field: string rule_type = 1;
2267
+ */
2268
+ ruleType = "";
2269
+ /**
2270
+ * Charge within its class, e.g. h264, 1080p, captions, processing_m.
2271
+ *
2272
+ * @generated from field: string rule_key = 2;
2273
+ */
2274
+ ruleKey = "";
2275
+ /**
2276
+ * Human label, e.g. "H.264".
2277
+ *
2278
+ * @generated from field: string label = 3;
2279
+ */
2280
+ label = "";
2281
+ /**
2282
+ * Human label of the class, e.g. "Encoding".
2283
+ *
2284
+ * @generated from field: string group_label = 4;
2285
+ */
2286
+ groupLabel = "";
2287
+ /**
2288
+ * What base_price is per: eur_per_output_minute, eur_per_source_minute,
2289
+ * eur_per_video, eur_per_job, eur_per_gb_month, eur_per_gb, or eur_per_unit
2290
+ * for a charge whose unit is not known yet. Empty for a charge that has only
2291
+ * a multiplier.
2292
+ *
2293
+ * @generated from field: string unit = 5;
2294
+ */
2295
+ unit = "";
2296
+ /**
2297
+ * The price per unit, in EUR, this app pays. Absent for a charge that has
2298
+ * only a multiplier.
2299
+ *
2300
+ * @generated from field: optional double base_price = 6;
2301
+ */
2302
+ basePrice;
2303
+ /**
2304
+ * The multiplier this app pays. Absent for a charge that has only a per-unit
2305
+ * price.
2306
+ *
2307
+ * @generated from field: optional double multiplier = 7;
2308
+ */
2309
+ multiplier;
2310
+ /**
2311
+ * True when this account has a custom rate for this charge, so base_price or
2312
+ * multiplier differs from the list price.
2313
+ *
2314
+ * @generated from field: bool custom = 8;
2315
+ */
2316
+ custom = false;
2317
+ /**
2318
+ * The public list price per unit, in EUR. Absent when base_price is.
2319
+ *
2320
+ * @generated from field: optional double list_base_price = 9;
2321
+ */
2322
+ listBasePrice;
2323
+ /**
2324
+ * The public list multiplier. Absent when multiplier is.
2325
+ *
2326
+ * @generated from field: optional double list_multiplier = 10;
2327
+ */
2328
+ listMultiplier;
2329
+ constructor(data) {
2330
+ super();
2331
+ proto3.util.initPartial(data, this);
2332
+ }
2333
+ static runtime = proto3;
2334
+ static typeName = "transcodely.v1.PricingEntry";
2335
+ static fields = proto3.util.newFieldList(() => [
2336
+ {
2337
+ no: 1,
2338
+ name: "rule_type",
2339
+ kind: "scalar",
2340
+ T: 9
2341
+ /* ScalarType.STRING */
2342
+ },
2343
+ {
2344
+ no: 2,
2345
+ name: "rule_key",
2346
+ kind: "scalar",
2347
+ T: 9
2348
+ /* ScalarType.STRING */
2349
+ },
2350
+ {
2351
+ no: 3,
2352
+ name: "label",
2353
+ kind: "scalar",
2354
+ T: 9
2355
+ /* ScalarType.STRING */
2356
+ },
2357
+ {
2358
+ no: 4,
2359
+ name: "group_label",
2360
+ kind: "scalar",
2361
+ T: 9
2362
+ /* ScalarType.STRING */
2363
+ },
2364
+ {
2365
+ no: 5,
2366
+ name: "unit",
2367
+ kind: "scalar",
2368
+ T: 9
2369
+ /* ScalarType.STRING */
2370
+ },
2371
+ { no: 6, name: "base_price", kind: "scalar", T: 1, opt: true },
2372
+ { no: 7, name: "multiplier", kind: "scalar", T: 1, opt: true },
2373
+ {
2374
+ no: 8,
2375
+ name: "custom",
2376
+ kind: "scalar",
2377
+ T: 8
2378
+ /* ScalarType.BOOL */
2379
+ },
2380
+ { no: 9, name: "list_base_price", kind: "scalar", T: 1, opt: true },
2381
+ { no: 10, name: "list_multiplier", kind: "scalar", T: 1, opt: true }
2382
+ ]);
2383
+ static fromBinary(bytes, options) {
2384
+ return new _PricingEntry().fromBinary(bytes, options);
2385
+ }
2386
+ static fromJson(jsonValue, options) {
2387
+ return new _PricingEntry().fromJson(jsonValue, options);
2388
+ }
2389
+ static fromJsonString(jsonString, options) {
2390
+ return new _PricingEntry().fromJsonString(jsonString, options);
2391
+ }
2392
+ static equals(a, b) {
2393
+ return proto3.util.equals(_PricingEntry, a, b);
2394
+ }
2395
+ };
2396
+ var GetPricingResponse = class _GetPricingResponse extends Message {
2397
+ /**
2398
+ * The app these prices are for.
2399
+ *
2400
+ * @generated from field: string app_id = 1;
2401
+ */
2402
+ appId = "";
2403
+ /**
2404
+ * Currency of every price. Always "EUR".
2405
+ *
2406
+ * @generated from field: string currency = 2;
2407
+ */
2408
+ currency = "";
2409
+ /**
2410
+ * Every chargeable item, grouped by class in display order.
2411
+ *
2412
+ * @generated from field: repeated transcodely.v1.PricingEntry entries = 3;
2413
+ */
2414
+ entries = [];
2415
+ constructor(data) {
2416
+ super();
2417
+ proto3.util.initPartial(data, this);
2418
+ }
2419
+ static runtime = proto3;
2420
+ static typeName = "transcodely.v1.GetPricingResponse";
2421
+ static fields = proto3.util.newFieldList(() => [
2422
+ {
2423
+ no: 1,
2424
+ name: "app_id",
2425
+ kind: "scalar",
2426
+ T: 9
2427
+ /* ScalarType.STRING */
2428
+ },
2429
+ {
2430
+ no: 2,
2431
+ name: "currency",
2432
+ kind: "scalar",
2433
+ T: 9
2434
+ /* ScalarType.STRING */
2435
+ },
2436
+ { no: 3, name: "entries", kind: "message", T: PricingEntry, repeated: true }
2437
+ ]);
2438
+ static fromBinary(bytes, options) {
2439
+ return new _GetPricingResponse().fromBinary(bytes, options);
2440
+ }
2441
+ static fromJson(jsonValue, options) {
2442
+ return new _GetPricingResponse().fromJson(jsonValue, options);
2443
+ }
2444
+ static fromJsonString(jsonString, options) {
2445
+ return new _GetPricingResponse().fromJsonString(jsonString, options);
2446
+ }
2447
+ static equals(a, b) {
2448
+ return proto3.util.equals(_GetPricingResponse, a, b);
2449
+ }
2450
+ };
2229
2451
  var AppService = {
2230
2452
  typeName: "transcodely.v1.AppService",
2231
2453
  methods: {
@@ -2348,6 +2570,18 @@ var AppService = {
2348
2570
  I: GetSpendRequest,
2349
2571
  O: GetSpendResponse,
2350
2572
  kind: MethodKind.Unary
2573
+ },
2574
+ /**
2575
+ * Get the prices an app pays: every chargeable item with its effective rate,
2576
+ * whether the account has a custom rate for it, and the public list price.
2577
+ *
2578
+ * @generated from rpc transcodely.v1.AppService.GetPricing
2579
+ */
2580
+ getPricing: {
2581
+ name: "GetPricing",
2582
+ I: GetPricingRequest,
2583
+ O: GetPricingResponse,
2584
+ kind: MethodKind.Unary
2351
2585
  }
2352
2586
  }
2353
2587
  };
@@ -2472,6 +2706,21 @@ var Apps = class {
2472
2706
  opts
2473
2707
  );
2474
2708
  }
2709
+ /**
2710
+ * Get the prices an app pays: every chargeable item with its effective EUR
2711
+ * rate, whether the account has a custom rate for it (`custom`), and the
2712
+ * public list price. Omit `id` to price the API key's own app (dashboard
2713
+ * callers: the organization's first active app). Prices are fixed when a job is
2714
+ * created, so a price change applies to jobs created after it.
2715
+ */
2716
+ getPricing(id, opts) {
2717
+ return this.transport.unary(
2718
+ AppService,
2719
+ AppService.methods.getPricing,
2720
+ new GetPricingRequest(id ? { appId: id } : {}),
2721
+ opts
2722
+ );
2723
+ }
2475
2724
  };
2476
2725
  var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
2477
2726
  InvoiceStatus2[InvoiceStatus2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
@@ -4426,6 +4675,7 @@ var WebhookEndpoint = class _WebhookEndpoint extends Message {
4426
4675
  * "job.insights.failed", "output.created", "output.ready",
4427
4676
  * "output.failed", "output.progress", "video.uploaded", "video.ready",
4428
4677
  * "video.failed", "video.deleted", "video.source_scheduled_for_deletion",
4678
+ * "video.insights.ready", "video.insights.failed",
4429
4679
  * "app.created", "app.updated", "app.spend_limit_warning",
4430
4680
  * "app.spend_limit_exceeded", or "*".
4431
4681
  * Keep in sync with domain.WebhookEventTypes() ("job.updated" does not exist).
@@ -7361,6 +7611,17 @@ proto3.util.setEnumType(TranscriptFormat, "transcodely.v1.TranscriptFormat", [
7361
7611
  { no: 2, name: "TRANSCRIPT_FORMAT_TXT" },
7362
7612
  { no: 3, name: "TRANSCRIPT_FORMAT_MD" }
7363
7613
  ]);
7614
+ var InsightsSource = /* @__PURE__ */ ((InsightsSource2) => {
7615
+ InsightsSource2[InsightsSource2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
7616
+ InsightsSource2[InsightsSource2["JOB"] = 1] = "JOB";
7617
+ InsightsSource2[InsightsSource2["VIDEO"] = 2] = "VIDEO";
7618
+ return InsightsSource2;
7619
+ })(InsightsSource || {});
7620
+ proto3.util.setEnumType(InsightsSource, "transcodely.v1.InsightsSource", [
7621
+ { no: 0, name: "INSIGHTS_SOURCE_UNSPECIFIED" },
7622
+ { no: 1, name: "INSIGHTS_SOURCE_JOB" },
7623
+ { no: 2, name: "INSIGHTS_SOURCE_VIDEO" }
7624
+ ]);
7364
7625
  var InsightsStatus = /* @__PURE__ */ ((InsightsStatus2) => {
7365
7626
  InsightsStatus2[InsightsStatus2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
7366
7627
  InsightsStatus2[InsightsStatus2["PENDING"] = 1] = "PENDING";
@@ -8253,7 +8514,8 @@ var InsightsHighlight = class _InsightsHighlight extends Message {
8253
8514
  };
8254
8515
  var TranscriptInsights = class _TranscriptInsights extends Message {
8255
8516
  /**
8256
- * The out_… output the generate track was configured on.
8517
+ * The out_… output the generate track was configured on. Empty for source
8518
+ * "video".
8257
8519
  *
8258
8520
  * @generated from field: string output_id = 1;
8259
8521
  */
@@ -8398,6 +8660,38 @@ var TranscriptInsights = class _TranscriptInsights extends Message {
8398
8660
  * @generated from field: string hint = 23;
8399
8661
  */
8400
8662
  hint = "";
8663
+ /**
8664
+ * Unique identifier of this insights entry (ins_…).
8665
+ *
8666
+ * @generated from field: string id = 24;
8667
+ */
8668
+ id = "";
8669
+ /**
8670
+ * job | video: requested on a captions job, or on a hosted video's existing
8671
+ * captions with VideoService.GenerateInsights.
8672
+ *
8673
+ * @generated from field: transcodely.v1.InsightsSource source = 25;
8674
+ */
8675
+ source = 0 /* UNSPECIFIED */;
8676
+ /**
8677
+ * The hosted video (vid_…) the insights belong to, for source "video".
8678
+ * Empty for source "job" (see Video.insights for a hosted video's
8679
+ * job-sourced insights).
8680
+ *
8681
+ * @generated from field: string video_id = 26;
8682
+ */
8683
+ videoId = "";
8684
+ /**
8685
+ * Price of this entry in EUR, for source "video": EUR 0.02 per video plus
8686
+ * EUR 0.005 per minute of source, fixed when the entry was created. Charged
8687
+ * only when status becomes "ready"; nothing is charged when it fails. An
8688
+ * entry that becomes "ready" after a newer entry for the same language was
8689
+ * already shown on the video is not charged either, and shows 0.
8690
+ * Absent for source "job", whose insights fees are listed on Job.fees.
8691
+ *
8692
+ * @generated from field: optional double fee_eur = 27;
8693
+ */
8694
+ feeEur;
8401
8695
  constructor(data) {
8402
8696
  super();
8403
8697
  proto3.util.initPartial(data, this);
@@ -8493,7 +8787,23 @@ var TranscriptInsights = class _TranscriptInsights extends Message {
8493
8787
  kind: "scalar",
8494
8788
  T: 9
8495
8789
  /* ScalarType.STRING */
8496
- }
8790
+ },
8791
+ {
8792
+ no: 24,
8793
+ name: "id",
8794
+ kind: "scalar",
8795
+ T: 9
8796
+ /* ScalarType.STRING */
8797
+ },
8798
+ { no: 25, name: "source", kind: "enum", T: proto3.getEnumType(InsightsSource) },
8799
+ {
8800
+ no: 26,
8801
+ name: "video_id",
8802
+ kind: "scalar",
8803
+ T: 9
8804
+ /* ScalarType.STRING */
8805
+ },
8806
+ { no: 27, name: "fee_eur", kind: "scalar", T: 1, opt: true }
8497
8807
  ]);
8498
8808
  static fromBinary(bytes, options) {
8499
8809
  return new _TranscriptInsights().fromBinary(bytes, options);
@@ -14304,7 +14614,8 @@ var CreateJobRequest = class _CreateJobRequest extends Message {
14304
14614
  * Optional target app. API-key callers may omit it (their key's app is used)
14305
14615
  * or pass their own app; a different app is rejected with PermissionDenied.
14306
14616
  * Portal/JWT callers pass it to create in a specific app in their org;
14307
- * omitted selects the org's first active app.
14617
+ * omitted selects the org's first active app, or, when input_video_id
14618
+ * names a video in the org, that video's app.
14308
14619
  *
14309
14620
  * @generated from field: optional string app_id = 21;
14310
14621
  */
@@ -14977,9 +15288,14 @@ var Video = class _Video extends Message {
14977
15288
  textTracks = [];
14978
15289
  /**
14979
15290
  * AI insights for this video, one per transcript language, from the
14980
- * captions job that requested them (SubtitleTrack.insights). Each moves
14981
- * from "pending" to "ready" or "failed". Signed URLs are computed per
14982
- * request under the same rules as text track URLs and are never stored.
15291
+ * captions job that requested them (SubtitleTrack.insights) or from
15292
+ * GenerateInsights. Each moves from "pending" to "ready" or "failed". A
15293
+ * GenerateInsights entry still pending for a language that already has
15294
+ * ready insights is listed first, ahead of the ready entry it will replace.
15295
+ * If that entry fails, the ready insights stay and the failed entry is no
15296
+ * longer listed; video.insights.failed reports it.
15297
+ * Signed URLs are computed per request under the same rules as text track
15298
+ * URLs and are never stored.
14983
15299
  *
14984
15300
  * @generated from field: repeated transcodely.v1.TranscriptInsights insights = 53;
14985
15301
  */
@@ -15022,12 +15338,13 @@ var Video = class _Video extends Message {
15022
15338
  /**
15023
15339
  * Everything this video has cost, in EUR: the sum of the settled totals of
15024
15340
  * every job billed for it — the transcode that produced it plus any later
15025
- * job that took it as input (retro captions, for example).
15341
+ * job that took it as input (retro captions, for example) — plus the fee of
15342
+ * every ready GenerateInsights entry (TranscriptInsights.fee_eur).
15026
15343
  *
15027
15344
  * This is the authoritative per-video figure and the one to display. It is
15028
- * built from the same job totals the billing ledger is written from, so it
15345
+ * built from the same amounts the billing ledger is written from, so it
15029
15346
  * reconciles with the invoice; captions_cost is a breakdown inside it.
15030
- * Absent while no linked job has settled yet.
15347
+ * Absent while nothing linked to the video has been billed yet.
15031
15348
  *
15032
15349
  * @generated from field: optional double total_cost = 52;
15033
15350
  */
@@ -17788,6 +18105,100 @@ var GetSeoMarkupResponse = class _GetSeoMarkupResponse extends Message {
17788
18105
  return proto3.util.equals(_GetSeoMarkupResponse, a, b);
17789
18106
  }
17790
18107
  };
18108
+ var GenerateInsightsRequest = class _GenerateInsightsRequest extends Message {
18109
+ /**
18110
+ * Video ID.
18111
+ *
18112
+ * @generated from field: string id = 1;
18113
+ */
18114
+ id = "";
18115
+ /**
18116
+ * ISO 639-2 language of the AI caption track to use (e.g. "eng"). Optional
18117
+ * when the video has exactly one AI caption track; required when it has
18118
+ * several (refused with code parameter_required, listing the available
18119
+ * languages).
18120
+ *
18121
+ * @generated from field: optional string language = 2;
18122
+ */
18123
+ language;
18124
+ /**
18125
+ * Optional free-text guidance about the content, its audience or the tone
18126
+ * you want, at most 300 characters. Same meaning as InsightsOptions.hint.
18127
+ *
18128
+ * @generated from field: optional string hint = 3;
18129
+ */
18130
+ hint;
18131
+ /**
18132
+ * Optional app the video belongs to. API-key callers may omit it (their
18133
+ * key's app is used) or pass their own app; a different app is rejected
18134
+ * with PermissionDenied. Portal/JWT callers may pass it; omitted, the app
18135
+ * is resolved from the video.
18136
+ *
18137
+ * @generated from field: optional string app_id = 4;
18138
+ */
18139
+ appId;
18140
+ constructor(data) {
18141
+ super();
18142
+ proto3.util.initPartial(data, this);
18143
+ }
18144
+ static runtime = proto3;
18145
+ static typeName = "transcodely.v1.GenerateInsightsRequest";
18146
+ static fields = proto3.util.newFieldList(() => [
18147
+ {
18148
+ no: 1,
18149
+ name: "id",
18150
+ kind: "scalar",
18151
+ T: 9
18152
+ /* ScalarType.STRING */
18153
+ },
18154
+ { no: 2, name: "language", kind: "scalar", T: 9, opt: true },
18155
+ { no: 3, name: "hint", kind: "scalar", T: 9, opt: true },
18156
+ { no: 4, name: "app_id", kind: "scalar", T: 9, opt: true }
18157
+ ]);
18158
+ static fromBinary(bytes, options) {
18159
+ return new _GenerateInsightsRequest().fromBinary(bytes, options);
18160
+ }
18161
+ static fromJson(jsonValue, options) {
18162
+ return new _GenerateInsightsRequest().fromJson(jsonValue, options);
18163
+ }
18164
+ static fromJsonString(jsonString, options) {
18165
+ return new _GenerateInsightsRequest().fromJsonString(jsonString, options);
18166
+ }
18167
+ static equals(a, b) {
18168
+ return proto3.util.equals(_GenerateInsightsRequest, a, b);
18169
+ }
18170
+ };
18171
+ var GenerateInsightsResponse = class _GenerateInsightsResponse extends Message {
18172
+ /**
18173
+ * The insights entry: newly created, or the one already pending for this
18174
+ * video and language. Status is "pending"; poll VideoService.Get (or
18175
+ * Watch) or subscribe to video.insights.ready / video.insights.failed.
18176
+ *
18177
+ * @generated from field: transcodely.v1.TranscriptInsights insights = 1;
18178
+ */
18179
+ insights;
18180
+ constructor(data) {
18181
+ super();
18182
+ proto3.util.initPartial(data, this);
18183
+ }
18184
+ static runtime = proto3;
18185
+ static typeName = "transcodely.v1.GenerateInsightsResponse";
18186
+ static fields = proto3.util.newFieldList(() => [
18187
+ { no: 1, name: "insights", kind: "message", T: TranscriptInsights }
18188
+ ]);
18189
+ static fromBinary(bytes, options) {
18190
+ return new _GenerateInsightsResponse().fromBinary(bytes, options);
18191
+ }
18192
+ static fromJson(jsonValue, options) {
18193
+ return new _GenerateInsightsResponse().fromJson(jsonValue, options);
18194
+ }
18195
+ static fromJsonString(jsonString, options) {
18196
+ return new _GenerateInsightsResponse().fromJsonString(jsonString, options);
18197
+ }
18198
+ static equals(a, b) {
18199
+ return proto3.util.equals(_GenerateInsightsResponse, a, b);
18200
+ }
18201
+ };
17791
18202
 
17792
18203
  // src/webhooks/types.ts
17793
18204
  var WEBHOOK_EVENT_TYPES = [
@@ -17807,6 +18218,8 @@ var WEBHOOK_EVENT_TYPES = [
17807
18218
  "video.failed",
17808
18219
  "video.deleted",
17809
18220
  "video.source_scheduled_for_deletion",
18221
+ "video.insights.ready",
18222
+ "video.insights.failed",
17810
18223
  "app.created",
17811
18224
  "app.updated",
17812
18225
  "app.spend_limit_warning",
@@ -17829,8 +18242,14 @@ var NOTIFICATION_EVENT_TYPES = /* @__PURE__ */ new Set([
17829
18242
  "app.spend_limit_warning",
17830
18243
  "app.spend_limit_exceeded"
17831
18244
  ]);
18245
+ var EXACT_TYPE_DECODERS = /* @__PURE__ */ new Map([
18246
+ ["video.insights.ready", (json) => fromJson(json, TranscriptInsights)],
18247
+ ["video.insights.failed", (json) => fromJson(json, TranscriptInsights)]
18248
+ ]);
17832
18249
  function decoderForType(type) {
17833
18250
  if (NOTIFICATION_EVENT_TYPES.has(type)) return void 0;
18251
+ const exact = EXACT_TYPE_DECODERS.get(type);
18252
+ if (exact) return exact;
17834
18253
  for (const entry of RESOURCE_DECODERS) {
17835
18254
  if (type.startsWith(entry.prefix)) return entry.decode;
17836
18255
  }
@@ -19980,7 +20399,7 @@ function backoff(attempt) {
19980
20399
  }
19981
20400
 
19982
20401
  // src/version.ts
19983
- var SDK_VERSION = "0.3.12";
20402
+ var SDK_VERSION = "0.3.14";
19984
20403
  var API_VERSION = "2026-05-03";
19985
20404
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
19986
20405
 
@@ -23789,6 +24208,31 @@ var VideoService = {
23789
24208
  I: GetSeoMarkupRequest,
23790
24209
  O: GetSeoMarkupResponse,
23791
24210
  kind: MethodKind.Unary
24211
+ },
24212
+ /**
24213
+ * Generate AI insights (title suggestions, summary, key points, chapters,
24214
+ * questions, key terms, highlights, topics) from a hosted video's existing
24215
+ * AI captions, without transcribing again. Billed EUR 0.02 per video plus
24216
+ * EUR 0.005 per minute of source, charged only when the insights become
24217
+ * ready. Returns the entry in "pending"; it also appears on Video.insights,
24218
+ * and video.insights.ready or video.insights.failed fires when it finishes.
24219
+ *
24220
+ * While an entry for the same video and language is pending, the call
24221
+ * returns that entry and bills nothing new. Once it is ready or failed, a
24222
+ * new call generates (and bills) a new entry; it replaces the ready one
24223
+ * only when it becomes ready itself.
24224
+ *
24225
+ * Refused with failed_precondition and code captions_required when the
24226
+ * video has no AI captions, and insights_transcript_unavailable when the
24227
+ * caption track has no transcript.
24228
+ *
24229
+ * @generated from rpc transcodely.v1.VideoService.GenerateInsights
24230
+ */
24231
+ generateInsights: {
24232
+ name: "GenerateInsights",
24233
+ I: GenerateInsightsRequest,
24234
+ O: GenerateInsightsResponse,
24235
+ kind: MethodKind.Unary
23792
24236
  }
23793
24237
  }
23794
24238
  };
@@ -23961,6 +24405,29 @@ var Videos = class {
23961
24405
  opts
23962
24406
  );
23963
24407
  }
24408
+ /**
24409
+ * Generate AI insights (title suggestions, summary, key points, chapters,
24410
+ * questions, key terms, highlights, topics) from a hosted video's existing
24411
+ * AI captions, without transcribing again. Returns the TranscriptInsights
24412
+ * entry in "pending"; it also appears on `video.insights`, and
24413
+ * `video.insights.ready` or `video.insights.failed` fires when it finishes.
24414
+ * Billed EUR 0.02 per video plus EUR 0.005 per minute of source, charged
24415
+ * only when the insights become ready.
24416
+ *
24417
+ * While an entry for the same video and language is pending, the call
24418
+ * returns that entry and bills nothing new. Pass `language` when the video
24419
+ * has several AI caption tracks. A video without AI captions is refused with
24420
+ * failed_precondition (code captions_required).
24421
+ */
24422
+ async generateInsights(req, opts) {
24423
+ const res = await this.transport.unary(
24424
+ VideoService,
24425
+ VideoService.methods.generateInsights,
24426
+ new GenerateInsightsRequest(req),
24427
+ opts
24428
+ );
24429
+ return res.insights;
24430
+ }
23964
24431
  };
23965
24432
 
23966
24433
  // src/resources/uploads.ts
@@ -25314,6 +25781,6 @@ var Transcodely = class {
25314
25781
  Transcodely.API_VERSION = API_VERSION;
25315
25782
  Transcodely.SDK_VERSION = SDK_VERSION;
25316
25783
 
25317
- export { APIConnectionError, APIError, API_VERSION, AppStatus, AudioCodec, AuthenticationError, BillingStanding, BillingTreatment, BitrateMode, ConflictError, Container, ContentAwareMode, ContentType, DEFAULT_BASE_URL, DEFAULT_CONCURRENCY, DEFAULT_MAX_RETRIES, DEFAULT_PART_SIZE, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_TOLERANCE_SECONDS, DRMSystem, DeliveryFormat, DunningStage, EVENT_ID_HEADER, EncryptionScheme, ExposureThresholdSource, GOPAlignmentMode, HDRFormat, HDRMode, HLSPlaylistType, HLSSegmentFormat, HealthStatus, InsightsStatus, InvalidRequestError, InvoiceLineType, InvoiceStatus, JobCostLineType, JobPriority, JobStatus, MAX_PARTS, MAX_UPLOAD_SIZE_BYTES, MIN_PART_SIZE, MembershipRole, MembershipStatus, NotFoundError, OrganizationStatus, OriginPermission, OriginProvider, OriginStatus, OutputFormat, OutputStatus, Page, PaymentMethodState, PermissionError, PreconditionError, QualityTier, R2Jurisdiction, RateLimitError, Resolution, SDK_VERSION, SIGNATURE_HEADER, StorageEventSource, StorageEventStatus, SubtitleFormat, SubtitleOperation, ThumbnailFormat, ThumbnailMode, ToneMapping, Transcodely, TranscodelyError, TranscriptFormat, TranscriptStyle, TrustTier, UploadAbortedError, UploadError, Uploads, UserApprovalStatus, UserStatus, VideoCodec, VideoStatus, VideoVisibility, WEBHOOK_EVENT_TYPES, WatchEventType, WatermarkAnchor, WebhookError, WebhookPayloadError, WebhookSignatureError, WebhookTimestampError, Webhooks, calculatePartSize, calculateTotalParts, constructEvent, contentTypeForFilename, isEventType, isKnownEvent, toWireJson, verifySignature };
25784
+ export { APIConnectionError, APIError, API_VERSION, AppStatus, AudioCodec, AuthenticationError, BillingStanding, BillingTreatment, BitrateMode, ConflictError, Container, ContentAwareMode, ContentType, DEFAULT_BASE_URL, DEFAULT_CONCURRENCY, DEFAULT_MAX_RETRIES, DEFAULT_PART_SIZE, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_TOLERANCE_SECONDS, DRMSystem, DeliveryFormat, DunningStage, EVENT_ID_HEADER, EncryptionScheme, ExposureThresholdSource, GOPAlignmentMode, HDRFormat, HDRMode, HLSPlaylistType, HLSSegmentFormat, HealthStatus, InsightsSource, InsightsStatus, InvalidRequestError, InvoiceLineType, InvoiceStatus, JobCostLineType, JobPriority, JobStatus, MAX_PARTS, MAX_UPLOAD_SIZE_BYTES, MIN_PART_SIZE, MembershipRole, MembershipStatus, NotFoundError, OrganizationStatus, OriginPermission, OriginProvider, OriginStatus, OutputFormat, OutputStatus, Page, PaymentMethodState, PermissionError, PreconditionError, QualityTier, R2Jurisdiction, RateLimitError, Resolution, SDK_VERSION, SIGNATURE_HEADER, StorageEventSource, StorageEventStatus, SubtitleFormat, SubtitleOperation, ThumbnailFormat, ThumbnailMode, ToneMapping, Transcodely, TranscodelyError, TranscriptFormat, TranscriptStyle, TrustTier, UploadAbortedError, UploadError, Uploads, UserApprovalStatus, UserStatus, VideoCodec, VideoStatus, VideoVisibility, WEBHOOK_EVENT_TYPES, WatchEventType, WatermarkAnchor, WebhookError, WebhookPayloadError, WebhookSignatureError, WebhookTimestampError, Webhooks, calculatePartSize, calculateTotalParts, constructEvent, contentTypeForFilename, isEventType, isKnownEvent, toWireJson, verifySignature };
25318
25785
  //# sourceMappingURL=index.mjs.map
25319
25786
  //# sourceMappingURL=index.mjs.map