@transcodely/sdk 0.3.6 → 0.3.7

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.cjs CHANGED
@@ -164,6 +164,40 @@ protobuf.proto3.util.setEnumType(BillingStanding, "transcodely.v1.BillingStandin
164
164
  { no: 3, name: "BILLING_STANDING_GRACE" },
165
165
  { no: 4, name: "BILLING_STANDING_DELINQUENT" }
166
166
  ]);
167
+ var BillingTreatment = /* @__PURE__ */ ((BillingTreatment2) => {
168
+ BillingTreatment2[BillingTreatment2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
169
+ BillingTreatment2[BillingTreatment2["NORMAL"] = 1] = "NORMAL";
170
+ BillingTreatment2[BillingTreatment2["TRUSTED"] = 2] = "TRUSTED";
171
+ BillingTreatment2[BillingTreatment2["EXEMPT"] = 3] = "EXEMPT";
172
+ return BillingTreatment2;
173
+ })(BillingTreatment || {});
174
+ protobuf.proto3.util.setEnumType(BillingTreatment, "transcodely.v1.BillingTreatment", [
175
+ { no: 0, name: "BILLING_TREATMENT_UNSPECIFIED" },
176
+ { no: 1, name: "BILLING_TREATMENT_NORMAL" },
177
+ { no: 2, name: "BILLING_TREATMENT_TRUSTED" },
178
+ { no: 3, name: "BILLING_TREATMENT_EXEMPT" }
179
+ ]);
180
+ var DunningStage = /* @__PURE__ */ ((DunningStage2) => {
181
+ DunningStage2[DunningStage2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
182
+ DunningStage2[DunningStage2["NONE"] = 1] = "NONE";
183
+ DunningStage2[DunningStage2["PAST_DUE"] = 2] = "PAST_DUE";
184
+ DunningStage2[DunningStage2["WARNED"] = 3] = "WARNED";
185
+ DunningStage2[DunningStage2["SOFT_LIMITED"] = 4] = "SOFT_LIMITED";
186
+ DunningStage2[DunningStage2["SUSPENDED"] = 5] = "SUSPENDED";
187
+ DunningStage2[DunningStage2["DELETION_WARNED"] = 6] = "DELETION_WARNED";
188
+ DunningStage2[DunningStage2["WRITTEN_OFF"] = 7] = "WRITTEN_OFF";
189
+ return DunningStage2;
190
+ })(DunningStage || {});
191
+ protobuf.proto3.util.setEnumType(DunningStage, "transcodely.v1.DunningStage", [
192
+ { no: 0, name: "DUNNING_STAGE_UNSPECIFIED" },
193
+ { no: 1, name: "DUNNING_STAGE_NONE" },
194
+ { no: 2, name: "DUNNING_STAGE_PAST_DUE" },
195
+ { no: 3, name: "DUNNING_STAGE_WARNED" },
196
+ { no: 4, name: "DUNNING_STAGE_SOFT_LIMITED" },
197
+ { no: 5, name: "DUNNING_STAGE_SUSPENDED" },
198
+ { no: 6, name: "DUNNING_STAGE_DELETION_WARNED" },
199
+ { no: 7, name: "DUNNING_STAGE_WRITTEN_OFF" }
200
+ ]);
167
201
  var PaginationRequest = class _PaginationRequest extends protobuf.Message {
168
202
  /**
169
203
  * Maximum number of items to return (default: 20, max: 100).
@@ -1105,6 +1139,14 @@ var App = class _App extends protobuf.Message {
1105
1139
  * @generated from field: optional double monthly_spend_limit_eur = 15;
1106
1140
  */
1107
1141
  monthlySpendLimitEur;
1142
+ /**
1143
+ * Player configuration for the app's hosted player and embeds. Unset when
1144
+ * never configured (the player uses its built-in defaults). Update via
1145
+ * AppService.UpdatePlayerConfig.
1146
+ *
1147
+ * @generated from field: optional transcodely.v1.PlayerConfig player_config = 16;
1148
+ */
1149
+ playerConfig;
1108
1150
  constructor(data) {
1109
1151
  super();
1110
1152
  protobuf.proto3.util.initPartial(data, this);
@@ -1149,7 +1191,8 @@ var App = class _App extends protobuf.Message {
1149
1191
  T: 9
1150
1192
  /* ScalarType.STRING */
1151
1193
  },
1152
- { no: 15, name: "monthly_spend_limit_eur", kind: "scalar", T: 1, opt: true }
1194
+ { no: 15, name: "monthly_spend_limit_eur", kind: "scalar", T: 1, opt: true },
1195
+ { no: 16, name: "player_config", kind: "message", T: PlayerConfig, opt: true }
1153
1196
  ]);
1154
1197
  static fromBinary(bytes, options) {
1155
1198
  return new _App().fromBinary(bytes, options);
@@ -1164,6 +1207,159 @@ var App = class _App extends protobuf.Message {
1164
1207
  return protobuf.proto3.util.equals(_App, a, b);
1165
1208
  }
1166
1209
  };
1210
+ var PlayerConfig = class _PlayerConfig extends protobuf.Message {
1211
+ /**
1212
+ * Caption (subtitle) rendering style.
1213
+ *
1214
+ * @generated from field: optional transcodely.v1.CaptionStyle captions = 1;
1215
+ */
1216
+ captions;
1217
+ constructor(data) {
1218
+ super();
1219
+ protobuf.proto3.util.initPartial(data, this);
1220
+ }
1221
+ static runtime = protobuf.proto3;
1222
+ static typeName = "transcodely.v1.PlayerConfig";
1223
+ static fields = protobuf.proto3.util.newFieldList(() => [
1224
+ { no: 1, name: "captions", kind: "message", T: CaptionStyle, opt: true }
1225
+ ]);
1226
+ static fromBinary(bytes, options) {
1227
+ return new _PlayerConfig().fromBinary(bytes, options);
1228
+ }
1229
+ static fromJson(jsonValue, options) {
1230
+ return new _PlayerConfig().fromJson(jsonValue, options);
1231
+ }
1232
+ static fromJsonString(jsonString, options) {
1233
+ return new _PlayerConfig().fromJsonString(jsonString, options);
1234
+ }
1235
+ static equals(a, b) {
1236
+ return protobuf.proto3.util.equals(_PlayerConfig, a, b);
1237
+ }
1238
+ };
1239
+ var CaptionStyle = class _CaptionStyle extends protobuf.Message {
1240
+ /**
1241
+ * Cue box background color. Player default: "#0a0a0a". Empty string clears.
1242
+ *
1243
+ * @generated from field: optional string background_color = 1;
1244
+ */
1245
+ backgroundColor;
1246
+ /**
1247
+ * Cue box background opacity, 0 (fully transparent) to 1 (solid).
1248
+ * Player default: 0.7.
1249
+ *
1250
+ * @generated from field: optional double background_opacity = 2;
1251
+ */
1252
+ backgroundOpacity;
1253
+ /**
1254
+ * Caption text color. Player default: "#ffffff". Empty string clears.
1255
+ *
1256
+ * @generated from field: optional string text_color = 3;
1257
+ */
1258
+ textColor;
1259
+ /**
1260
+ * Caption text size multiplier applied to the player's responsive base
1261
+ * size: 0.5 (half) to 2 (double). Player default: 1.
1262
+ *
1263
+ * @generated from field: optional double font_scale = 4;
1264
+ */
1265
+ fontScale;
1266
+ constructor(data) {
1267
+ super();
1268
+ protobuf.proto3.util.initPartial(data, this);
1269
+ }
1270
+ static runtime = protobuf.proto3;
1271
+ static typeName = "transcodely.v1.CaptionStyle";
1272
+ static fields = protobuf.proto3.util.newFieldList(() => [
1273
+ { no: 1, name: "background_color", kind: "scalar", T: 9, opt: true },
1274
+ { no: 2, name: "background_opacity", kind: "scalar", T: 1, opt: true },
1275
+ { no: 3, name: "text_color", kind: "scalar", T: 9, opt: true },
1276
+ { no: 4, name: "font_scale", kind: "scalar", T: 1, opt: true }
1277
+ ]);
1278
+ static fromBinary(bytes, options) {
1279
+ return new _CaptionStyle().fromBinary(bytes, options);
1280
+ }
1281
+ static fromJson(jsonValue, options) {
1282
+ return new _CaptionStyle().fromJson(jsonValue, options);
1283
+ }
1284
+ static fromJsonString(jsonString, options) {
1285
+ return new _CaptionStyle().fromJsonString(jsonString, options);
1286
+ }
1287
+ static equals(a, b) {
1288
+ return protobuf.proto3.util.equals(_CaptionStyle, a, b);
1289
+ }
1290
+ };
1291
+ var UpdatePlayerConfigRequest = class _UpdatePlayerConfigRequest extends protobuf.Message {
1292
+ /**
1293
+ * App ID.
1294
+ *
1295
+ * @generated from field: string id = 1;
1296
+ */
1297
+ id = "";
1298
+ /**
1299
+ * Player configuration to merge. Fields present here overwrite the stored
1300
+ * value; absent fields are left unchanged.
1301
+ *
1302
+ * @generated from field: transcodely.v1.PlayerConfig player_config = 2;
1303
+ */
1304
+ playerConfig;
1305
+ constructor(data) {
1306
+ super();
1307
+ protobuf.proto3.util.initPartial(data, this);
1308
+ }
1309
+ static runtime = protobuf.proto3;
1310
+ static typeName = "transcodely.v1.UpdatePlayerConfigRequest";
1311
+ static fields = protobuf.proto3.util.newFieldList(() => [
1312
+ {
1313
+ no: 1,
1314
+ name: "id",
1315
+ kind: "scalar",
1316
+ T: 9
1317
+ /* ScalarType.STRING */
1318
+ },
1319
+ { no: 2, name: "player_config", kind: "message", T: PlayerConfig }
1320
+ ]);
1321
+ static fromBinary(bytes, options) {
1322
+ return new _UpdatePlayerConfigRequest().fromBinary(bytes, options);
1323
+ }
1324
+ static fromJson(jsonValue, options) {
1325
+ return new _UpdatePlayerConfigRequest().fromJson(jsonValue, options);
1326
+ }
1327
+ static fromJsonString(jsonString, options) {
1328
+ return new _UpdatePlayerConfigRequest().fromJsonString(jsonString, options);
1329
+ }
1330
+ static equals(a, b) {
1331
+ return protobuf.proto3.util.equals(_UpdatePlayerConfigRequest, a, b);
1332
+ }
1333
+ };
1334
+ var UpdatePlayerConfigResponse = class _UpdatePlayerConfigResponse extends protobuf.Message {
1335
+ /**
1336
+ * The updated app with merged player config.
1337
+ *
1338
+ * @generated from field: transcodely.v1.App app = 1;
1339
+ */
1340
+ app;
1341
+ constructor(data) {
1342
+ super();
1343
+ protobuf.proto3.util.initPartial(data, this);
1344
+ }
1345
+ static runtime = protobuf.proto3;
1346
+ static typeName = "transcodely.v1.UpdatePlayerConfigResponse";
1347
+ static fields = protobuf.proto3.util.newFieldList(() => [
1348
+ { no: 1, name: "app", kind: "message", T: App }
1349
+ ]);
1350
+ static fromBinary(bytes, options) {
1351
+ return new _UpdatePlayerConfigResponse().fromBinary(bytes, options);
1352
+ }
1353
+ static fromJson(jsonValue, options) {
1354
+ return new _UpdatePlayerConfigResponse().fromJson(jsonValue, options);
1355
+ }
1356
+ static fromJsonString(jsonString, options) {
1357
+ return new _UpdatePlayerConfigResponse().fromJsonString(jsonString, options);
1358
+ }
1359
+ static equals(a, b) {
1360
+ return protobuf.proto3.util.equals(_UpdatePlayerConfigResponse, a, b);
1361
+ }
1362
+ };
1167
1363
  var CreateAppRequest = class _CreateAppRequest extends protobuf.Message {
1168
1364
  /**
1169
1365
  * Parent organization ID.
@@ -2104,6 +2300,20 @@ var AppService = {
2104
2300
  O: UpdateHostingConfigResponse,
2105
2301
  kind: protobuf.MethodKind.Unary
2106
2302
  },
2303
+ /**
2304
+ * Update player configuration for an app.
2305
+ * Merges provided fields into the existing player config. Applies to the
2306
+ * hosted player and embeds for every video in the app. Unlike hosting
2307
+ * config, this does not require hosting to be enabled first.
2308
+ *
2309
+ * @generated from rpc transcodely.v1.AppService.UpdatePlayerConfig
2310
+ */
2311
+ updatePlayerConfig: {
2312
+ name: "UpdatePlayerConfig",
2313
+ I: UpdatePlayerConfigRequest,
2314
+ O: UpdatePlayerConfigResponse,
2315
+ kind: protobuf.MethodKind.Unary
2316
+ },
2107
2317
  /**
2108
2318
  * Set or clear an app's monthly spend limit for transcoding charges.
2109
2319
  * Providing monthly_spend_limit_eur sets the cap (must be > 0); omitting it
@@ -2275,6 +2485,7 @@ var InvoiceLineType = /* @__PURE__ */ ((InvoiceLineType2) => {
2275
2485
  InvoiceLineType2[InvoiceLineType2["FEE"] = 2] = "FEE";
2276
2486
  InvoiceLineType2[InvoiceLineType2["MIN_CHARGE"] = 3] = "MIN_CHARGE";
2277
2487
  InvoiceLineType2[InvoiceLineType2["ADJUSTMENT"] = 4] = "ADJUSTMENT";
2488
+ InvoiceLineType2[InvoiceLineType2["HOSTING"] = 5] = "HOSTING";
2278
2489
  return InvoiceLineType2;
2279
2490
  })(InvoiceLineType || {});
2280
2491
  protobuf.proto3.util.setEnumType(InvoiceLineType, "transcodely.v1.InvoiceLineType", [
@@ -2282,7 +2493,38 @@ protobuf.proto3.util.setEnumType(InvoiceLineType, "transcodely.v1.InvoiceLineTyp
2282
2493
  { no: 1, name: "INVOICE_LINE_TYPE_USAGE" },
2283
2494
  { no: 2, name: "INVOICE_LINE_TYPE_FEE" },
2284
2495
  { no: 3, name: "INVOICE_LINE_TYPE_MIN_CHARGE" },
2285
- { no: 4, name: "INVOICE_LINE_TYPE_ADJUSTMENT" }
2496
+ { no: 4, name: "INVOICE_LINE_TYPE_ADJUSTMENT" },
2497
+ { no: 5, name: "INVOICE_LINE_TYPE_HOSTING" }
2498
+ ]);
2499
+ var TrustTier = /* @__PURE__ */ ((TrustTier2) => {
2500
+ TrustTier2[TrustTier2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
2501
+ TrustTier2[TrustTier2["NEW"] = 1] = "NEW";
2502
+ TrustTier2[TrustTier2["ESTABLISHED"] = 2] = "ESTABLISHED";
2503
+ TrustTier2[TrustTier2["PROVEN"] = 3] = "PROVEN";
2504
+ return TrustTier2;
2505
+ })(TrustTier || {});
2506
+ protobuf.proto3.util.setEnumType(TrustTier, "transcodely.v1.TrustTier", [
2507
+ { no: 0, name: "TRUST_TIER_UNSPECIFIED" },
2508
+ { no: 1, name: "TRUST_TIER_NEW" },
2509
+ { no: 2, name: "TRUST_TIER_ESTABLISHED" },
2510
+ { no: 3, name: "TRUST_TIER_PROVEN" }
2511
+ ]);
2512
+ var ExposureThresholdSource = /* @__PURE__ */ ((ExposureThresholdSource2) => {
2513
+ ExposureThresholdSource2[ExposureThresholdSource2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
2514
+ ExposureThresholdSource2[ExposureThresholdSource2["OVERRIDE"] = 1] = "OVERRIDE";
2515
+ ExposureThresholdSource2[ExposureThresholdSource2["TRUST_TIER"] = 2] = "TRUST_TIER";
2516
+ ExposureThresholdSource2[ExposureThresholdSource2["ORG_PLAN"] = 3] = "ORG_PLAN";
2517
+ ExposureThresholdSource2[ExposureThresholdSource2["PLATFORM_DEFAULT"] = 4] = "PLATFORM_DEFAULT";
2518
+ ExposureThresholdSource2[ExposureThresholdSource2["UNBOUNDED"] = 5] = "UNBOUNDED";
2519
+ return ExposureThresholdSource2;
2520
+ })(ExposureThresholdSource || {});
2521
+ protobuf.proto3.util.setEnumType(ExposureThresholdSource, "transcodely.v1.ExposureThresholdSource", [
2522
+ { no: 0, name: "EXPOSURE_THRESHOLD_SOURCE_UNSPECIFIED" },
2523
+ { no: 1, name: "EXPOSURE_THRESHOLD_SOURCE_OVERRIDE" },
2524
+ { no: 2, name: "EXPOSURE_THRESHOLD_SOURCE_TRUST_TIER" },
2525
+ { no: 3, name: "EXPOSURE_THRESHOLD_SOURCE_ORG_PLAN" },
2526
+ { no: 4, name: "EXPOSURE_THRESHOLD_SOURCE_PLATFORM_DEFAULT" },
2527
+ { no: 5, name: "EXPOSURE_THRESHOLD_SOURCE_UNBOUNDED" }
2286
2528
  ]);
2287
2529
  var PaymentMethodState = /* @__PURE__ */ ((PaymentMethodState2) => {
2288
2530
  PaymentMethodState2[PaymentMethodState2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
@@ -2808,21 +3050,428 @@ var BillingPortalSession = class _BillingPortalSession extends protobuf.Message
2808
3050
  * Where to send the browser. Single-use and short-lived; request a new
2809
3051
  * session rather than storing this.
2810
3052
  *
3053
+ * Points at the portal's settings section, where payment methods are managed,
3054
+ * rather than at its landing page.
3055
+ *
2811
3056
  * @generated from field: string url = 2;
2812
3057
  */
2813
3058
  url = "";
2814
3059
  /**
2815
- * When the session stops working.
3060
+ * When the session stops working. Applies to url and session_token alike —
3061
+ * they are two ways into the same session.
2816
3062
  *
2817
3063
  * @generated from field: google.protobuf.Timestamp expires_at = 3;
2818
3064
  */
2819
3065
  expiresAt;
3066
+ /**
3067
+ * Short-lived (~1h), single-customer-scoped token for the provider's embedded
3068
+ * payment-method form, so a card can be added in place instead of by
3069
+ * redirecting to the hosted portal.
3070
+ *
3071
+ * Same trust level as `url`, which reaches the same portal as the same
3072
+ * customer with no further authentication. It is still a bare credential:
3073
+ * hand it to the embed, never log or store it, and request a new session
3074
+ * instead of reusing one.
3075
+ *
3076
+ * Empty when the configured provider exposes no such token; fall back to
3077
+ * opening `url`.
3078
+ *
3079
+ * @generated from field: string session_token = 4;
3080
+ */
3081
+ sessionToken = "";
3082
+ constructor(data) {
3083
+ super();
3084
+ protobuf.proto3.util.initPartial(data, this);
3085
+ }
3086
+ static runtime = protobuf.proto3;
3087
+ static typeName = "transcodely.v1.BillingPortalSession";
3088
+ static fields = protobuf.proto3.util.newFieldList(() => [
3089
+ {
3090
+ no: 1,
3091
+ name: "object",
3092
+ kind: "scalar",
3093
+ T: 9
3094
+ /* ScalarType.STRING */
3095
+ },
3096
+ {
3097
+ no: 2,
3098
+ name: "url",
3099
+ kind: "scalar",
3100
+ T: 9
3101
+ /* ScalarType.STRING */
3102
+ },
3103
+ { no: 3, name: "expires_at", kind: "message", T: protobuf.Timestamp },
3104
+ {
3105
+ no: 4,
3106
+ name: "session_token",
3107
+ kind: "scalar",
3108
+ T: 9
3109
+ /* ScalarType.STRING */
3110
+ }
3111
+ ]);
3112
+ static fromBinary(bytes, options) {
3113
+ return new _BillingPortalSession().fromBinary(bytes, options);
3114
+ }
3115
+ static fromJson(jsonValue, options) {
3116
+ return new _BillingPortalSession().fromJson(jsonValue, options);
3117
+ }
3118
+ static fromJsonString(jsonString, options) {
3119
+ return new _BillingPortalSession().fromJsonString(jsonString, options);
3120
+ }
3121
+ static equals(a, b) {
3122
+ return protobuf.proto3.util.equals(_BillingPortalSession, a, b);
3123
+ }
3124
+ };
3125
+ var Budget = class _Budget extends protobuf.Message {
3126
+ /**
3127
+ * Object type, always "budget".
3128
+ *
3129
+ * @generated from field: string object = 1;
3130
+ */
3131
+ object = "";
3132
+ /**
3133
+ * Organization this budget belongs to.
3134
+ *
3135
+ * @generated from field: string org_id = 2;
3136
+ */
3137
+ orgId = "";
3138
+ /**
3139
+ * The monthly budget in EUR. Absent when no budget is set, which is the
3140
+ * default and means no alerts are sent.
3141
+ *
3142
+ * @generated from field: optional double amount_eur = 3;
3143
+ */
3144
+ amountEur;
3145
+ /**
3146
+ * Spend so far in the current billing period, in EUR.
3147
+ *
3148
+ * This is the same ledger, over the same window, that GetUpcomingInvoice
3149
+ * reports — it covers transcoding AND hosting for every app in the
3150
+ * organization, and it excludes usage that will never be billed. It is
3151
+ * therefore NOT the same number as AppService.GetSpend, which is scoped to
3152
+ * one app, counts estimates for jobs still running, and knows nothing about
3153
+ * hosting.
3154
+ *
3155
+ * @generated from field: double spent_eur = 4;
3156
+ */
3157
+ spentEur = 0;
3158
+ /**
3159
+ * spent_eur as a percentage of amount_eur. Absent when no budget is set.
3160
+ * Not capped at 100: an organization at 240% of its budget is shown 240.
3161
+ *
3162
+ * @generated from field: optional double used_percent = 5;
3163
+ */
3164
+ usedPercent;
3165
+ /**
3166
+ * Start of the current billing period (inclusive), UTC.
3167
+ *
3168
+ * @generated from field: google.protobuf.Timestamp period_start = 6;
3169
+ */
3170
+ periodStart;
3171
+ /**
3172
+ * End of the current billing period (exclusive), UTC. Spend resets here.
3173
+ *
3174
+ * @generated from field: google.protobuf.Timestamp period_end = 7;
3175
+ */
3176
+ periodEnd;
3177
+ /**
3178
+ * The percentage steps that send an alert email, ascending. Fixed at
3179
+ * 50, 80 and 100 today; new steps may be added.
3180
+ *
3181
+ * @generated from field: repeated int32 alert_steps = 8;
3182
+ */
3183
+ alertSteps = [];
3184
+ /**
3185
+ * The steps already emailed this billing period, ascending. Fire-once per
3186
+ * period: a step listed here does not send again, and changing the budget
3187
+ * mid-period does not re-arm it. Empty at the start of every period.
3188
+ *
3189
+ * @generated from field: repeated int32 notified_steps = 9;
3190
+ */
3191
+ notifiedSteps = [];
3192
+ /**
3193
+ * ISO 4217 currency code for every amount here. Always "EUR" today.
3194
+ *
3195
+ * @generated from field: string currency = 10;
3196
+ */
3197
+ currency = "";
3198
+ constructor(data) {
3199
+ super();
3200
+ protobuf.proto3.util.initPartial(data, this);
3201
+ }
3202
+ static runtime = protobuf.proto3;
3203
+ static typeName = "transcodely.v1.Budget";
3204
+ static fields = protobuf.proto3.util.newFieldList(() => [
3205
+ {
3206
+ no: 1,
3207
+ name: "object",
3208
+ kind: "scalar",
3209
+ T: 9
3210
+ /* ScalarType.STRING */
3211
+ },
3212
+ {
3213
+ no: 2,
3214
+ name: "org_id",
3215
+ kind: "scalar",
3216
+ T: 9
3217
+ /* ScalarType.STRING */
3218
+ },
3219
+ { no: 3, name: "amount_eur", kind: "scalar", T: 1, opt: true },
3220
+ {
3221
+ no: 4,
3222
+ name: "spent_eur",
3223
+ kind: "scalar",
3224
+ T: 1
3225
+ /* ScalarType.DOUBLE */
3226
+ },
3227
+ { no: 5, name: "used_percent", kind: "scalar", T: 1, opt: true },
3228
+ { no: 6, name: "period_start", kind: "message", T: protobuf.Timestamp },
3229
+ { no: 7, name: "period_end", kind: "message", T: protobuf.Timestamp },
3230
+ { no: 8, name: "alert_steps", kind: "scalar", T: 5, repeated: true },
3231
+ { no: 9, name: "notified_steps", kind: "scalar", T: 5, repeated: true },
3232
+ {
3233
+ no: 10,
3234
+ name: "currency",
3235
+ kind: "scalar",
3236
+ T: 9
3237
+ /* ScalarType.STRING */
3238
+ }
3239
+ ]);
3240
+ static fromBinary(bytes, options) {
3241
+ return new _Budget().fromBinary(bytes, options);
3242
+ }
3243
+ static fromJson(jsonValue, options) {
3244
+ return new _Budget().fromJson(jsonValue, options);
3245
+ }
3246
+ static fromJsonString(jsonString, options) {
3247
+ return new _Budget().fromJsonString(jsonString, options);
3248
+ }
3249
+ static equals(a, b) {
3250
+ return protobuf.proto3.util.equals(_Budget, a, b);
3251
+ }
3252
+ };
3253
+ var OutstandingBalance = class _OutstandingBalance extends protobuf.Message {
3254
+ /**
3255
+ * Object type, always "outstanding_balance".
3256
+ *
3257
+ * @generated from field: string object = 1;
3258
+ */
3259
+ object = "";
3260
+ /**
3261
+ * Organization this balance belongs to.
3262
+ *
3263
+ * @generated from field: string org_id = 2;
3264
+ */
3265
+ orgId = "";
3266
+ /**
3267
+ * The unsettled amount, in integer minor units (cents) of `currency`.
3268
+ * Rendered as a JSON string per the protobuf 64-bit integer mapping.
3269
+ *
3270
+ * @generated from field: int64 outstanding_cents = 3;
3271
+ */
3272
+ outstandingCents = protobuf.protoInt64.zero;
3273
+ /**
3274
+ * The trust tier the organization's payment history puts it on, which is what
3275
+ * sets the threshold unless an operator or a plan overrides it.
3276
+ *
3277
+ * @generated from field: transcodely.v1.TrustTier tier = 4;
3278
+ */
3279
+ tier = 0 /* UNSPECIFIED */;
3280
+ /**
3281
+ * How many statements this organization has PAID. The input behind `tier`,
3282
+ * surfaced so the path to a higher threshold is visible rather than implied.
3283
+ * A mid-cycle settlement counts once it is paid, like any other statement.
3284
+ *
3285
+ * @generated from field: int64 settled_payments = 5;
3286
+ */
3287
+ settledPayments = protobuf.protoInt64.zero;
3288
+ /**
3289
+ * The threshold, in cents. Absent when no threshold applies at all — a
3290
+ * long-standing account with no plan ceiling has none, which is the intended
3291
+ * destination of the whole ladder.
3292
+ *
3293
+ * @generated from field: optional int64 threshold_cents = 6;
3294
+ */
3295
+ thresholdCents;
3296
+ /**
3297
+ * Which rung supplied `threshold_cents`.
3298
+ *
3299
+ * @generated from field: transcodely.v1.ExposureThresholdSource threshold_source = 7;
3300
+ */
3301
+ thresholdSource = 0 /* UNSPECIFIED */;
3302
+ /**
3303
+ * The amount at which new-job admission stops: twice `threshold_cents`.
3304
+ * Absent exactly when `threshold_cents` is.
3305
+ *
3306
+ * @generated from field: optional int64 hard_stop_cents = 8;
3307
+ */
3308
+ hardStopCents;
3309
+ /**
3310
+ * Whether new jobs are being refused right now. Reads the same numbers the
3311
+ * admission gate reads, so a card showing false cannot coexist with a create
3312
+ * being rejected for this reason.
3313
+ *
3314
+ * @generated from field: bool blocked = 9;
3315
+ */
3316
+ blocked = false;
3317
+ /**
3318
+ * `outstanding_cents` as a percentage of `threshold_cents`. Absent when no
3319
+ * threshold applies. Not capped at 100: an organization at 180% is shown 180.
3320
+ *
3321
+ * @generated from field: optional double used_percent = 10;
3322
+ */
3323
+ usedPercent;
3324
+ /**
3325
+ * The percentage steps that send a reminder email, ascending. 80, 100, 125,
3326
+ * 150, 175 and 200 today; the last one is where admission stops.
3327
+ *
3328
+ * @generated from field: repeated int32 alert_steps = 11;
3329
+ */
3330
+ alertSteps = [];
3331
+ /**
3332
+ * The steps already emailed for the current accrual window, ascending.
3333
+ * Fire-once: a step listed here does not send again until the balance is
3334
+ * settled or the billing period rolls.
3335
+ *
3336
+ * @generated from field: repeated int32 notified_steps = 12;
3337
+ */
3338
+ notifiedSteps = [];
3339
+ /**
3340
+ * ISO 4217 currency code for every amount here. Always "EUR" today.
3341
+ *
3342
+ * @generated from field: string currency = 13;
3343
+ */
3344
+ currency = "";
3345
+ /**
3346
+ * Whether SettleOutstandingBalance is available on this deployment. False
3347
+ * while the settlement rail is disabled — a billing page should not render a
3348
+ * "pay now" action that can only fail.
3349
+ *
3350
+ * @generated from field: bool settlement_available = 14;
3351
+ */
3352
+ settlementAvailable = false;
3353
+ constructor(data) {
3354
+ super();
3355
+ protobuf.proto3.util.initPartial(data, this);
3356
+ }
3357
+ static runtime = protobuf.proto3;
3358
+ static typeName = "transcodely.v1.OutstandingBalance";
3359
+ static fields = protobuf.proto3.util.newFieldList(() => [
3360
+ {
3361
+ no: 1,
3362
+ name: "object",
3363
+ kind: "scalar",
3364
+ T: 9
3365
+ /* ScalarType.STRING */
3366
+ },
3367
+ {
3368
+ no: 2,
3369
+ name: "org_id",
3370
+ kind: "scalar",
3371
+ T: 9
3372
+ /* ScalarType.STRING */
3373
+ },
3374
+ {
3375
+ no: 3,
3376
+ name: "outstanding_cents",
3377
+ kind: "scalar",
3378
+ T: 3
3379
+ /* ScalarType.INT64 */
3380
+ },
3381
+ { no: 4, name: "tier", kind: "enum", T: protobuf.proto3.getEnumType(TrustTier) },
3382
+ {
3383
+ no: 5,
3384
+ name: "settled_payments",
3385
+ kind: "scalar",
3386
+ T: 3
3387
+ /* ScalarType.INT64 */
3388
+ },
3389
+ { no: 6, name: "threshold_cents", kind: "scalar", T: 3, opt: true },
3390
+ { no: 7, name: "threshold_source", kind: "enum", T: protobuf.proto3.getEnumType(ExposureThresholdSource) },
3391
+ { no: 8, name: "hard_stop_cents", kind: "scalar", T: 3, opt: true },
3392
+ {
3393
+ no: 9,
3394
+ name: "blocked",
3395
+ kind: "scalar",
3396
+ T: 8
3397
+ /* ScalarType.BOOL */
3398
+ },
3399
+ { no: 10, name: "used_percent", kind: "scalar", T: 1, opt: true },
3400
+ { no: 11, name: "alert_steps", kind: "scalar", T: 5, repeated: true },
3401
+ { no: 12, name: "notified_steps", kind: "scalar", T: 5, repeated: true },
3402
+ {
3403
+ no: 13,
3404
+ name: "currency",
3405
+ kind: "scalar",
3406
+ T: 9
3407
+ /* ScalarType.STRING */
3408
+ },
3409
+ {
3410
+ no: 14,
3411
+ name: "settlement_available",
3412
+ kind: "scalar",
3413
+ T: 8
3414
+ /* ScalarType.BOOL */
3415
+ }
3416
+ ]);
3417
+ static fromBinary(bytes, options) {
3418
+ return new _OutstandingBalance().fromBinary(bytes, options);
3419
+ }
3420
+ static fromJson(jsonValue, options) {
3421
+ return new _OutstandingBalance().fromJson(jsonValue, options);
3422
+ }
3423
+ static fromJsonString(jsonString, options) {
3424
+ return new _OutstandingBalance().fromJsonString(jsonString, options);
3425
+ }
3426
+ static equals(a, b) {
3427
+ return protobuf.proto3.util.equals(_OutstandingBalance, a, b);
3428
+ }
3429
+ };
3430
+ var Settlement = class _Settlement extends protobuf.Message {
3431
+ /**
3432
+ * Object type, always "settlement".
3433
+ *
3434
+ * @generated from field: string object = 1;
3435
+ */
3436
+ object = "";
3437
+ /**
3438
+ * The statement the balance was captured onto. It is an ordinary invoice —
3439
+ * readable through GetInvoice, listed by ListInvoices, and paid through the
3440
+ * same provider flow as any other.
3441
+ *
3442
+ * @generated from field: string invoice_id = 2;
3443
+ */
3444
+ invoiceId = "";
3445
+ /**
3446
+ * What it came to, in integer minor units (cents).
3447
+ *
3448
+ * @generated from field: int64 amount_cents = 3;
3449
+ */
3450
+ amountCents = protobuf.protoInt64.zero;
3451
+ /**
3452
+ * The window the statement covers, UTC. It starts where the previous
3453
+ * statement ended (or at the period start) and ends at the settlement
3454
+ * instant.
3455
+ *
3456
+ * @generated from field: google.protobuf.Timestamp period_start = 4;
3457
+ */
3458
+ periodStart;
3459
+ /**
3460
+ * @generated from field: google.protobuf.Timestamp period_end = 5;
3461
+ */
3462
+ periodEnd;
3463
+ /**
3464
+ * ISO 4217 currency code. Always "EUR" today.
3465
+ *
3466
+ * @generated from field: string currency = 6;
3467
+ */
3468
+ currency = "";
2820
3469
  constructor(data) {
2821
3470
  super();
2822
3471
  protobuf.proto3.util.initPartial(data, this);
2823
3472
  }
2824
3473
  static runtime = protobuf.proto3;
2825
- static typeName = "transcodely.v1.BillingPortalSession";
3474
+ static typeName = "transcodely.v1.Settlement";
2826
3475
  static fields = protobuf.proto3.util.newFieldList(() => [
2827
3476
  {
2828
3477
  no: 1,
@@ -2833,24 +3482,39 @@ var BillingPortalSession = class _BillingPortalSession extends protobuf.Message
2833
3482
  },
2834
3483
  {
2835
3484
  no: 2,
2836
- name: "url",
3485
+ name: "invoice_id",
2837
3486
  kind: "scalar",
2838
3487
  T: 9
2839
3488
  /* ScalarType.STRING */
2840
3489
  },
2841
- { no: 3, name: "expires_at", kind: "message", T: protobuf.Timestamp }
3490
+ {
3491
+ no: 3,
3492
+ name: "amount_cents",
3493
+ kind: "scalar",
3494
+ T: 3
3495
+ /* ScalarType.INT64 */
3496
+ },
3497
+ { no: 4, name: "period_start", kind: "message", T: protobuf.Timestamp },
3498
+ { no: 5, name: "period_end", kind: "message", T: protobuf.Timestamp },
3499
+ {
3500
+ no: 6,
3501
+ name: "currency",
3502
+ kind: "scalar",
3503
+ T: 9
3504
+ /* ScalarType.STRING */
3505
+ }
2842
3506
  ]);
2843
3507
  static fromBinary(bytes, options) {
2844
- return new _BillingPortalSession().fromBinary(bytes, options);
3508
+ return new _Settlement().fromBinary(bytes, options);
2845
3509
  }
2846
3510
  static fromJson(jsonValue, options) {
2847
- return new _BillingPortalSession().fromJson(jsonValue, options);
3511
+ return new _Settlement().fromJson(jsonValue, options);
2848
3512
  }
2849
3513
  static fromJsonString(jsonString, options) {
2850
- return new _BillingPortalSession().fromJsonString(jsonString, options);
3514
+ return new _Settlement().fromJsonString(jsonString, options);
2851
3515
  }
2852
3516
  static equals(a, b) {
2853
- return protobuf.proto3.util.equals(_BillingPortalSession, a, b);
3517
+ return protobuf.proto3.util.equals(_Settlement, a, b);
2854
3518
  }
2855
3519
  };
2856
3520
  var ListInvoicesRequest = class _ListInvoicesRequest extends protobuf.Message {
@@ -3134,6 +3798,232 @@ var CreateBillingPortalSessionResponse = class _CreateBillingPortalSessionRespon
3134
3798
  return protobuf.proto3.util.equals(_CreateBillingPortalSessionResponse, a, b);
3135
3799
  }
3136
3800
  };
3801
+ var GetBudgetRequest = class _GetBudgetRequest extends protobuf.Message {
3802
+ constructor(data) {
3803
+ super();
3804
+ protobuf.proto3.util.initPartial(data, this);
3805
+ }
3806
+ static runtime = protobuf.proto3;
3807
+ static typeName = "transcodely.v1.GetBudgetRequest";
3808
+ static fields = protobuf.proto3.util.newFieldList(() => []);
3809
+ static fromBinary(bytes, options) {
3810
+ return new _GetBudgetRequest().fromBinary(bytes, options);
3811
+ }
3812
+ static fromJson(jsonValue, options) {
3813
+ return new _GetBudgetRequest().fromJson(jsonValue, options);
3814
+ }
3815
+ static fromJsonString(jsonString, options) {
3816
+ return new _GetBudgetRequest().fromJsonString(jsonString, options);
3817
+ }
3818
+ static equals(a, b) {
3819
+ return protobuf.proto3.util.equals(_GetBudgetRequest, a, b);
3820
+ }
3821
+ };
3822
+ var GetBudgetResponse = class _GetBudgetResponse extends protobuf.Message {
3823
+ /**
3824
+ * The budget. Always present: an organization with no budget set gets one
3825
+ * with amount_eur absent and spent_eur still populated, so the current
3826
+ * period's spend can be shown before a budget exists.
3827
+ *
3828
+ * @generated from field: transcodely.v1.Budget budget = 1;
3829
+ */
3830
+ budget;
3831
+ constructor(data) {
3832
+ super();
3833
+ protobuf.proto3.util.initPartial(data, this);
3834
+ }
3835
+ static runtime = protobuf.proto3;
3836
+ static typeName = "transcodely.v1.GetBudgetResponse";
3837
+ static fields = protobuf.proto3.util.newFieldList(() => [
3838
+ { no: 1, name: "budget", kind: "message", T: Budget }
3839
+ ]);
3840
+ static fromBinary(bytes, options) {
3841
+ return new _GetBudgetResponse().fromBinary(bytes, options);
3842
+ }
3843
+ static fromJson(jsonValue, options) {
3844
+ return new _GetBudgetResponse().fromJson(jsonValue, options);
3845
+ }
3846
+ static fromJsonString(jsonString, options) {
3847
+ return new _GetBudgetResponse().fromJsonString(jsonString, options);
3848
+ }
3849
+ static equals(a, b) {
3850
+ return protobuf.proto3.util.equals(_GetBudgetResponse, a, b);
3851
+ }
3852
+ };
3853
+ var UpdateBudgetRequest = class _UpdateBudgetRequest extends protobuf.Message {
3854
+ /**
3855
+ * Monthly budget in EUR. When present, sets the budget (must be > 0). When
3856
+ * ABSENT, the budget is cleared and no further alerts are sent — that is the
3857
+ * only way to turn them off. The upper bound matches the NUMERIC(12,2)
3858
+ * storage column.
3859
+ *
3860
+ * @generated from field: optional double amount_eur = 1;
3861
+ */
3862
+ amountEur;
3863
+ constructor(data) {
3864
+ super();
3865
+ protobuf.proto3.util.initPartial(data, this);
3866
+ }
3867
+ static runtime = protobuf.proto3;
3868
+ static typeName = "transcodely.v1.UpdateBudgetRequest";
3869
+ static fields = protobuf.proto3.util.newFieldList(() => [
3870
+ { no: 1, name: "amount_eur", kind: "scalar", T: 1, opt: true }
3871
+ ]);
3872
+ static fromBinary(bytes, options) {
3873
+ return new _UpdateBudgetRequest().fromBinary(bytes, options);
3874
+ }
3875
+ static fromJson(jsonValue, options) {
3876
+ return new _UpdateBudgetRequest().fromJson(jsonValue, options);
3877
+ }
3878
+ static fromJsonString(jsonString, options) {
3879
+ return new _UpdateBudgetRequest().fromJsonString(jsonString, options);
3880
+ }
3881
+ static equals(a, b) {
3882
+ return protobuf.proto3.util.equals(_UpdateBudgetRequest, a, b);
3883
+ }
3884
+ };
3885
+ var UpdateBudgetResponse = class _UpdateBudgetResponse extends protobuf.Message {
3886
+ /**
3887
+ * The budget as it now stands, with current-period spend recomputed, so a
3888
+ * caller that just moved the number can render the new bar without a second
3889
+ * request. amount_eur is absent when the budget was cleared.
3890
+ *
3891
+ * @generated from field: transcodely.v1.Budget budget = 1;
3892
+ */
3893
+ budget;
3894
+ constructor(data) {
3895
+ super();
3896
+ protobuf.proto3.util.initPartial(data, this);
3897
+ }
3898
+ static runtime = protobuf.proto3;
3899
+ static typeName = "transcodely.v1.UpdateBudgetResponse";
3900
+ static fields = protobuf.proto3.util.newFieldList(() => [
3901
+ { no: 1, name: "budget", kind: "message", T: Budget }
3902
+ ]);
3903
+ static fromBinary(bytes, options) {
3904
+ return new _UpdateBudgetResponse().fromBinary(bytes, options);
3905
+ }
3906
+ static fromJson(jsonValue, options) {
3907
+ return new _UpdateBudgetResponse().fromJson(jsonValue, options);
3908
+ }
3909
+ static fromJsonString(jsonString, options) {
3910
+ return new _UpdateBudgetResponse().fromJsonString(jsonString, options);
3911
+ }
3912
+ static equals(a, b) {
3913
+ return protobuf.proto3.util.equals(_UpdateBudgetResponse, a, b);
3914
+ }
3915
+ };
3916
+ var GetOutstandingBalanceRequest = class _GetOutstandingBalanceRequest extends protobuf.Message {
3917
+ constructor(data) {
3918
+ super();
3919
+ protobuf.proto3.util.initPartial(data, this);
3920
+ }
3921
+ static runtime = protobuf.proto3;
3922
+ static typeName = "transcodely.v1.GetOutstandingBalanceRequest";
3923
+ static fields = protobuf.proto3.util.newFieldList(() => []);
3924
+ static fromBinary(bytes, options) {
3925
+ return new _GetOutstandingBalanceRequest().fromBinary(bytes, options);
3926
+ }
3927
+ static fromJson(jsonValue, options) {
3928
+ return new _GetOutstandingBalanceRequest().fromJson(jsonValue, options);
3929
+ }
3930
+ static fromJsonString(jsonString, options) {
3931
+ return new _GetOutstandingBalanceRequest().fromJsonString(jsonString, options);
3932
+ }
3933
+ static equals(a, b) {
3934
+ return protobuf.proto3.util.equals(_GetOutstandingBalanceRequest, a, b);
3935
+ }
3936
+ };
3937
+ var GetOutstandingBalanceResponse = class _GetOutstandingBalanceResponse extends protobuf.Message {
3938
+ /**
3939
+ * Always present. An organization that owes nothing gets one with
3940
+ * outstanding_cents 0 and its threshold still populated, so a card can show
3941
+ * the headroom before anything has been spent.
3942
+ *
3943
+ * @generated from field: transcodely.v1.OutstandingBalance balance = 1;
3944
+ */
3945
+ balance;
3946
+ constructor(data) {
3947
+ super();
3948
+ protobuf.proto3.util.initPartial(data, this);
3949
+ }
3950
+ static runtime = protobuf.proto3;
3951
+ static typeName = "transcodely.v1.GetOutstandingBalanceResponse";
3952
+ static fields = protobuf.proto3.util.newFieldList(() => [
3953
+ { no: 1, name: "balance", kind: "message", T: OutstandingBalance }
3954
+ ]);
3955
+ static fromBinary(bytes, options) {
3956
+ return new _GetOutstandingBalanceResponse().fromBinary(bytes, options);
3957
+ }
3958
+ static fromJson(jsonValue, options) {
3959
+ return new _GetOutstandingBalanceResponse().fromJson(jsonValue, options);
3960
+ }
3961
+ static fromJsonString(jsonString, options) {
3962
+ return new _GetOutstandingBalanceResponse().fromJsonString(jsonString, options);
3963
+ }
3964
+ static equals(a, b) {
3965
+ return protobuf.proto3.util.equals(_GetOutstandingBalanceResponse, a, b);
3966
+ }
3967
+ };
3968
+ var SettleOutstandingBalanceRequest = class _SettleOutstandingBalanceRequest extends protobuf.Message {
3969
+ constructor(data) {
3970
+ super();
3971
+ protobuf.proto3.util.initPartial(data, this);
3972
+ }
3973
+ static runtime = protobuf.proto3;
3974
+ static typeName = "transcodely.v1.SettleOutstandingBalanceRequest";
3975
+ static fields = protobuf.proto3.util.newFieldList(() => []);
3976
+ static fromBinary(bytes, options) {
3977
+ return new _SettleOutstandingBalanceRequest().fromBinary(bytes, options);
3978
+ }
3979
+ static fromJson(jsonValue, options) {
3980
+ return new _SettleOutstandingBalanceRequest().fromJson(jsonValue, options);
3981
+ }
3982
+ static fromJsonString(jsonString, options) {
3983
+ return new _SettleOutstandingBalanceRequest().fromJsonString(jsonString, options);
3984
+ }
3985
+ static equals(a, b) {
3986
+ return protobuf.proto3.util.equals(_SettleOutstandingBalanceRequest, a, b);
3987
+ }
3988
+ };
3989
+ var SettleOutstandingBalanceResponse = class _SettleOutstandingBalanceResponse extends protobuf.Message {
3990
+ /**
3991
+ * The statement that was produced.
3992
+ *
3993
+ * @generated from field: transcodely.v1.Settlement settlement = 1;
3994
+ */
3995
+ settlement;
3996
+ /**
3997
+ * The balance as it now stands — zero, with the block lifted and the steps
3998
+ * re-armed — so a caller that just paid can render the new state without a
3999
+ * second request.
4000
+ *
4001
+ * @generated from field: transcodely.v1.OutstandingBalance balance = 2;
4002
+ */
4003
+ balance;
4004
+ constructor(data) {
4005
+ super();
4006
+ protobuf.proto3.util.initPartial(data, this);
4007
+ }
4008
+ static runtime = protobuf.proto3;
4009
+ static typeName = "transcodely.v1.SettleOutstandingBalanceResponse";
4010
+ static fields = protobuf.proto3.util.newFieldList(() => [
4011
+ { no: 1, name: "settlement", kind: "message", T: Settlement },
4012
+ { no: 2, name: "balance", kind: "message", T: OutstandingBalance }
4013
+ ]);
4014
+ static fromBinary(bytes, options) {
4015
+ return new _SettleOutstandingBalanceResponse().fromBinary(bytes, options);
4016
+ }
4017
+ static fromJson(jsonValue, options) {
4018
+ return new _SettleOutstandingBalanceResponse().fromJson(jsonValue, options);
4019
+ }
4020
+ static fromJsonString(jsonString, options) {
4021
+ return new _SettleOutstandingBalanceResponse().fromJsonString(jsonString, options);
4022
+ }
4023
+ static equals(a, b) {
4024
+ return protobuf.proto3.util.equals(_SettleOutstandingBalanceResponse, a, b);
4025
+ }
4026
+ };
3137
4027
  var BillingService = {
3138
4028
  typeName: "transcodely.v1.BillingService",
3139
4029
  methods: {
@@ -3213,6 +4103,71 @@ var BillingService = {
3213
4103
  I: CreateBillingPortalSessionRequest,
3214
4104
  O: CreateBillingPortalSessionResponse,
3215
4105
  kind: protobuf.MethodKind.Unary
4106
+ },
4107
+ /**
4108
+ * Retrieve the organization's monthly budget together with the spend it is
4109
+ * measured against, in one call: everything a budget card needs.
4110
+ *
4111
+ * @generated from rpc transcodely.v1.BillingService.GetBudget
4112
+ */
4113
+ getBudget: {
4114
+ name: "GetBudget",
4115
+ I: GetBudgetRequest,
4116
+ O: GetBudgetResponse,
4117
+ kind: protobuf.MethodKind.Unary
4118
+ },
4119
+ /**
4120
+ * Set or clear the organization's monthly budget.
4121
+ *
4122
+ * Omitting amount_eur clears the budget and turns the alert emails off.
4123
+ * Changing the amount never re-sends an alert step already sent this period;
4124
+ * see Budget.notified_steps.
4125
+ *
4126
+ * @generated from rpc transcodely.v1.BillingService.UpdateBudget
4127
+ */
4128
+ updateBudget: {
4129
+ name: "UpdateBudget",
4130
+ I: UpdateBudgetRequest,
4131
+ O: UpdateBudgetResponse,
4132
+ kind: protobuf.MethodKind.Unary
4133
+ },
4134
+ /**
4135
+ * Retrieve the organization's outstanding balance — usage that has been
4136
+ * accrued but not yet billed — together with the threshold it is measured
4137
+ * against, in one call: everything an outstanding-balance card needs.
4138
+ *
4139
+ * Distinct from GetUpcomingInvoice, which shows what the CURRENT PERIOD has
4140
+ * accrued. This shows what is UNSETTLED, which also includes anything a
4141
+ * previous period left uncaptured, and it is the number that decides whether
4142
+ * new jobs are admitted.
4143
+ *
4144
+ * @generated from rpc transcodely.v1.BillingService.GetOutstandingBalance
4145
+ */
4146
+ getOutstandingBalance: {
4147
+ name: "GetOutstandingBalance",
4148
+ I: GetOutstandingBalanceRequest,
4149
+ O: GetOutstandingBalanceResponse,
4150
+ kind: protobuf.MethodKind.Unary
4151
+ },
4152
+ /**
4153
+ * Pay the outstanding balance now, without waiting for the period to end.
4154
+ *
4155
+ * Closes the current period at this instant and produces a real statement for
4156
+ * everything owed, which the payment provider then charges. On success the
4157
+ * outstanding balance is zero, any admission block is lifted immediately, and
4158
+ * the organization's trust tier re-evaluates once the statement is paid.
4159
+ *
4160
+ * Returns failed_precondition with error code "settlement_unavailable" when
4161
+ * the deployment has mid-cycle settlement switched off, and
4162
+ * "nothing_outstanding" when there is nothing to pay.
4163
+ *
4164
+ * @generated from rpc transcodely.v1.BillingService.SettleOutstandingBalance
4165
+ */
4166
+ settleOutstandingBalance: {
4167
+ name: "SettleOutstandingBalance",
4168
+ I: SettleOutstandingBalanceRequest,
4169
+ O: SettleOutstandingBalanceResponse,
4170
+ kind: protobuf.MethodKind.Unary
3216
4171
  }
3217
4172
  }
3218
4173
  };
@@ -3319,6 +4274,113 @@ var Billing = class {
3319
4274
  );
3320
4275
  return res.session;
3321
4276
  }
4277
+ /**
4278
+ * Retrieve the organization's monthly budget together with the spend it is
4279
+ * measured against — everything a budget card needs, in one call.
4280
+ *
4281
+ * A budget only ever **notifies**: crossing 100% sends an email and changes
4282
+ * nothing else. The hard cap is the per-app spend limit
4283
+ * (`client.apps.setSpendLimit`), which rejects new jobs at 100%.
4284
+ *
4285
+ * Always returns a budget. An organization with none set gets one with
4286
+ * `amountEur` and `usedPercent` absent and `spentEur` still populated, so the
4287
+ * current period's spend renders before a budget exists.
4288
+ */
4289
+ async retrieveBudget(opts) {
4290
+ const res = await this.transport.unary(
4291
+ BillingService,
4292
+ BillingService.methods.getBudget,
4293
+ new GetBudgetRequest({}),
4294
+ opts
4295
+ );
4296
+ return res.budget;
4297
+ }
4298
+ /**
4299
+ * Set or clear the organization's monthly budget. Provide `amountEur` (must
4300
+ * be > 0) to set it; omit it to clear the budget and stop the alert emails.
4301
+ * {@link setBudget} and {@link clearBudget} are the ergonomic shorthands.
4302
+ *
4303
+ * The returned budget has current-period spend recomputed, so a caller that
4304
+ * just moved the number can re-render without a second request.
4305
+ */
4306
+ async updateBudget(req = {}, opts) {
4307
+ const res = await this.transport.unary(
4308
+ BillingService,
4309
+ BillingService.methods.updateBudget,
4310
+ new UpdateBudgetRequest(req),
4311
+ opts
4312
+ );
4313
+ return res.budget;
4314
+ }
4315
+ /**
4316
+ * Set the organization's monthly budget in EUR (must be > 0).
4317
+ *
4318
+ * Alert emails fire once per billing period at each of `budget.alertSteps`
4319
+ * (50%, 80%, 100% today). Raising or lowering the amount mid-period never
4320
+ * re-arms a step already listed in `budget.notifiedSteps`.
4321
+ */
4322
+ setBudget(amountEur, opts) {
4323
+ return this.updateBudget({ amountEur }, opts);
4324
+ }
4325
+ /**
4326
+ * Clear the organization's monthly budget, turning the alert emails off —
4327
+ * omitting the optional amount is the only way to switch them off.
4328
+ */
4329
+ clearBudget(opts) {
4330
+ return this.updateBudget({}, opts);
4331
+ }
4332
+ /**
4333
+ * Retrieve the organization's outstanding balance — usage accrued but not yet
4334
+ * captured onto a statement — together with the threshold it is measured
4335
+ * against.
4336
+ *
4337
+ * Distinct from {@link retrieveUpcoming}, which reports what the **current
4338
+ * period** has accrued: this is what is **unsettled**, so it also carries
4339
+ * anything an earlier period left uncaptured, and it is the number that
4340
+ * decides whether new jobs are admitted.
4341
+ *
4342
+ * Nothing is restricted as it climbs — reminder emails go out at 80%, 100%,
4343
+ * 125%, 150% and 175% and service continues past the threshold on purpose.
4344
+ * Only at `hardStopCents` (twice the threshold) are new jobs refused, with
4345
+ * error code `outstanding_balance_exceeded`; queued and running work still
4346
+ * finishes and playback keeps serving. Branch on `blocked`, which reads the
4347
+ * same numbers the admission gate reads.
4348
+ */
4349
+ async retrieveOutstandingBalance(opts) {
4350
+ const res = await this.transport.unary(
4351
+ BillingService,
4352
+ BillingService.methods.getOutstandingBalance,
4353
+ new GetOutstandingBalanceRequest({}),
4354
+ opts
4355
+ );
4356
+ return res.balance;
4357
+ }
4358
+ /**
4359
+ * Pay the outstanding balance now, without waiting for the period to end.
4360
+ *
4361
+ * Closes the current period at this instant and produces a real statement —
4362
+ * an ordinary invoice, readable through {@link retrieve} — which the payment
4363
+ * provider then charges. On success the balance is zero and any admission
4364
+ * block is lifted immediately; the response carries the refreshed balance too,
4365
+ * so no follow-up read is needed.
4366
+ *
4367
+ * Takes no amount on purpose: the figure is whatever the ledger says at the
4368
+ * instant it runs, so a stale page cannot underpay and leave the difference
4369
+ * looking settled.
4370
+ *
4371
+ * Throws {@link PreconditionError} with code `settlement_unavailable` when the
4372
+ * deployment has mid-cycle settlement switched off — check
4373
+ * `balance.settlementAvailable` before offering a "pay now" action — and with
4374
+ * `nothing_outstanding` when there is nothing to pay.
4375
+ */
4376
+ settleOutstandingBalance(opts) {
4377
+ return this.transport.unary(
4378
+ BillingService,
4379
+ BillingService.methods.settleOutstandingBalance,
4380
+ new SettleOutstandingBalanceRequest({}),
4381
+ opts
4382
+ );
4383
+ }
3322
4384
  };
3323
4385
  var WebhookEndpoint = class _WebhookEndpoint extends protobuf.Message {
3324
4386
  /**
@@ -6172,6 +7234,11 @@ var StreamingConfig = class _StreamingConfig extends protobuf.Message {
6172
7234
  * Example: "video_{resolution}" produces "video_1080p.m3u8"
6173
7235
  * Default: "{codec}_{resolution}" produces "h264_1080p.m3u8"
6174
7236
  *
7237
+ * The rendered value becomes a filename and is also carried through the
7238
+ * packager's stream descriptors, so the accepted charset is deliberately
7239
+ * narrow: letters, digits, `_`, `-`, `.` and the `{}` that delimit template
7240
+ * variables. No path separators, no `..`, and none of `, : ; ' " \`.
7241
+ *
6175
7242
  * @generated from field: optional string hls_variant_pattern = 12;
6176
7243
  */
6177
7244
  hlsVariantPattern;
@@ -6241,6 +7308,12 @@ var BurnInStyle = class _BurnInStyle extends protobuf.Message {
6241
7308
  /**
6242
7309
  * Font family name. Default: "Arial".
6243
7310
  *
7311
+ * Letters, digits, spaces, `_` and `-` only. The value is embedded in the
7312
+ * renderer's style string, where a quote, comma or semicolon would terminate
7313
+ * it and let whatever follows parse as further styling arguments.
7314
+ *
7315
+ * Example: "DejaVu Sans"
7316
+ *
6244
7317
  * @generated from field: optional string font_family = 1;
6245
7318
  */
6246
7319
  fontFamily;
@@ -9772,6 +10845,11 @@ var HLSConfig = class _HLSConfig extends protobuf.Message {
9772
10845
  * Variables: {codec}, {resolution}, {bitrate}, {index}
9773
10846
  * Default: "{codec}_{resolution}"
9774
10847
  *
10848
+ * The rendered value becomes a filename and is also carried through the
10849
+ * packager's stream descriptors, so the accepted charset is deliberately
10850
+ * narrow: letters, digits, `_`, `-`, `.` and the `{}` that delimit template
10851
+ * variables. No path separators, no `..`, and none of `, : ; ' " \`.
10852
+ *
9775
10853
  * @generated from field: optional string variant_pattern = 4;
9776
10854
  */
9777
10855
  variantPattern;
@@ -12520,6 +13598,18 @@ var Video = class _Video extends protobuf.Message {
12520
13598
  */
12521
13599
  outputSizeBytes = protobuf.protoInt64.zero;
12522
13600
  /**
13601
+ * Total billed by the transcode job that produced this video, in EUR.
13602
+ *
13603
+ * Despite the name this is the job's WHOLE total, not encoding alone: a
13604
+ * job's total already includes every fee billed on it, so for a video
13605
+ * captioned inline (the auto_captions upload flag) the captions fee is part
13606
+ * of this number, as is the flat per-job processing fee. Absent until the
13607
+ * job settles.
13608
+ *
13609
+ * Prefer total_cost. This field covers one job, so it misses the cost of
13610
+ * later jobs run against the video, and adding captions_cost to it
13611
+ * double-counts inline captions.
13612
+ *
12523
13613
  * @generated from field: optional double encoding_cost = 31;
12524
13614
  */
12525
13615
  encodingCost;
@@ -12531,11 +13621,35 @@ var Video = class _Video extends protobuf.Message {
12531
13621
  * confirmed only when a caption artifact is actually delivered, so voided
12532
13622
  * and still-estimated fees are never counted. This is a per-feature
12533
13623
  * breakdown of already-billed job totals, not an extra charge on top of
12534
- * them.
13624
+ * them: it is contained in total_cost, never added to it.
12535
13625
  *
12536
13626
  * @generated from field: optional double captions_cost = 50;
12537
13627
  */
12538
13628
  captionsCost;
13629
+ /**
13630
+ * Everything this video has cost, in EUR: the sum of the settled totals of
13631
+ * every job billed for it — the transcode that produced it plus any later
13632
+ * job that took it as input (retro captions, for example).
13633
+ *
13634
+ * This is the authoritative per-video figure and the one to display. It is
13635
+ * built from the same job totals the billing ledger is written from, so it
13636
+ * reconciles with the invoice; captions_cost is a breakdown inside it.
13637
+ * Absent while no linked job has settled yet.
13638
+ *
13639
+ * @generated from field: optional double total_cost = 52;
13640
+ */
13641
+ totalCost;
13642
+ /**
13643
+ * Why this video failed, in one sentence a customer can act on. Present only
13644
+ * when status is "error"; absent for every other status.
13645
+ *
13646
+ * This is curated copy, never raw failure text — it will not contain
13647
+ * encoder output, storage-provider responses, or internal identifiers. When
13648
+ * the video has a linked job, that job's error_message says the same thing.
13649
+ *
13650
+ * @generated from field: optional string error_message = 51;
13651
+ */
13652
+ errorMessage;
12539
13653
  /**
12540
13654
  * Timestamps.
12541
13655
  *
@@ -12650,6 +13764,8 @@ var Video = class _Video extends protobuf.Message {
12650
13764
  },
12651
13765
  { no: 31, name: "encoding_cost", kind: "scalar", T: 1, opt: true },
12652
13766
  { no: 50, name: "captions_cost", kind: "scalar", T: 1, opt: true },
13767
+ { no: 52, name: "total_cost", kind: "scalar", T: 1, opt: true },
13768
+ { no: 51, name: "error_message", kind: "scalar", T: 9, opt: true },
12653
13769
  { no: 40, name: "created_at", kind: "message", T: protobuf.Timestamp },
12654
13770
  { no: 41, name: "updated_at", kind: "message", T: protobuf.Timestamp },
12655
13771
  { no: 42, name: "ready_at", kind: "message", T: protobuf.Timestamp, opt: true },
@@ -15517,7 +16633,7 @@ function backoff(attempt) {
15517
16633
  }
15518
16634
 
15519
16635
  // src/version.ts
15520
- var SDK_VERSION = "0.3.6";
16636
+ var SDK_VERSION = "0.3.7";
15521
16637
  var API_VERSION = "2026-05-03";
15522
16638
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
15523
16639
 
@@ -16314,10 +17430,14 @@ var Organization = class _Organization extends protobuf.Message {
16314
17430
  */
16315
17431
  planName;
16316
17432
  /**
16317
- * Whether this org must have a payment method on file. NOT ENFORCED: no
16318
- * create, dispatch or delivery path reads this today. It records intent
16319
- * ahead of the release that starts requiring one, at which point orgs
16320
- * already carrying false are the grandfathered population.
17433
+ * Whether this org must have a payment method on file. ENFORCED: with no
17434
+ * usable payment method a required org derives a restricting
17435
+ * billing_standing, and its jobs resolve to the free tier's limits rather
17436
+ * than to its plan.
17437
+ *
17438
+ * Organizations created before the enforcement release carry false and are
17439
+ * the grandfathered population — unaffected until an operator turns it on.
17440
+ * A comped org (billing_exempt) is off the hook whatever this says.
16321
17441
  *
16322
17442
  * @generated from field: bool payment_method_required = 11;
16323
17443
  */
@@ -16336,19 +17456,24 @@ var Organization = class _Organization extends protobuf.Message {
16336
17456
  * Derived payment health. Always BILLING_STANDING_ACTIVE when
16337
17457
  * payment_method_required is false, whatever the facts below say.
16338
17458
  *
17459
+ * Filled on admin reads, and on OrganizationService.Get for a member of the
17460
+ * org (JWT/portal actors). Absent on the API-key read path, which gets a
17461
+ * refusal code on the create instead, and on List.
17462
+ *
16339
17463
  * @generated from field: transcodely.v1.BillingStanding billing_standing = 13;
16340
17464
  */
16341
17465
  billingStanding = 0 /* UNSPECIFIED */;
16342
17466
  /**
16343
17467
  * When the current grace window closes, present only while billing_standing
16344
- * is BILLING_STANDING_GRACE.
17468
+ * is BILLING_STANDING_GRACE. Filled wherever billing_standing is.
16345
17469
  *
16346
17470
  * @generated from field: optional google.protobuf.Timestamp grace_until = 14;
16347
17471
  */
16348
17472
  graceUntil;
16349
17473
  /**
16350
17474
  * Stable token explaining billing_standing; same vocabulary as
16351
- * BillingProfile.standing_reason.
17475
+ * BillingProfile.standing_reason. ADMIN reads only — tokens like
17476
+ * card_expired are payment-method detail, which a plain member never sees.
16352
17477
  *
16353
17478
  * @generated from field: string standing_reason = 15;
16354
17479
  */
@@ -16372,6 +17497,20 @@ var Organization = class _Organization extends protobuf.Message {
16372
17497
  * @generated from field: int32 consecutive_dunned_cycles = 17;
16373
17498
  */
16374
17499
  consecutiveDunnedCycles = 0;
17500
+ /**
17501
+ * How automation may treat this organization — see BillingTreatment.
17502
+ *
17503
+ * ADMIN reads only, like standing_reason above: it is a statement about a
17504
+ * commercial relationship, and a customer does not learn from an API field
17505
+ * that we have decided never to interrupt them.
17506
+ *
17507
+ * Orthogonal to billing_standing. A trusted org can report
17508
+ * BILLING_STANDING_DELINQUENT and still be untouched by every automated
17509
+ * path — the founder gets an email instead.
17510
+ *
17511
+ * @generated from field: transcodely.v1.BillingTreatment billing_treatment = 18;
17512
+ */
17513
+ billingTreatment = 0 /* UNSPECIFIED */;
16375
17514
  constructor(data) {
16376
17515
  super();
16377
17516
  protobuf.proto3.util.initPartial(data, this);
@@ -16443,7 +17582,8 @@ var Organization = class _Organization extends protobuf.Message {
16443
17582
  kind: "scalar",
16444
17583
  T: 5
16445
17584
  /* ScalarType.INT32 */
16446
- }
17585
+ },
17586
+ { no: 18, name: "billing_treatment", kind: "enum", T: protobuf.proto3.getEnumType(BillingTreatment) }
16447
17587
  ]);
16448
17588
  static fromBinary(bytes, options) {
16449
17589
  return new _Organization().fromBinary(bytes, options);
@@ -18684,8 +19824,7 @@ var User = class _User extends protobuf.Message {
18684
19824
  */
18685
19825
  updatedAt;
18686
19826
  /**
18687
- * Whether this user has been approved by a staff member.
18688
- * New sign-ups default to PENDING.
19827
+ * Whether this user may use the dashboard.
18689
19828
  *
18690
19829
  * @generated from field: transcodely.v1.UserApprovalStatus approval_status = 11;
18691
19830
  */
@@ -18697,7 +19836,8 @@ var User = class _User extends protobuf.Message {
18697
19836
  */
18698
19837
  approvalDecidedAt;
18699
19838
  /**
18700
- * The staff member's user_id who decided approval.
19839
+ * The staff member's user_id who decided approval. Absent when the user was
19840
+ * approved automatically rather than by a person.
18701
19841
  *
18702
19842
  * @generated from field: optional string approval_decided_by_user_id = 13;
18703
19843
  */
@@ -20261,6 +21401,7 @@ exports.AppStatus = AppStatus;
20261
21401
  exports.AudioCodec = AudioCodec;
20262
21402
  exports.AuthenticationError = AuthenticationError;
20263
21403
  exports.BillingStanding = BillingStanding;
21404
+ exports.BillingTreatment = BillingTreatment;
20264
21405
  exports.BitrateMode = BitrateMode;
20265
21406
  exports.ConflictError = ConflictError;
20266
21407
  exports.Container = Container;
@@ -20270,8 +21411,10 @@ exports.DEFAULT_BASE_URL = DEFAULT_BASE_URL;
20270
21411
  exports.DEFAULT_TOLERANCE_SECONDS = DEFAULT_TOLERANCE_SECONDS;
20271
21412
  exports.DRMSystem = DRMSystem;
20272
21413
  exports.DeliveryFormat = DeliveryFormat;
21414
+ exports.DunningStage = DunningStage;
20273
21415
  exports.EVENT_ID_HEADER = EVENT_ID_HEADER;
20274
21416
  exports.EncryptionScheme = EncryptionScheme;
21417
+ exports.ExposureThresholdSource = ExposureThresholdSource;
20275
21418
  exports.GOPAlignmentMode = GOPAlignmentMode;
20276
21419
  exports.HDRFormat = HDRFormat;
20277
21420
  exports.HDRMode = HDRMode;
@@ -20309,6 +21452,7 @@ exports.ThumbnailMode = ThumbnailMode;
20309
21452
  exports.ToneMapping = ToneMapping;
20310
21453
  exports.Transcodely = Transcodely;
20311
21454
  exports.TranscodelyError = TranscodelyError;
21455
+ exports.TrustTier = TrustTier;
20312
21456
  exports.UserApprovalStatus = UserApprovalStatus;
20313
21457
  exports.UserStatus = UserStatus;
20314
21458
  exports.VideoCodec = VideoCodec;