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