export type GetApiGroupsGroupIdRegistryResourcesContentArgs = {'group-id': string, path: string}; export type GetApiGroupsGroupIdRegistryResourcesContentOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get registry resource content * * GET /groups/{group-id}/registry-resources/content */ export const getApiGroupsGroupIdRegistryResourcesContent = async (args: GetApiGroupsGroupIdRegistryResourcesContentArgs, options?: GetApiGroupsGroupIdRegistryResourcesContentOptions) => { const {baseUrl = "https://virtserver.swaggerhub.com/a2294/MI_Dashboard/1.0.0", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text/plain") if (args.path != null) query.append("path", String(args.path)) const url = `${baseUrl.replace(/\/+$/, '')}/groups/${encodeURIComponent(String(args['group-id']))}/registry-resources/content${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 res.text() };