export type GetApiV1TrustAccessFriendlyUrlCustomLinksArgs = {friendlyUrl: string}; export type GetApiV1TrustAccessFriendlyUrlCustomLinksOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * List Trust Center custom links * * GET /v1/trust-access/{friendlyUrl}/custom-links */ export const getApiV1TrustAccessFriendlyUrlCustomLinks = async (args: GetApiV1TrustAccessFriendlyUrlCustomLinksArgs, options?: GetApiV1TrustAccessFriendlyUrlCustomLinksOptions) => { const {baseUrl = "https://api.betayum.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/trust-access/${encodeURIComponent(String(args.friendlyUrl))}/custom-links${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 };