export type ReviewQuestionChoiceRequest = {reviewQuestionChoiceID?: (number | null) | undefined, txtChoise?: (string | null) | undefined, isCorrectChoise?: boolean | undefined, order?: number | undefined, counter?: number | undefined}; export type ReviewQuestionRequest = {reviewQuestionID?: (number | null) | undefined, reviewQuestionTypeID?: number | undefined, txtQuestion?: (string | null) | undefined, reviewAnswerType?: (string | null) | undefined, isActive?: boolean | undefined, reviewQuestionChoices?: (Array | null) | undefined}; export type CreateUpdateReviewQuestionsRqst = {reviewID?: number | undefined, reviewQuestions?: (Array | null) | undefined}; export type UpdateApiV1ApiReviewUpdateReviewQuestionsRewidIdArgs = {rewidId: number, body: CreateUpdateReviewQuestionsRqst}; export type UpdateApiV1ApiReviewUpdateReviewQuestionsRewidIdOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /v1/api/Review/UpdateReviewQuestions/{rewidId} */ export const updateApiV1ApiReviewUpdateReviewQuestionsRewidId = async (args: UpdateApiV1ApiReviewUpdateReviewQuestionsRewidIdArgs, options: UpdateApiV1ApiReviewUpdateReviewQuestionsRewidIdOptions) => { 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(/\/+$/, '')}/v1/api/Review/UpdateReviewQuestions/${encodeURIComponent(String(args.rewidId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 };