From cdbc36290aadd1588fb967607b59d6fe99d5b0fd Mon Sep 17 00:00:00 2001 From: Anki Batsukh Date: Mon, 27 Nov 2023 08:52:20 +0100 Subject: [PATCH] add year filter for holidays-quota query --- src/clockodo.test.ts | 4 ++-- src/clockodo.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/clockodo.test.ts b/src/clockodo.test.ts index d0a3e035..09e76971 100644 --- a/src/clockodo.test.ts +++ b/src/clockodo.test.ts @@ -668,10 +668,10 @@ describe("Clockodo (instance)", () => { describe("getHolidaysQuotas()", () => { it("correctly builds getHolidaysQuotas() request", async () => { const nockScope = nock(CLOCKODO_API) - .get("/holidaysquota?users_id=17") + .get("/holidaysquota?users_id=17&year=2028") .reply(200, {}); - await clockodo.getHolidaysQuotas({ usersId: 17 }); + await clockodo.getHolidaysQuotas({ usersId: 17, year: 2028 }); nockScope.done(); }); diff --git a/src/clockodo.ts b/src/clockodo.ts index bcf5928b..76c4b816 100644 --- a/src/clockodo.ts +++ b/src/clockodo.ts @@ -1179,6 +1179,7 @@ export type HolidaysQuotasReturnType = { export type HolidaysQuotasParams = { /** The user ID by which the holidays quota rows should be filtered */ usersId?: number; + year?: number; }; export type HolidaysCarryoversReturnType = {