export type DeleteApiClientsOnboardingIdPartnersPeopleIdArgs = {onboarding_id: string, partner_id: string}; export type DeleteApiClientsOnboardingIdPartnersPeopleIdOptions = {baseUrl?: string | undefined, sec0?: {username: string, password: string} | undefined, sec1?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remover sócio - PF * * DELETE /clients/{onboarding_id}/partners/people/{id} */ export const deleteApiClientsOnboardingIdPartnersPeopleId = async (args: DeleteApiClientsOnboardingIdPartnersPeopleIdArgs, options?: DeleteApiClientsOnboardingIdPartnersPeopleIdOptions) => { const {baseUrl = "https://pagamentos.grafeno.be/api/v2", fetch: fetchFn = fetch, sec0, sec1} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") if (sec0 !== undefined) headers.set('authorization', `Basic ${btoa(`${sec0.username}:${sec0.password}`)}`) if (sec1 !== undefined) headers.set("Authorization", sec1) const url = `${baseUrl.replace(/\/+$/, '')}/clients/${encodeURIComponent(String(args.onboarding_id))}/partners/people/${encodeURIComponent(String(args.id))}${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 (await res.json()) as unknown };