export type RemoveBusinessDocumentRequest = {business_profile_id: string, file_uuid: string}; export type CreateApiVerifyRemoveBusinessDocumentArgs = {body: RemoveBusinessDocumentRequest}; export type CreateApiVerifyRemoveBusinessDocumentOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove business document * * POST /verify/remove_business_document */ export const createApiVerifyRemoveBusinessDocument = async (args: CreateApiVerifyRemoveBusinessDocumentArgs, options?: CreateApiVerifyRemoveBusinessDocumentOptions) => { const {baseUrl = "https://api-sandbox.aiprise.com/api/v1", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (apiKey !== undefined) headers.set("X-API-KEY", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/verify/remove_business_document${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 };