@transcodely/sdk 0.3.4 → 0.3.6

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
@@ -149,6 +149,21 @@ protobuf.proto3.util.setEnumType(BitrateMode, "transcodely.v1.BitrateMode", [
149
149
  { no: 2, name: "BITRATE_MODE_CBR" },
150
150
  { no: 3, name: "BITRATE_MODE_VBR" }
151
151
  ]);
152
+ var BillingStanding = /* @__PURE__ */ ((BillingStanding2) => {
153
+ BillingStanding2[BillingStanding2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
154
+ BillingStanding2[BillingStanding2["FREE"] = 1] = "FREE";
155
+ BillingStanding2[BillingStanding2["ACTIVE"] = 2] = "ACTIVE";
156
+ BillingStanding2[BillingStanding2["GRACE"] = 3] = "GRACE";
157
+ BillingStanding2[BillingStanding2["DELINQUENT"] = 4] = "DELINQUENT";
158
+ return BillingStanding2;
159
+ })(BillingStanding || {});
160
+ protobuf.proto3.util.setEnumType(BillingStanding, "transcodely.v1.BillingStanding", [
161
+ { no: 0, name: "BILLING_STANDING_UNSPECIFIED" },
162
+ { no: 1, name: "BILLING_STANDING_FREE" },
163
+ { no: 2, name: "BILLING_STANDING_ACTIVE" },
164
+ { no: 3, name: "BILLING_STANDING_GRACE" },
165
+ { no: 4, name: "BILLING_STANDING_DELINQUENT" }
166
+ ]);
152
167
  var PaginationRequest = class _PaginationRequest extends protobuf.Message {
153
168
  /**
154
169
  * Maximum number of items to return (default: 20, max: 100).
@@ -2269,6 +2284,17 @@ protobuf.proto3.util.setEnumType(InvoiceLineType, "transcodely.v1.InvoiceLineTyp
2269
2284
  { no: 3, name: "INVOICE_LINE_TYPE_MIN_CHARGE" },
2270
2285
  { no: 4, name: "INVOICE_LINE_TYPE_ADJUSTMENT" }
2271
2286
  ]);
2287
+ var PaymentMethodState = /* @__PURE__ */ ((PaymentMethodState2) => {
2288
+ PaymentMethodState2[PaymentMethodState2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
2289
+ PaymentMethodState2[PaymentMethodState2["NONE"] = 1] = "NONE";
2290
+ PaymentMethodState2[PaymentMethodState2["ON_FILE"] = 2] = "ON_FILE";
2291
+ return PaymentMethodState2;
2292
+ })(PaymentMethodState || {});
2293
+ protobuf.proto3.util.setEnumType(PaymentMethodState, "transcodely.v1.PaymentMethodState", [
2294
+ { no: 0, name: "PAYMENT_METHOD_STATE_UNSPECIFIED" },
2295
+ { no: 1, name: "PAYMENT_METHOD_STATE_NONE" },
2296
+ { no: 2, name: "PAYMENT_METHOD_STATE_ON_FILE" }
2297
+ ]);
2272
2298
  var Invoice = class _Invoice extends protobuf.Message {
2273
2299
  /**
2274
2300
  * Unique identifier (e.g., "inv_a1b2c3d4e5f6").
@@ -2535,6 +2561,298 @@ var InvoiceLineItem = class _InvoiceLineItem extends protobuf.Message {
2535
2561
  return protobuf.proto3.util.equals(_InvoiceLineItem, a, b);
2536
2562
  }
2537
2563
  };
2564
+ var BillingProfile = class _BillingProfile extends protobuf.Message {
2565
+ /**
2566
+ * Object type, always "billing_profile".
2567
+ *
2568
+ * @generated from field: string object = 1;
2569
+ */
2570
+ object = "";
2571
+ /**
2572
+ * Organization this profile describes.
2573
+ *
2574
+ * @generated from field: string org_id = 2;
2575
+ */
2576
+ orgId = "";
2577
+ /**
2578
+ * Whether a payment method is on file. Determined by whether the payment
2579
+ * provider holds any payment method for this organization, and by nothing
2580
+ * else — in particular, a method missing its card details is still a
2581
+ * payment method.
2582
+ *
2583
+ * @generated from field: transcodely.v1.PaymentMethodState payment_method_state = 3;
2584
+ */
2585
+ paymentMethodState = 0 /* UNSPECIFIED */;
2586
+ /**
2587
+ * The methods the provider holds, for display only. Empty when the state is
2588
+ * "none", and never empty when the state is "on_file".
2589
+ *
2590
+ * @generated from field: repeated transcodely.v1.BillingPaymentMethod payment_methods = 4;
2591
+ */
2592
+ paymentMethods = [];
2593
+ /**
2594
+ * The organization's billing email, which the payment provider requires
2595
+ * before it will accept a payment method. Absent when unset.
2596
+ *
2597
+ * @generated from field: optional string billing_email = 5;
2598
+ */
2599
+ billingEmail;
2600
+ /**
2601
+ * The organization's derived payment health, and what its usage limits
2602
+ * resolve from. See BillingStanding.
2603
+ *
2604
+ * @generated from field: transcodely.v1.BillingStanding standing = 6;
2605
+ */
2606
+ standing = 0 /* UNSPECIFIED */;
2607
+ /**
2608
+ * When the current grace window closes. Present if and only if standing is
2609
+ * BILLING_STANDING_GRACE. At this instant the account is already past it —
2610
+ * the deadline is inclusive — and what it becomes is determined by
2611
+ * standing_reason: a card problem decays to FREE, an unpaid invoice to
2612
+ * DELINQUENT.
2613
+ *
2614
+ * @generated from field: optional google.protobuf.Timestamp grace_until = 7;
2615
+ */
2616
+ graceUntil;
2617
+ /**
2618
+ * Why standing is what it is, as a stable token to switch on rather than
2619
+ * copy to display:
2620
+ *
2621
+ * "" nothing is wrong
2622
+ * "exempt" the org is not required to hold a payment
2623
+ * method, so standing is always active
2624
+ * "no_payment_method" none has ever been on file
2625
+ * "card_expired" one is on file and its expiry has passed
2626
+ * "card_removed" one we had observed is gone
2627
+ * "invoice_past_due" an invoice failed to collect
2628
+ * "repeated_invoice_failure" a second consecutive failure, which earns no
2629
+ * grace window at all
2630
+ *
2631
+ * New tokens may be added; treat an unrecognized one as a generic billing
2632
+ * problem rather than failing.
2633
+ *
2634
+ * @generated from field: string standing_reason = 8;
2635
+ */
2636
+ standingReason = "";
2637
+ /**
2638
+ * Whether this organization must hold a payment method. FALSE means it is
2639
+ * exempt — organizations predating the requirement are, and an operator may
2640
+ * exempt one deliberately — in which case standing is always
2641
+ * BILLING_STANDING_ACTIVE and no banner or prompt about payment methods
2642
+ * should be shown.
2643
+ *
2644
+ * Exempt is not free service: the organization still accrues usage and is
2645
+ * still invoiced. It simply is not limited for lacking a card on file.
2646
+ *
2647
+ * @generated from field: bool payment_method_required = 9;
2648
+ */
2649
+ paymentMethodRequired = false;
2650
+ constructor(data) {
2651
+ super();
2652
+ protobuf.proto3.util.initPartial(data, this);
2653
+ }
2654
+ static runtime = protobuf.proto3;
2655
+ static typeName = "transcodely.v1.BillingProfile";
2656
+ static fields = protobuf.proto3.util.newFieldList(() => [
2657
+ {
2658
+ no: 1,
2659
+ name: "object",
2660
+ kind: "scalar",
2661
+ T: 9
2662
+ /* ScalarType.STRING */
2663
+ },
2664
+ {
2665
+ no: 2,
2666
+ name: "org_id",
2667
+ kind: "scalar",
2668
+ T: 9
2669
+ /* ScalarType.STRING */
2670
+ },
2671
+ { no: 3, name: "payment_method_state", kind: "enum", T: protobuf.proto3.getEnumType(PaymentMethodState) },
2672
+ { no: 4, name: "payment_methods", kind: "message", T: BillingPaymentMethod, repeated: true },
2673
+ { no: 5, name: "billing_email", kind: "scalar", T: 9, opt: true },
2674
+ { no: 6, name: "standing", kind: "enum", T: protobuf.proto3.getEnumType(BillingStanding) },
2675
+ { no: 7, name: "grace_until", kind: "message", T: protobuf.Timestamp, opt: true },
2676
+ {
2677
+ no: 8,
2678
+ name: "standing_reason",
2679
+ kind: "scalar",
2680
+ T: 9
2681
+ /* ScalarType.STRING */
2682
+ },
2683
+ {
2684
+ no: 9,
2685
+ name: "payment_method_required",
2686
+ kind: "scalar",
2687
+ T: 8
2688
+ /* ScalarType.BOOL */
2689
+ }
2690
+ ]);
2691
+ static fromBinary(bytes, options) {
2692
+ return new _BillingProfile().fromBinary(bytes, options);
2693
+ }
2694
+ static fromJson(jsonValue, options) {
2695
+ return new _BillingProfile().fromJson(jsonValue, options);
2696
+ }
2697
+ static fromJsonString(jsonString, options) {
2698
+ return new _BillingProfile().fromJsonString(jsonString, options);
2699
+ }
2700
+ static equals(a, b) {
2701
+ return protobuf.proto3.util.equals(_BillingProfile, a, b);
2702
+ }
2703
+ };
2704
+ var BillingPaymentMethod = class _BillingPaymentMethod extends protobuf.Message {
2705
+ /**
2706
+ * The payment provider's identifier for this method.
2707
+ *
2708
+ * @generated from field: string id = 1;
2709
+ */
2710
+ id = "";
2711
+ /**
2712
+ * Method family: "card", or "generic" for everything else the provider
2713
+ * supports (direct debit and similar). Always present.
2714
+ *
2715
+ * @generated from field: string type = 2;
2716
+ */
2717
+ type = "";
2718
+ /**
2719
+ * Card network, e.g. "visa" or "mastercard". Cards only, and only when the
2720
+ * provider exposes it.
2721
+ *
2722
+ * @generated from field: optional string brand = 3;
2723
+ */
2724
+ brand;
2725
+ /**
2726
+ * Last four digits of the card number. Cards only, and only when the
2727
+ * provider exposes it.
2728
+ *
2729
+ * @generated from field: optional string last4 = 4;
2730
+ */
2731
+ last4;
2732
+ /**
2733
+ * Expiry month, 1-12. Cards only, and only when the provider exposes it.
2734
+ *
2735
+ * @generated from field: optional int32 exp_month = 5;
2736
+ */
2737
+ expMonth;
2738
+ /**
2739
+ * Expiry year, four digits. Cards only, and only when the provider exposes
2740
+ * it.
2741
+ *
2742
+ * @generated from field: optional int32 exp_year = 6;
2743
+ */
2744
+ expYear;
2745
+ /**
2746
+ * Whether this is the method the provider charges by default. Advisory: the
2747
+ * provider does not always mark a default, so false here does not mean the
2748
+ * method is unused, and it is never a signal about the organization's
2749
+ * payment standing.
2750
+ *
2751
+ * @generated from field: bool is_default = 7;
2752
+ */
2753
+ isDefault = false;
2754
+ constructor(data) {
2755
+ super();
2756
+ protobuf.proto3.util.initPartial(data, this);
2757
+ }
2758
+ static runtime = protobuf.proto3;
2759
+ static typeName = "transcodely.v1.BillingPaymentMethod";
2760
+ static fields = protobuf.proto3.util.newFieldList(() => [
2761
+ {
2762
+ no: 1,
2763
+ name: "id",
2764
+ kind: "scalar",
2765
+ T: 9
2766
+ /* ScalarType.STRING */
2767
+ },
2768
+ {
2769
+ no: 2,
2770
+ name: "type",
2771
+ kind: "scalar",
2772
+ T: 9
2773
+ /* ScalarType.STRING */
2774
+ },
2775
+ { no: 3, name: "brand", kind: "scalar", T: 9, opt: true },
2776
+ { no: 4, name: "last4", kind: "scalar", T: 9, opt: true },
2777
+ { no: 5, name: "exp_month", kind: "scalar", T: 5, opt: true },
2778
+ { no: 6, name: "exp_year", kind: "scalar", T: 5, opt: true },
2779
+ {
2780
+ no: 7,
2781
+ name: "is_default",
2782
+ kind: "scalar",
2783
+ T: 8
2784
+ /* ScalarType.BOOL */
2785
+ }
2786
+ ]);
2787
+ static fromBinary(bytes, options) {
2788
+ return new _BillingPaymentMethod().fromBinary(bytes, options);
2789
+ }
2790
+ static fromJson(jsonValue, options) {
2791
+ return new _BillingPaymentMethod().fromJson(jsonValue, options);
2792
+ }
2793
+ static fromJsonString(jsonString, options) {
2794
+ return new _BillingPaymentMethod().fromJsonString(jsonString, options);
2795
+ }
2796
+ static equals(a, b) {
2797
+ return protobuf.proto3.util.equals(_BillingPaymentMethod, a, b);
2798
+ }
2799
+ };
2800
+ var BillingPortalSession = class _BillingPortalSession extends protobuf.Message {
2801
+ /**
2802
+ * Object type, always "billing_portal_session".
2803
+ *
2804
+ * @generated from field: string object = 1;
2805
+ */
2806
+ object = "";
2807
+ /**
2808
+ * Where to send the browser. Single-use and short-lived; request a new
2809
+ * session rather than storing this.
2810
+ *
2811
+ * @generated from field: string url = 2;
2812
+ */
2813
+ url = "";
2814
+ /**
2815
+ * When the session stops working.
2816
+ *
2817
+ * @generated from field: google.protobuf.Timestamp expires_at = 3;
2818
+ */
2819
+ expiresAt;
2820
+ constructor(data) {
2821
+ super();
2822
+ protobuf.proto3.util.initPartial(data, this);
2823
+ }
2824
+ static runtime = protobuf.proto3;
2825
+ static typeName = "transcodely.v1.BillingPortalSession";
2826
+ static fields = protobuf.proto3.util.newFieldList(() => [
2827
+ {
2828
+ no: 1,
2829
+ name: "object",
2830
+ kind: "scalar",
2831
+ T: 9
2832
+ /* ScalarType.STRING */
2833
+ },
2834
+ {
2835
+ no: 2,
2836
+ name: "url",
2837
+ kind: "scalar",
2838
+ T: 9
2839
+ /* ScalarType.STRING */
2840
+ },
2841
+ { no: 3, name: "expires_at", kind: "message", T: protobuf.Timestamp }
2842
+ ]);
2843
+ static fromBinary(bytes, options) {
2844
+ return new _BillingPortalSession().fromBinary(bytes, options);
2845
+ }
2846
+ static fromJson(jsonValue, options) {
2847
+ return new _BillingPortalSession().fromJson(jsonValue, options);
2848
+ }
2849
+ static fromJsonString(jsonString, options) {
2850
+ return new _BillingPortalSession().fromJsonString(jsonString, options);
2851
+ }
2852
+ static equals(a, b) {
2853
+ return protobuf.proto3.util.equals(_BillingPortalSession, a, b);
2854
+ }
2855
+ };
2538
2856
  var ListInvoicesRequest = class _ListInvoicesRequest extends protobuf.Message {
2539
2857
  /**
2540
2858
  * Pagination parameters.
@@ -2716,6 +3034,106 @@ var GetUpcomingInvoiceResponse = class _GetUpcomingInvoiceResponse extends proto
2716
3034
  return protobuf.proto3.util.equals(_GetUpcomingInvoiceResponse, a, b);
2717
3035
  }
2718
3036
  };
3037
+ var GetBillingProfileRequest = class _GetBillingProfileRequest extends protobuf.Message {
3038
+ constructor(data) {
3039
+ super();
3040
+ protobuf.proto3.util.initPartial(data, this);
3041
+ }
3042
+ static runtime = protobuf.proto3;
3043
+ static typeName = "transcodely.v1.GetBillingProfileRequest";
3044
+ static fields = protobuf.proto3.util.newFieldList(() => []);
3045
+ static fromBinary(bytes, options) {
3046
+ return new _GetBillingProfileRequest().fromBinary(bytes, options);
3047
+ }
3048
+ static fromJson(jsonValue, options) {
3049
+ return new _GetBillingProfileRequest().fromJson(jsonValue, options);
3050
+ }
3051
+ static fromJsonString(jsonString, options) {
3052
+ return new _GetBillingProfileRequest().fromJsonString(jsonString, options);
3053
+ }
3054
+ static equals(a, b) {
3055
+ return protobuf.proto3.util.equals(_GetBillingProfileRequest, a, b);
3056
+ }
3057
+ };
3058
+ var GetBillingProfileResponse = class _GetBillingProfileResponse extends protobuf.Message {
3059
+ /**
3060
+ * The organization's payment standing, read live from the payment provider.
3061
+ *
3062
+ * @generated from field: transcodely.v1.BillingProfile profile = 1;
3063
+ */
3064
+ profile;
3065
+ constructor(data) {
3066
+ super();
3067
+ protobuf.proto3.util.initPartial(data, this);
3068
+ }
3069
+ static runtime = protobuf.proto3;
3070
+ static typeName = "transcodely.v1.GetBillingProfileResponse";
3071
+ static fields = protobuf.proto3.util.newFieldList(() => [
3072
+ { no: 1, name: "profile", kind: "message", T: BillingProfile }
3073
+ ]);
3074
+ static fromBinary(bytes, options) {
3075
+ return new _GetBillingProfileResponse().fromBinary(bytes, options);
3076
+ }
3077
+ static fromJson(jsonValue, options) {
3078
+ return new _GetBillingProfileResponse().fromJson(jsonValue, options);
3079
+ }
3080
+ static fromJsonString(jsonString, options) {
3081
+ return new _GetBillingProfileResponse().fromJsonString(jsonString, options);
3082
+ }
3083
+ static equals(a, b) {
3084
+ return protobuf.proto3.util.equals(_GetBillingProfileResponse, a, b);
3085
+ }
3086
+ };
3087
+ var CreateBillingPortalSessionRequest = class _CreateBillingPortalSessionRequest extends protobuf.Message {
3088
+ constructor(data) {
3089
+ super();
3090
+ protobuf.proto3.util.initPartial(data, this);
3091
+ }
3092
+ static runtime = protobuf.proto3;
3093
+ static typeName = "transcodely.v1.CreateBillingPortalSessionRequest";
3094
+ static fields = protobuf.proto3.util.newFieldList(() => []);
3095
+ static fromBinary(bytes, options) {
3096
+ return new _CreateBillingPortalSessionRequest().fromBinary(bytes, options);
3097
+ }
3098
+ static fromJson(jsonValue, options) {
3099
+ return new _CreateBillingPortalSessionRequest().fromJson(jsonValue, options);
3100
+ }
3101
+ static fromJsonString(jsonString, options) {
3102
+ return new _CreateBillingPortalSessionRequest().fromJsonString(jsonString, options);
3103
+ }
3104
+ static equals(a, b) {
3105
+ return protobuf.proto3.util.equals(_CreateBillingPortalSessionRequest, a, b);
3106
+ }
3107
+ };
3108
+ var CreateBillingPortalSessionResponse = class _CreateBillingPortalSessionResponse extends protobuf.Message {
3109
+ /**
3110
+ * The session. Redirect the browser to its url.
3111
+ *
3112
+ * @generated from field: transcodely.v1.BillingPortalSession session = 1;
3113
+ */
3114
+ session;
3115
+ constructor(data) {
3116
+ super();
3117
+ protobuf.proto3.util.initPartial(data, this);
3118
+ }
3119
+ static runtime = protobuf.proto3;
3120
+ static typeName = "transcodely.v1.CreateBillingPortalSessionResponse";
3121
+ static fields = protobuf.proto3.util.newFieldList(() => [
3122
+ { no: 1, name: "session", kind: "message", T: BillingPortalSession }
3123
+ ]);
3124
+ static fromBinary(bytes, options) {
3125
+ return new _CreateBillingPortalSessionResponse().fromBinary(bytes, options);
3126
+ }
3127
+ static fromJson(jsonValue, options) {
3128
+ return new _CreateBillingPortalSessionResponse().fromJson(jsonValue, options);
3129
+ }
3130
+ static fromJsonString(jsonString, options) {
3131
+ return new _CreateBillingPortalSessionResponse().fromJsonString(jsonString, options);
3132
+ }
3133
+ static equals(a, b) {
3134
+ return protobuf.proto3.util.equals(_CreateBillingPortalSessionResponse, a, b);
3135
+ }
3136
+ };
2719
3137
  var BillingService = {
2720
3138
  typeName: "transcodely.v1.BillingService",
2721
3139
  methods: {
@@ -2761,6 +3179,40 @@ var BillingService = {
2761
3179
  I: GetUpcomingInvoiceRequest,
2762
3180
  O: GetUpcomingInvoiceResponse,
2763
3181
  kind: protobuf.MethodKind.Unary
3182
+ },
3183
+ /**
3184
+ * Retrieve the organization's billing profile: whether a payment method is
3185
+ * on file, and the card details the payment provider exposes for display.
3186
+ *
3187
+ * Read-only and side-effect free: it never creates provider resources. An
3188
+ * organization that has never touched billing gets payment_method_state
3189
+ * "none" and an empty payment_methods list.
3190
+ *
3191
+ * @generated from rpc transcodely.v1.BillingService.GetBillingProfile
3192
+ */
3193
+ getBillingProfile: {
3194
+ name: "GetBillingProfile",
3195
+ I: GetBillingProfileRequest,
3196
+ O: GetBillingProfileResponse,
3197
+ kind: protobuf.MethodKind.Unary
3198
+ },
3199
+ /**
3200
+ * Create a short-lived session for the payment provider's hosted billing
3201
+ * portal and return its URL. The portal is where a payment method is added
3202
+ * or replaced and where receipts live; card details never touch the
3203
+ * Transcodely API.
3204
+ *
3205
+ * First call for an organization also links it to the payment provider
3206
+ * (customer + subscription), so the returned portal is already attached to
3207
+ * this organization's billing account. Safe to call repeatedly.
3208
+ *
3209
+ * @generated from rpc transcodely.v1.BillingService.CreateBillingPortalSession
3210
+ */
3211
+ createBillingPortalSession: {
3212
+ name: "CreateBillingPortalSession",
3213
+ I: CreateBillingPortalSessionRequest,
3214
+ O: CreateBillingPortalSessionResponse,
3215
+ kind: protobuf.MethodKind.Unary
2764
3216
  }
2765
3217
  }
2766
3218
  };
@@ -2824,6 +3276,49 @@ var Billing = class {
2824
3276
  );
2825
3277
  return res.invoice;
2826
3278
  }
3279
+ /**
3280
+ * Retrieve the organization's payment standing: whether the payment provider
3281
+ * holds a chargeable method, and what it will say about it for display.
3282
+ *
3283
+ * Read-only and side-effect free — it never creates provider resources. An
3284
+ * organization that has never touched billing reports
3285
+ * `PaymentMethodState.NONE` and no payment methods.
3286
+ *
3287
+ * `paymentMethodState` is the only reliable signal. A method's `brand` and
3288
+ * `last4` are frequently absent even for a working card, because the provider
3289
+ * does not always expose card metadata; render such a method as "Card on
3290
+ * file" rather than treating the missing digits as an error.
3291
+ */
3292
+ async retrieveProfile(opts) {
3293
+ const res = await this.transport.unary(
3294
+ BillingService,
3295
+ BillingService.methods.getBillingProfile,
3296
+ new GetBillingProfileRequest({}),
3297
+ opts
3298
+ );
3299
+ return res.profile;
3300
+ }
3301
+ /**
3302
+ * Create a short-lived session for the payment provider's hosted billing
3303
+ * portal and return it. The portal is where a payment method is added or
3304
+ * replaced and where receipts live — card details never touch this SDK.
3305
+ *
3306
+ * The first call for an organization also links it to the payment provider,
3307
+ * so the returned portal is already attached to this organization's billing
3308
+ * account. Safe to call repeatedly.
3309
+ *
3310
+ * The session is single-use and expires; request a fresh one per visit rather
3311
+ * than storing the URL.
3312
+ */
3313
+ async createPortalSession(opts) {
3314
+ const res = await this.transport.unary(
3315
+ BillingService,
3316
+ BillingService.methods.createBillingPortalSession,
3317
+ new CreateBillingPortalSessionRequest({}),
3318
+ opts
3319
+ );
3320
+ return res.session;
3321
+ }
2827
3322
  };
2828
3323
  var WebhookEndpoint = class _WebhookEndpoint extends protobuf.Message {
2829
3324
  /**
@@ -9065,6 +9560,21 @@ protobuf.proto3.util.setEnumType(WatchEventType, "transcodely.v1.WatchEventType"
9065
9560
  { no: 4, name: "WATCH_EVENT_TYPE_COMPLETED" },
9066
9561
  { no: 5, name: "WATCH_EVENT_TYPE_HEARTBEAT" }
9067
9562
  ]);
9563
+ var JobCostLineType = /* @__PURE__ */ ((JobCostLineType2) => {
9564
+ JobCostLineType2[JobCostLineType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
9565
+ JobCostLineType2[JobCostLineType2["OUTPUT"] = 1] = "OUTPUT";
9566
+ JobCostLineType2[JobCostLineType2["MINIMUM_CHARGE"] = 2] = "MINIMUM_CHARGE";
9567
+ JobCostLineType2[JobCostLineType2["FEE"] = 3] = "FEE";
9568
+ JobCostLineType2[JobCostLineType2["ADJUSTMENT"] = 4] = "ADJUSTMENT";
9569
+ return JobCostLineType2;
9570
+ })(JobCostLineType || {});
9571
+ protobuf.proto3.util.setEnumType(JobCostLineType, "transcodely.v1.JobCostLineType", [
9572
+ { no: 0, name: "JOB_COST_LINE_TYPE_UNSPECIFIED" },
9573
+ { no: 1, name: "JOB_COST_LINE_TYPE_OUTPUT" },
9574
+ { no: 2, name: "JOB_COST_LINE_TYPE_MINIMUM_CHARGE" },
9575
+ { no: 3, name: "JOB_COST_LINE_TYPE_FEE" },
9576
+ { no: 4, name: "JOB_COST_LINE_TYPE_ADJUSTMENT" }
9577
+ ]);
9068
9578
  var AudioTrackConfig = class _AudioTrackConfig extends protobuf.Message {
9069
9579
  /**
9070
9580
  * ISO 639-2 language code (e.g., "eng", "spa", "jpn", "fra").
@@ -10504,17 +11014,26 @@ var Job = class _Job extends protobuf.Message {
10504
11014
  *
10505
11015
  * Only completed outputs are billable, and what happened to the job as a
10506
11016
  * whole decides whether they are billed at all:
10507
- * - completed: the sum of its outputs' actual costs, raised to
10508
- * minimum_charge_eur if that minimum is in effect.
10509
- * - canceled: the sum of the outputs that had already completed and been
10510
- * delivered when the cancel landed. Identical whether the job was
10511
- * canceled through CancelJob or observed as canceled by the worker. The
10512
- * minimum charge never applies.
10513
- * - failed: zero. A job that ends failed is not billed, even if some of
10514
- * its outputs completed before the failure.
10515
- * - partial: the sum of the outputs that completed, un-floored.
10516
- * Additive fees (see fees) are included on top, and are charged only on jobs
10517
- * that ended completed or partial.
11017
+ * - completed: the sum of its outputs' actual costs, plus the fees below.
11018
+ * - partial: the sum of the outputs that completed, plus the fees below.
11019
+ * - canceled: the processing fee, if an encoder had already begun work,
11020
+ * plus the outputs that had already completed and been delivered when
11021
+ * the cancel landed. Canceling a job that was still queued bills
11022
+ * nothing. Identical whether the job was canceled through CancelJob or
11023
+ * observed as canceled by the worker.
11024
+ * - failed: zero. A job that ends failed is not billed at all — not for
11025
+ * outputs that completed before the failure, and not for the machine it
11026
+ * ran on.
11027
+ *
11028
+ * Fees (see fees) are included on top of the output costs. Which ones are
11029
+ * charged depends on the fee: the flat processing fee is charged on every
11030
+ * job an encoder began, including a canceled one, while a metered add-on
11031
+ * such as AI captions is charged only when a completed or partial job
11032
+ * actually delivered its artifact.
11033
+ *
11034
+ * Jobs created before the processing-fee model (August 2026) are billed
11035
+ * max(sum of output costs, minimum_charge_eur) + fees when completed, and
11036
+ * their canceled/partial totals are un-floored.
10518
11037
  *
10519
11038
  * @generated from field: optional double total_actual_cost = 9;
10520
11039
  */
@@ -10651,44 +11170,62 @@ var Job = class _Job extends protobuf.Message {
10651
11170
  */
10652
11171
  object = "";
10653
11172
  /**
10654
- * Minimum charge for this job in EUR, locked at creation and never changed
10655
- * retroactively. It is derived from the job's assigned billing class — a size
10656
- * band (small/medium/large/extra-large) reflecting the compute the job is
10657
- * guaranteed to cover — or, in legacy configurations, from the recommended
10658
- * machine size; either way it is a stable quote, not re-derived from the
10659
- * machine the job ultimately runs on. When the minimum charge is in effect,
10660
- * the billed total for a successfully completed job is
10661
- * max(sum of output costs, minimum_charge_eur) — see minimum_charge_applied
10662
- * for whether it determined this job's total. The minimum applies only to
10663
- * jobs that reach completed: a failed job is billed zero, and a canceled or
10664
- * partial job is billed the un-floored sum of the outputs it did complete.
10665
- * Absent when no minimum was computed for this job.
10666
- *
10667
- * @generated from field: optional double minimum_charge_eur = 30;
11173
+ * HISTORICAL — jobs created before the processing-fee model (August 2026)
11174
+ * only. Always absent on jobs created since; use fees (fee_type
11175
+ * "processing") instead.
11176
+ *
11177
+ * The per-job minimum charge, locked at creation and never changed
11178
+ * retroactively. It was derived from the job's assigned billing class — a
11179
+ * size band (small/medium/large/extra-large) reflecting the compute the job
11180
+ * is guaranteed to cover — or, in earlier configurations, from the
11181
+ * recommended machine size; either way a stable quote, not re-derived from
11182
+ * the machine the job ultimately ran on. When in effect, the billed total for
11183
+ * a successfully completed job was max(sum of output costs,
11184
+ * minimum_charge_eur) — see minimum_charge_applied for whether it determined
11185
+ * this job's total. It applied only to jobs that reached completed: a failed
11186
+ * job was billed zero, and a canceled or partial job the un-floored sum of
11187
+ * the outputs it did complete.
11188
+ *
11189
+ * Jobs quoted under this model keep settling under it, so the field is
11190
+ * populated forever on those jobs and is never removed from the API.
11191
+ *
11192
+ * @generated from field: optional double minimum_charge_eur = 30 [deprecated = true];
11193
+ * @deprecated
10668
11194
  */
10669
11195
  minimumChargeEur;
10670
11196
  /**
11197
+ * HISTORICAL — jobs created before the processing-fee model (August 2026)
11198
+ * only. Always false on jobs created since.
11199
+ *
10671
11200
  * Whether minimum_charge_eur determined the job's most recently computed
10672
11201
  * total — true when the sum of output costs came in below the minimum and
10673
11202
  * the total was raised to it (estimated total after probe; actual total
10674
11203
  * after successful completion). When true, total_estimated_cost or
10675
11204
  * total_actual_cost exceeds the sum of the per-output cost fields, which
10676
- * are never raised themselves. The minimum is a stable quote locked at
10677
- * creation (from the job's billing class, or the recommended machine size in
10678
- * legacy configurations); it is never re-derived from the machine the job
10679
- * ultimately runs on.
11205
+ * were never raised themselves.
10680
11206
  *
10681
- * @generated from field: bool minimum_charge_applied = 31;
11207
+ * @generated from field: bool minimum_charge_applied = 31 [deprecated = true];
11208
+ * @deprecated
10682
11209
  */
10683
11210
  minimumChargeApplied = false;
10684
11211
  /**
10685
- * Additive fee line items (v1: AI caption generation). Fees are charged ON
10686
- * TOP of the encode bill and sit OUTSIDE the minimum-charge floor:
10687
- * billed total = max(sum of output costs, minimum_charge_eur) + sum of fees.
11212
+ * Fee line items on the job. Two kinds appear here:
11213
+ *
11214
+ * "processing" — the flat per-job processing fee, charged once for the
11215
+ * encoder the job ran on, scaled by the job's size class. Present on every
11216
+ * job an encoder began processing. Quantity is always 1.
11217
+ * "captions" — AI caption generation, metered per source minute.
11218
+ *
11219
+ * Fees are charged ON TOP of the encode bill:
11220
+ * billed total = sum of output costs + sum of fees. (On historical jobs that
11221
+ * carry a minimum_charge_eur, the output sum is raised to that floor first;
11222
+ * fees have always sat outside the clamp.)
11223
+ *
10688
11224
  * total_estimated_cost / total_actual_cost INCLUDE fees; this list exposes
10689
- * the decomposition. Only live fees are listed — a fee that was voided
10690
- * (job failed/canceled, or the artifact was never produced) is dropped
10691
- * from the list and never charged. Server-set; read-only.
11225
+ * the decomposition. Only live fees are listed — a fee that was voided is
11226
+ * dropped from the list and never charged. A job that failed, or that was
11227
+ * canceled while still queued, therefore reports no fees at all.
11228
+ * Server-set; read-only.
10692
11229
  *
10693
11230
  * @generated from field: repeated transcodely.v1.JobFee fees = 33;
10694
11231
  */
@@ -10716,6 +11253,26 @@ var Job = class _Job extends protobuf.Message {
10716
11253
  * @generated from field: optional transcodely.v1.ClipConfig clip = 36;
10717
11254
  */
10718
11255
  clip;
11256
+ /**
11257
+ * Hosted video this job's managed output belongs to ("vid_..."). Set when
11258
+ * the job writes to Transcodely-managed hosting storage (created with
11259
+ * managed=true, or with input_video_id targeting an existing video); absent
11260
+ * for jobs delivering to your own origin. Server-set; read-only.
11261
+ *
11262
+ * @generated from field: optional string video_id = 37;
11263
+ */
11264
+ videoId;
11265
+ /**
11266
+ * Itemized decomposition of total_estimated_cost and total_actual_cost:
11267
+ * one line per output, one per fee, and — on jobs old enough to have a
11268
+ * minimum charge — the top-up it added. The lines always sum to the totals,
11269
+ * so this is the field to render a cost from: the per-output cost fields
11270
+ * alone do not add up to the bill, because fees are charged on top of them.
11271
+ * Always present. Server-set; read-only.
11272
+ *
11273
+ * @generated from field: transcodely.v1.JobCostBreakdown cost_breakdown = 38;
11274
+ */
11275
+ costBreakdown;
10719
11276
  constructor(data) {
10720
11277
  super();
10721
11278
  protobuf.proto3.util.initPartial(data, this);
@@ -10816,7 +11373,9 @@ var Job = class _Job extends protobuf.Message {
10816
11373
  /* ScalarType.STRING */
10817
11374
  },
10818
11375
  { no: 35, name: "chapter_results", kind: "message", T: ChapterResult, repeated: true },
10819
- { no: 36, name: "clip", kind: "message", T: ClipConfig, opt: true }
11376
+ { no: 36, name: "clip", kind: "message", T: ClipConfig, opt: true },
11377
+ { no: 37, name: "video_id", kind: "scalar", T: 9, opt: true },
11378
+ { no: 38, name: "cost_breakdown", kind: "message", T: JobCostBreakdown }
10820
11379
  ]);
10821
11380
  static fromBinary(bytes, options) {
10822
11381
  return new _Job().fromBinary(bytes, options);
@@ -10833,40 +11392,47 @@ var Job = class _Job extends protobuf.Message {
10833
11392
  };
10834
11393
  var JobFee = class _JobFee extends protobuf.Message {
10835
11394
  /**
10836
- * Fee discriminator — the fee pricing rule's key. v1: "captions".
11395
+ * Fee discriminator:
11396
+ * "processing" — the flat per-job processing fee (see Job.fees).
11397
+ * "captions" — AI caption generation.
10837
11398
  *
10838
11399
  * @generated from field: string fee_type = 1;
10839
11400
  */
10840
11401
  feeType = "";
10841
11402
  /**
10842
11403
  * Human-readable description of what the fee is for
10843
- * (e.g., "AI Caption Generation").
11404
+ * (e.g., "Processing fee", "AI Caption Generation").
10844
11405
  *
10845
11406
  * @generated from field: string description = 2;
10846
11407
  */
10847
11408
  description = "";
10848
11409
  /**
10849
- * Metering unit. v1: "source_minute" (input duration in minutes).
11410
+ * Metering unit:
11411
+ * "job" — a flat per-job charge; quantity is always 1.
11412
+ * "source_minute" — input duration in minutes.
10850
11413
  *
10851
11414
  * @generated from field: string unit = 3;
10852
11415
  */
10853
11416
  unit = "";
10854
11417
  /**
10855
11418
  * Metered quantity in `unit`s — the exact fraction, e.g. a 90-second
10856
- * source is 1.5 source minutes. 0 until the input probe completes.
11419
+ * source is 1.5 source minutes. For a "source_minute" fee this is 0 until
11420
+ * the input probe completes; a "job" fee is always 1, from creation.
10857
11421
  *
10858
11422
  * @generated from field: double quantity = 4;
10859
11423
  */
10860
11424
  quantity = 0;
10861
11425
  /**
10862
- * Price per unit in `currency`, locked at job creation from the
10863
- * then-effective fee pricing rule (e.g., 0.05).
11426
+ * Price per unit in `currency`, locked at job creation (e.g., 0.05). For the
11427
+ * processing fee this is the job's size class's rate at the moment the job
11428
+ * was created; later rate changes never re-price an existing job.
10864
11429
  *
10865
11430
  * @generated from field: double rate = 5;
10866
11431
  */
10867
11432
  rate = 0;
10868
11433
  /**
10869
- * quantity x rate, in `currency`. 0 until the input probe completes.
11434
+ * quantity x rate, in `currency`. For a "source_minute" fee this is 0 until
11435
+ * the input probe completes; for a "job" fee it equals rate from creation.
10870
11436
  *
10871
11437
  * @generated from field: double amount = 6;
10872
11438
  */
@@ -10878,6 +11444,13 @@ var JobFee = class _JobFee extends protobuf.Message {
10878
11444
  * @generated from field: string currency = 7;
10879
11445
  */
10880
11446
  currency = "";
11447
+ /**
11448
+ * Fee id ("fee_..."). This is what a cost-breakdown fee line's
11449
+ * `reference_id` points at (see JobCostBreakdown).
11450
+ *
11451
+ * @generated from field: string id = 8;
11452
+ */
11453
+ id = "";
10881
11454
  constructor(data) {
10882
11455
  super();
10883
11456
  protobuf.proto3.util.initPartial(data, this);
@@ -10933,6 +11506,13 @@ var JobFee = class _JobFee extends protobuf.Message {
10933
11506
  kind: "scalar",
10934
11507
  T: 9
10935
11508
  /* ScalarType.STRING */
11509
+ },
11510
+ {
11511
+ no: 8,
11512
+ name: "id",
11513
+ kind: "scalar",
11514
+ T: 9
11515
+ /* ScalarType.STRING */
10936
11516
  }
10937
11517
  ]);
10938
11518
  static fromBinary(bytes, options) {
@@ -10948,6 +11528,137 @@ var JobFee = class _JobFee extends protobuf.Message {
10948
11528
  return protobuf.proto3.util.equals(_JobFee, a, b);
10949
11529
  }
10950
11530
  };
11531
+ var JobCostLine = class _JobCostLine extends protobuf.Message {
11532
+ /**
11533
+ * What kind of charge this line is: output, minimum_charge, fee or
11534
+ * adjustment.
11535
+ *
11536
+ * @generated from field: transcodely.v1.JobCostLineType type = 1;
11537
+ */
11538
+ type = 0 /* UNSPECIFIED */;
11539
+ /**
11540
+ * The thing the line is for: an output id ("out_...") on output lines, a
11541
+ * fee id ("fee_...") on fee lines. Empty on the minimum-charge and
11542
+ * adjustment lines, which belong to the job as a whole rather than to any
11543
+ * one part of it.
11544
+ *
11545
+ * @generated from field: string reference_id = 2;
11546
+ */
11547
+ referenceId = "";
11548
+ /**
11549
+ * Human-readable label: "1080p h264 hls", "Minimum job charge",
11550
+ * "AI Caption Generation". Wording is documentation, not API surface, and
11551
+ * may be reworded in any release — key off `type` and `reference_id`.
11552
+ *
11553
+ * @generated from field: string description = 3;
11554
+ */
11555
+ description = "";
11556
+ /**
11557
+ * What this line contributed to total_estimated_cost. Absent until the
11558
+ * input probe supplies a duration.
11559
+ *
11560
+ * @generated from field: optional double estimated_amount_eur = 4;
11561
+ */
11562
+ estimatedAmountEur;
11563
+ /**
11564
+ * What this line contributed to total_actual_cost. Absent until the job
11565
+ * settles; 0 for a line that settled at no charge (a failed job's outputs,
11566
+ * a fee whose artifact was never produced). Absent and zero are different
11567
+ * answers: one is "not known yet", the other is "free".
11568
+ *
11569
+ * Negative only on an adjustment line.
11570
+ *
11571
+ * @generated from field: optional double actual_amount_eur = 5;
11572
+ */
11573
+ actualAmountEur;
11574
+ constructor(data) {
11575
+ super();
11576
+ protobuf.proto3.util.initPartial(data, this);
11577
+ }
11578
+ static runtime = protobuf.proto3;
11579
+ static typeName = "transcodely.v1.JobCostLine";
11580
+ static fields = protobuf.proto3.util.newFieldList(() => [
11581
+ { no: 1, name: "type", kind: "enum", T: protobuf.proto3.getEnumType(JobCostLineType) },
11582
+ {
11583
+ no: 2,
11584
+ name: "reference_id",
11585
+ kind: "scalar",
11586
+ T: 9
11587
+ /* ScalarType.STRING */
11588
+ },
11589
+ {
11590
+ no: 3,
11591
+ name: "description",
11592
+ kind: "scalar",
11593
+ T: 9
11594
+ /* ScalarType.STRING */
11595
+ },
11596
+ { no: 4, name: "estimated_amount_eur", kind: "scalar", T: 1, opt: true },
11597
+ { no: 5, name: "actual_amount_eur", kind: "scalar", T: 1, opt: true }
11598
+ ]);
11599
+ static fromBinary(bytes, options) {
11600
+ return new _JobCostLine().fromBinary(bytes, options);
11601
+ }
11602
+ static fromJson(jsonValue, options) {
11603
+ return new _JobCostLine().fromJson(jsonValue, options);
11604
+ }
11605
+ static fromJsonString(jsonString, options) {
11606
+ return new _JobCostLine().fromJsonString(jsonString, options);
11607
+ }
11608
+ static equals(a, b) {
11609
+ return protobuf.proto3.util.equals(_JobCostLine, a, b);
11610
+ }
11611
+ };
11612
+ var JobCostBreakdown = class _JobCostBreakdown extends protobuf.Message {
11613
+ /**
11614
+ * Lines in reading order: outputs, then fees, then the minimum charge, then
11615
+ * the adjustment.
11616
+ *
11617
+ * @generated from field: repeated transcodely.v1.JobCostLine lines = 1;
11618
+ */
11619
+ lines = [];
11620
+ /**
11621
+ * The totals the lines explain. Same values as Job.total_estimated_cost /
11622
+ * Job.total_actual_cost, repeated here so a breakdown can be verified
11623
+ * without carrying the job around.
11624
+ *
11625
+ * One deliberate difference: a failed job reports total_actual_cost as 0
11626
+ * here even in the rare case where no total was ever written for it (a job
11627
+ * the control plane failed after its worker vanished). A failed job bills
11628
+ * nothing, and "unknown" would be a worse answer than the one the policy
11629
+ * already guarantees.
11630
+ *
11631
+ * @generated from field: optional double total_estimated_cost = 2;
11632
+ */
11633
+ totalEstimatedCost;
11634
+ /**
11635
+ * @generated from field: optional double total_actual_cost = 3;
11636
+ */
11637
+ totalActualCost;
11638
+ constructor(data) {
11639
+ super();
11640
+ protobuf.proto3.util.initPartial(data, this);
11641
+ }
11642
+ static runtime = protobuf.proto3;
11643
+ static typeName = "transcodely.v1.JobCostBreakdown";
11644
+ static fields = protobuf.proto3.util.newFieldList(() => [
11645
+ { no: 1, name: "lines", kind: "message", T: JobCostLine, repeated: true },
11646
+ { no: 2, name: "total_estimated_cost", kind: "scalar", T: 1, opt: true },
11647
+ { no: 3, name: "total_actual_cost", kind: "scalar", T: 1, opt: true }
11648
+ ]);
11649
+ static fromBinary(bytes, options) {
11650
+ return new _JobCostBreakdown().fromBinary(bytes, options);
11651
+ }
11652
+ static fromJson(jsonValue, options) {
11653
+ return new _JobCostBreakdown().fromJson(jsonValue, options);
11654
+ }
11655
+ static fromJsonString(jsonString, options) {
11656
+ return new _JobCostBreakdown().fromJsonString(jsonString, options);
11657
+ }
11658
+ static equals(a, b) {
11659
+ return protobuf.proto3.util.equals(_JobCostBreakdown, a, b);
11660
+ }
11661
+ };
10951
11662
  var ClipConfig = class _ClipConfig extends protobuf.Message {
10952
11663
  /**
10953
11664
  * Where the clip starts, in seconds from the beginning of the input.
@@ -14806,7 +15517,7 @@ function backoff(attempt) {
14806
15517
  }
14807
15518
 
14808
15519
  // src/version.ts
14809
- var SDK_VERSION = "0.3.4";
15520
+ var SDK_VERSION = "0.3.6";
14810
15521
  var API_VERSION = "2026-05-03";
14811
15522
  var DEFAULT_BASE_URL = "https://api.transcodely.com";
14812
15523
 
@@ -15589,6 +16300,78 @@ var Organization = class _Organization extends protobuf.Message {
15589
16300
  * @generated from field: google.protobuf.Timestamp updated_at = 8;
15590
16301
  */
15591
16302
  updatedAt;
16303
+ /**
16304
+ * Plan assigned to the organization, applying to every app under it that has
16305
+ * no plan of its own. Absent when the org carries none.
16306
+ *
16307
+ * @generated from field: optional string plan_id = 9;
16308
+ */
16309
+ planId;
16310
+ /**
16311
+ * Display name of the org's plan. Absent exactly when plan_id is.
16312
+ *
16313
+ * @generated from field: optional string plan_name = 10;
16314
+ */
16315
+ planName;
16316
+ /**
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.
16321
+ *
16322
+ * @generated from field: bool payment_method_required = 11;
16323
+ */
16324
+ paymentMethodRequired = false;
16325
+ /**
16326
+ * When the org was explicitly exempted from the payment-method requirement —
16327
+ * stamped when payment_method_required is turned off, cleared when it is
16328
+ * turned on. Absent for an org that has never been exempted, which today is
16329
+ * every org. Reflects the CURRENT exemption only; the change history lives in
16330
+ * the admin audit log.
16331
+ *
16332
+ * @generated from field: optional google.protobuf.Timestamp grandfathered_at = 12;
16333
+ */
16334
+ grandfatheredAt;
16335
+ /**
16336
+ * Derived payment health. Always BILLING_STANDING_ACTIVE when
16337
+ * payment_method_required is false, whatever the facts below say.
16338
+ *
16339
+ * @generated from field: transcodely.v1.BillingStanding billing_standing = 13;
16340
+ */
16341
+ billingStanding = 0 /* UNSPECIFIED */;
16342
+ /**
16343
+ * When the current grace window closes, present only while billing_standing
16344
+ * is BILLING_STANDING_GRACE.
16345
+ *
16346
+ * @generated from field: optional google.protobuf.Timestamp grace_until = 14;
16347
+ */
16348
+ graceUntil;
16349
+ /**
16350
+ * Stable token explaining billing_standing; same vocabulary as
16351
+ * BillingProfile.standing_reason.
16352
+ *
16353
+ * @generated from field: string standing_reason = 15;
16354
+ */
16355
+ standingReason = "";
16356
+ /**
16357
+ * Whether a dunning episode is open right now — the payment provider has an
16358
+ * unpaid invoice for this org and is retrying it. TRUE together with
16359
+ * payment_method_required = false is the case that needs a human: the org is
16360
+ * exempt, so nothing will limit it, and the unpaid invoice will otherwise sit
16361
+ * there indefinitely.
16362
+ *
16363
+ * @generated from field: bool in_dunning = 16;
16364
+ */
16365
+ inDunning = false;
16366
+ /**
16367
+ * How many dunning episodes have run without a clean cycle in between. At 2 a
16368
+ * new episode gets no grace window at all. Reset only by an invoice that pays
16369
+ * while no episode is open — recovering INSIDE dunning does not earn the
16370
+ * window back.
16371
+ *
16372
+ * @generated from field: int32 consecutive_dunned_cycles = 17;
16373
+ */
16374
+ consecutiveDunnedCycles = 0;
15592
16375
  constructor(data) {
15593
16376
  super();
15594
16377
  protobuf.proto3.util.initPartial(data, this);
@@ -15627,7 +16410,40 @@ var Organization = class _Organization extends protobuf.Message {
15627
16410
  },
15628
16411
  { no: 6, name: "status", kind: "enum", T: protobuf.proto3.getEnumType(OrganizationStatus) },
15629
16412
  { no: 7, name: "created_at", kind: "message", T: protobuf.Timestamp },
15630
- { no: 8, name: "updated_at", kind: "message", T: protobuf.Timestamp }
16413
+ { no: 8, name: "updated_at", kind: "message", T: protobuf.Timestamp },
16414
+ { no: 9, name: "plan_id", kind: "scalar", T: 9, opt: true },
16415
+ { no: 10, name: "plan_name", kind: "scalar", T: 9, opt: true },
16416
+ {
16417
+ no: 11,
16418
+ name: "payment_method_required",
16419
+ kind: "scalar",
16420
+ T: 8
16421
+ /* ScalarType.BOOL */
16422
+ },
16423
+ { no: 12, name: "grandfathered_at", kind: "message", T: protobuf.Timestamp, opt: true },
16424
+ { no: 13, name: "billing_standing", kind: "enum", T: protobuf.proto3.getEnumType(BillingStanding) },
16425
+ { no: 14, name: "grace_until", kind: "message", T: protobuf.Timestamp, opt: true },
16426
+ {
16427
+ no: 15,
16428
+ name: "standing_reason",
16429
+ kind: "scalar",
16430
+ T: 9
16431
+ /* ScalarType.STRING */
16432
+ },
16433
+ {
16434
+ no: 16,
16435
+ name: "in_dunning",
16436
+ kind: "scalar",
16437
+ T: 8
16438
+ /* ScalarType.BOOL */
16439
+ },
16440
+ {
16441
+ no: 17,
16442
+ name: "consecutive_dunned_cycles",
16443
+ kind: "scalar",
16444
+ T: 5
16445
+ /* ScalarType.INT32 */
16446
+ }
15631
16447
  ]);
15632
16448
  static fromBinary(bytes, options) {
15633
16449
  return new _Organization().fromBinary(bytes, options);
@@ -19444,6 +20260,7 @@ exports.API_VERSION = API_VERSION;
19444
20260
  exports.AppStatus = AppStatus;
19445
20261
  exports.AudioCodec = AudioCodec;
19446
20262
  exports.AuthenticationError = AuthenticationError;
20263
+ exports.BillingStanding = BillingStanding;
19447
20264
  exports.BitrateMode = BitrateMode;
19448
20265
  exports.ConflictError = ConflictError;
19449
20266
  exports.Container = Container;
@@ -19463,6 +20280,7 @@ exports.HLSSegmentFormat = HLSSegmentFormat;
19463
20280
  exports.InvalidRequestError = InvalidRequestError;
19464
20281
  exports.InvoiceLineType = InvoiceLineType;
19465
20282
  exports.InvoiceStatus = InvoiceStatus;
20283
+ exports.JobCostLineType = JobCostLineType;
19466
20284
  exports.JobPriority = JobPriority;
19467
20285
  exports.JobStatus = JobStatus;
19468
20286
  exports.MembershipRole = MembershipRole;
@@ -19475,6 +20293,7 @@ exports.OriginStatus = OriginStatus;
19475
20293
  exports.OutputFormat = OutputFormat;
19476
20294
  exports.OutputStatus = OutputStatus;
19477
20295
  exports.Page = Page;
20296
+ exports.PaymentMethodState = PaymentMethodState;
19478
20297
  exports.PermissionError = PermissionError;
19479
20298
  exports.PreconditionError = PreconditionError;
19480
20299
  exports.QualityTier = QualityTier;