cocoda-sdk 3.6.4 → 3.7.0

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.
@@ -439,9 +439,8 @@ var BaseProvider = class {
439
439
  return data3;
440
440
  }, (error) => {
441
441
  const count = error.config?._retryCount ?? 0;
442
- const method = error.config.method;
443
442
  const statusCode = error.response?.status;
444
- if (this._retryConfig.methods.includes(method) && this._retryConfig.statusCodes.includes(statusCode) && count < this._retryConfig.count) {
443
+ if (this._retryConfig.methods.includes(error.config?.method) && this._retryConfig.statusCodes.includes(statusCode) && count < this._retryConfig.count) {
445
444
  error.config._retryCount = count + 1;
446
445
  if (error.config.data) {
447
446
  error.config.data = JSON.parse(error.config.data);
@@ -743,9 +742,6 @@ var BaseProvider = class {
743
742
  concept._getAncestors = (config) => {
744
743
  return this.getAncestors({ ...config, concept });
745
744
  };
746
- concept._getDetails = async (config) => {
747
- return (await this.getConcepts({ ...config, concepts: [concept] }))[0];
748
- };
749
745
  for (let type of ["broader", "narrower", "ancestors"]) {
750
746
  if (Array.isArray(concept[type]) && concept[type].length && !concept[type].includes(null)) {
751
747
  concept[type] = this.adjustConcepts(concept[type]);
@@ -779,12 +775,6 @@ var BaseProvider = class {
779
775
  scheme._getTop = (config) => {
780
776
  return scheme._registry.getTop({ ...config, scheme });
781
777
  };
782
- scheme._getTypes = (config) => {
783
- return scheme._registry.getTypes({ ...config, scheme });
784
- };
785
- scheme._suggest = ({ search, ...config }) => {
786
- return scheme._registry.suggest({ ...config, search, scheme });
787
- };
788
778
  }
789
779
  return scheme;
790
780
  }
@@ -805,12 +795,6 @@ var BaseProvider = class {
805
795
  }
806
796
  }
807
797
  mapping._registry = this;
808
- if (!mapping.identifier) {
809
- let identifier = import_jskos_tools.default.addMappingIdentifiers(mapping)?.identifier;
810
- if (identifier) {
811
- mapping.identifier = identifier;
812
- }
813
- }
814
798
  return mapping;
815
799
  }
816
800
  adjustMappings(mappings) {
@@ -1452,7 +1436,6 @@ var MappingsApiProvider = class extends BaseProvider {
1452
1436
  throw new InvalidOrMissingParameterError({ parameter: "mapping" });
1453
1437
  }
1454
1438
  mapping = import_jskos_tools3.default.minifyMapping(mapping);
1455
- mapping = import_jskos_tools3.default.addMappingIdentifiers(mapping);
1456
1439
  return this.axios({
1457
1440
  ...config,
1458
1441
  method: "post",
@@ -1476,7 +1459,6 @@ var MappingsApiProvider = class extends BaseProvider {
1476
1459
  throw new InvalidOrMissingParameterError({ parameter: "mapping" });
1477
1460
  }
1478
1461
  mapping = import_jskos_tools3.default.minifyMapping(mapping);
1479
- mapping = import_jskos_tools3.default.addMappingIdentifiers(mapping);
1480
1462
  const uri = mapping.uri;
1481
1463
  if (!uri || !uri.startsWith(this._api.mappings)) {
1482
1464
  throw new InvalidOrMissingParameterError({ parameter: "mapping", message: "URI doesn't seem to be part of this registry." });
@@ -1832,7 +1814,6 @@ var OccurrencesApiProvider = class extends BaseProvider {
1832
1814
  }
1833
1815
  mapping.type = [import_jskos_tools4.default.defaultMappingType.uri];
1834
1816
  mapping._occurrence = occurrence;
1835
- mapping = import_jskos_tools4.default.addMappingIdentifiers(mapping);
1836
1817
  mappings.push(mapping);
1837
1818
  }
1838
1819
  mappings._url = occurrences._url;