@transcodely/sdk 0.3.3 → 0.3.5

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
@@ -9063,6 +9063,21 @@ proto3.util.setEnumType(WatchEventType, "transcodely.v1.WatchEventType", [
9063
9063
  { no: 4, name: "WATCH_EVENT_TYPE_COMPLETED" },
9064
9064
  { no: 5, name: "WATCH_EVENT_TYPE_HEARTBEAT" }
9065
9065
  ]);
9066
+ var JobCostLineType = /* @__PURE__ */ ((JobCostLineType2) => {
9067
+ JobCostLineType2[JobCostLineType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
9068
+ JobCostLineType2[JobCostLineType2["OUTPUT"] = 1] = "OUTPUT";
9069
+ JobCostLineType2[JobCostLineType2["MINIMUM_CHARGE"] = 2] = "MINIMUM_CHARGE";
9070
+ JobCostLineType2[JobCostLineType2["FEE"] = 3] = "FEE";
9071
+ JobCostLineType2[JobCostLineType2["ADJUSTMENT"] = 4] = "ADJUSTMENT";
9072
+ return JobCostLineType2;
9073
+ })(JobCostLineType || {});
9074
+ proto3.util.setEnumType(JobCostLineType, "transcodely.v1.JobCostLineType", [
9075
+ { no: 0, name: "JOB_COST_LINE_TYPE_UNSPECIFIED" },
9076
+ { no: 1, name: "JOB_COST_LINE_TYPE_OUTPUT" },
9077
+ { no: 2, name: "JOB_COST_LINE_TYPE_MINIMUM_CHARGE" },
9078
+ { no: 3, name: "JOB_COST_LINE_TYPE_FEE" },
9079
+ { no: 4, name: "JOB_COST_LINE_TYPE_ADJUSTMENT" }
9080
+ ]);
9066
9081
  var AudioTrackConfig = class _AudioTrackConfig extends Message {
9067
9082
  /**
9068
9083
  * ISO 639-2 language code (e.g., "eng", "spa", "jpn", "fra").
@@ -10714,6 +10729,26 @@ var Job = class _Job extends Message {
10714
10729
  * @generated from field: optional transcodely.v1.ClipConfig clip = 36;
10715
10730
  */
10716
10731
  clip;
10732
+ /**
10733
+ * Hosted video this job's managed output belongs to ("vid_..."). Set when
10734
+ * the job writes to Transcodely-managed hosting storage (created with
10735
+ * managed=true, or with input_video_id targeting an existing video); absent
10736
+ * for jobs delivering to your own origin. Server-set; read-only.
10737
+ *
10738
+ * @generated from field: optional string video_id = 37;
10739
+ */
10740
+ videoId;
10741
+ /**
10742
+ * Itemized decomposition of total_estimated_cost and total_actual_cost:
10743
+ * one line per output, one per fee, and the minimum-charge top-up when the
10744
+ * per-job minimum raised a total. The lines always sum to the totals, so
10745
+ * this is the field to render a cost from — the per-output cost fields
10746
+ * alone do not add up to the bill whenever the minimum charge is in effect.
10747
+ * Always present. Server-set; read-only.
10748
+ *
10749
+ * @generated from field: transcodely.v1.JobCostBreakdown cost_breakdown = 38;
10750
+ */
10751
+ costBreakdown;
10717
10752
  constructor(data) {
10718
10753
  super();
10719
10754
  proto3.util.initPartial(data, this);
@@ -10814,7 +10849,9 @@ var Job = class _Job extends Message {
10814
10849
  /* ScalarType.STRING */
10815
10850
  },
10816
10851
  { no: 35, name: "chapter_results", kind: "message", T: ChapterResult, repeated: true },
10817
- { no: 36, name: "clip", kind: "message", T: ClipConfig, opt: true }
10852
+ { no: 36, name: "clip", kind: "message", T: ClipConfig, opt: true },
10853
+ { no: 37, name: "video_id", kind: "scalar", T: 9, opt: true },
10854
+ { no: 38, name: "cost_breakdown", kind: "message", T: JobCostBreakdown }
10818
10855
  ]);
10819
10856
  static fromBinary(bytes, options) {
10820
10857
  return new _Job().fromBinary(bytes, options);
@@ -10876,6 +10913,13 @@ var JobFee = class _JobFee extends Message {
10876
10913
  * @generated from field: string currency = 7;
10877
10914
  */
10878
10915
  currency = "";
10916
+ /**
10917
+ * Fee id ("fee_..."). This is what a cost-breakdown fee line's
10918
+ * `reference_id` points at (see JobCostBreakdown).
10919
+ *
10920
+ * @generated from field: string id = 8;
10921
+ */
10922
+ id = "";
10879
10923
  constructor(data) {
10880
10924
  super();
10881
10925
  proto3.util.initPartial(data, this);
@@ -10931,6 +10975,13 @@ var JobFee = class _JobFee extends Message {
10931
10975
  kind: "scalar",
10932
10976
  T: 9
10933
10977
  /* ScalarType.STRING */
10978
+ },
10979
+ {
10980
+ no: 8,
10981
+ name: "id",
10982
+ kind: "scalar",
10983
+ T: 9
10984
+ /* ScalarType.STRING */
10934
10985
  }
10935
10986
  ]);
10936
10987
  static fromBinary(bytes, options) {
@@ -10946,6 +10997,137 @@ var JobFee = class _JobFee extends Message {
10946
10997
  return proto3.util.equals(_JobFee, a, b);
10947
10998
  }
10948
10999
  };
11000
+ var JobCostLine = class _JobCostLine extends Message {
11001
+ /**
11002
+ * What kind of charge this line is: output, minimum_charge, fee or
11003
+ * adjustment.
11004
+ *
11005
+ * @generated from field: transcodely.v1.JobCostLineType type = 1;
11006
+ */
11007
+ type = 0 /* UNSPECIFIED */;
11008
+ /**
11009
+ * The thing the line is for: an output id ("out_...") on output lines, a
11010
+ * fee id ("fee_...") on fee lines. Empty on the minimum-charge and
11011
+ * adjustment lines, which belong to the job as a whole rather than to any
11012
+ * one part of it.
11013
+ *
11014
+ * @generated from field: string reference_id = 2;
11015
+ */
11016
+ referenceId = "";
11017
+ /**
11018
+ * Human-readable label: "1080p h264 hls", "Minimum job charge",
11019
+ * "AI Caption Generation". Wording is documentation, not API surface, and
11020
+ * may be reworded in any release — key off `type` and `reference_id`.
11021
+ *
11022
+ * @generated from field: string description = 3;
11023
+ */
11024
+ description = "";
11025
+ /**
11026
+ * What this line contributed to total_estimated_cost. Absent until the
11027
+ * input probe supplies a duration.
11028
+ *
11029
+ * @generated from field: optional double estimated_amount_eur = 4;
11030
+ */
11031
+ estimatedAmountEur;
11032
+ /**
11033
+ * What this line contributed to total_actual_cost. Absent until the job
11034
+ * settles; 0 for a line that settled at no charge (a failed job's outputs,
11035
+ * a fee whose artifact was never produced). Absent and zero are different
11036
+ * answers: one is "not known yet", the other is "free".
11037
+ *
11038
+ * Negative only on an adjustment line.
11039
+ *
11040
+ * @generated from field: optional double actual_amount_eur = 5;
11041
+ */
11042
+ actualAmountEur;
11043
+ constructor(data) {
11044
+ super();
11045
+ proto3.util.initPartial(data, this);
11046
+ }
11047
+ static runtime = proto3;
11048
+ static typeName = "transcodely.v1.JobCostLine";
11049
+ static fields = proto3.util.newFieldList(() => [
11050
+ { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(JobCostLineType) },
11051
+ {
11052
+ no: 2,
11053
+ name: "reference_id",
11054
+ kind: "scalar",
11055
+ T: 9
11056
+ /* ScalarType.STRING */
11057
+ },
11058
+ {
11059
+ no: 3,
11060
+ name: "description",
11061
+ kind: "scalar",
11062
+ T: 9
11063
+ /* ScalarType.STRING */
11064
+ },
11065
+ { no: 4, name: "estimated_amount_eur", kind: "scalar", T: 1, opt: true },
11066
+ { no: 5, name: "actual_amount_eur", kind: "scalar", T: 1, opt: true }
11067
+ ]);
11068
+ static fromBinary(bytes, options) {
11069
+ return new _JobCostLine().fromBinary(bytes, options);
11070
+ }
11071
+ static fromJson(jsonValue, options) {
11072
+ return new _JobCostLine().fromJson(jsonValue, options);
11073
+ }
11074
+ static fromJsonString(jsonString, options) {
11075
+ return new _JobCostLine().fromJsonString(jsonString, options);
11076
+ }
11077
+ static equals(a, b) {
11078
+ return proto3.util.equals(_JobCostLine, a, b);
11079
+ }
11080
+ };
11081
+ var JobCostBreakdown = class _JobCostBreakdown extends Message {
11082
+ /**
11083
+ * Lines in reading order: outputs, then fees, then the minimum charge, then
11084
+ * the adjustment.
11085
+ *
11086
+ * @generated from field: repeated transcodely.v1.JobCostLine lines = 1;
11087
+ */
11088
+ lines = [];
11089
+ /**
11090
+ * The totals the lines explain. Same values as Job.total_estimated_cost /
11091
+ * Job.total_actual_cost, repeated here so a breakdown can be verified
11092
+ * without carrying the job around.
11093
+ *
11094
+ * One deliberate difference: a failed job reports total_actual_cost as 0
11095
+ * here even in the rare case where no total was ever written for it (a job
11096
+ * the control plane failed after its worker vanished). A failed job bills
11097
+ * nothing, and "unknown" would be a worse answer than the one the policy
11098
+ * already guarantees.
11099
+ *
11100
+ * @generated from field: optional double total_estimated_cost = 2;
11101
+ */
11102
+ totalEstimatedCost;
11103
+ /**
11104
+ * @generated from field: optional double total_actual_cost = 3;
11105
+ */
11106
+ totalActualCost;
11107
+ constructor(data) {
11108
+ super();
11109
+ proto3.util.initPartial(data, this);
11110
+ }
11111
+ static runtime = proto3;
11112
+ static typeName = "transcodely.v1.JobCostBreakdown";
11113
+ static fields = proto3.util.newFieldList(() => [
11114
+ { no: 1, name: "lines", kind: "message", T: JobCostLine, repeated: true },
11115
+ { no: 2, name: "total_estimated_cost", kind: "scalar", T: 1, opt: true },
11116
+ { no: 3, name: "total_actual_cost", kind: "scalar", T: 1, opt: true }
11117
+ ]);
11118
+ static fromBinary(bytes, options) {
11119
+ return new _JobCostBreakdown().fromBinary(bytes, options);
11120
+ }
11121
+ static fromJson(jsonValue, options) {
11122
+ return new _JobCostBreakdown().fromJson(jsonValue, options);
11123
+ }
11124
+ static fromJsonString(jsonString, options) {
11125
+ return new _JobCostBreakdown().fromJsonString(jsonString, options);
11126
+ }
11127
+ static equals(a, b) {
11128
+ return proto3.util.equals(_JobCostBreakdown, a, b);
11129
+ }
11130
+ };
10949
11131
  var ClipConfig = class _ClipConfig extends Message {
10950
11132
  /**
10951
11133
  * Where the clip starts, in seconds from the beginning of the input.
@@ -11810,6 +11992,19 @@ var Video = class _Video extends Message {
11810
11992
  * @generated from field: optional double encoding_cost = 31;
11811
11993
  */
11812
11994
  encodingCost;
11995
+ /**
11996
+ * Sum of confirmed AI-caption fees, in EUR, across all of this video's jobs
11997
+ * — captions generated inline with the transcode (the auto_captions upload
11998
+ * flag) and retro captions-only jobs that used this video as their input
11999
+ * (input_video_id). Absent until a captions fee is confirmed; fees are
12000
+ * confirmed only when a caption artifact is actually delivered, so voided
12001
+ * and still-estimated fees are never counted. This is a per-feature
12002
+ * breakdown of already-billed job totals, not an extra charge on top of
12003
+ * them.
12004
+ *
12005
+ * @generated from field: optional double captions_cost = 50;
12006
+ */
12007
+ captionsCost;
11813
12008
  /**
11814
12009
  * Timestamps.
11815
12010
  *
@@ -11923,6 +12118,7 @@ var Video = class _Video extends Message {
11923
12118
  /* ScalarType.INT64 */
11924
12119
  },
11925
12120
  { no: 31, name: "encoding_cost", kind: "scalar", T: 1, opt: true },
12121
+ { no: 50, name: "captions_cost", kind: "scalar", T: 1, opt: true },
11926
12122
  { no: 40, name: "created_at", kind: "message", T: Timestamp },
11927
12123
  { no: 41, name: "updated_at", kind: "message", T: Timestamp },
11928
12124
  { no: 42, name: "ready_at", kind: "message", T: Timestamp, opt: true },
@@ -12280,6 +12476,19 @@ var CreateUploadRequest = class _CreateUploadRequest extends Message {
12280
12476
  * @generated from field: bool hover_previews = 10;
12281
12477
  */
12282
12478
  hoverPreviews = false;
12479
+ /**
12480
+ * When true, generate AI captions inline with the transcode: the managed
12481
+ * job's output carries a "generate" subtitle track (language auto-detected,
12482
+ * WebVTT), produced by the same job — and on the same worker — as the
12483
+ * encode, and listed in the video's streaming manifest so players discover
12484
+ * it natively. Billed as the per-source-minute captions fee on that job;
12485
+ * the fee is only charged when a caption track is actually delivered. The
12486
+ * track surfaces as Video.text_tracks once ready. Unset or false = no
12487
+ * captions.
12488
+ *
12489
+ * @generated from field: optional bool auto_captions = 11;
12490
+ */
12491
+ autoCaptions;
12283
12492
  constructor(data) {
12284
12493
  super();
12285
12494
  proto3.util.initPartial(data, this);
@@ -12326,7 +12535,8 @@ var CreateUploadRequest = class _CreateUploadRequest extends Message {
12326
12535
  kind: "scalar",
12327
12536
  T: 8
12328
12537
  /* ScalarType.BOOL */
12329
- }
12538
+ },
12539
+ { no: 11, name: "auto_captions", kind: "scalar", T: 8, opt: true }
12330
12540
  ]);
12331
12541
  static fromBinary(bytes, options) {
12332
12542
  return new _CreateUploadRequest().fromBinary(bytes, options);
@@ -12513,6 +12723,19 @@ var CreateFromUrlRequest = class _CreateFromUrlRequest extends Message {
12513
12723
  * @generated from field: bool hover_previews = 8;
12514
12724
  */
12515
12725
  hoverPreviews = false;
12726
+ /**
12727
+ * When true, generate AI captions inline with the transcode: the managed
12728
+ * job's output carries a "generate" subtitle track (language auto-detected,
12729
+ * WebVTT), produced by the same job — and on the same worker — as the
12730
+ * encode, and listed in the video's streaming manifest so players discover
12731
+ * it natively. Billed as the per-source-minute captions fee on that job;
12732
+ * the fee is only charged when a caption track is actually delivered. The
12733
+ * track surfaces as Video.text_tracks once ready. Unset or false = no
12734
+ * captions.
12735
+ *
12736
+ * @generated from field: optional bool auto_captions = 9;
12737
+ */
12738
+ autoCaptions;
12516
12739
  constructor(data) {
12517
12740
  super();
12518
12741
  proto3.util.initPartial(data, this);
@@ -12545,7 +12768,8 @@ var CreateFromUrlRequest = class _CreateFromUrlRequest extends Message {
12545
12768
  kind: "scalar",
12546
12769
  T: 8
12547
12770
  /* ScalarType.BOOL */
12548
- }
12771
+ },
12772
+ { no: 9, name: "auto_captions", kind: "scalar", T: 8, opt: true }
12549
12773
  ]);
12550
12774
  static fromBinary(bytes, options) {
12551
12775
  return new _CreateFromUrlRequest().fromBinary(bytes, options);
@@ -12765,6 +12989,19 @@ var CreateMultipartUploadRequest = class _CreateMultipartUploadRequest extends M
12765
12989
  * @generated from field: bool hover_previews = 15;
12766
12990
  */
12767
12991
  hoverPreviews = false;
12992
+ /**
12993
+ * When true, generate AI captions inline with the transcode: the managed
12994
+ * job's output carries a "generate" subtitle track (language auto-detected,
12995
+ * WebVTT), produced by the same job — and on the same worker — as the
12996
+ * encode, and listed in the video's streaming manifest so players discover
12997
+ * it natively. Billed as the per-source-minute captions fee on that job;
12998
+ * the fee is only charged when a caption track is actually delivered. The
12999
+ * track surfaces as Video.text_tracks once ready. Unset or false = no
13000
+ * captions.
13001
+ *
13002
+ * @generated from field: optional bool auto_captions = 16;
13003
+ */
13004
+ autoCaptions;
12768
13005
  constructor(data) {
12769
13006
  super();
12770
13007
  proto3.util.initPartial(data, this);
@@ -12819,7 +13056,8 @@ var CreateMultipartUploadRequest = class _CreateMultipartUploadRequest extends M
12819
13056
  kind: "scalar",
12820
13057
  T: 8
12821
13058
  /* ScalarType.BOOL */
12822
- }
13059
+ },
13060
+ { no: 16, name: "auto_captions", kind: "scalar", T: 8, opt: true }
12823
13061
  ]);
12824
13062
  static fromBinary(bytes, options) {
12825
13063
  return new _CreateMultipartUploadRequest().fromBinary(bytes, options);
@@ -14748,7 +14986,7 @@ function backoff(attempt) {
14748
14986
  }
14749
14987
 
14750
14988
  // src/version.ts
14751
- var SDK_VERSION = "0.3.3";
14989
+ var SDK_VERSION = "0.3.5";
14752
14990
  var API_VERSION = "2026-05-03";
14753
14991
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
14754
14992
 
@@ -19380,6 +19618,6 @@ var Transcodely = class {
19380
19618
  Transcodely.API_VERSION = API_VERSION;
19381
19619
  Transcodely.SDK_VERSION = SDK_VERSION;
19382
19620
 
19383
- export { APIConnectionError, APIError, API_VERSION, AppStatus, AudioCodec, AuthenticationError, BitrateMode, ConflictError, Container, ContentAwareMode, ContentType, DEFAULT_BASE_URL, DEFAULT_TOLERANCE_SECONDS, DRMSystem, DeliveryFormat, EVENT_ID_HEADER, EncryptionScheme, GOPAlignmentMode, HDRFormat, HDRMode, HLSPlaylistType, HLSSegmentFormat, InvalidRequestError, InvoiceLineType, InvoiceStatus, JobPriority, JobStatus, MembershipRole, MembershipStatus, NotFoundError, OrganizationStatus, OriginPermission, OriginProvider, OriginStatus, OutputFormat, OutputStatus, Page, PermissionError, PreconditionError, QualityTier, R2Jurisdiction, RateLimitError, Resolution, SDK_VERSION, SIGNATURE_HEADER, SubtitleFormat, SubtitleOperation, ThumbnailFormat, ThumbnailMode, ToneMapping, Transcodely, TranscodelyError, UserApprovalStatus, UserStatus, VideoCodec, VideoStatus, VideoVisibility, WEBHOOK_EVENT_TYPES, WatchEventType, WatermarkAnchor, WebhookError, WebhookPayloadError, WebhookSignatureError, WebhookTimestampError, Webhooks, constructEvent, isEventType, isKnownEvent, verifySignature };
19621
+ export { APIConnectionError, APIError, API_VERSION, AppStatus, AudioCodec, AuthenticationError, BitrateMode, ConflictError, Container, ContentAwareMode, ContentType, DEFAULT_BASE_URL, DEFAULT_TOLERANCE_SECONDS, DRMSystem, DeliveryFormat, EVENT_ID_HEADER, EncryptionScheme, GOPAlignmentMode, HDRFormat, HDRMode, HLSPlaylistType, HLSSegmentFormat, InvalidRequestError, InvoiceLineType, InvoiceStatus, JobCostLineType, JobPriority, JobStatus, MembershipRole, MembershipStatus, NotFoundError, OrganizationStatus, OriginPermission, OriginProvider, OriginStatus, OutputFormat, OutputStatus, Page, PermissionError, PreconditionError, QualityTier, R2Jurisdiction, RateLimitError, Resolution, SDK_VERSION, SIGNATURE_HEADER, SubtitleFormat, SubtitleOperation, ThumbnailFormat, ThumbnailMode, ToneMapping, Transcodely, TranscodelyError, UserApprovalStatus, UserStatus, VideoCodec, VideoStatus, VideoVisibility, WEBHOOK_EVENT_TYPES, WatchEventType, WatermarkAnchor, WebhookError, WebhookPayloadError, WebhookSignatureError, WebhookTimestampError, Webhooks, constructEvent, isEventType, isKnownEvent, verifySignature };
19384
19622
  //# sourceMappingURL=index.mjs.map
19385
19623
  //# sourceMappingURL=index.mjs.map