export type GetApiApiMetadataTermsSearchArgs = {terms: Array}; export type GetApiApiMetadataTermsSearchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Allowed user roles:


Search for terms record within a specific SDZ * * GET /api/metadata/terms/search */ export const getApiApiMetadataTermsSearch = async (args: GetApiApiMetadataTermsSearchArgs, options?: GetApiApiMetadataTermsSearchOptions) => { const {baseUrl = "https://api.burstiq.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") for (const item of args.terms ?? []) query.append("terms", String(item)) const url = `${baseUrl.replace(/\/+$/, '')}/api/metadata/terms/search${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.blob() };