bruce-models 7.1.83 → 7.1.85
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/bruce-models.es5.js +22 -55
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +22 -55
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/data-lab/data-lab.js +2 -54
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/import/import-assembly.js +19 -0
- package/dist/lib/import/import-assembly.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/data-lab/data-lab.d.ts +3 -29
- package/dist/types/import/import-assembly.d.ts +24 -5
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -10844,59 +10844,6 @@
|
|
|
10844
10844
|
});
|
|
10845
10845
|
}
|
|
10846
10846
|
DataLab.SuggestDataLabQueryByPrompt = SuggestDataLabQueryByPrompt;
|
|
10847
|
-
/**
|
|
10848
|
-
* Runs a DataLab query for the distinct Entity Type IDs of everything it matches.
|
|
10849
|
-
*/
|
|
10850
|
-
function GetEntityTypeIds(params) {
|
|
10851
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10852
|
-
let { api, query, skip, load, req: reqParams } = params;
|
|
10853
|
-
if (!api) {
|
|
10854
|
-
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
10855
|
-
}
|
|
10856
|
-
if (!(query === null || query === void 0 ? void 0 : query[EReqKey.Primary])) {
|
|
10857
|
-
throw new Error("query must carry a PrimarySelection.");
|
|
10858
|
-
}
|
|
10859
|
-
skip = skip !== null && skip !== void 0 ? skip : 0;
|
|
10860
|
-
load = load !== null && load !== void 0 ? load : 200;
|
|
10861
|
-
// Cloned so asking this question of a query never changes what the caller goes on to run.
|
|
10862
|
-
const body = Object.assign(Object.assign({}, query), { [EReqKey.Primary]: Object.assign(Object.assign({}, query[EReqKey.Primary]), { Select: { Type: ESelectType.EntityTypeId } }), Skip: skip, Load: load });
|
|
10863
|
-
const res = yield api.POST("v3/datalab/runSearch", body, exports.Api.PrepReqParams(reqParams));
|
|
10864
|
-
return {
|
|
10865
|
-
entityTypeIds: Array.isArray(res === null || res === void 0 ? void 0 : res.Items) ? res.Items : [],
|
|
10866
|
-
hasMore: Boolean(res === null || res === void 0 ? void 0 : res.NextPage)
|
|
10867
|
-
};
|
|
10868
|
-
});
|
|
10869
|
-
}
|
|
10870
|
-
DataLab.GetEntityTypeIds = GetEntityTypeIds;
|
|
10871
|
-
/**
|
|
10872
|
-
* Returns the distinct Entity Type IDs used inside one or more assembly hierarchies.
|
|
10873
|
-
* The root Entity's own Type is included, since it is part of the hierarchy.
|
|
10874
|
-
*/
|
|
10875
|
-
function GetAssemblyEntityTypeIds(params) {
|
|
10876
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10877
|
-
const { api, rootEntityId, skip, load, req } = params;
|
|
10878
|
-
const rootIds = Array.isArray(rootEntityId) ? rootEntityId : [rootEntityId];
|
|
10879
|
-
if (!rootIds.length || rootIds.some(id => !id)) {
|
|
10880
|
-
throw new Error("rootEntityId must be provided.");
|
|
10881
|
-
}
|
|
10882
|
-
const criterion = {
|
|
10883
|
-
key: "root",
|
|
10884
|
-
RootID: rootIds
|
|
10885
|
-
};
|
|
10886
|
-
return GetEntityTypeIds({
|
|
10887
|
-
api,
|
|
10888
|
-
skip,
|
|
10889
|
-
load,
|
|
10890
|
-
req,
|
|
10891
|
-
query: {
|
|
10892
|
-
[EReqKey.Primary]: {
|
|
10893
|
-
Items: [criterion]
|
|
10894
|
-
}
|
|
10895
|
-
}
|
|
10896
|
-
});
|
|
10897
|
-
});
|
|
10898
|
-
}
|
|
10899
|
-
DataLab.GetAssemblyEntityTypeIds = GetAssemblyEntityTypeIds;
|
|
10900
10847
|
/**
|
|
10901
10848
|
* Runs a DataLab query.
|
|
10902
10849
|
* @param params
|
|
@@ -10934,7 +10881,8 @@
|
|
|
10934
10881
|
const data = yield req;
|
|
10935
10882
|
res({
|
|
10936
10883
|
entities: data.Items,
|
|
10937
|
-
totalCount: data.MatchesCount
|
|
10884
|
+
totalCount: data.MatchesCount,
|
|
10885
|
+
items: data.Items
|
|
10938
10886
|
});
|
|
10939
10887
|
}
|
|
10940
10888
|
catch (e) {
|
|
@@ -14994,6 +14942,25 @@
|
|
|
14994
14942
|
return null;
|
|
14995
14943
|
}
|
|
14996
14944
|
ImportAssembly.ParseAnalysisResult = ParseAnalysisResult;
|
|
14945
|
+
/**
|
|
14946
|
+
* Returns the analysis itself, wherever the API decided to put it.
|
|
14947
|
+
*/
|
|
14948
|
+
function ResolveAnalysisResult(params) {
|
|
14949
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14950
|
+
let { api, paResult, req: reqParams } = params;
|
|
14951
|
+
const parsed = ParseAnalysisResult(paResult);
|
|
14952
|
+
const tempFileId = parsed === null || parsed === void 0 ? void 0 : parsed["Analysis.TempFile.ID"];
|
|
14953
|
+
if (!parsed || !tempFileId) {
|
|
14954
|
+
return parsed;
|
|
14955
|
+
}
|
|
14956
|
+
if (!api) {
|
|
14957
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
14958
|
+
}
|
|
14959
|
+
const analysis = yield api.GET("tempfile/" + tempFileId, exports.Api.PrepReqParams(reqParams));
|
|
14960
|
+
return typeof analysis === "string" ? ParseAnalysisResult(analysis) : analysis;
|
|
14961
|
+
});
|
|
14962
|
+
}
|
|
14963
|
+
ImportAssembly.ResolveAnalysisResult = ResolveAnalysisResult;
|
|
14997
14964
|
})(exports.ImportAssembly || (exports.ImportAssembly = {}));
|
|
14998
14965
|
|
|
14999
14966
|
(function (ImportCad) {
|
|
@@ -20410,7 +20377,7 @@
|
|
|
20410
20377
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
20411
20378
|
|
|
20412
20379
|
// This is updated with the package.json version on build.
|
|
20413
|
-
const VERSION = "7.1.
|
|
20380
|
+
const VERSION = "7.1.85";
|
|
20414
20381
|
|
|
20415
20382
|
exports.VERSION = VERSION;
|
|
20416
20383
|
exports.AbstractApi = AbstractApi;
|