@transcodely/sdk 0.1.2 → 0.1.4

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
@@ -3309,7 +3309,10 @@ var ResendEventRequest = class _ResendEventRequest extends Message {
3309
3309
  };
3310
3310
  var ResendEventResponse = class _ResendEventResponse extends Message {
3311
3311
  /**
3312
- * Newly-created pending delivery records, one per target endpoint.
3312
+ * Newly-created pending delivery records, one per target endpoint. These are
3313
+ * freshly queued, so response-side fields (latency_ms, response_status,
3314
+ * response_headers, transport_error) are absent until the worker attempts
3315
+ * delivery — re-fetch via ListWebhookDeliveries to see the completed row.
3313
3316
  *
3314
3317
  * @generated from field: repeated transcodely.v1.WebhookDelivery deliveries = 1;
3315
3318
  */
@@ -3390,7 +3393,9 @@ var SendTestWebhookResponse = class _SendTestWebhookResponse extends Message {
3390
3393
  /**
3391
3394
  * The newly-queued delivery row. The UI navigates the operator to its
3392
3395
  * detail sheet so they can watch the worker transition it from pending
3393
- * to succeeded / failed in real time.
3396
+ * to succeeded / failed in real time. Because it is freshly queued,
3397
+ * response-side fields (latency_ms, response_status, response_headers,
3398
+ * transport_error) are absent until the worker attempts delivery.
3394
3399
  *
3395
3400
  * @generated from field: transcodely.v1.WebhookDelivery delivery = 1;
3396
3401
  */
@@ -7412,6 +7417,27 @@ var ThumbnailSpec = class _ThumbnailSpec extends Message {
7412
7417
  * @generated from field: optional int32 sprite_columns = 9;
7413
7418
  */
7414
7419
  spriteColumns;
7420
+ /**
7421
+ * Per-thumbnail storage path template, resolved by the worker with
7422
+ * thumbnail-aware variables. Precedence: this field, then the output origin's
7423
+ * path_template, then the built-in default {job_id}/thumbnails/thumb_{thumb_index}.
7424
+ * The job-level output_path_template is NOT applied to thumbnails (it is
7425
+ * documented as applying to every output; thumbnails aren't outputs).
7426
+ *
7427
+ * Variables: {job_id}, {video_id}, {date}, {timestamp}, {uuid},
7428
+ * {format} (image format: jpeg|png|webp), {thumb_index} (0-based),
7429
+ * {thumb_time} (seconds, file-safe), {thumb_time_ms} (milliseconds).
7430
+ *
7431
+ * Example: "video/{video_id}/poster/{thumb_index}".
7432
+ *
7433
+ * Must not start with `/` or contain `..` (no path traversal). When set, it
7434
+ * must reference a uniqueness token ({job_id}, {video_id}, or {uuid}) so
7435
+ * thumbnails from different jobs never collide on a shared origin. Unset →
7436
+ * the default above (existing keys unchanged).
7437
+ *
7438
+ * @generated from field: optional string path_template = 10;
7439
+ */
7440
+ pathTemplate;
7415
7441
  constructor(data) {
7416
7442
  super();
7417
7443
  proto3.util.initPartial(data, this);
@@ -7427,7 +7453,8 @@ var ThumbnailSpec = class _ThumbnailSpec extends Message {
7427
7453
  { no: 6, name: "timestamp", kind: "scalar", T: 1, opt: true },
7428
7454
  { no: 7, name: "interval_seconds", kind: "scalar", T: 1, opt: true },
7429
7455
  { no: 8, name: "timestamps", kind: "scalar", T: 1, repeated: true },
7430
- { no: 9, name: "sprite_columns", kind: "scalar", T: 5, opt: true }
7456
+ { no: 9, name: "sprite_columns", kind: "scalar", T: 5, opt: true },
7457
+ { no: 10, name: "path_template", kind: "scalar", T: 9, opt: true }
7431
7458
  ]);
7432
7459
  static fromBinary(bytes, options) {
7433
7460
  return new _ThumbnailSpec().fromBinary(bytes, options);
@@ -7442,6 +7469,122 @@ var ThumbnailSpec = class _ThumbnailSpec extends Message {
7442
7469
  return proto3.util.equals(_ThumbnailSpec, a, b);
7443
7470
  }
7444
7471
  };
7472
+ var ThumbnailResult = class _ThumbnailResult extends Message {
7473
+ /**
7474
+ * Storage key relative to the output origin
7475
+ * (e.g. "job_xxx/thumbnails/thumb_0.jpg"). Stable identifier for the file.
7476
+ *
7477
+ * @generated from field: string storage_key = 1;
7478
+ */
7479
+ storageKey = "";
7480
+ /**
7481
+ * Fully-qualified storage URL as built by the worker
7482
+ * (e.g. "s3://bucket/prefix/job_xxx/thumbnails/thumb_0.jpg"). Stored as-is
7483
+ * and echoed on the Job response, exactly like JobOutput.output_url.
7484
+ *
7485
+ * @generated from field: string url = 2;
7486
+ */
7487
+ url = "";
7488
+ /**
7489
+ * Generation mode that produced this file: single | interval | sprite |
7490
+ * timestamps. Lowercase string on the wire.
7491
+ *
7492
+ * @generated from field: string mode = 3;
7493
+ */
7494
+ mode = "";
7495
+ /**
7496
+ * File format: jpeg | png | webp. The sprite mode's WebVTT sidecar uses
7497
+ * "vtt".
7498
+ *
7499
+ * @generated from field: string format = 4;
7500
+ */
7501
+ format = "";
7502
+ /**
7503
+ * Pixel dimensions. 0 when not applicable (e.g. the .vtt sidecar).
7504
+ *
7505
+ * @generated from field: int32 width = 5;
7506
+ */
7507
+ width = 0;
7508
+ /**
7509
+ * @generated from field: int32 height = 6;
7510
+ */
7511
+ height = 0;
7512
+ /**
7513
+ * 0-based index within a multi-file spec (interval frames, sprite tiles).
7514
+ *
7515
+ * @generated from field: int32 index = 7;
7516
+ */
7517
+ index = 0;
7518
+ constructor(data) {
7519
+ super();
7520
+ proto3.util.initPartial(data, this);
7521
+ }
7522
+ static runtime = proto3;
7523
+ static typeName = "transcodely.v1.ThumbnailResult";
7524
+ static fields = proto3.util.newFieldList(() => [
7525
+ {
7526
+ no: 1,
7527
+ name: "storage_key",
7528
+ kind: "scalar",
7529
+ T: 9
7530
+ /* ScalarType.STRING */
7531
+ },
7532
+ {
7533
+ no: 2,
7534
+ name: "url",
7535
+ kind: "scalar",
7536
+ T: 9
7537
+ /* ScalarType.STRING */
7538
+ },
7539
+ {
7540
+ no: 3,
7541
+ name: "mode",
7542
+ kind: "scalar",
7543
+ T: 9
7544
+ /* ScalarType.STRING */
7545
+ },
7546
+ {
7547
+ no: 4,
7548
+ name: "format",
7549
+ kind: "scalar",
7550
+ T: 9
7551
+ /* ScalarType.STRING */
7552
+ },
7553
+ {
7554
+ no: 5,
7555
+ name: "width",
7556
+ kind: "scalar",
7557
+ T: 5
7558
+ /* ScalarType.INT32 */
7559
+ },
7560
+ {
7561
+ no: 6,
7562
+ name: "height",
7563
+ kind: "scalar",
7564
+ T: 5
7565
+ /* ScalarType.INT32 */
7566
+ },
7567
+ {
7568
+ no: 7,
7569
+ name: "index",
7570
+ kind: "scalar",
7571
+ T: 5
7572
+ /* ScalarType.INT32 */
7573
+ }
7574
+ ]);
7575
+ static fromBinary(bytes, options) {
7576
+ return new _ThumbnailResult().fromBinary(bytes, options);
7577
+ }
7578
+ static fromJson(jsonValue, options) {
7579
+ return new _ThumbnailResult().fromJson(jsonValue, options);
7580
+ }
7581
+ static fromJsonString(jsonString, options) {
7582
+ return new _ThumbnailResult().fromJsonString(jsonString, options);
7583
+ }
7584
+ static equals(a, b) {
7585
+ return proto3.util.equals(_ThumbnailResult, a, b);
7586
+ }
7587
+ };
7445
7588
 
7446
7589
  // src/gen/transcodely/v1/job_pb.ts
7447
7590
  var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
@@ -7931,6 +8074,17 @@ var OutputSpec = class _OutputSpec extends Message {
7931
8074
  * @generated from field: optional string effective_path_template = 15;
7932
8075
  */
7933
8076
  effectivePathTemplate;
8077
+ /**
8078
+ * Produce a video-only output, dropping audio entirely.
8079
+ * Override semantics: when unset, the value is inherited from the referenced
8080
+ * preset (or defaults to false). When true, no audio stream is encoded or
8081
+ * packaged even if the source has one. A source that has no audio is always
8082
+ * handled gracefully (video-only) regardless of this flag.
8083
+ * Must not be combined with explicit audio[] tracks.
8084
+ *
8085
+ * @generated from field: optional bool disable_audio = 16;
8086
+ */
8087
+ disableAudio;
7934
8088
  constructor(data) {
7935
8089
  super();
7936
8090
  proto3.util.initPartial(data, this);
@@ -7950,7 +8104,8 @@ var OutputSpec = class _OutputSpec extends Message {
7950
8104
  { no: 12, name: "drm", kind: "message", T: DRMConfig, opt: true },
7951
8105
  { no: 13, name: "content_aware", kind: "message", T: ContentAwareConfig, opt: true },
7952
8106
  { no: 14, name: "encoding_mode", kind: "scalar", T: 9, opt: true },
7953
- { no: 15, name: "effective_path_template", kind: "scalar", T: 9, opt: true }
8107
+ { no: 15, name: "effective_path_template", kind: "scalar", T: 9, opt: true },
8108
+ { no: 16, name: "disable_audio", kind: "scalar", T: 8, opt: true }
7954
8109
  ]);
7955
8110
  static fromBinary(bytes, options) {
7956
8111
  return new _OutputSpec().fromBinary(bytes, options);
@@ -8868,6 +9023,15 @@ var Job = class _Job extends Message {
8868
9023
  * @generated from field: repeated transcodely.v1.ThumbnailSpec thumbnails = 25;
8869
9024
  */
8870
9025
  thumbnails = [];
9026
+ /**
9027
+ * Generated thumbnail artifacts (populated after the job completes). Each
9028
+ * entry carries the worker-built storage `url` plus `mode`/`index` to
9029
+ * correlate it back to the spec in `thumbnails` that produced it. Mirrors
9030
+ * how JobOutput.output_url surfaces rendition results.
9031
+ *
9032
+ * @generated from field: repeated transcodely.v1.ThumbnailResult thumbnail_results = 28;
9033
+ */
9034
+ thumbnailResults = [];
8871
9035
  /**
8872
9036
  * Job-level output path template (echoed from request).
8873
9037
  * Variables: {job_id}, {output_id}, {date}, {timestamp}, {codec}, {resolution}, {format}, {quality}, {output_index}, {uuid}
@@ -8952,6 +9116,7 @@ var Job = class _Job extends Message {
8952
9116
  },
8953
9117
  { no: 24, name: "execution", kind: "message", T: ExecutionTiming },
8954
9118
  { no: 25, name: "thumbnails", kind: "message", T: ThumbnailSpec, repeated: true },
9119
+ { no: 28, name: "thumbnail_results", kind: "message", T: ThumbnailResult, repeated: true },
8955
9120
  { no: 26, name: "output_path_template", kind: "scalar", T: 9, opt: true },
8956
9121
  {
8957
9122
  no: 27,
@@ -9649,14 +9814,6 @@ var Video = class _Video extends Message {
9649
9814
  * @generated from field: optional double encoding_cost = 31;
9650
9815
  */
9651
9816
  encodingCost;
9652
- /**
9653
- * @generated from field: optional double storage_cost_monthly = 32;
9654
- */
9655
- storageCostMonthly;
9656
- /**
9657
- * @generated from field: optional double egress_total = 33;
9658
- */
9659
- egressTotal;
9660
9817
  /**
9661
9818
  * Timestamps.
9662
9819
  *
@@ -9742,8 +9899,6 @@ var Video = class _Video extends Message {
9742
9899
  /* ScalarType.INT64 */
9743
9900
  },
9744
9901
  { no: 31, name: "encoding_cost", kind: "scalar", T: 1, opt: true },
9745
- { no: 32, name: "storage_cost_monthly", kind: "scalar", T: 1, opt: true },
9746
- { no: 33, name: "egress_total", kind: "scalar", T: 1, opt: true },
9747
9902
  { no: 40, name: "created_at", kind: "message", T: Timestamp },
9748
9903
  { no: 41, name: "updated_at", kind: "message", T: Timestamp },
9749
9904
  { no: 42, name: "ready_at", kind: "message", T: Timestamp, opt: true },
@@ -10988,7 +11143,8 @@ var WatchVideoResponse = class _WatchVideoResponse extends Message {
10988
11143
  */
10989
11144
  video;
10990
11145
  /**
10991
- * Type of event that triggered this update (e.g., "snapshot", "status_change", "completed").
11146
+ * Type of event that triggered this update. One of: "snapshot" (initial
11147
+ * state on subscribe), "status_change", "progress", "completed".
10992
11148
  *
10993
11149
  * @generated from field: string event_type = 2;
10994
11150
  */
@@ -11136,6 +11292,12 @@ var UsageSummary = class _UsageSummary extends Message {
11136
11292
  * @generated from field: double total_cost = 30;
11137
11293
  */
11138
11294
  totalCost = 0;
11295
+ /**
11296
+ * ISO 4217 currency code for all monetary fields in this summary (e.g. "EUR").
11297
+ *
11298
+ * @generated from field: string currency = 31;
11299
+ */
11300
+ currency = "";
11139
11301
  constructor(data) {
11140
11302
  super();
11141
11303
  proto3.util.initPartial(data, this);
@@ -11219,6 +11381,13 @@ var UsageSummary = class _UsageSummary extends Message {
11219
11381
  kind: "scalar",
11220
11382
  T: 1
11221
11383
  /* ScalarType.DOUBLE */
11384
+ },
11385
+ {
11386
+ no: 31,
11387
+ name: "currency",
11388
+ kind: "scalar",
11389
+ T: 9
11390
+ /* ScalarType.STRING */
11222
11391
  }
11223
11392
  ]);
11224
11393
  static fromBinary(bytes, options) {
@@ -11686,7 +11855,7 @@ function backoff(attempt) {
11686
11855
  }
11687
11856
 
11688
11857
  // src/version.ts
11689
- var SDK_VERSION = "0.1.2";
11858
+ var SDK_VERSION = "0.1.4";
11690
11859
  var API_VERSION = "2026-05-03";
11691
11860
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
11692
11861
 
@@ -12212,9 +12381,11 @@ var UpdateMembershipRoleRequest = class _UpdateMembershipRoleRequest extends Mes
12212
12381
  };
12213
12382
  var UpdateMembershipRoleResponse = class _UpdateMembershipRoleResponse extends Message {
12214
12383
  /**
12215
- * The updated membership.
12384
+ * The updated membership, including user details — same shape as
12385
+ * GetMembership / ListMemberships so a client refreshing from this response
12386
+ * doesn't see user fields disappear after a role change.
12216
12387
  *
12217
- * @generated from field: transcodely.v1.Membership membership = 1;
12388
+ * @generated from field: transcodely.v1.MembershipWithUser membership = 1;
12218
12389
  */
12219
12390
  membership;
12220
12391
  constructor(data) {
@@ -12224,7 +12395,7 @@ var UpdateMembershipRoleResponse = class _UpdateMembershipRoleResponse extends M
12224
12395
  static runtime = proto3;
12225
12396
  static typeName = "transcodely.v1.UpdateMembershipRoleResponse";
12226
12397
  static fields = proto3.util.newFieldList(() => [
12227
- { no: 1, name: "membership", kind: "message", T: Membership }
12398
+ { no: 1, name: "membership", kind: "message", T: MembershipWithUser }
12228
12399
  ]);
12229
12400
  static fromBinary(bytes, options) {
12230
12401
  return new _UpdateMembershipRoleResponse().fromBinary(bytes, options);
@@ -13600,14 +13771,6 @@ var Preset = class _Preset extends Message {
13600
13771
  * @generated from field: transcodely.v1.DeliveryFormat delivery_format = 8;
13601
13772
  */
13602
13773
  deliveryFormat = 0 /* UNSPECIFIED */;
13603
- /**
13604
- * Streaming configuration for HLS/DASH outputs.
13605
- * Includes segment duration, GOP alignment, and format options.
13606
- * DEPRECATED: segment_duration field 9 is replaced by this.
13607
- *
13608
- * @generated from field: optional transcodely.v1.StreamingConfig streaming = 17;
13609
- */
13610
- streaming;
13611
13774
  /**
13612
13775
  * Segment duration in seconds for HLS/DASH (default: 6).
13613
13776
  * DEPRECATED: Use streaming.segment_duration_seconds instead.
@@ -13668,6 +13831,13 @@ var Preset = class _Preset extends Message {
13668
13831
  * @generated from field: repeated transcodely.v1.PresetVariant variants = 18;
13669
13832
  */
13670
13833
  variants = [];
13834
+ /**
13835
+ * Produce video-only outputs (no audio). When true, outputs derived from this
13836
+ * preset drop audio entirely unless the output overrides disable_audio.
13837
+ *
13838
+ * @generated from field: bool disable_audio = 19;
13839
+ */
13840
+ disableAudio = false;
13671
13841
  constructor(data) {
13672
13842
  super();
13673
13843
  proto3.util.initPartial(data, this);
@@ -13707,7 +13877,6 @@ var Preset = class _Preset extends Message {
13707
13877
  /* ScalarType.BOOL */
13708
13878
  },
13709
13879
  { no: 8, name: "delivery_format", kind: "enum", T: proto3.getEnumType(DeliveryFormat) },
13710
- { no: 17, name: "streaming", kind: "message", T: StreamingConfig, opt: true },
13711
13880
  { no: 9, name: "segment_duration", kind: "scalar", T: 5, opt: true },
13712
13881
  { no: 10, name: "video", kind: "message", T: VideoSettings },
13713
13882
  { no: 11, name: "audio", kind: "message", T: AudioSettings },
@@ -13722,7 +13891,14 @@ var Preset = class _Preset extends Message {
13722
13891
  },
13723
13892
  { no: 15, name: "created_at", kind: "message", T: Timestamp },
13724
13893
  { no: 16, name: "updated_at", kind: "message", T: Timestamp },
13725
- { no: 18, name: "variants", kind: "message", T: PresetVariant, repeated: true }
13894
+ { no: 18, name: "variants", kind: "message", T: PresetVariant, repeated: true },
13895
+ {
13896
+ no: 19,
13897
+ name: "disable_audio",
13898
+ kind: "scalar",
13899
+ T: 8
13900
+ /* ScalarType.BOOL */
13901
+ }
13726
13902
  ]);
13727
13903
  static fromBinary(bytes, options) {
13728
13904
  return new _Preset().fromBinary(bytes, options);
@@ -13817,11 +13993,18 @@ var CreatePresetRequest = class _CreatePresetRequest extends Message {
13817
13993
  /**
13818
13994
  * Multi-variant ABR configuration (max 20 variants).
13819
13995
  * Only valid when delivery_format is hls, dash, or cmaf.
13820
- * Requires at least 2 variants when non-empty.
13996
+ * Requires at least 1 variant when non-empty; a single variant produces a
13997
+ * single-rendition streaming output (e.g. one vertical 720p HLS stream).
13821
13998
  *
13822
13999
  * @generated from field: repeated transcodely.v1.PresetVariant variants = 14;
13823
14000
  */
13824
14001
  variants = [];
14002
+ /**
14003
+ * Produce video-only outputs (no audio). Default: false.
14004
+ *
14005
+ * @generated from field: optional bool disable_audio = 15;
14006
+ */
14007
+ disableAudio;
13825
14008
  constructor(data) {
13826
14009
  super();
13827
14010
  proto3.util.initPartial(data, this);
@@ -13853,7 +14036,8 @@ var CreatePresetRequest = class _CreatePresetRequest extends Message {
13853
14036
  { no: 9, name: "video", kind: "message", T: VideoSettings },
13854
14037
  { no: 10, name: "audio", kind: "message", T: AudioSettings },
13855
14038
  { no: 11, name: "quality_tier", kind: "enum", T: proto3.getEnumType(QualityTier) },
13856
- { no: 14, name: "variants", kind: "message", T: PresetVariant, repeated: true }
14039
+ { no: 14, name: "variants", kind: "message", T: PresetVariant, repeated: true },
14040
+ { no: 15, name: "disable_audio", kind: "scalar", T: 8, opt: true }
13857
14041
  ]);
13858
14042
  static fromBinary(bytes, options) {
13859
14043
  return new _CreatePresetRequest().fromBinary(bytes, options);
@@ -14213,6 +14397,13 @@ var UpdatePresetRequest = class _UpdatePresetRequest extends Message {
14213
14397
  * @generated from field: repeated transcodely.v1.PresetVariant variants = 15;
14214
14398
  */
14215
14399
  variants = [];
14400
+ /**
14401
+ * New disable_audio setting (optional). When true, outputs from this preset
14402
+ * are video-only.
14403
+ *
14404
+ * @generated from field: optional bool disable_audio = 16;
14405
+ */
14406
+ disableAudio;
14216
14407
  constructor(data) {
14217
14408
  super();
14218
14409
  proto3.util.initPartial(data, this);
@@ -14239,7 +14430,8 @@ var UpdatePresetRequest = class _UpdatePresetRequest extends Message {
14239
14430
  { no: 10, name: "video", kind: "message", T: VideoSettings, opt: true },
14240
14431
  { no: 11, name: "audio", kind: "message", T: AudioSettings, opt: true },
14241
14432
  { no: 12, name: "quality_tier", kind: "enum", T: proto3.getEnumType(QualityTier), opt: true },
14242
- { no: 15, name: "variants", kind: "message", T: PresetVariant, repeated: true }
14433
+ { no: 15, name: "variants", kind: "message", T: PresetVariant, repeated: true },
14434
+ { no: 16, name: "disable_audio", kind: "scalar", T: 8, opt: true }
14243
14435
  ]);
14244
14436
  static fromBinary(bytes, options) {
14245
14437
  return new _UpdatePresetRequest().fromBinary(bytes, options);
@@ -16071,7 +16263,12 @@ function buildEvent(parsed) {
16071
16263
  if (!isPlainObject(requestRaw)) {
16072
16264
  throw new WebhookPayloadError("Webhook envelope field `request` must be a JSON object");
16073
16265
  }
16074
- const requestId = requireString(requestRaw, "id");
16266
+ const requestIdRaw = requestRaw["id"];
16267
+ if (requestIdRaw !== null && (typeof requestIdRaw !== "string" || requestIdRaw.length === 0)) {
16268
+ throw new WebhookPayloadError(
16269
+ "Webhook envelope field `request.id` must be a non-empty string or null"
16270
+ );
16271
+ }
16075
16272
  const idempotencyKeyRaw = requestRaw["idempotency_key"];
16076
16273
  if (idempotencyKeyRaw !== null && typeof idempotencyKeyRaw !== "string") {
16077
16274
  throw new WebhookPayloadError(
@@ -16089,7 +16286,7 @@ function buildEvent(parsed) {
16089
16286
  data,
16090
16287
  livemode,
16091
16288
  pendingWebhooks,
16092
- request: { id: requestId, idempotencyKey: idempotencyKeyRaw }
16289
+ request: { id: requestIdRaw, idempotencyKey: idempotencyKeyRaw }
16093
16290
  };
16094
16291
  }
16095
16292