export type UpdateApiV1BoardsBoardIdCustomfieldsCustomFieldIdArgs = {boardId: string, customFieldId: string, body: {values: Array<{id?: string | undefined}> | null} | {value: string | null}}; export type UpdateApiV1BoardsBoardIdCustomfieldsCustomFieldIdOptions = {baseUrl: string, ApiKeyAuth?: string | undefined, WorkspaceIdAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * /boards/:boardId/customfields/:customFieldId * * PUT /v1/boards/{boardId}/customfields/{customFieldId} * * Also accepts auth: BearerAuth + WorkspaceIdAuth */ export const updateApiV1BoardsBoardIdCustomfieldsCustomFieldId = async (args: UpdateApiV1BoardsBoardIdCustomfieldsCustomFieldIdArgs, options: UpdateApiV1BoardsBoardIdCustomfieldsCustomFieldIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, ApiKeyAuth, WorkspaceIdAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (ApiKeyAuth !== undefined) headers.set("x-api-key", ApiKeyAuth) if (WorkspaceIdAuth !== undefined) headers.set("x-air-workspace-id", WorkspaceIdAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/boards/${encodeURIComponent(String(args.boardId))}/customfields/${encodeURIComponent(String(args.customFieldId))}${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 };