import { baseService } from "exos-core";
import { Item } from "./types";

/**
 * Performs a GET operation to obtain a collection of items
 * @returns A promise that, when fullfilled, returns a collection of items.
 * @throws An error if something happens
 */
async function getItems(): Promise<Item[]> {
  const url = "/items";
  return await baseService.get<Item[]>(url);
}

export {
  getItems
}
