cocoda-sdk 3.4.4 → 3.4.6

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.
package/README.md CHANGED
@@ -171,7 +171,7 @@ The following providers are also exported, but have to be added via `cdk.addProv
171
171
  - **This integration is currently experimental.**
172
172
  - `MyCoRe` - access to vocabularies via [MyCoRe](https://www.mycore.de/)
173
173
  - **This integration is currently experimental. Only one vocabulary per registry is supported. Not recommended for large vocabularies as all of the vocabulary data is loaded and kept in memory.**
174
- - `ReconciliationApi` - access to mapping suggestions via a [OpenRefine Reconciliation API](https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API)
174
+ - `ReconciliationApi` - access to mapping suggestions via a [Reconciliation Service API](https://reconciliation-api.github.io/specs/draft/)
175
175
  - `OccurrencesApi` - access to concept occurrences via [occurrences-api](https://github.com/gbv/occurrences-api) (will be changed to [occurrences-server](https://github.com/gbv/occurrences-server) in the future)
176
176
  - `LabelSearchSuggestion` - access to mapping suggestions using other registries' search endpoints (using [jskos-server])
177
177
 
@@ -387,7 +387,7 @@ var BaseProvider = class {
387
387
  };
388
388
  this._config = {};
389
389
  this.setRetryConfig();
390
- this.axios.interceptors.request.use((config) => {
390
+ this.axios.interceptors.request.use((config = {}) => {
391
391
  if (!config._skipAdditionalParameters) {
392
392
  const language = import_uniq.default([].concat(import_get.default(config, "params.language", "").split(","), this.languages, this._defaultLanguages).filter((lang) => lang != "")).join(",");
393
393
  import_set.default(config, "params.language", language);
@@ -395,7 +395,7 @@ var BaseProvider = class {
395
395
  import_set.default(config, "headers.Authorization", `Bearer ${this._auth.bearerToken}`);
396
396
  }
397
397
  }
398
- if (config.url.startsWith("http:") && typeof window !== "undefined" && window.location.protocol == "https:") {
398
+ if (config.url?.startsWith("http:") && typeof window !== "undefined" && window.location.protocol == "https:") {
399
399
  throw new import_axios.default.Cancel("Can't call http API from https.");
400
400
  }
401
401
  return config;
@@ -1946,7 +1946,7 @@ var ConceptApiProvider = class extends BaseProvider {
1946
1946
  this.has.auth = import_get.default(this._config, "auth.key") != null;
1947
1947
  this._defaultParams = {
1948
1948
  // Default parameters mostly for DANTE
1949
- properties: "+created,issued,modified,editorialNote,scopeNote"
1949
+ properties: "+created,issued,modified,editorialNote,scopeNote,note,definition"
1950
1950
  };
1951
1951
  }
1952
1952
  /**
@@ -2004,7 +2004,7 @@ var ConceptApiProvider = class extends BaseProvider {
2004
2004
  * @param {Object} config
2005
2005
  * @returns {Object[]} array of JSKOS concept scheme objects
2006
2006
  */
2007
- async getSchemes(config) {
2007
+ async getSchemes(config = {}) {
2008
2008
  if (!this._api.schemes) {
2009
2009
  if (Array.isArray(this.schemes)) {
2010
2010
  return this.schemes;
@@ -2801,7 +2801,7 @@ var SkosmosApiProvider = class extends BaseProvider {
2801
2801
  * @param {Object} config
2802
2802
  * @returns {Object[]} array of JSKOS concept scheme objects
2803
2803
  */
2804
- async getSchemes({ ...config }) {
2804
+ async getSchemes({ ...config } = {}) {
2805
2805
  const schemes = [];
2806
2806
  for (let scheme of this.schemes || []) {
2807
2807
  const url = this._getApiUrl(scheme, "/");
@@ -3417,7 +3417,7 @@ var SkohubProvider = class extends BaseProvider {
3417
3417
  }
3418
3418
  return concept;
3419
3419
  }
3420
- async getSchemes({ ...config }) {
3420
+ async getSchemes({ ...config } = {}) {
3421
3421
  return Promise.all(this.schemes.map((scheme) => this._loadScheme({ ...config, scheme })));
3422
3422
  }
3423
3423
  async getTop({ scheme, ...config }) {