diff --git a/src/api/action.ts b/src/api/action.ts index 3a56981ce..f8117290d 100644 --- a/src/api/action.ts +++ b/src/api/action.ts @@ -22,20 +22,24 @@ export const getAggregateActions = async ( { API_HOST, axios }: PartialQueryConfigForApi, ) => axios - .get<{ aggregateResult: number; createdDay: string }[]>( - `${API_HOST}/${buildGetAggregateActions(args)}`, - ) + .get< + { + aggregateResult: number; + createdDay?: string; + createdTimeOfDay?: string; + createdDayOfWeek?: string; + actionType?: string; + }[] + >(`${API_HOST}/${buildGetAggregateActions(args)}`) .then(({ data }) => data); export const exportActions = async ( args: { itemId: UUID }, { API_HOST, axios }: PartialQueryConfigForApi, -): Promise => - axios.post(`${API_HOST}/${buildExportActions(args.itemId)}`); +) => axios.post(`${API_HOST}/${buildExportActions(args.itemId)}`); export const postItemAction = async ( itemId: UUID, payload: { type: string; extra?: { [key: string]: unknown } }, { API_HOST, axios }: PartialQueryConfigForApi, -): Promise => - axios.post(`${API_HOST}/${buildPostItemAction(itemId)}`, payload); +) => axios.post(`${API_HOST}/${buildPostItemAction(itemId)}`, payload);