export type GetApiV1TrustPortalOverviewArgs = {organizationId: string}; export type GetApiV1TrustPortalOverviewOptions = {baseUrl?: string | undefined, apikey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get trust portal overview * * GET /v1/trust-portal/overview */ export const getApiV1TrustPortalOverview = async (args: GetApiV1TrustPortalOverviewArgs, options?: GetApiV1TrustPortalOverviewOptions) => { const {baseUrl = "https://api.betayum.com", fetch: fetchFn = fetch, apikey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.organizationId != null) query.append("organizationId", String(args.organizationId)) if (apikey !== undefined) headers.set("X-API-Key", apikey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/trust-portal/overview${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 };