export type GetApiWaiverFormAccessLogArgs = {Authorization: string, SiteId: number, formId: string}; export type GetApiWaiverFormAccessLogOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Gets a list of all the forms associated with the provided form identifiers. * * GET /WaiverForm/AccessLog */ export const getApiWaiverFormAccessLog = async (args: GetApiWaiverFormAccessLogArgs, options?: GetApiWaiverFormAccessLogOptions) => { 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)) if (args.formId != null) query.append("formId", String(args.formId)) const url = `${baseUrl.replace(/\/+$/, '')}/WaiverForm/AccessLog${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 };