From effc22c29d0bee190428b21959f8009829ecf1bd Mon Sep 17 00:00:00 2001 From: Anki Batsukh Date: Mon, 27 Nov 2023 08:44:06 +0100 Subject: [PATCH] add user scope filter --- src/clockodo.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clockodo.ts b/src/clockodo.ts index bcf5928b..854123b5 100644 --- a/src/clockodo.ts +++ b/src/clockodo.ts @@ -365,7 +365,7 @@ export class Clockodo { return this.api.get("/v2/users/" + id, remainingParams); } - async getUsers(params?: Params): Promise { + async getUsers(params?: Params): Promise { return this.api.get("/v2/users", params); } @@ -917,7 +917,11 @@ export type LumpsumServicesReturnType = ResponseWithPaging & // This endpoint still uses the old lumpSum casing lumpSumServices: Array; }; + export type UserReturnType = { user: User }; +export type UsersParam = { + filterScope?: "manageAbsences" | "viewAbsences" | "manage"; +}; export type UsersReturnType = { users: Array }; export type EntryReturnType = { entry: Entry }; export type AddEntryReturnType = { entry: Entry; stopped?: Entry };