export type CreateApiApiEmployeesTrainingsCurriculumIdSendBulkReminderArgs = {body: {company_id?: string | undefined, employees?: Array | undefined}}; export type CreateApiApiEmployeesTrainingsCurriculumIdSendBulkReminderOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Send bulk training reminder to employees. Receive status 200 OK if successful or 404 if no curriculum or training is found. * * POST /api/employees/trainings/{curriculum_id}/send_bulk_reminder */ export const createApiApiEmployeesTrainingsCurriculumIdSendBulkReminder = async (args: CreateApiApiEmployeesTrainingsCurriculumIdSendBulkReminderArgs, options?: CreateApiApiEmployeesTrainingsCurriculumIdSendBulkReminderOptions) => { const {baseUrl = "https://app.haekka.com", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/api/employees/trainings/${encodeURIComponent(String(args.curriculum_id))}/send_bulk_reminder${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };