@osdk/faux 0.3.0-beta.6 → 0.4.0-beta.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.
@@ -484,7 +484,8 @@ var FauxDataStoreBatch = class {
484
484
  parameters: {
485
485
  objectType,
486
486
  primaryKey
487
- }
487
+ },
488
+ errorDescription: "The object the user is attempting to create already exists."
488
489
  });
489
490
  }
490
491
  const fullMetadata = this.#fauxDataStore.ontology.getObjectTypeFullMetadataOrThrow(objectType);
@@ -1178,7 +1179,8 @@ var FauxDataStore = class {
1178
1179
  parameters: {
1179
1180
  objectType,
1180
1181
  primaryKey: String(primaryKey)
1181
- }
1182
+ },
1183
+ errorDescription: "The object the user is attempting to create already exists."
1182
1184
  });
1183
1185
  }
1184
1186
  }
@@ -1440,7 +1442,8 @@ var FauxDataStore = class {
1440
1442
  parameters: {
1441
1443
  objectType,
1442
1444
  properties: [property]
1443
- }
1445
+ },
1446
+ errorDescription: "The requested properties are not found on the object type."
1444
1447
  });
1445
1448
  }
1446
1449
  if (propertyDef.dataType.type !== "mediaReference") {
@@ -1451,7 +1454,8 @@ var FauxDataStore = class {
1451
1454
  parameters: {
1452
1455
  property,
1453
1456
  propertyBaseType: propertyDef.dataType.type
1454
- }
1457
+ },
1458
+ errorDescription: "The given property type is not of the expected type."
1455
1459
  });
1456
1460
  }
1457
1461
  const rid = obj[property].reference.mediaSetViewItem.mediaItemRid;
@@ -1464,7 +1468,8 @@ var FauxDataStore = class {
1464
1468
  property,
1465
1469
  propertyBaseType: propertyDef.dataType.type,
1466
1470
  propertyValue: rid
1467
- }
1471
+ },
1472
+ errorDescription: "The value of the given property is invalid. See the documentation of PropertyValue for details on how properties are represented."
1468
1473
  });
1469
1474
  }
1470
1475
  const ret = this.#media.get(objectType).get(property).get(rid);
@@ -1683,7 +1688,7 @@ __export(Actions_exports, {
1683
1688
  applyBatch: () => applyBatch2
1684
1689
  });
1685
1690
 
1686
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
1691
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
1687
1692
  var Action_exports = {};
1688
1693
  __export(Action_exports, {
1689
1694
  apply: () => apply,
@@ -1697,35 +1702,29 @@ var symbolClientContext = Symbol("ClientContext");
1697
1702
  // ../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js
1698
1703
  var symbolClientContext2 = "__osdkClientContext";
1699
1704
 
1700
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
1705
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
1701
1706
  var PalantirApiError = class extends Error {
1702
- message;
1703
- errorName;
1704
- errorCode;
1705
- statusCode;
1706
- errorInstanceId;
1707
- parameters;
1708
- constructor(message, errorName, errorCode, statusCode, errorInstanceId2, parameters) {
1707
+ constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId2, parameters) {
1709
1708
  super(message);
1710
1709
  this.message = message;
1711
1710
  this.errorName = errorName;
1712
1711
  this.errorCode = errorCode;
1712
+ this.errorDescription = errorDescription;
1713
1713
  this.statusCode = statusCode;
1714
1714
  this.errorInstanceId = errorInstanceId2;
1715
1715
  this.parameters = parameters;
1716
1716
  }
1717
1717
  };
1718
1718
 
1719
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
1719
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
1720
1720
  var UnknownError = class extends PalantirApiError {
1721
- originalError;
1722
- constructor(message, errorType, originalError) {
1723
- super(message, errorType);
1721
+ constructor(message, errorName, originalError, statusCode) {
1722
+ super(message, errorName, void 0, void 0, statusCode);
1724
1723
  this.originalError = originalError;
1725
1724
  }
1726
1725
  };
1727
1726
 
1728
- // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.4.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
1727
+ // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
1729
1728
  async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
1730
1729
  const path = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
1731
1730
  const body = flags & 1 ? args.shift() : void 0;
@@ -1769,7 +1768,7 @@ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, h
1769
1768
  if (!response.ok) {
1770
1769
  try {
1771
1770
  const convertedError = await response.json();
1772
- return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);
1771
+ return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);
1773
1772
  } catch (e) {
1774
1773
  if (e instanceof Error) {
1775
1774
  return new UnknownError(e.message, "UNKNOWN");
@@ -1790,7 +1789,7 @@ function parseUrl(baseUrl, endpointPath) {
1790
1789
  return new URL(`api${endpointPath}`, baseUrl);
1791
1790
  }
1792
1791
 
1793
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
1792
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
1794
1793
  var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 3];
1795
1794
  function apply($ctx, ...args) {
1796
1795
  return foundryPlatformFetch($ctx, _apply, ...args);
@@ -1804,7 +1803,7 @@ function applyBatch($ctx, ...args) {
1804
1803
  return foundryPlatformFetch($ctx, _applyBatch, ...args);
1805
1804
  }
1806
1805
 
1807
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
1806
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
1808
1807
  var ActionTypeV2_exports = {};
1809
1808
  __export(ActionTypeV2_exports, {
1810
1809
  get: () => get,
@@ -1824,7 +1823,7 @@ function getByRid($ctx, ...args) {
1824
1823
  return foundryPlatformFetch($ctx, _getByRid, ...args);
1825
1824
  }
1826
1825
 
1827
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
1826
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
1828
1827
  var Attachment_exports = {};
1829
1828
  __export(Attachment_exports, {
1830
1829
  get: () => get2,
@@ -1849,7 +1848,7 @@ function get2($ctx, ...args) {
1849
1848
  return foundryPlatformFetch($ctx, _get2, ...args);
1850
1849
  }
1851
1850
 
1852
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
1851
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
1853
1852
  var AttachmentPropertyV2_exports = {};
1854
1853
  __export(AttachmentPropertyV2_exports, {
1855
1854
  getAttachment: () => getAttachment,
@@ -1874,7 +1873,7 @@ function readAttachmentByRid($ctx, ...args) {
1874
1873
  return foundryPlatformFetch($ctx, _readAttachmentByRid, ...args);
1875
1874
  }
1876
1875
 
1877
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
1876
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
1878
1877
  var LinkedObjectV2_exports = {};
1879
1878
  __export(LinkedObjectV2_exports, {
1880
1879
  getLinkedObject: () => getLinkedObject,
@@ -1889,7 +1888,7 @@ function getLinkedObject($ctx, ...args) {
1889
1888
  return foundryPlatformFetch($ctx, _getLinkedObject, ...args);
1890
1889
  }
1891
1890
 
1892
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
1891
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
1893
1892
  var MediaReferenceProperty_exports = {};
1894
1893
  __export(MediaReferenceProperty_exports, {
1895
1894
  getMediaContent: () => getMediaContent,
@@ -1914,7 +1913,7 @@ function uploadMedia($ctx, ...args) {
1914
1913
  return foundryPlatformFetch($ctx, _uploadMedia, ...args);
1915
1914
  }
1916
1915
 
1917
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
1916
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
1918
1917
  var ObjectTypeV2_exports = {};
1919
1918
  __export(ObjectTypeV2_exports, {
1920
1919
  get: () => get3,
@@ -1944,13 +1943,14 @@ function getOutgoingLinkType($ctx, ...args) {
1944
1943
  return foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);
1945
1944
  }
1946
1945
 
1947
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
1946
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
1948
1947
  var OntologyInterface_exports = {};
1949
1948
  __export(OntologyInterface_exports, {
1950
1949
  aggregate: () => aggregate,
1951
1950
  get: () => get4,
1952
1951
  getOutgoingInterfaceLinkType: () => getOutgoingInterfaceLinkType,
1953
1952
  list: () => list3,
1953
+ listInterfaceLinkedObjects: () => listInterfaceLinkedObjects,
1954
1954
  listObjectsForInterface: () => listObjectsForInterface,
1955
1955
  listOutgoingInterfaceLinkTypes: () => listOutgoingInterfaceLinkTypes,
1956
1956
  search: () => search
@@ -1983,8 +1983,12 @@ var _getOutgoingInterfaceLinkType = [0, "/v2/ontologies/{0}/interfaceTypes/{1}/o
1983
1983
  function getOutgoingInterfaceLinkType($ctx, ...args) {
1984
1984
  return foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);
1985
1985
  }
1986
+ var _listInterfaceLinkedObjects = [0, "/v2/ontologies/{0}/interfaces/{1}/{2}/{3}/links/{4}", 2];
1987
+ function listInterfaceLinkedObjects($ctx, ...args) {
1988
+ return foundryPlatformFetch($ctx, _listInterfaceLinkedObjects, ...args);
1989
+ }
1986
1990
 
1987
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
1991
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
1988
1992
  var OntologyObjectSet_exports = {};
1989
1993
  __export(OntologyObjectSet_exports, {
1990
1994
  aggregate: () => aggregate2,
@@ -2019,7 +2023,7 @@ function aggregate2($ctx, ...args) {
2019
2023
  return foundryPlatformFetch($ctx, _aggregate2, ...args);
2020
2024
  }
2021
2025
 
2022
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
2026
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
2023
2027
  var OntologyObjectV2_exports = {};
2024
2028
  __export(OntologyObjectV2_exports, {
2025
2029
  aggregate: () => aggregate3,
@@ -2049,7 +2053,7 @@ function aggregate3($ctx, ...args) {
2049
2053
  return foundryPlatformFetch($ctx, _aggregate3, ...args);
2050
2054
  }
2051
2055
 
2052
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js
2056
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js
2053
2057
  var OntologyTransaction_exports = {};
2054
2058
  __export(OntologyTransaction_exports, {
2055
2059
  postEdits: () => postEdits
@@ -2059,7 +2063,7 @@ function postEdits($ctx, ...args) {
2059
2063
  return foundryPlatformFetch($ctx, _postEdits, ...args);
2060
2064
  }
2061
2065
 
2062
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
2066
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
2063
2067
  var OntologyV2_exports = {};
2064
2068
  __export(OntologyV2_exports, {
2065
2069
  get: () => get7,
@@ -2084,7 +2088,7 @@ function loadMetadata($ctx, ...args) {
2084
2088
  return foundryPlatformFetch($ctx, _loadMetadata, ...args);
2085
2089
  }
2086
2090
 
2087
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
2091
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
2088
2092
  var Query_exports = {};
2089
2093
  __export(Query_exports, {
2090
2094
  execute: () => execute
@@ -2094,7 +2098,7 @@ function execute($ctx, ...args) {
2094
2098
  return foundryPlatformFetch($ctx, _execute, ...args);
2095
2099
  }
2096
2100
 
2097
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
2101
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
2098
2102
  var QueryType_exports = {};
2099
2103
  __export(QueryType_exports, {
2100
2104
  get: () => get8,
@@ -2109,7 +2113,7 @@ function get8($ctx, ...args) {
2109
2113
  return foundryPlatformFetch($ctx, _get8, ...args);
2110
2114
  }
2111
2115
 
2112
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
2116
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
2113
2117
  var TimeSeriesPropertyV2_exports = {};
2114
2118
  __export(TimeSeriesPropertyV2_exports, {
2115
2119
  getFirstPoint: () => getFirstPoint,
@@ -2129,7 +2133,7 @@ function streamPoints($ctx, ...args) {
2129
2133
  return foundryPlatformFetch($ctx, _streamPoints, ...args);
2130
2134
  }
2131
2135
 
2132
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.30.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
2136
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.35.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
2133
2137
  var TimeSeriesValueBankProperty_exports = {};
2134
2138
  __export(TimeSeriesValueBankProperty_exports, {
2135
2139
  getLatestValue: () => getLatestValue,
@@ -2852,7 +2856,8 @@ var FauxAttachmentStore = class {
2852
2856
  errorInstanceId: "internal",
2853
2857
  parameters: {
2854
2858
  attachmentRid
2855
- }
2859
+ },
2860
+ errorDescription: "The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object."
2856
2861
  });
2857
2862
  }
2858
2863
  const {
@@ -2873,7 +2878,8 @@ var FauxAttachmentStore = class {
2873
2878
  errorInstanceId: "internal",
2874
2879
  parameters: {
2875
2880
  attachmentRid
2876
- }
2881
+ },
2882
+ errorDescription: "The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object."
2877
2883
  });
2878
2884
  }
2879
2885
  return attachment.buffer;