export type GetApihttpLocalhost8000ProjectIdTreenodesTreenodeIdImportingUserArgs = {project_id: string, treenode_id: string}; export type GetApihttpLocalhost8000ProjectIdTreenodesTreenodeIdImportingUserOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieve the user ID of the user who imported the passed in treenode. If * * GET http://localhost:8000/{project_id}/treenodes/{treenode_id}/importing-user */ export const getApihttpLocalhost8000ProjectIdTreenodesTreenodeIdImportingUser = async (args: GetApihttpLocalhost8000ProjectIdTreenodesTreenodeIdImportingUserArgs, options?: GetApihttpLocalhost8000ProjectIdTreenodesTreenodeIdImportingUserOptions) => { const {baseUrl = "http://localhost:8000", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}http://localhost:8000/${encodeURIComponent(String(args.project_id))}/treenodes/${encodeURIComponent(String(args.treenode_id))}/importing-user${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 };