bruce-models 2.9.2 → 2.9.4
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 +31 -24
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +31 -24
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/program-key/program-key.js +30 -20
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/user/session.js +0 -3
- package/dist/lib/user/session.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/user/session.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -8785,28 +8785,38 @@ var ProgramKey;
|
|
|
8785
8785
|
if (!programId) {
|
|
8786
8786
|
throw ("Program ID is required.");
|
|
8787
8787
|
}
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
8794
|
-
try {
|
|
8795
|
-
const data = yield api.GET(`programkey/${programId}`, Api.PrepReqParams(reqParams));
|
|
8796
|
-
res({
|
|
8797
|
-
programKey: data
|
|
8798
|
-
});
|
|
8799
|
-
}
|
|
8800
|
-
catch (e) {
|
|
8801
|
-
rej(e);
|
|
8802
|
-
}
|
|
8803
|
-
}));
|
|
8804
|
-
yield api.SetCacheItem({
|
|
8805
|
-
key,
|
|
8806
|
-
value: prom,
|
|
8788
|
+
// Our API throws an error when a key is not set which is a bit annoying.
|
|
8789
|
+
// Since we only use these keys for a few specific things we'll just request the list and avoid the error.
|
|
8790
|
+
// If this becomes useful for more things we'll make requesting a key that doesn't exist just return empty JSON.
|
|
8791
|
+
const prom = yield GetList({
|
|
8792
|
+
api,
|
|
8807
8793
|
req: reqParams
|
|
8808
8794
|
});
|
|
8809
|
-
|
|
8795
|
+
const key = prom.programKeys.find(k => k.ProgramId === programId);
|
|
8796
|
+
// const key = GetCacheKey(programId);
|
|
8797
|
+
// const cache = await api.GetCacheItem(key, reqParams);
|
|
8798
|
+
// if (cache?.found) {
|
|
8799
|
+
// return cache.data;
|
|
8800
|
+
// }
|
|
8801
|
+
// const prom: Promise<any> = new Promise(async (res, rej) => {
|
|
8802
|
+
// try {
|
|
8803
|
+
// const data = await api.GET(`programkey/${programId}`, Api.PrepReqParams(reqParams));
|
|
8804
|
+
// res({
|
|
8805
|
+
// programKey: data
|
|
8806
|
+
// });
|
|
8807
|
+
// }
|
|
8808
|
+
// catch (e) {
|
|
8809
|
+
// rej(e);
|
|
8810
|
+
// }
|
|
8811
|
+
// });
|
|
8812
|
+
// await api.SetCacheItem({
|
|
8813
|
+
// key,
|
|
8814
|
+
// value: prom,
|
|
8815
|
+
// req: reqParams
|
|
8816
|
+
// });
|
|
8817
|
+
return {
|
|
8818
|
+
programKey: key
|
|
8819
|
+
};
|
|
8810
8820
|
});
|
|
8811
8821
|
}
|
|
8812
8822
|
ProgramKey.Get = Get;
|
|
@@ -10273,9 +10283,6 @@ var Session;
|
|
|
10273
10283
|
if (!api) {
|
|
10274
10284
|
api = ENVIRONMENT.Api().GetGuardianApi();
|
|
10275
10285
|
}
|
|
10276
|
-
if (!sessionId) {
|
|
10277
|
-
throw ("Session ID is required.");
|
|
10278
|
-
}
|
|
10279
10286
|
const key = GetCacheKey(sessionId);
|
|
10280
10287
|
const cache = yield api.GetCacheItem(key, reqParams);
|
|
10281
10288
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
@@ -11995,7 +12002,7 @@ var DataSource;
|
|
|
11995
12002
|
DataSource.GetList = GetList;
|
|
11996
12003
|
})(DataSource || (DataSource = {}));
|
|
11997
12004
|
|
|
11998
|
-
const VERSION$1 = "2.9.
|
|
12005
|
+
const VERSION$1 = "2.9.4";
|
|
11999
12006
|
|
|
12000
12007
|
export { VERSION$1 as VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
12001
12008
|
//# sourceMappingURL=bruce-models.es5.js.map
|