File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -696,10 +696,11 @@ export function mapApiInspectionsUrlParamsGet(options: GetInspectionsOptions): s
696
696
params . append ( key , value . toString ( ) ) ;
697
697
} ) ;
698
698
}
699
- if ( options . sort ) {
700
- Object . entries ( options . sort ) . forEach ( ( [ key , value ] ) => {
701
- params . append ( key , value . toString ( ) ) ;
702
- } ) ;
699
+ if ( options . sort ?. sortByProperty ) {
700
+ params . append ( 'sort_by_property' , options . sort . sortByProperty ) ;
701
+ }
702
+ if ( options . sort ?. sortOrder ) {
703
+ params . append ( 'sort_order' , options . sort . sortOrder . toString ( ) ) ;
703
704
}
704
705
return `${ url } ${ params . toString ( ) } ` ;
705
706
}
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ interface ApiPaginationParams {
46
46
}
47
47
48
48
interface ApiCursors {
49
- before ?: Pick < ApiPaginationParams , 'before' > ;
50
- after ?: Pick < ApiPaginationParams , 'after' > ;
49
+ before ?: string ;
50
+ after ?: string ;
51
51
next ?: ApiPaginationParams ;
52
52
previous ?: ApiPaginationParams ;
53
53
}
@@ -76,3 +76,8 @@ export interface ApiInspectionPost {
76
76
vehicle ?: ApiVehiclePostPatch ;
77
77
damage_severity ?: ApiDamageSeverity ;
78
78
}
79
+
80
+ export interface ApiInspectionsSortRequest {
81
+ sort_by_property ?: string ;
82
+ sort_drder ?: SortOrder ;
83
+ }
You can’t perform that action at this time.
0 commit comments