cocoda-sdk 3.3.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1760,34 +1760,34 @@ var ConceptApiProvider = class extends BaseProvider {
1760
1760
  }
1761
1761
  });
1762
1762
  }
1763
- async suggest({ use = "notation,label", types = [], sort = "score", ...config }) {
1763
+ async suggest({ use = "notation,label", types = [], sort = "score", params = {}, ...config }) {
1764
1764
  return this._search({
1765
1765
  ...config,
1766
1766
  endpoint: "suggest",
1767
1767
  params: {
1768
- ...config.params,
1768
+ ...params,
1769
1769
  type: types.join("|"),
1770
1770
  use,
1771
1771
  sort
1772
1772
  }
1773
1773
  });
1774
1774
  }
1775
- async search({ types = [], ...config }) {
1775
+ async search({ types = [], params = {}, ...config }) {
1776
1776
  return this._search({
1777
1777
  ...config,
1778
1778
  endpoint: "search",
1779
1779
  params: {
1780
- ...config.params,
1780
+ ...params,
1781
1781
  type: types.join("|")
1782
1782
  }
1783
1783
  });
1784
1784
  }
1785
- async vocSuggest({ use = "notation,label", sort = "score", ...config }) {
1785
+ async vocSuggest({ use = "notation,label", sort = "score", params = {}, ...config }) {
1786
1786
  return this._search({
1787
1787
  ...config,
1788
1788
  endpoint: "voc-suggest",
1789
1789
  params: {
1790
- ...config.params,
1790
+ ...params,
1791
1791
  use,
1792
1792
  sort
1793
1793
  }
@@ -1799,8 +1799,8 @@ var ConceptApiProvider = class extends BaseProvider {
1799
1799
  endpoint: "voc-search"
1800
1800
  });
1801
1801
  }
1802
- async _search({ endpoint, scheme, search, limit, offset, params, ...config }) {
1803
- let url = this._api[endpoint];
1802
+ async _search({ endpoint, scheme, search, limit, offset, params, url, ...config }) {
1803
+ url = url ?? this._api[endpoint];
1804
1804
  if (!url) {
1805
1805
  throw new MissingApiUrlError();
1806
1806
  }
@@ -2002,7 +2002,7 @@ var LabelSearchSuggestionProvider = class extends BaseProvider {
2002
2002
  });
2003
2003
  }
2004
2004
  supportsScheme(scheme) {
2005
- return import_get.default(scheme, "_registry.has.search", false);
2005
+ return super.supportsScheme(scheme) && import_get.default(scheme, "_registry.has.search", false);
2006
2006
  }
2007
2007
  async getMappings({ from, to, mode, selected, limit = 10, ...config }) {
2008
2008
  if (mode != "or") {
@@ -2077,8 +2077,10 @@ var LabelSearchSuggestionProvider = class extends BaseProvider {
2077
2077
  if (!registry || registry.has.search === false) {
2078
2078
  return [];
2079
2079
  }
2080
+ let url = (this._jskos.overrides || []).find((o) => import_jskos_tools7.default.compare(o, targetScheme))?.search;
2080
2081
  const data3 = await registry.search({
2081
2082
  ...config,
2083
+ url,
2082
2084
  search: label,
2083
2085
  scheme: targetScheme,
2084
2086
  limit