export type DeleteApiPublicV2SuppliersConnectionContactsContactIdArgs = {contactId: number}; export type DeleteApiPublicV2SuppliersConnectionContactsContactIdOptions = {baseUrl?: string | undefined, TokenAuthentication?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a connection contact * * DELETE /public/v2/suppliers/connection-contacts/{contactId} */ export const deleteApiPublicV2SuppliersConnectionContactsContactId = async (args: DeleteApiPublicV2SuppliersConnectionContactsContactIdArgs, options?: DeleteApiPublicV2SuppliersConnectionContactsContactIdOptions) => { const {baseUrl = "https://api.prewave.com", fetch: fetchFn = fetch, TokenAuthentication} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (TokenAuthentication !== undefined) headers.set("X-Auth-Token", TokenAuthentication) const url = `${baseUrl.replace(/\/+$/, '')}/public/v2/suppliers/connection-contacts/${encodeURIComponent(String(args.contactId))}${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 };