@osdk/faux 0.1.1 → 0.2.0-beta.10
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/CHANGELOG.md +60 -22
- package/build/browser/FauxFoundry/FauxDataStore.js +130 -3
- package/build/browser/FauxFoundry/FauxDataStore.js.map +1 -1
- package/build/browser/FauxFoundry/FauxDataStore.test.js +30 -2
- package/build/browser/FauxFoundry/FauxDataStore.test.js.map +1 -1
- package/build/browser/FauxFoundry/FauxFoundry.js +4 -2
- package/build/browser/FauxFoundry/FauxFoundry.js.map +1 -1
- package/build/browser/FauxFoundry/getObjectsFromSet.js +7 -1
- package/build/browser/FauxFoundry/getObjectsFromSet.js.map +1 -1
- package/build/cjs/index.cjs +173 -34
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +5 -3
- package/build/esm/FauxFoundry/FauxDataStore.js +130 -3
- package/build/esm/FauxFoundry/FauxDataStore.js.map +1 -1
- package/build/esm/FauxFoundry/FauxDataStore.test.js +30 -2
- package/build/esm/FauxFoundry/FauxDataStore.test.js.map +1 -1
- package/build/esm/FauxFoundry/FauxFoundry.js +4 -2
- package/build/esm/FauxFoundry/FauxFoundry.js.map +1 -1
- package/build/esm/FauxFoundry/getObjectsFromSet.js +7 -1
- package/build/esm/FauxFoundry/getObjectsFromSet.js.map +1 -1
- package/build/types/FauxFoundry/FauxDataStore.d.ts +2 -2
- package/build/types/FauxFoundry/FauxDataStore.d.ts.map +1 -1
- package/build/types/FauxFoundry/FauxFoundry.d.ts +3 -1
- package/build/types/FauxFoundry/FauxFoundry.d.ts.map +1 -1
- package/build/types/FauxFoundry/getObjectsFromSet.d.ts.map +1 -1
- package/package.json +9 -9
package/build/cjs/index.cjs
CHANGED
|
@@ -719,33 +719,33 @@ function getObjectsFromSet(ds, objectSet, methodInput) {
|
|
|
719
719
|
return filterObjects(base, objectSet.where);
|
|
720
720
|
}
|
|
721
721
|
case "union": {
|
|
722
|
-
const
|
|
722
|
+
const set2 = /* @__PURE__ */ new Set();
|
|
723
723
|
for (const objSet of objectSet.objectSets) {
|
|
724
724
|
const objects = getObjectsFromSet(ds, objSet, methodInput);
|
|
725
725
|
for (const obj of objects) {
|
|
726
|
-
|
|
726
|
+
set2.add(obj);
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
return Array.from(
|
|
729
|
+
return Array.from(set2);
|
|
730
730
|
}
|
|
731
731
|
case "subtract": {
|
|
732
|
-
const
|
|
732
|
+
const set2 = new Set(getObjectsFromSet(ds, objectSet.objectSets[0], methodInput));
|
|
733
733
|
for (let i = 1; i < objectSet.objectSets.length; i++) {
|
|
734
734
|
const toSubtract = getObjectsFromSet(ds, objectSet.objectSets[i], methodInput);
|
|
735
735
|
for (const obj of toSubtract) {
|
|
736
|
-
|
|
736
|
+
set2.delete(obj);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return Array.from(
|
|
739
|
+
return Array.from(set2);
|
|
740
740
|
}
|
|
741
741
|
case "intersect": {
|
|
742
|
-
const
|
|
742
|
+
const set2 = new Set(getObjectsFromSet(ds, objectSet.objectSets[0], methodInput));
|
|
743
743
|
for (let i = 1; i < objectSet.objectSets.length; i++) {
|
|
744
744
|
const toIntersect = getObjectsFromSet(ds, objectSet.objectSets[i], methodInput);
|
|
745
|
-
for (const obj of
|
|
745
|
+
for (const obj of set2) {
|
|
746
746
|
const match = toIntersect.find((x) => x.__apiName === obj.__apiName && x.__primaryKey === obj.__primaryKey);
|
|
747
747
|
if (!match) {
|
|
748
|
-
|
|
748
|
+
set2.delete(obj);
|
|
749
749
|
} else if (obj["$propsToReturn"] || match["$propsToReturn"]) {
|
|
750
750
|
obj["$propsToReturn"] = {
|
|
751
751
|
...obj["$propsToReturn"],
|
|
@@ -754,7 +754,7 @@ function getObjectsFromSet(ds, objectSet, methodInput) {
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return Array.from(
|
|
757
|
+
return Array.from(set2);
|
|
758
758
|
}
|
|
759
759
|
case "searchAround": {
|
|
760
760
|
const base = getObjectsFromSet(ds, objectSet.objectSet, methodInput);
|
|
@@ -799,8 +799,13 @@ function getObjectsFromSet(ds, objectSet, methodInput) {
|
|
|
799
799
|
$propsToReturn
|
|
800
800
|
};
|
|
801
801
|
});
|
|
802
|
+
// This does not mimic KNN, it just returns `numNeighbors` objects
|
|
802
803
|
case "nearestNeighbors":
|
|
803
|
-
|
|
804
|
+
const {
|
|
805
|
+
numNeighbors
|
|
806
|
+
} = objectSet;
|
|
807
|
+
const set = getObjectsFromSet(ds, objectSet.objectSet, methodInput);
|
|
808
|
+
return set.slice(0, numNeighbors);
|
|
804
809
|
case "reference":
|
|
805
810
|
throw new Error(`Unhandled objectSet type ${JSON.stringify(objectSet)} in shared.test`);
|
|
806
811
|
}
|
|
@@ -1130,9 +1135,11 @@ var FauxDataStore = class {
|
|
|
1130
1135
|
#media = new mnemonist.DefaultMap((_objectType) => new mnemonist.DefaultMap((_propName) => {
|
|
1131
1136
|
return /* @__PURE__ */ new Map();
|
|
1132
1137
|
}));
|
|
1133
|
-
|
|
1138
|
+
#strict;
|
|
1139
|
+
constructor(fauxOntology, attachments, strict) {
|
|
1134
1140
|
this.#fauxOntology = fauxOntology;
|
|
1135
1141
|
this.#attachments = attachments;
|
|
1142
|
+
this.#strict = strict;
|
|
1136
1143
|
}
|
|
1137
1144
|
/**
|
|
1138
1145
|
* Removes all data that is associated with a namespace/ontology.
|
|
@@ -1238,20 +1245,101 @@ var FauxDataStore = class {
|
|
|
1238
1245
|
};
|
|
1239
1246
|
}
|
|
1240
1247
|
replaceObjectOrThrow(x) {
|
|
1241
|
-
this
|
|
1248
|
+
const objectType = this.ontology.getObjectTypeFullMetadataOrThrow(x.__apiName);
|
|
1249
|
+
const oldObject = this.getObjectOrThrow(x.__apiName, x.__primaryKey);
|
|
1250
|
+
const linksToUpdate = [];
|
|
1251
|
+
const linksToRemove = [];
|
|
1252
|
+
for (const linkDef of objectType.linkTypes) {
|
|
1253
|
+
if (linkDef.cardinality === "ONE") {
|
|
1254
|
+
!(this.#strict && linkDef.foreignKeyPropertyApiName) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Error examining ${objectType.objectType.apiName}.${linkDef.apiName}: ONE side of links should have a foreign key. `) : invariant4__default.default(false) : void 0;
|
|
1255
|
+
const fkName = linkDef.foreignKeyPropertyApiName;
|
|
1256
|
+
const fkValue = x[fkName];
|
|
1257
|
+
const oldFkValue = oldObject[fkName];
|
|
1258
|
+
if (oldObject[fkName] !== x[fkName]) {
|
|
1259
|
+
const dstSide = this.ontology.getOtherLinkTypeSideV2OrThrow(objectType.objectType.apiName, linkDef.apiName);
|
|
1260
|
+
const dstLocator = objectLocator({
|
|
1261
|
+
__apiName: dstSide.objectTypeApiName,
|
|
1262
|
+
__primaryKey: fkValue
|
|
1263
|
+
});
|
|
1264
|
+
const target = this.getObject(dstSide.objectTypeApiName, fkValue);
|
|
1265
|
+
if (fkValue != null && !target) {
|
|
1266
|
+
console.log(`WARNING! Setting a FK value to a non-existent object: ${dstLocator}`);
|
|
1267
|
+
}
|
|
1268
|
+
if (fkValue != null) {
|
|
1269
|
+
linksToUpdate.push({
|
|
1270
|
+
dstSide,
|
|
1271
|
+
dstLocator,
|
|
1272
|
+
srcSide: linkDef,
|
|
1273
|
+
srcLocator: objectLocator(x)
|
|
1274
|
+
});
|
|
1275
|
+
} else {
|
|
1276
|
+
linksToRemove.push({
|
|
1277
|
+
srcLocator: objectLocator(x),
|
|
1278
|
+
srcSide: linkDef,
|
|
1279
|
+
dstLocator: objectLocator({
|
|
1280
|
+
__apiName: dstSide.objectTypeApiName,
|
|
1281
|
+
__primaryKey: oldFkValue
|
|
1282
|
+
}),
|
|
1283
|
+
dstSide
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1242
1289
|
this.#objects.get(x.__apiName).set(String(x.__primaryKey), x);
|
|
1290
|
+
for (const {
|
|
1291
|
+
srcSide,
|
|
1292
|
+
srcLocator,
|
|
1293
|
+
dstSide,
|
|
1294
|
+
dstLocator
|
|
1295
|
+
} of linksToUpdate) {
|
|
1296
|
+
this.#updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator);
|
|
1297
|
+
this.#updateSingleLinkSide(dstSide, dstLocator, srcSide, srcLocator);
|
|
1298
|
+
}
|
|
1299
|
+
for (const {
|
|
1300
|
+
srcSide,
|
|
1301
|
+
srcLocator,
|
|
1302
|
+
dstSide,
|
|
1303
|
+
dstLocator
|
|
1304
|
+
} of linksToRemove) {
|
|
1305
|
+
this.#removeSingleSideOfLink(srcLocator, srcSide, dstLocator);
|
|
1306
|
+
this.#removeSingleSideOfLink(dstLocator, dstSide, srcLocator);
|
|
1307
|
+
}
|
|
1243
1308
|
}
|
|
1244
1309
|
/** Throws if the object does not already exist */
|
|
1245
1310
|
unregisterObjectOrThrow(objectType, primaryKey) {
|
|
1246
1311
|
this.#assertObjectExists(objectType, primaryKey);
|
|
1247
1312
|
this.#objects.get(objectType).delete(String(primaryKey));
|
|
1248
1313
|
}
|
|
1249
|
-
registerLink(
|
|
1314
|
+
registerLink(tmpSrc, srcLinkName, tmpDst, destLinkName) {
|
|
1315
|
+
const src = this.getObjectOrThrow(tmpSrc.__apiName, tmpSrc.__primaryKey);
|
|
1316
|
+
const dst = this.getObjectOrThrow(tmpDst.__apiName, tmpDst.__primaryKey);
|
|
1250
1317
|
const srcLocator = objectLocator(src);
|
|
1251
1318
|
const dstLocator = objectLocator(dst);
|
|
1252
1319
|
const [srcSide, dstSide] = this.#fauxOntology.getBothLinkTypeSides(src.__apiName, srcLinkName, dst.__apiName);
|
|
1253
1320
|
!(srcSide.linkTypeRid === dstSide.linkTypeRid) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Expected both sides of the link to have the same rid, but got ${srcSide.linkTypeRid} and ${dstSide.linkTypeRid}`) : invariant4__default.default(false) : void 0;
|
|
1254
1321
|
!(dstSide.apiName === destLinkName) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Link name mismatch on dst side. Expected ${destLinkName} but found ${dstSide.apiName}`) : invariant4__default.default(false) : void 0;
|
|
1322
|
+
if (this.#strict) {
|
|
1323
|
+
const oneSide = srcSide.cardinality === "ONE" ? {
|
|
1324
|
+
object: src,
|
|
1325
|
+
link: srcSide
|
|
1326
|
+
} : dstSide.cardinality === "ONE" ? {
|
|
1327
|
+
object: dst,
|
|
1328
|
+
link: dstSide
|
|
1329
|
+
} : void 0;
|
|
1330
|
+
const manySide = oneSide ? srcSide.cardinality === "MANY" ? {
|
|
1331
|
+
object: src} : {
|
|
1332
|
+
object: dst} : void 0;
|
|
1333
|
+
if (oneSide && manySide) {
|
|
1334
|
+
!oneSide.link.foreignKeyPropertyApiName ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Expected to find a foreignKeyPropertyApiName on the one side: ${oneSide.object.__apiName}.${oneSide.link.apiName}`) : invariant4__default.default(false) : void 0;
|
|
1335
|
+
const newObj = {
|
|
1336
|
+
...oneSide.object,
|
|
1337
|
+
[oneSide.link.foreignKeyPropertyApiName]: manySide.object.__primaryKey
|
|
1338
|
+
};
|
|
1339
|
+
this.replaceObjectOrThrow(newObj);
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1255
1343
|
this.#updateSingleLinkSide(srcSide, srcLocator, dstSide, dstLocator);
|
|
1256
1344
|
this.#updateSingleLinkSide(dstSide, dstLocator, srcSide, srcLocator);
|
|
1257
1345
|
}
|
|
@@ -1260,6 +1348,21 @@ var FauxDataStore = class {
|
|
|
1260
1348
|
const dstLocator = objectLocator(dst);
|
|
1261
1349
|
const [srcSide, dstSide] = this.#fauxOntology.getBothLinkTypeSides(src.__apiName, srcLinkName, dst.__apiName);
|
|
1262
1350
|
!(dstSide.apiName === dstLinkName) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Link name mismatch on dst side. Expected ${dstLinkName} but found ${dstSide.apiName}`) : invariant4__default.default(false) : void 0;
|
|
1351
|
+
if (this.#strict) {
|
|
1352
|
+
const {
|
|
1353
|
+
oneSide,
|
|
1354
|
+
manySide
|
|
1355
|
+
} = extractOneManySide(srcSide, src, dstSide, dst);
|
|
1356
|
+
if (oneSide && manySide) {
|
|
1357
|
+
!oneSide.link.foreignKeyPropertyApiName ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, `Expected to find a foreignKeyPropertyApiName on the one side: ${oneSide.object.__apiName}.${oneSide.link.apiName}`) : invariant4__default.default(false) : void 0;
|
|
1358
|
+
const newObj = {
|
|
1359
|
+
...oneSide.object,
|
|
1360
|
+
[oneSide.link.foreignKeyPropertyApiName]: void 0
|
|
1361
|
+
};
|
|
1362
|
+
this.replaceObjectOrThrow(newObj);
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1263
1366
|
this.#removeSingleSideOfLink(srcLocator, srcSide, dstLocator);
|
|
1264
1367
|
this.#removeSingleSideOfLink(dstLocator, dstSide, srcLocator);
|
|
1265
1368
|
}
|
|
@@ -1519,6 +1622,26 @@ var FauxDataStore = class {
|
|
|
1519
1622
|
};
|
|
1520
1623
|
}
|
|
1521
1624
|
};
|
|
1625
|
+
function extractOneManySide(srcSide, src, dstSide, dst) {
|
|
1626
|
+
const oneSide = srcSide.cardinality === "ONE" ? {
|
|
1627
|
+
object: src,
|
|
1628
|
+
link: srcSide
|
|
1629
|
+
} : dstSide.cardinality === "ONE" ? {
|
|
1630
|
+
object: dst,
|
|
1631
|
+
link: dstSide
|
|
1632
|
+
} : void 0;
|
|
1633
|
+
const manySide = oneSide ? srcSide.cardinality === "MANY" ? {
|
|
1634
|
+
object: src,
|
|
1635
|
+
link: srcSide
|
|
1636
|
+
} : {
|
|
1637
|
+
object: dst,
|
|
1638
|
+
link: dstSide
|
|
1639
|
+
} : void 0;
|
|
1640
|
+
return {
|
|
1641
|
+
oneSide,
|
|
1642
|
+
manySide
|
|
1643
|
+
};
|
|
1644
|
+
}
|
|
1522
1645
|
|
|
1523
1646
|
// src/mock/OntologiesV2/index.ts
|
|
1524
1647
|
var OntologiesV2_exports2 = {};
|
|
@@ -1547,7 +1670,7 @@ __export(Actions_exports, {
|
|
|
1547
1670
|
applyBatch: () => applyBatch2
|
|
1548
1671
|
});
|
|
1549
1672
|
|
|
1550
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1673
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
1551
1674
|
var Action_exports = {};
|
|
1552
1675
|
__export(Action_exports, {
|
|
1553
1676
|
apply: () => apply,
|
|
@@ -1589,7 +1712,7 @@ var UnknownError = class extends PalantirApiError {
|
|
|
1589
1712
|
}
|
|
1590
1713
|
};
|
|
1591
1714
|
|
|
1592
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.
|
|
1715
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.4.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
|
|
1593
1716
|
async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
|
|
1594
1717
|
const path = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
|
|
1595
1718
|
const body = flags & 1 ? args.shift() : void 0;
|
|
@@ -1616,7 +1739,11 @@ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, h
|
|
|
1616
1739
|
headersInit.set("Content-Type", requestMediaType ?? "application/json");
|
|
1617
1740
|
headersInit.set("Accept", responseMediaType ?? "application/json");
|
|
1618
1741
|
Object.entries(headers || {}).forEach(([key, value]) => {
|
|
1619
|
-
if (value
|
|
1742
|
+
if (key === "Content-Type" && typeof value === "string") {
|
|
1743
|
+
headersInit.set("Content-Type", value);
|
|
1744
|
+
} else if (key === "Accept" && typeof value === "string") {
|
|
1745
|
+
headersInit.set("Accept", value);
|
|
1746
|
+
} else if (value != null) {
|
|
1620
1747
|
headersInit.append(key, value.toString());
|
|
1621
1748
|
}
|
|
1622
1749
|
});
|
|
@@ -1650,7 +1777,7 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
1650
1777
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
1651
1778
|
}
|
|
1652
1779
|
|
|
1653
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1780
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
1654
1781
|
var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 3];
|
|
1655
1782
|
function apply($ctx, ...args) {
|
|
1656
1783
|
return foundryPlatformFetch($ctx, _apply, ...args);
|
|
@@ -1664,7 +1791,7 @@ function applyBatch($ctx, ...args) {
|
|
|
1664
1791
|
return foundryPlatformFetch($ctx, _applyBatch, ...args);
|
|
1665
1792
|
}
|
|
1666
1793
|
|
|
1667
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1794
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
1668
1795
|
var ActionTypeV2_exports = {};
|
|
1669
1796
|
__export(ActionTypeV2_exports, {
|
|
1670
1797
|
get: () => get,
|
|
@@ -1684,7 +1811,7 @@ function getByRid($ctx, ...args) {
|
|
|
1684
1811
|
return foundryPlatformFetch($ctx, _getByRid, ...args);
|
|
1685
1812
|
}
|
|
1686
1813
|
|
|
1687
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1814
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
1688
1815
|
var Attachment_exports = {};
|
|
1689
1816
|
__export(Attachment_exports, {
|
|
1690
1817
|
get: () => get2,
|
|
@@ -1709,7 +1836,7 @@ function get2($ctx, ...args) {
|
|
|
1709
1836
|
return foundryPlatformFetch($ctx, _get2, ...args);
|
|
1710
1837
|
}
|
|
1711
1838
|
|
|
1712
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1839
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
|
|
1713
1840
|
var AttachmentPropertyV2_exports = {};
|
|
1714
1841
|
__export(AttachmentPropertyV2_exports, {
|
|
1715
1842
|
getAttachment: () => getAttachment,
|
|
@@ -1734,7 +1861,7 @@ function readAttachmentByRid($ctx, ...args) {
|
|
|
1734
1861
|
return foundryPlatformFetch($ctx, _readAttachmentByRid, ...args);
|
|
1735
1862
|
}
|
|
1736
1863
|
|
|
1737
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1864
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
|
|
1738
1865
|
var LinkedObjectV2_exports = {};
|
|
1739
1866
|
__export(LinkedObjectV2_exports, {
|
|
1740
1867
|
getLinkedObject: () => getLinkedObject,
|
|
@@ -1749,7 +1876,7 @@ function getLinkedObject($ctx, ...args) {
|
|
|
1749
1876
|
return foundryPlatformFetch($ctx, _getLinkedObject, ...args);
|
|
1750
1877
|
}
|
|
1751
1878
|
|
|
1752
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1879
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
1753
1880
|
var MediaReferenceProperty_exports = {};
|
|
1754
1881
|
__export(MediaReferenceProperty_exports, {
|
|
1755
1882
|
getMediaContent: () => getMediaContent,
|
|
@@ -1774,7 +1901,7 @@ function uploadMedia($ctx, ...args) {
|
|
|
1774
1901
|
return foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
1775
1902
|
}
|
|
1776
1903
|
|
|
1777
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1904
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
1778
1905
|
var ObjectTypeV2_exports = {};
|
|
1779
1906
|
__export(ObjectTypeV2_exports, {
|
|
1780
1907
|
get: () => get3,
|
|
@@ -1804,12 +1931,14 @@ function getOutgoingLinkType($ctx, ...args) {
|
|
|
1804
1931
|
return foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);
|
|
1805
1932
|
}
|
|
1806
1933
|
|
|
1807
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1934
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
1808
1935
|
var OntologyInterface_exports = {};
|
|
1809
1936
|
__export(OntologyInterface_exports, {
|
|
1810
1937
|
aggregate: () => aggregate,
|
|
1811
1938
|
get: () => get4,
|
|
1939
|
+
getOutgoingInterfaceLinkType: () => getOutgoingInterfaceLinkType,
|
|
1812
1940
|
list: () => list3,
|
|
1941
|
+
listOutgoingInterfaceLinkTypes: () => listOutgoingInterfaceLinkTypes,
|
|
1813
1942
|
search: () => search
|
|
1814
1943
|
});
|
|
1815
1944
|
var _list3 = [0, "/v2/ontologies/{0}/interfaceTypes", 2];
|
|
@@ -1828,8 +1957,16 @@ var _aggregate = [1, "/v2/ontologies/{0}/interfaces/{1}/aggregate", 3];
|
|
|
1828
1957
|
function aggregate($ctx, ...args) {
|
|
1829
1958
|
return foundryPlatformFetch($ctx, _aggregate, ...args);
|
|
1830
1959
|
}
|
|
1960
|
+
var _listOutgoingInterfaceLinkTypes = [0, "/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes", 2];
|
|
1961
|
+
function listOutgoingInterfaceLinkTypes($ctx, ...args) {
|
|
1962
|
+
return foundryPlatformFetch($ctx, _listOutgoingInterfaceLinkTypes, ...args);
|
|
1963
|
+
}
|
|
1964
|
+
var _getOutgoingInterfaceLinkType = [0, "/v2/ontologies/{0}/interfaceTypes/{1}/outgoingLinkTypes/{2}", 2];
|
|
1965
|
+
function getOutgoingInterfaceLinkType($ctx, ...args) {
|
|
1966
|
+
return foundryPlatformFetch($ctx, _getOutgoingInterfaceLinkType, ...args);
|
|
1967
|
+
}
|
|
1831
1968
|
|
|
1832
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1969
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
1833
1970
|
var OntologyObjectSet_exports = {};
|
|
1834
1971
|
__export(OntologyObjectSet_exports, {
|
|
1835
1972
|
aggregate: () => aggregate2,
|
|
@@ -1864,7 +2001,7 @@ function aggregate2($ctx, ...args) {
|
|
|
1864
2001
|
return foundryPlatformFetch($ctx, _aggregate2, ...args);
|
|
1865
2002
|
}
|
|
1866
2003
|
|
|
1867
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
2004
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
|
|
1868
2005
|
var OntologyObjectV2_exports = {};
|
|
1869
2006
|
__export(OntologyObjectV2_exports, {
|
|
1870
2007
|
aggregate: () => aggregate3,
|
|
@@ -1894,7 +2031,7 @@ function aggregate3($ctx, ...args) {
|
|
|
1894
2031
|
return foundryPlatformFetch($ctx, _aggregate3, ...args);
|
|
1895
2032
|
}
|
|
1896
2033
|
|
|
1897
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
2034
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
|
|
1898
2035
|
var OntologyV2_exports = {};
|
|
1899
2036
|
__export(OntologyV2_exports, {
|
|
1900
2037
|
get: () => get7,
|
|
@@ -1919,7 +2056,7 @@ function loadMetadata($ctx, ...args) {
|
|
|
1919
2056
|
return foundryPlatformFetch($ctx, _loadMetadata, ...args);
|
|
1920
2057
|
}
|
|
1921
2058
|
|
|
1922
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
2059
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
1923
2060
|
var Query_exports = {};
|
|
1924
2061
|
__export(Query_exports, {
|
|
1925
2062
|
execute: () => execute
|
|
@@ -1929,7 +2066,7 @@ function execute($ctx, ...args) {
|
|
|
1929
2066
|
return foundryPlatformFetch($ctx, _execute, ...args);
|
|
1930
2067
|
}
|
|
1931
2068
|
|
|
1932
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
2069
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
1933
2070
|
var QueryType_exports = {};
|
|
1934
2071
|
__export(QueryType_exports, {
|
|
1935
2072
|
get: () => get8,
|
|
@@ -1944,7 +2081,7 @@ function get8($ctx, ...args) {
|
|
|
1944
2081
|
return foundryPlatformFetch($ctx, _get8, ...args);
|
|
1945
2082
|
}
|
|
1946
2083
|
|
|
1947
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
2084
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
1948
2085
|
var TimeSeriesPropertyV2_exports = {};
|
|
1949
2086
|
__export(TimeSeriesPropertyV2_exports, {
|
|
1950
2087
|
getFirstPoint: () => getFirstPoint,
|
|
@@ -1964,7 +2101,7 @@ function streamPoints($ctx, ...args) {
|
|
|
1964
2101
|
return foundryPlatformFetch($ctx, _streamPoints, ...args);
|
|
1965
2102
|
}
|
|
1966
2103
|
|
|
1967
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
2104
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.25.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
1968
2105
|
var TimeSeriesValueBankProperty_exports = {};
|
|
1969
2106
|
__export(TimeSeriesValueBankProperty_exports, {
|
|
1970
2107
|
getLatestValue: () => getLatestValue,
|
|
@@ -2916,8 +3053,10 @@ var FauxFoundry = class {
|
|
|
2916
3053
|
description: "The default ontology",
|
|
2917
3054
|
rid: `ri.ontology.main.ontology.${crypto__namespace.randomUUID()}`
|
|
2918
3055
|
}, {
|
|
2919
|
-
logger
|
|
3056
|
+
logger,
|
|
3057
|
+
strict
|
|
2920
3058
|
} = {}) {
|
|
3059
|
+
this.strict = strict ?? true;
|
|
2921
3060
|
this.baseUrl = baseUrl;
|
|
2922
3061
|
this.#handlers = createFauxFoundryHandlers(baseUrl, this);
|
|
2923
3062
|
this.createOntology(defaultOntology);
|
|
@@ -2957,7 +3096,7 @@ var FauxFoundry = class {
|
|
|
2957
3096
|
const ontology = this.getOntology(ontologyApiNameOrRid);
|
|
2958
3097
|
const dataStore = this.#dataStoresByOntologyApiName.get(ontology.apiName);
|
|
2959
3098
|
if (!dataStore) {
|
|
2960
|
-
const ret = new FauxDataStore(ontology, this.attachments);
|
|
3099
|
+
const ret = new FauxDataStore(ontology, this.attachments, this.strict);
|
|
2961
3100
|
this.setDataStore(ontologyApiNameOrRid, ret);
|
|
2962
3101
|
return ret;
|
|
2963
3102
|
}
|