@@ -259,14 +259,36 @@ const injectedRtkApi = api
259259 } ) ,
260260 invalidatesTags : [ "pipelines" ] ,
261261 } ) ,
262+ convertAdvancedToSimple : build . mutation <
263+ ConvertAdvancedToSimpleApiResponse ,
264+ ConvertAdvancedToSimpleApiArg
265+ > ( {
266+ query : ( queryArg ) => ( {
267+ url : `/pipelines/${ queryArg . pipelineId } /variants/${ queryArg . variantId } /convert-to-simple` ,
268+ method : "POST" ,
269+ body : queryArg . pipelineGraph ,
270+ } ) ,
271+ invalidatesTags : [ "pipelines" ] ,
272+ } ) ,
273+ convertSimpleToAdvanced : build . mutation <
274+ ConvertSimpleToAdvancedApiResponse ,
275+ ConvertSimpleToAdvancedApiArg
276+ > ( {
277+ query : ( queryArg ) => ( {
278+ url : `/pipelines/${ queryArg . pipelineId } /variants/${ queryArg . variantId } /convert-to-advanced` ,
279+ method : "POST" ,
280+ body : queryArg . pipelineGraph ,
281+ } ) ,
282+ invalidatesTags : [ "pipelines" ] ,
283+ } ) ,
262284 runPerformanceTest : build . mutation <
263285 RunPerformanceTestApiResponse ,
264286 RunPerformanceTestApiArg
265287 > ( {
266288 query : ( queryArg ) => ( {
267289 url : `/tests/performance` ,
268290 method : "POST" ,
269- body : queryArg . performanceTestSpecInput ,
291+ body : queryArg . performanceTestSpec ,
270292 } ) ,
271293 invalidatesTags : [ "tests" ] ,
272294 } ) ,
@@ -277,7 +299,7 @@ const injectedRtkApi = api
277299 query : ( queryArg ) => ( {
278300 url : `/tests/density` ,
279301 method : "POST" ,
280- body : queryArg . densityTestSpecInput ,
302+ body : queryArg . densityTestSpec ,
281303 } ) ,
282304 invalidatesTags : [ "tests" ] ,
283305 } ) ,
@@ -401,8 +423,7 @@ export type CreatePipelineApiArg = {
401423 pipelineDefinition : PipelineDefinition ;
402424} ;
403425export type ValidatePipelineApiResponse =
404- /** status 200 Successful Response */
405- any | /** status 202 Pipeline validation started */ ValidationJobResponse ;
426+ /** status 202 Pipeline validation started */ ValidationJobResponse ;
406427export type ValidatePipelineApiArg = {
407428 pipelineValidationInput : PipelineValidation2 ;
408429} ;
@@ -423,8 +444,7 @@ export type DeletePipelineApiArg = {
423444 pipelineId : string ;
424445} ;
425446export type OptimizeVariantApiResponse =
426- /** status 200 Successful Response */
427- any | /** status 202 Variant optimization started */ OptimizationJobResponse ;
447+ /** status 202 Variant optimization started */ OptimizationJobResponse ;
428448export type OptimizeVariantApiArg = {
429449 pipelineId : string ;
430450 variantId : string ;
@@ -449,15 +469,29 @@ export type UpdateVariantApiArg = {
449469 variantId : string ;
450470 variantUpdate : VariantUpdate ;
451471} ;
472+ export type ConvertAdvancedToSimpleApiResponse =
473+ /** status 200 Converted simple graph */ PipelineGraph ;
474+ export type ConvertAdvancedToSimpleApiArg = {
475+ pipelineId : string ;
476+ variantId : string ;
477+ pipelineGraph : PipelineGraph ;
478+ } ;
479+ export type ConvertSimpleToAdvancedApiResponse =
480+ /** status 200 Converted advanced graph */ PipelineGraph ;
481+ export type ConvertSimpleToAdvancedApiArg = {
482+ pipelineId : string ;
483+ variantId : string ;
484+ pipelineGraph : PipelineGraph ;
485+ } ;
452486export type RunPerformanceTestApiResponse =
453487 /** status 202 Performance test job created */ TestJobResponse ;
454488export type RunPerformanceTestApiArg = {
455- performanceTestSpecInput : PerformanceTestSpec2 ;
489+ performanceTestSpec : PerformanceTestSpec ;
456490} ;
457491export type RunDensityTestApiResponse =
458492 /** status 202 Density test job created */ TestJobResponse ;
459493export type RunDensityTestApiArg = {
460- densityTestSpecInput : DensityTestSpec2 ;
494+ densityTestSpec : DensityTestSpec ;
461495} ;
462496export type GetVideosApiResponse =
463497 /** status 200 Successful Response */ Video [ ] ;
@@ -517,6 +551,8 @@ export type ValidationError = {
517551 loc : ( string | number ) [ ] ;
518552 msg : string ;
519553 type : string ;
554+ input ?: any ;
555+ ctx ?: object ;
520556} ;
521557export type HttpValidationError = {
522558 detail ?: ValidationError [ ] ;
@@ -558,46 +594,11 @@ export type PerformanceJobStatus = {
558594 [ key : string ] : string ;
559595 } | null ;
560596} ;
561- export type GraphInline = {
562- source ?: "graph" ;
563- /** Inline pipeline graph to use for the test. */
564- pipeline_graph : PipelineGraph ;
565- } ;
566- export type VariantReference = {
567- source ?: "variant" ;
568- /** ID of the pipeline containing the variant. */
569- pipeline_id : string ;
570- /** ID of the variant within the pipeline. */
571- variant_id : string ;
572- } ;
573- export type PipelinePerformanceSpec = {
574- /** Graph source - either a reference to existing variant or inline graph. */
575- pipeline :
576- | ( {
577- source : "graph" ;
578- } & GraphInline )
579- | ( {
580- source : "variant" ;
581- } & VariantReference ) ;
582- /** Number of parallel streams for this pipeline. */
583- streams ?: number ;
584- } ;
585- export type OutputMode = "disabled" | "file" | "live_stream" ;
586- export type ExecutionConfig = {
587- /** Mode for pipeline output generation. */
588- output_mode ?: OutputMode ;
589- /** Maximum runtime in seconds (0 = run until EOS, >0 = time limit with looping for live_stream/disabled). */
590- max_runtime ?: number ;
591- } ;
592- export type PerformanceTestSpec = {
593- /** List of pipelines with number of streams for each. */
594- pipeline_performance_specs : PipelinePerformanceSpec [ ] ;
595- /** Execution configuration for output and runtime. */
596- execution_config ?: ExecutionConfig ;
597- } ;
598597export type PerformanceJobSummary = {
599598 id : string ;
600- request : PerformanceTestSpec ;
599+ request : {
600+ [ key : string ] : any ;
601+ } ;
601602} ;
602603export type DensityJobStatus = {
603604 id : string ;
@@ -613,29 +614,11 @@ export type DensityJobStatus = {
613614 } | null ;
614615 error_message : string | null ;
615616} ;
616- export type PipelineDensitySpec = {
617- /** Graph source - either a reference to existing variant or inline graph. */
618- pipeline :
619- | ( {
620- source : "graph" ;
621- } & GraphInline )
622- | ( {
623- source : "variant" ;
624- } & VariantReference ) ;
625- /** Relative share of total streams for this pipeline (percentage). */
626- stream_rate ?: number ;
627- } ;
628- export type DensityTestSpec = {
629- /** Minimum acceptable FPS per stream. */
630- fps_floor : number ;
631- /** List of pipelines with relative stream_rate percentages that must sum to 100. */
632- pipeline_density_specs : PipelineDensitySpec [ ] ;
633- /** Execution configuration for output and runtime. */
634- execution_config ?: ExecutionConfig ;
635- } ;
636617export type DensityJobSummary = {
637618 id : string ;
638- request : DensityTestSpec ;
619+ request : {
620+ [ key : string ] : any ;
621+ } ;
639622} ;
640623export type OptimizationType = "preprocess" | "optimize" ;
641624export type OptimizationJobState =
@@ -780,46 +763,75 @@ export type TestJobResponse = {
780763 /** Identifier of the created test job. */
781764 job_id : string ;
782765} ;
783- export type GraphInline2 = {
766+ export type PipelineDescriptionSource = {
767+ source ?: "description" ;
768+ /** GStreamer pipeline string with elements separated by '!'. */
769+ pipeline_description : string ;
770+ /** Optional custom identifier for pipeline description. Must be URL-safe. */
771+ description_id ?: string | null ;
772+ } ;
773+ export type GraphInline = {
784774 source ?: "graph" ;
775+ /** Optional custom identifier for inline graph. Must be URL-safe. */
776+ graph_id ?: string | null ;
785777 /** Inline pipeline graph to use for the test. */
786778 pipeline_graph : PipelineGraph ;
787779} ;
788- export type PipelinePerformanceSpec2 = {
780+ export type VariantReference = {
781+ source ?: "variant" ;
782+ /** ID of the pipeline containing the variant. */
783+ pipeline_id : string ;
784+ /** ID of the variant within the pipeline. */
785+ variant_id : string ;
786+ } ;
787+ export type PipelinePerformanceSpec = {
789788 /** Graph source - either a reference to existing variant or inline graph. */
790789 pipeline :
790+ | ( {
791+ source : "description" ;
792+ } & PipelineDescriptionSource )
791793 | ( {
792794 source : "graph" ;
793- } & GraphInline2 )
795+ } & GraphInline )
794796 | ( {
795797 source : "variant" ;
796798 } & VariantReference ) ;
797799 /** Number of parallel streams for this pipeline. */
798800 streams ?: number ;
799801} ;
800- export type PerformanceTestSpec2 = {
802+ export type OutputMode = "disabled" | "file" | "live_stream" ;
803+ export type ExecutionConfig = {
804+ /** Mode for pipeline output generation. */
805+ output_mode ?: OutputMode ;
806+ /** Maximum runtime in seconds (0 = run until EOS, >0 = time limit with looping for live_stream/disabled). */
807+ max_runtime ?: number ;
808+ } ;
809+ export type PerformanceTestSpec = {
801810 /** List of pipelines with number of streams for each. */
802- pipeline_performance_specs : PipelinePerformanceSpec2 [ ] ;
811+ pipeline_performance_specs : PipelinePerformanceSpec [ ] ;
803812 /** Execution configuration for output and runtime. */
804813 execution_config ?: ExecutionConfig ;
805814} ;
806- export type PipelineDensitySpec2 = {
815+ export type PipelineDensitySpec = {
807816 /** Graph source - either a reference to existing variant or inline graph. */
808817 pipeline :
818+ | ( {
819+ source : "description" ;
820+ } & PipelineDescriptionSource )
809821 | ( {
810822 source : "graph" ;
811- } & GraphInline2 )
823+ } & GraphInline )
812824 | ( {
813825 source : "variant" ;
814826 } & VariantReference ) ;
815827 /** Relative share of total streams for this pipeline (percentage). */
816828 stream_rate ?: number ;
817829} ;
818- export type DensityTestSpec2 = {
830+ export type DensityTestSpec = {
819831 /** Minimum acceptable FPS per stream. */
820832 fps_floor : number ;
821833 /** List of pipelines with relative stream_rate percentages that must sum to 100. */
822- pipeline_density_specs : PipelineDensitySpec2 [ ] ;
834+ pipeline_density_specs : PipelineDensitySpec [ ] ;
823835 /** Execution configuration for output and runtime. */
824836 execution_config ?: ExecutionConfig ;
825837} ;
@@ -913,6 +925,8 @@ export const {
913925 useCreateVariantMutation,
914926 useDeleteVariantMutation,
915927 useUpdateVariantMutation,
928+ useConvertAdvancedToSimpleMutation,
929+ useConvertSimpleToAdvancedMutation,
916930 useRunPerformanceTestMutation,
917931 useRunDensityTestMutation,
918932 useGetVideosQuery,
0 commit comments