File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
- import { UseInfiniteQueryOptions } from "react-query" ;
1
+ import { QueryOptions , UseInfiniteQueryOptions } from "react-query" ;
2
2
import * as API from "api/api" ;
3
- import { WorkspaceBuild , WorkspaceBuildsRequest } from "api/typesGenerated" ;
3
+ import {
4
+ type WorkspaceBuild ,
5
+ type WorkspaceBuildParameter ,
6
+ type WorkspaceBuildsRequest ,
7
+ } from "api/typesGenerated" ;
8
+
9
+ export function workspaceBuildParametersKey ( workspaceBuildId : string ) {
10
+ return [ "workspaceBuilds" , workspaceBuildId , "parameters" ] as const ;
11
+ }
12
+
13
+ export function workspaceBuildParameters ( workspaceBuildId : string ) {
14
+ return {
15
+ queryKey : workspaceBuildParametersKey ( workspaceBuildId ) ,
16
+ queryFn : ( ) => API . getWorkspaceBuildParameters ( workspaceBuildId ) ,
17
+ } as const satisfies QueryOptions < WorkspaceBuildParameter [ ] > ;
18
+ }
4
19
5
20
export const workspaceBuildByNumber = (
6
21
username : string ,
You can’t perform that action at this time.
0 commit comments