export type UpdateApiV1BoardsBoardIdListsListIdJsonArgs = {token: string, boardId: number, listId: number, body: {is_archive?: boolean | undefined, name?: string | undefined, position?: string | undefined}}; export type UpdateApiV1BoardsBoardIdListsListIdJsonOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Update an existing webhooks * * PUT /v1/boards/{boardId}/lists/{listId}.json */ export const updateApiV1BoardsBoardIdListsListIdJson = async (args: UpdateApiV1BoardsBoardIdListsListIdJsonArgs, options: UpdateApiV1BoardsBoardIdListsListIdJsonOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.token != null) query.append("token", String(args.token)) const url = `${baseUrl.replace(/\/+$/, '')}/v1/boards/${encodeURIComponent(String(args.boardId))}/lists/${encodeURIComponent(String(args.listId))}.json${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 };