export type GetApiInventoryIdentitiesInventoryIdentityIDArgs = {inventoryIdentityID: string}; export type GetApiInventoryIdentitiesInventoryIdentityIDOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get a single Identity * * GET /inventory/identities/{inventoryIdentityID} */ export const getApiInventoryIdentitiesInventoryIdentityID = async (args: GetApiInventoryIdentitiesInventoryIdentityIDArgs, options?: GetApiInventoryIdentitiesInventoryIdentityIDOptions) => { const {baseUrl = "https://example.app.liongard.com/api/v2", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-ROAR-API-KEY", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/inventory/identities/${encodeURIComponent(String(args.inventoryIdentityID))}${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 };