export type DeleteApiApiV1PartnerKycSessionsSessionIdArgs = {session_id: string, body: {reason?: string | undefined}}; export type DeleteApiApiV1PartnerKycSessionsSessionIdOptions = {baseUrl?: string | undefined, AuthID?: string | undefined, AuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Revoke KYC session * * DELETE /api/v1/partner/kyc-sessions/{session_id} */ export const deleteApiApiV1PartnerKycSessionsSessionId = async (args: DeleteApiApiV1PartnerKycSessionsSessionIdArgs, options?: DeleteApiApiV1PartnerKycSessionsSessionIdOptions) => { const {baseUrl = "https://api.vobiz.ai", fetch: fetchFn = fetch, AuthID, AuthToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (AuthID !== undefined) headers.set("X-Auth-ID", AuthID) if (AuthToken !== undefined) headers.set("X-Auth-Token", AuthToken) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/partner/kyc-sessions/${encodeURIComponent(String(args.session_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", 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 (await res.json()) as unknown };