export type DeleteApiV1InterviewsInterviewIdQuestionsQuestionIdArgs = {interview_id: string, question_id: string, 'X-API-Key'?: (string | null) | undefined}; export type DeleteApiV1InterviewsInterviewIdQuestionsQuestionIdOptions = {baseUrl: string, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Question * * DELETE /v1/interviews/{interview_id}/questions/{question_id} */ export const deleteApiV1InterviewsInterviewIdQuestionsQuestionId = async (args: DeleteApiV1InterviewsInterviewIdQuestionsQuestionIdArgs, options: DeleteApiV1InterviewsInterviewIdQuestionsQuestionIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-API-Key'] != null) headers.set("X-API-Key", String(args['X-API-Key'])) if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/interviews/${encodeURIComponent(String(args.interview_id))}/questions/${encodeURIComponent(String(args.question_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };