export type DeleteApiAssetsAssetIdProjectManagementLinkArgs = {asset_id: string}; export type DeleteApiAssetsAssetIdProjectManagementLinkOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a project management link for an asset * * DELETE /assets/{asset_id}/project-management-link */ export const deleteApiAssetsAssetIdProjectManagementLink = async (args: DeleteApiAssetsAssetIdProjectManagementLinkArgs, options?: DeleteApiAssetsAssetIdProjectManagementLinkOptions) => { const {baseUrl = "https://enterprise.knak.io/api/published/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/assets/${encodeURIComponent(String(args.asset_id))}/project-management-link${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 };