export type GetApiTokenTokenNotFoundArgs = {token: string, pageSize?: number | undefined, page?: number | undefined}; export type GetApiTokenTokenNotFoundOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Returns a list of the identifiers not found for a given token * * GET /token/{token}/notFound */ export const getApiTokenTokenNotFound = async (args: GetApiTokenTokenNotFoundArgs, options: GetApiTokenTokenNotFoundOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.pageSize != null) query.append("pageSize", String(args.pageSize)) if (args.page != null) query.append("page", String(args.page)) const url = `${baseUrl.replace(/\/+$/, '')}/token/${encodeURIComponent(String(args.token))}/notFound${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 };