export type GetApiUsersStaffClockInOutWidgetInformationArgs = {Authorization: string, SiteId: number}; export type GetApiUsersStaffClockInOutWidgetInformationOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Gets current staff clockin/out information for Arcus APIs. * * GET /Users/Staff/ClockInOutWidgetInformation */ export const getApiUsersStaffClockInOutWidgetInformation = async (args: GetApiUsersStaffClockInOutWidgetInformationArgs, options?: GetApiUsersStaffClockInOutWidgetInformationOptions) => { const {baseUrl = "https://api.mindbodyonline.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (args.SiteId != null) headers.set("SiteId", String(args.SiteId)) const url = `${baseUrl.replace(/\/+$/, '')}/Users/Staff/ClockInOutWidgetInformation${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };