diff --git a/.stats.yml b/.stats.yml index 0a88747c..81b7ba33 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 88 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-ecba5336919fc9783537b0901d6822cbcb49e160371c348a404bfcc748d09719.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mux%2Fmux-603174c84ed6d06302f3843b95c5281fa79df1e7428eb8d475525fb27fa48b38.yml diff --git a/src/resources/video/assets.ts b/src/resources/video/assets.ts index f17aaa83..df2d5b4d 100755 --- a/src/resources/video/assets.ts +++ b/src/resources/video/assets.ts @@ -226,9 +226,10 @@ export interface Asset { created_at: string; /** - * The encoding tier informs the cost, quality, and available platform features for - * the asset. By default the `smart` encoding tier is used. - * [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + * @deprecated: This field is deprecated. Please use `video_quality` instead. The + * encoding tier informs the cost, quality, and available platform features for the + * asset. By default the `smart` encoding tier is used. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) */ encoding_tier: 'smart' | 'baseline'; @@ -384,6 +385,14 @@ export interface Asset { * when the asset is created from a direct upload. */ upload_id?: string; + + /** + * The video quality controls the cost, quality, and available platform features + * for the asset. By default the `plus` video quality is used. This field replaces + * the deprecated `encoding_tier` value. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + */ + video_quality?: 'basic' | 'plus'; } export namespace Asset { @@ -573,9 +582,10 @@ export interface AssetOptions { advanced_playback_policies?: Array; /** - * The encoding tier informs the cost, quality, and available platform features for - * the asset. By default the `smart` encoding tier is used. - * [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + * @deprecated: This field is deprecated. Please use `video_quality` instead. The + * encoding tier informs the cost, quality, and available platform features for the + * asset. By default the `smart` encoding tier is used. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) */ encoding_tier?: 'smart' | 'baseline'; @@ -667,6 +677,14 @@ export interface AssetOptions { * limited to 10 seconds, deleted after 24 hrs. */ test?: boolean; + + /** + * The video quality controls the cost, quality, and available platform features + * for the asset. By default the `plus` video quality is used. This field replaces + * the deprecated `encoding_tier` value. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + */ + video_quality?: 'basic' | 'plus'; } export namespace AssetOptions { @@ -1303,9 +1321,10 @@ export interface AssetCreateParams { advanced_playback_policies?: Array; /** - * The encoding tier informs the cost, quality, and available platform features for - * the asset. By default the `smart` encoding tier is used. - * [See the guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + * This field is deprecated. Please use `video_quality` instead. The encoding tier + * informs the cost, quality, and available platform features for the asset. By + * default the `smart` encoding tier is used. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) */ encoding_tier?: 'smart' | 'baseline'; @@ -1387,6 +1406,14 @@ export interface AssetCreateParams { * limited to 10 seconds, deleted after 24 hrs. */ test?: boolean; + + /** + * The video quality controls the cost, quality, and available platform features + * for the asset. By default the `plus` video quality is used. This field replaces + * the deprecated `encoding_tier` value. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + */ + video_quality?: 'basic' | 'plus'; } export namespace AssetCreateParams { diff --git a/src/resources/video/delivery-usage.ts b/src/resources/video/delivery-usage.ts index ca6db45e..ff3d0c49 100755 --- a/src/resources/video/delivery-usage.ts +++ b/src/resources/video/delivery-usage.ts @@ -39,8 +39,9 @@ export interface DeliveryReport { asset_duration: number; /** + * @deprecated: This field is deprecated. Please use `asset_video_quality` instead. * The encoding tier that the asset was ingested at. - * [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) */ asset_encoding_tier: 'smart' | 'baseline'; @@ -76,6 +77,13 @@ export interface DeliveryReport { */ delivered_seconds_by_resolution: DeliveryReport.DeliveredSecondsByResolution; + /** + * The video quality that the asset was ingested at. This field replaces + * `asset_encoding_tier`. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + */ + asset_video_quality?: 'basic' | 'plus'; + /** * If exists, time at which the asset was deleted. Measured in seconds since the * Unix epoch. diff --git a/src/resources/webhooks.ts b/src/resources/webhooks.ts index c14a2424..0726370c 100755 --- a/src/resources/webhooks.ts +++ b/src/resources/webhooks.ts @@ -536,6 +536,13 @@ export namespace VideoDeliveryHighTrafficWebhookEvent { */ asset_duration?: number; + /** + * @deprecated: This field is deprecated. Please use `asset_video_quality` instead. + * The encoding tier that the asset was ingested at. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + */ + asset_encoding_tier?: 'smart' | 'baseline'; + /** * Unique identifier for the asset. */ @@ -552,6 +559,13 @@ export namespace VideoDeliveryHighTrafficWebhookEvent { */ asset_state?: 'ready' | 'errored' | 'deleted'; + /** + * The video quality that the asset was ingested at. This field replaces + * `asset_encoding_tier`. + * [See the video quality guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) + */ + asset_video_quality?: 'basic' | 'plus'; + /** * Time at which the asset was created. Measured in seconds since the Unix epoch. */ diff --git a/tests/api-resources/video/assets.test.ts b/tests/api-resources/video/assets.test.ts index 90df3c5e..9fee9b2b 100755 --- a/tests/api-resources/video/assets.test.ts +++ b/tests/api-resources/video/assets.test.ts @@ -64,6 +64,7 @@ describe('resource assets', () => { per_title_encode: true, playback_policy: ['public'], test: true, + video_quality: 'basic', }); }); diff --git a/tests/api-resources/video/uploads.test.ts b/tests/api-resources/video/uploads.test.ts index 4968db70..f360a449 100755 --- a/tests/api-resources/video/uploads.test.ts +++ b/tests/api-resources/video/uploads.test.ts @@ -116,6 +116,7 @@ describe('resource uploads', () => { per_title_encode: true, playback_policy: ['public'], test: true, + video_quality: 'basic', }, test: true, timeout: 60,