export type CoachingBllDtoCoachingSessionToolFeedback = {sessionToolId?: number | undefined, sessionPairingId?: number | undefined, submissionId?: number | undefined, key?: (string | null) | undefined, feedback?: (string | null) | undefined}; export type CreateApiCoachingCoachingSessionSubmitFeedbackArgs = {body: CoachingBllDtoCoachingSessionToolFeedback}; export type CreateApiCoachingCoachingSessionSubmitFeedbackOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /coaching/coachingSession/submit-feedback */ export const createApiCoachingCoachingSessionSubmitFeedback = async (args: CreateApiCoachingCoachingSessionSubmitFeedbackArgs, options: CreateApiCoachingCoachingSessionSubmitFeedbackOptions) => { const {baseUrl, 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(/\/+$/, '')}/coaching/coachingSession/submit-feedback${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 };