@digitalculture/ochre-sdk 0.16.12 → 0.17.1

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/dist/index.d.mts CHANGED
@@ -1399,7 +1399,7 @@ declare function filterProperties(property: Property, filter: {
1399
1399
  }, options?: PropertyOptions): boolean;
1400
1400
  //#endregion
1401
1401
  //#region src/utils/helpers.d.ts
1402
- declare const DEFAULT_API_VERSION = 1;
1402
+ declare const DEFAULT_API_VERSION = 2;
1403
1403
  /**
1404
1404
  * Flatten the properties of an item
1405
1405
  * @param item - The item whose properties to flatten
package/dist/index.mjs CHANGED
@@ -950,7 +950,7 @@ function parseStringContent(content, language = "eng") {
950
950
 
951
951
  //#endregion
952
952
  //#region src/utils/helpers.ts
953
- const DEFAULT_API_VERSION = 1;
953
+ const DEFAULT_API_VERSION = 2;
954
954
  /**
955
955
  * Flatten the properties of an item
956
956
  * @param item - The item whose properties to flatten
@@ -3746,16 +3746,6 @@ async function fetchByUuidMetadata(uuid, customFetch) {
3746
3746
 
3747
3747
  //#endregion
3748
3748
  //#region src/utils/fetchers/website.ts
3749
- const KNOWN_ABBREVIATIONS = {
3750
- "uchicago-node": "60a1e386-7e53-4e14-b8cf-fb4ed953d57e",
3751
- "uchicago-node-staging": "62b60a47-fad5-49d7-a06a-2fa059f6e79a",
3752
- "guerrilla-television": "fad1e1bd-989d-4159-b195-4c32adc5cdc7",
3753
- "mapping-chicagoland": "8db5e83e-0c06-48b7-b4ac-a060d9bb5689",
3754
- "hannah-papanek": "20b2c919-021f-4774-b2c3-2f1ae5b910e7",
3755
- mepa: "85ddaa5a-535b-4809-8714-855d2d812a3e",
3756
- ssmc: "8ff977dd-d440-40f5-ad93-8ad7e2d39e74",
3757
- "sosc-core-at-smart": "db26c953-9b2a-4691-a909-5e8726b531d7"
3758
- };
3759
3749
  /**
3760
3750
  * Parses the version suffix from an API abbreviation
3761
3751
  *
@@ -3825,8 +3815,7 @@ async function fetchWebsite(abbreviation, options) {
3825
3815
  abbreviation: parseFakeString(data.result.ochre.belongsTo)
3826
3816
  };
3827
3817
  } else {
3828
- const uuid = KNOWN_ABBREVIATIONS[abbreviationToUse];
3829
- const response = await (customFetch ?? fetch)(uuid != null ? `https://ochre.lib.uchicago.edu/ochre?uuid=${uuid}&format=json` : `https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`for $q in input()/ochre[tree[@type='lesson'][identification/abbreviation='${abbreviationToUse}']] return $q`)}&format=json`);
3818
+ const response = await (customFetch ?? fetch)(`https://ochre.lib.uchicago.edu/ochre?xquery=${encodeURIComponent(`for $q in input()/ochre[tree[@type='lesson'][identification/abbreviation='${abbreviationToUse}']] return $q`)}&format=json`);
3830
3819
  if (!response.ok) throw new Error("Failed to fetch website");
3831
3820
  const data = await response.json();
3832
3821
  const result = "result" in data && !Array.isArray(data.result) ? data.result : !("result" in data) ? data : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.16.12",
3
+ "version": "0.17.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",