export type GetApiProfileProfilePublicIdActivityFileOptions = {baseUrl?: string | undefined, BearerProfile?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /profile/{profile_public_id}/activity_file/ */ export const getApiProfileProfilePublicIdActivityFile = async (options?: GetApiProfileProfilePublicIdActivityFileOptions) => { const {baseUrl = "https://api.wefitter.com/api/v1", fetch: fetchFn = fetch, BearerProfile} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerProfile !== undefined) headers.set("Authorization", BearerProfile) const url = `${baseUrl.replace(/\/+$/, '')}/profile/${encodeURIComponent(String(args.profile_public_id))}/activity_file/${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 };