bruce-models 4.7.9 → 4.8.0
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 +59 -5
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +55 -4
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +3 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/import/import-assembly.js +53 -0
- package/dist/lib/import/import-assembly.js.map +1 -0
- package/dist/lib/import/import-cad.js +1 -0
- package/dist/lib/import/import-cad.js.map +1 -1
- package/dist/lib/import/import-csv.js +1 -1
- package/dist/lib/import/import-csv.js.map +1 -1
- package/dist/lib/import/import-geojson.js +28 -0
- package/dist/lib/import/import-geojson.js.map +1 -0
- package/dist/lib/import/import-json.js +1 -1
- package/dist/lib/import/import-json.js.map +1 -1
- package/dist/lib/import/import-kml.js +1 -1
- package/dist/lib/import/import-kml.js.map +1 -1
- package/dist/types/bruce-models.d.ts +3 -1
- package/dist/types/entity/entity-type.d.ts +7 -6
- package/dist/types/import/import-assembly.d.ts +73 -0
- package/dist/types/import/import-cad.d.ts +1 -0
- package/dist/types/import/import-csv.d.ts +10 -15
- package/dist/types/import/import-geojson.d.ts +23 -0
- package/dist/types/import/import-json.d.ts +9 -12
- package/dist/types/import/import-kml.d.ts +16 -5
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -13199,9 +13199,49 @@ var DataLab;
|
|
|
13199
13199
|
DataLab.Run = Run;
|
|
13200
13200
|
})(DataLab || (DataLab = {}));
|
|
13201
13201
|
|
|
13202
|
+
var ImportAssembly;
|
|
13203
|
+
(function (ImportAssembly) {
|
|
13204
|
+
function Analyze(params) {
|
|
13205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13206
|
+
let { api, fileAnalyze, req: reqParams } = params;
|
|
13207
|
+
if (!api) {
|
|
13208
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13209
|
+
}
|
|
13210
|
+
return api.POST("import/analyze/assembly", fileAnalyze, Api.PrepReqParams(reqParams));
|
|
13211
|
+
});
|
|
13212
|
+
}
|
|
13213
|
+
ImportAssembly.Analyze = Analyze;
|
|
13214
|
+
function ImportEntities(params) {
|
|
13215
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13216
|
+
let { api, fileImport, req: reqParams } = params;
|
|
13217
|
+
if (!api) {
|
|
13218
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13219
|
+
}
|
|
13220
|
+
return api.POST("import/assembly", fileImport, Api.PrepReqParams(reqParams));
|
|
13221
|
+
});
|
|
13222
|
+
}
|
|
13223
|
+
ImportAssembly.ImportEntities = ImportEntities;
|
|
13224
|
+
/**
|
|
13225
|
+
* Parses the completed pending action result from running "ImportEntities".
|
|
13226
|
+
* This will return the root entity's id if any is present.
|
|
13227
|
+
* @param paResult
|
|
13228
|
+
*/
|
|
13229
|
+
function ParseAnalysisResult(paResult) {
|
|
13230
|
+
try {
|
|
13231
|
+
return typeof paResult == "string" ? JSON.parse(paResult) : paResult;
|
|
13232
|
+
}
|
|
13233
|
+
catch (_a) {
|
|
13234
|
+
// Failed to parse json.
|
|
13235
|
+
}
|
|
13236
|
+
return null;
|
|
13237
|
+
}
|
|
13238
|
+
ImportAssembly.ParseAnalysisResult = ParseAnalysisResult;
|
|
13239
|
+
})(ImportAssembly || (ImportAssembly = {}));
|
|
13240
|
+
|
|
13202
13241
|
/**
|
|
13203
13242
|
* TODO: The analysis result is currently a mix of multiple layers of legacy.
|
|
13204
13243
|
* We will first decide what we want it to do and then describe just the needed portions of the existing implementation.
|
|
13244
|
+
* @deprecated use import-assembly, this will be removed next update.
|
|
13205
13245
|
*/
|
|
13206
13246
|
var ImportCad;
|
|
13207
13247
|
(function (ImportCad) {
|
|
@@ -13254,7 +13294,7 @@ var ImportCsv;
|
|
|
13254
13294
|
if (!api) {
|
|
13255
13295
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13256
13296
|
}
|
|
13257
|
-
return api.POST("
|
|
13297
|
+
return api.POST("import/csv", fileImport, Api.PrepReqParams(reqParams));
|
|
13258
13298
|
});
|
|
13259
13299
|
}
|
|
13260
13300
|
ImportCsv.ImportEntities = ImportEntities;
|
|
@@ -13268,12 +13308,26 @@ var ImportJson;
|
|
|
13268
13308
|
if (!api) {
|
|
13269
13309
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13270
13310
|
}
|
|
13271
|
-
return api.POST("
|
|
13311
|
+
return api.POST("import/json", fileImport, Api.PrepReqParams(reqParams));
|
|
13272
13312
|
});
|
|
13273
13313
|
}
|
|
13274
13314
|
ImportJson.ImportEntities = ImportEntities;
|
|
13275
13315
|
})(ImportJson || (ImportJson = {}));
|
|
13276
13316
|
|
|
13317
|
+
var ImportGeoJson;
|
|
13318
|
+
(function (ImportGeoJson) {
|
|
13319
|
+
function ImportEntities(params) {
|
|
13320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13321
|
+
let { api, fileImport, req: reqParams } = params;
|
|
13322
|
+
if (!api) {
|
|
13323
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13324
|
+
}
|
|
13325
|
+
return api.POST("import/geojson", fileImport, Api.PrepReqParams(reqParams));
|
|
13326
|
+
});
|
|
13327
|
+
}
|
|
13328
|
+
ImportGeoJson.ImportEntities = ImportEntities;
|
|
13329
|
+
})(ImportGeoJson || (ImportGeoJson = {}));
|
|
13330
|
+
|
|
13277
13331
|
var ImportKml;
|
|
13278
13332
|
(function (ImportKml) {
|
|
13279
13333
|
function ImportEntities(params) {
|
|
@@ -13282,7 +13336,7 @@ var ImportKml;
|
|
|
13282
13336
|
if (!api) {
|
|
13283
13337
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
13284
13338
|
}
|
|
13285
|
-
return api.POST("
|
|
13339
|
+
return api.POST("import/kml", fileImport, Api.PrepReqParams(reqParams));
|
|
13286
13340
|
});
|
|
13287
13341
|
}
|
|
13288
13342
|
ImportKml.ImportEntities = ImportEntities;
|
|
@@ -14140,7 +14194,7 @@ var DataSource;
|
|
|
14140
14194
|
})(DataSource || (DataSource = {}));
|
|
14141
14195
|
|
|
14142
14196
|
// This is updated with the package.json version on build.
|
|
14143
|
-
const VERSION = "4.
|
|
14197
|
+
const VERSION = "4.8.0";
|
|
14144
14198
|
|
|
14145
|
-
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, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
14199
|
+
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, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
14146
14200
|
//# sourceMappingURL=bruce-models.es5.js.map
|