feat: deals fetch
This commit is contained in:
@ -6,6 +6,9 @@ import type {
|
||||
GetBoardsData,
|
||||
GetBoardsErrors,
|
||||
GetBoardsResponses,
|
||||
GetDealsData,
|
||||
GetDealsErrors,
|
||||
GetDealsResponses,
|
||||
GetProjectsData,
|
||||
GetProjectsResponses,
|
||||
} from "./types.gen";
|
||||
@ -60,3 +63,20 @@ export const getBoards = <ThrowOnError extends boolean = false>(
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Deals
|
||||
*/
|
||||
export const getDeals = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetDealsData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetDealsResponses,
|
||||
GetDealsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
responseType: "json",
|
||||
url: "/deal/{board_id}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user