@transcodely/sdk 0.3.4 → 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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ 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.5](https://github.com/transcodely/transcodely-js/compare/v0.3.4...v0.3.5) (2026-08-08)
8
+
9
+
10
+ ### Features
11
+
12
+ * job cost breakdown + video_id from api 4.9.0 ([#46](https://github.com/transcodely/transcodely-js/issues/46)) ([efe79e2](https://github.com/transcodely/transcodely-js/commit/efe79e24e0e7115d591722a303e2bd3986ceeeae))
13
+
7
14
  ## [0.3.4](https://github.com/transcodely/transcodely-js/compare/v0.3.3...v0.3.4) (2026-08-02)
8
15
 
9
16
 
package/dist/index.cjs CHANGED
@@ -9065,6 +9065,21 @@ protobuf.proto3.util.setEnumType(WatchEventType, "transcodely.v1.WatchEventType"
9065
9065
  { no: 4, name: "WATCH_EVENT_TYPE_COMPLETED" },
9066
9066
  { no: 5, name: "WATCH_EVENT_TYPE_HEARTBEAT" }
9067
9067
  ]);
9068
+ var JobCostLineType = /* @__PURE__ */ ((JobCostLineType2) => {
9069
+ JobCostLineType2[JobCostLineType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
9070
+ JobCostLineType2[JobCostLineType2["OUTPUT"] = 1] = "OUTPUT";
9071
+ JobCostLineType2[JobCostLineType2["MINIMUM_CHARGE"] = 2] = "MINIMUM_CHARGE";
9072
+ JobCostLineType2[JobCostLineType2["FEE"] = 3] = "FEE";
9073
+ JobCostLineType2[JobCostLineType2["ADJUSTMENT"] = 4] = "ADJUSTMENT";
9074
+ return JobCostLineType2;
9075
+ })(JobCostLineType || {});
9076
+ protobuf.proto3.util.setEnumType(JobCostLineType, "transcodely.v1.JobCostLineType", [
9077
+ { no: 0, name: "JOB_COST_LINE_TYPE_UNSPECIFIED" },
9078
+ { no: 1, name: "JOB_COST_LINE_TYPE_OUTPUT" },
9079
+ { no: 2, name: "JOB_COST_LINE_TYPE_MINIMUM_CHARGE" },
9080
+ { no: 3, name: "JOB_COST_LINE_TYPE_FEE" },
9081
+ { no: 4, name: "JOB_COST_LINE_TYPE_ADJUSTMENT" }
9082
+ ]);
9068
9083
  var AudioTrackConfig = class _AudioTrackConfig extends protobuf.Message {
9069
9084
  /**
9070
9085
  * ISO 639-2 language code (e.g., "eng", "spa", "jpn", "fra").
@@ -10716,6 +10731,26 @@ var Job = class _Job extends protobuf.Message {
10716
10731
  * @generated from field: optional transcodely.v1.ClipConfig clip = 36;
10717
10732
  */
10718
10733
  clip;
10734
+ /**
10735
+ * Hosted video this job's managed output belongs to ("vid_..."). Set when
10736
+ * the job writes to Transcodely-managed hosting storage (created with
10737
+ * managed=true, or with input_video_id targeting an existing video); absent
10738
+ * for jobs delivering to your own origin. Server-set; read-only.
10739
+ *
10740
+ * @generated from field: optional string video_id = 37;
10741
+ */
10742
+ videoId;
10743
+ /**
10744
+ * Itemized decomposition of total_estimated_cost and total_actual_cost:
10745
+ * one line per output, one per fee, and the minimum-charge top-up when the
10746
+ * per-job minimum raised a total. The lines always sum to the totals, so
10747
+ * this is the field to render a cost from — the per-output cost fields
10748
+ * alone do not add up to the bill whenever the minimum charge is in effect.
10749
+ * Always present. Server-set; read-only.
10750
+ *
10751
+ * @generated from field: transcodely.v1.JobCostBreakdown cost_breakdown = 38;
10752
+ */
10753
+ costBreakdown;
10719
10754
  constructor(data) {
10720
10755
  super();
10721
10756
  protobuf.proto3.util.initPartial(data, this);
@@ -10816,7 +10851,9 @@ var Job = class _Job extends protobuf.Message {
10816
10851
  /* ScalarType.STRING */
10817
10852
  },
10818
10853
  { no: 35, name: "chapter_results", kind: "message", T: ChapterResult, repeated: true },
10819
- { no: 36, name: "clip", kind: "message", T: ClipConfig, opt: true }
10854
+ { no: 36, name: "clip", kind: "message", T: ClipConfig, opt: true },
10855
+ { no: 37, name: "video_id", kind: "scalar", T: 9, opt: true },
10856
+ { no: 38, name: "cost_breakdown", kind: "message", T: JobCostBreakdown }
10820
10857
  ]);
10821
10858
  static fromBinary(bytes, options) {
10822
10859
  return new _Job().fromBinary(bytes, options);
@@ -10878,6 +10915,13 @@ var JobFee = class _JobFee extends protobuf.Message {
10878
10915
  * @generated from field: string currency = 7;
10879
10916
  */
10880
10917
  currency = "";
10918
+ /**
10919
+ * Fee id ("fee_..."). This is what a cost-breakdown fee line's
10920
+ * `reference_id` points at (see JobCostBreakdown).
10921
+ *
10922
+ * @generated from field: string id = 8;
10923
+ */
10924
+ id = "";
10881
10925
  constructor(data) {
10882
10926
  super();
10883
10927
  protobuf.proto3.util.initPartial(data, this);
@@ -10933,6 +10977,13 @@ var JobFee = class _JobFee extends protobuf.Message {
10933
10977
  kind: "scalar",
10934
10978
  T: 9
10935
10979
  /* ScalarType.STRING */
10980
+ },
10981
+ {
10982
+ no: 8,
10983
+ name: "id",
10984
+ kind: "scalar",
10985
+ T: 9
10986
+ /* ScalarType.STRING */
10936
10987
  }
10937
10988
  ]);
10938
10989
  static fromBinary(bytes, options) {
@@ -10948,6 +10999,137 @@ var JobFee = class _JobFee extends protobuf.Message {
10948
10999
  return protobuf.proto3.util.equals(_JobFee, a, b);
10949
11000
  }
10950
11001
  };
11002
+ var JobCostLine = class _JobCostLine extends protobuf.Message {
11003
+ /**
11004
+ * What kind of charge this line is: output, minimum_charge, fee or
11005
+ * adjustment.
11006
+ *
11007
+ * @generated from field: transcodely.v1.JobCostLineType type = 1;
11008
+ */
11009
+ type = 0 /* UNSPECIFIED */;
11010
+ /**
11011
+ * The thing the line is for: an output id ("out_...") on output lines, a
11012
+ * fee id ("fee_...") on fee lines. Empty on the minimum-charge and
11013
+ * adjustment lines, which belong to the job as a whole rather than to any
11014
+ * one part of it.
11015
+ *
11016
+ * @generated from field: string reference_id = 2;
11017
+ */
11018
+ referenceId = "";
11019
+ /**
11020
+ * Human-readable label: "1080p h264 hls", "Minimum job charge",
11021
+ * "AI Caption Generation". Wording is documentation, not API surface, and
11022
+ * may be reworded in any release — key off `type` and `reference_id`.
11023
+ *
11024
+ * @generated from field: string description = 3;
11025
+ */
11026
+ description = "";
11027
+ /**
11028
+ * What this line contributed to total_estimated_cost. Absent until the
11029
+ * input probe supplies a duration.
11030
+ *
11031
+ * @generated from field: optional double estimated_amount_eur = 4;
11032
+ */
11033
+ estimatedAmountEur;
11034
+ /**
11035
+ * What this line contributed to total_actual_cost. Absent until the job
11036
+ * settles; 0 for a line that settled at no charge (a failed job's outputs,
11037
+ * a fee whose artifact was never produced). Absent and zero are different
11038
+ * answers: one is "not known yet", the other is "free".
11039
+ *
11040
+ * Negative only on an adjustment line.
11041
+ *
11042
+ * @generated from field: optional double actual_amount_eur = 5;
11043
+ */
11044
+ actualAmountEur;
11045
+ constructor(data) {
11046
+ super();
11047
+ protobuf.proto3.util.initPartial(data, this);
11048
+ }
11049
+ static runtime = protobuf.proto3;
11050
+ static typeName = "transcodely.v1.JobCostLine";
11051
+ static fields = protobuf.proto3.util.newFieldList(() => [
11052
+ { no: 1, name: "type", kind: "enum", T: protobuf.proto3.getEnumType(JobCostLineType) },
11053
+ {
11054
+ no: 2,
11055
+ name: "reference_id",
11056
+ kind: "scalar",
11057
+ T: 9
11058
+ /* ScalarType.STRING */
11059
+ },
11060
+ {
11061
+ no: 3,
11062
+ name: "description",
11063
+ kind: "scalar",
11064
+ T: 9
11065
+ /* ScalarType.STRING */
11066
+ },
11067
+ { no: 4, name: "estimated_amount_eur", kind: "scalar", T: 1, opt: true },
11068
+ { no: 5, name: "actual_amount_eur", kind: "scalar", T: 1, opt: true }
11069
+ ]);
11070
+ static fromBinary(bytes, options) {
11071
+ return new _JobCostLine().fromBinary(bytes, options);
11072
+ }
11073
+ static fromJson(jsonValue, options) {
11074
+ return new _JobCostLine().fromJson(jsonValue, options);
11075
+ }
11076
+ static fromJsonString(jsonString, options) {
11077
+ return new _JobCostLine().fromJsonString(jsonString, options);
11078
+ }
11079
+ static equals(a, b) {
11080
+ return protobuf.proto3.util.equals(_JobCostLine, a, b);
11081
+ }
11082
+ };
11083
+ var JobCostBreakdown = class _JobCostBreakdown extends protobuf.Message {
11084
+ /**
11085
+ * Lines in reading order: outputs, then fees, then the minimum charge, then
11086
+ * the adjustment.
11087
+ *
11088
+ * @generated from field: repeated transcodely.v1.JobCostLine lines = 1;
11089
+ */
11090
+ lines = [];
11091
+ /**
11092
+ * The totals the lines explain. Same values as Job.total_estimated_cost /
11093
+ * Job.total_actual_cost, repeated here so a breakdown can be verified
11094
+ * without carrying the job around.
11095
+ *
11096
+ * One deliberate difference: a failed job reports total_actual_cost as 0
11097
+ * here even in the rare case where no total was ever written for it (a job
11098
+ * the control plane failed after its worker vanished). A failed job bills
11099
+ * nothing, and "unknown" would be a worse answer than the one the policy
11100
+ * already guarantees.
11101
+ *
11102
+ * @generated from field: optional double total_estimated_cost = 2;
11103
+ */
11104
+ totalEstimatedCost;
11105
+ /**
11106
+ * @generated from field: optional double total_actual_cost = 3;
11107
+ */
11108
+ totalActualCost;
11109
+ constructor(data) {
11110
+ super();
11111
+ protobuf.proto3.util.initPartial(data, this);
11112
+ }
11113
+ static runtime = protobuf.proto3;
11114
+ static typeName = "transcodely.v1.JobCostBreakdown";
11115
+ static fields = protobuf.proto3.util.newFieldList(() => [
11116
+ { no: 1, name: "lines", kind: "message", T: JobCostLine, repeated: true },
11117
+ { no: 2, name: "total_estimated_cost", kind: "scalar", T: 1, opt: true },
11118
+ { no: 3, name: "total_actual_cost", kind: "scalar", T: 1, opt: true }
11119
+ ]);
11120
+ static fromBinary(bytes, options) {
11121
+ return new _JobCostBreakdown().fromBinary(bytes, options);
11122
+ }
11123
+ static fromJson(jsonValue, options) {
11124
+ return new _JobCostBreakdown().fromJson(jsonValue, options);
11125
+ }
11126
+ static fromJsonString(jsonString, options) {
11127
+ return new _JobCostBreakdown().fromJsonString(jsonString, options);
11128
+ }
11129
+ static equals(a, b) {
11130
+ return protobuf.proto3.util.equals(_JobCostBreakdown, a, b);
11131
+ }
11132
+ };
10951
11133
  var ClipConfig = class _ClipConfig extends protobuf.Message {
10952
11134
  /**
10953
11135
  * Where the clip starts, in seconds from the beginning of the input.
@@ -14806,7 +14988,7 @@ function backoff(attempt) {
14806
14988
  }
14807
14989
 
14808
14990
  // src/version.ts
14809
- var SDK_VERSION = "0.3.4";
14991
+ var SDK_VERSION = "0.3.5";
14810
14992
  var API_VERSION = "2026-05-03";
14811
14993
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
14812
14994
 
@@ -19463,6 +19645,7 @@ exports.HLSSegmentFormat = HLSSegmentFormat;
19463
19645
  exports.InvalidRequestError = InvalidRequestError;
19464
19646
  exports.InvoiceLineType = InvoiceLineType;
19465
19647
  exports.InvoiceStatus = InvoiceStatus;
19648
+ exports.JobCostLineType = JobCostLineType;
19466
19649
  exports.JobPriority = JobPriority;
19467
19650
  exports.JobStatus = JobStatus;
19468
19651
  exports.MembershipRole = MembershipRole;