export type DeleteApiV1UsersIdentifyIdArgs = {hardDelete?: boolean | undefined, identifyId: string}; export type DeleteApiV1UsersIdentifyIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete user * * DELETE /v1/users/{identifyId} */ export const deleteApiV1UsersIdentifyId = async (args: DeleteApiV1UsersIdentifyIdArgs, options?: DeleteApiV1UsersIdentifyIdOptions) => { const {baseUrl = "https://app.aptrinsic.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.hardDelete != null) query.append("hardDelete", String(args.hardDelete)) const url = `${baseUrl.replace(/\/+$/, '')}/v1/users/${encodeURIComponent(String(args.identifyId))}${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 res.blob() };