export type GetApiApiV1PartnerKycSessionsSessionIdArgs = {session_id: string}; export type GetApiApiV1PartnerKycSessionsSessionIdOptions = {baseUrl?: string | undefined, AuthID?: string | undefined, AuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get KYC session * * GET /api/v1/partner/kyc-sessions/{session_id} */ export const getApiApiV1PartnerKycSessionsSessionId = async (args: GetApiApiV1PartnerKycSessionsSessionIdArgs, options?: GetApiApiV1PartnerKycSessionsSessionIdOptions) => { const {baseUrl = "https://api.vobiz.ai", fetch: fetchFn = fetch, AuthID, AuthToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() 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: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };