export type CreateApiAuthoringV1ReviewIdApproveAllArgs = {id: string}; export type CreateApiAuthoringV1ReviewIdApproveAllOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Approve all items in a review. * * POST /authoring/v1/review/{id}/approve-all */ export const createApiAuthoringV1ReviewIdApproveAll = async (args: CreateApiAuthoringV1ReviewIdApproveAllArgs, options: CreateApiAuthoringV1ReviewIdApproveAllOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/authoring/v1/review/${encodeURIComponent(String(args.id))}/approve-all${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };