bruce-models 5.2.3 → 5.2.5
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 +67 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +67 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +21 -0
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/api/bruce-api.js +45 -0
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/types/account/account.d.ts +14 -0
- package/dist/types/api/bruce-api.d.ts +5 -0
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -1256,6 +1256,51 @@ var BruceApi;
|
|
|
1256
1256
|
});
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* Version check that returns true if the version is at least the provided version.
|
|
1261
|
+
* @param version
|
|
1262
|
+
*/
|
|
1263
|
+
IsVersionAtLeast(version) {
|
|
1264
|
+
if (!this.version) {
|
|
1265
|
+
return false;
|
|
1266
|
+
}
|
|
1267
|
+
// Debug.
|
|
1268
|
+
if (typeof this.version == "string" && this.version.toLowerCase().includes("debug")) {
|
|
1269
|
+
return true;
|
|
1270
|
+
}
|
|
1271
|
+
// Bad data.
|
|
1272
|
+
if (!this.version.includes(".")) {
|
|
1273
|
+
return false;
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Compares two arrays of version parts.
|
|
1277
|
+
* Returns -1 if `a` is less than `b`, 1 if `a` is greater than `b`, or 0 if they are equal.
|
|
1278
|
+
* @param a
|
|
1279
|
+
* @param b
|
|
1280
|
+
*/
|
|
1281
|
+
function compareVersions(a, b) {
|
|
1282
|
+
for (let i = 0; i < a.length; i++) {
|
|
1283
|
+
if (a[i] < b[i]) {
|
|
1284
|
+
return -1;
|
|
1285
|
+
}
|
|
1286
|
+
else if (a[i] > b[i]) {
|
|
1287
|
+
return 1;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return 0;
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Splits a version string into an array of version parts.
|
|
1294
|
+
* Example format: "1.0.4836".
|
|
1295
|
+
* @param version
|
|
1296
|
+
*/
|
|
1297
|
+
function splitVersion(version) {
|
|
1298
|
+
return version.split(".").map(part => parseInt(part));
|
|
1299
|
+
}
|
|
1300
|
+
const curSplit = splitVersion(this.version);
|
|
1301
|
+
const reqSplit = splitVersion(version);
|
|
1302
|
+
return compareVersions(curSplit, reqSplit) >= 0;
|
|
1303
|
+
}
|
|
1259
1304
|
}
|
|
1260
1305
|
BruceApi$$1.Api = Api$$1;
|
|
1261
1306
|
})(BruceApi || (BruceApi = {}));
|
|
@@ -11230,6 +11275,27 @@ var Account;
|
|
|
11230
11275
|
});
|
|
11231
11276
|
}
|
|
11232
11277
|
Account.Create = Create;
|
|
11278
|
+
/**
|
|
11279
|
+
* Call to start a cleanup job. Do not start multiple cleanups at once.
|
|
11280
|
+
* @param params
|
|
11281
|
+
* @returns
|
|
11282
|
+
*/
|
|
11283
|
+
function Cleanup(params) {
|
|
11284
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11285
|
+
let { api, cleanTilesets, cleanPlugins, cleanLODs, cleanClientFiles } = params;
|
|
11286
|
+
if (!api) {
|
|
11287
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
11288
|
+
}
|
|
11289
|
+
const data = yield api.POST("cleanup", {
|
|
11290
|
+
"CleanTilesets": cleanTilesets,
|
|
11291
|
+
"CleanPlugins": cleanPlugins,
|
|
11292
|
+
"CleanLODs": cleanLODs,
|
|
11293
|
+
"CleanClientFiles": cleanClientFiles
|
|
11294
|
+
});
|
|
11295
|
+
return data;
|
|
11296
|
+
});
|
|
11297
|
+
}
|
|
11298
|
+
Account.Cleanup = Cleanup;
|
|
11233
11299
|
/**
|
|
11234
11300
|
* Returns cache identifier for an account by ID.
|
|
11235
11301
|
* Example: {
|
|
@@ -14534,7 +14600,7 @@ var DataSource;
|
|
|
14534
14600
|
})(DataSource || (DataSource = {}));
|
|
14535
14601
|
|
|
14536
14602
|
// This is updated with the package.json version on build.
|
|
14537
|
-
const VERSION = "5.2.
|
|
14603
|
+
const VERSION = "5.2.5";
|
|
14538
14604
|
|
|
14539
14605
|
export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
14540
14606
|
//# sourceMappingURL=bruce-models.es5.js.map
|