export type DeleteApiV1InterviewsInterviewIdQuestionSetsSetIdArgs = {interview_id: string, set_id: string, 'X-API-Key'?: (string | null) | undefined}; export type DeleteApiV1InterviewsInterviewIdQuestionSetsSetIdOptions = {baseUrl: string, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Question Set * * DELETE /v1/interviews/{interview_id}/question-sets/{set_id} */ export const deleteApiV1InterviewsInterviewIdQuestionSetsSetId = async (args: DeleteApiV1InterviewsInterviewIdQuestionSetsSetIdArgs, options: DeleteApiV1InterviewsInterviewIdQuestionSetsSetIdOptions) => { 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))}/question-sets/${encodeURIComponent(String(args.set_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 };