feat: boards with statuses fetch
This commit is contained in:
@ -2,7 +2,13 @@
|
||||
|
||||
import type { Client, Options as ClientOptions, TDataShape } from "./client";
|
||||
import { client as _heyApiClient } from "./client.gen";
|
||||
import type { GetProjectsData, GetProjectsResponses } from "./types.gen";
|
||||
import type {
|
||||
GetBoardsData,
|
||||
GetBoardsErrors,
|
||||
GetBoardsResponses,
|
||||
GetProjectsData,
|
||||
GetProjectsResponses,
|
||||
} from "./types.gen";
|
||||
|
||||
export type Options<
|
||||
TData extends TDataShape = TDataShape,
|
||||
@ -37,3 +43,20 @@ export const getProjects = <ThrowOnError extends boolean = false>(
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Boards
|
||||
*/
|
||||
export const getBoards = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetBoardsData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetBoardsResponses,
|
||||
GetBoardsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
responseType: "json",
|
||||
url: "/board/{project_id}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user