import httpService from "../../../../services/httpService"; import { Paginated } from "../../../../services/Paginated"; import { GeneralIdRef } from "../../../../utils/GeneralIdRef"; import MapToJson from "../../../../utils/MapToJson"; const apiEndpoint = "/Tasks"; export interface GetMyAssignments { Id: bigint; Guid: string; taskType: string; taskName: string; user?: GeneralIdRef; role?: GeneralIdRef; startDateTime?: Date; } export async function myTasks( page: number, pageSize: number, sortKey: string, sortAscending: boolean, filters?: Map | undefined, ): Promise> { const filterString = MapToJson(filters); const response = await httpService.get>( apiEndpoint + "/myTasks", { params: { page: page, pageSize: pageSize, sortKey: sortKey, sortAscending: sortAscending, filters: filterString, }, }, ); return response?.data; } const tasksService = { myTasks, }; export default tasksService;