bruce-models 1.5.1 → 1.5.3

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.
@@ -1352,6 +1352,132 @@ var GlobalApi;
1352
1352
  GlobalApi.Api = Api$$1;
1353
1353
  })(GlobalApi || (GlobalApi = {}));
1354
1354
 
1355
+ class ApiGetters {
1356
+ constructor(params) {
1357
+ this.bruce = {};
1358
+ this.idm = {};
1359
+ this.cam = {};
1360
+ this.global = {};
1361
+ this.accountId = params === null || params === void 0 ? void 0 : params.accountId;
1362
+ this.env = (params === null || params === void 0 ? void 0 : params.env) ? params.env : Api.EEnv.PROD;
1363
+ this.sessionId = params === null || params === void 0 ? void 0 : params.sessionId;
1364
+ }
1365
+ SetAccountId(accountId) {
1366
+ this.accountId = accountId;
1367
+ }
1368
+ GetAccountId() {
1369
+ return this.accountId;
1370
+ }
1371
+ SetEnv(env) {
1372
+ this.env = env;
1373
+ }
1374
+ GetEnv() {
1375
+ return this.env;
1376
+ }
1377
+ SetSessionId(sessionId) {
1378
+ this.sessionId = sessionId;
1379
+ for (const key in this.bruce) {
1380
+ this.bruce[key].SetSessionId(sessionId);
1381
+ }
1382
+ for (const key in this.idm) {
1383
+ this.idm[key].SetSessionId(sessionId);
1384
+ }
1385
+ for (const key in this.cam) {
1386
+ this.cam[key].SetSessionId(sessionId);
1387
+ }
1388
+ for (const key in this.global) {
1389
+ this.global[key].SetSessionId(sessionId);
1390
+ }
1391
+ }
1392
+ GetSessionId() {
1393
+ return this.sessionId;
1394
+ }
1395
+ GetBruceApi(params) {
1396
+ let { accountId, env } = params;
1397
+ accountId = accountId ? accountId : this.accountId;
1398
+ env = env ? env : this.env;
1399
+ const key = `${accountId}-${env}`;
1400
+ if (!this.bruce[key]) {
1401
+ this.bruce[key] = new BruceApi.Api({
1402
+ accountId,
1403
+ env,
1404
+ loadRegionalBaseUrl: true
1405
+ });
1406
+ this.bruce[key].SetSessionId(this.sessionId);
1407
+ }
1408
+ return this.bruce[key];
1409
+ }
1410
+ GetBruceGetter() {
1411
+ return {
1412
+ accountId: this.accountId,
1413
+ env: this.env,
1414
+ getApi: (accountId, env) => {
1415
+ return this.GetBruceApi({ accountId, env });
1416
+ }
1417
+ };
1418
+ }
1419
+ GetIdmApi(params) {
1420
+ let { env } = params;
1421
+ env = env ? env : this.env;
1422
+ const key = `${env}`;
1423
+ if (!this.idm[key]) {
1424
+ this.idm[key] = new IdmApi.Api({
1425
+ env
1426
+ });
1427
+ this.idm[key].SetSessionId(this.sessionId);
1428
+ }
1429
+ return this.idm[key];
1430
+ }
1431
+ GetIdmGetter() {
1432
+ return {
1433
+ env: this.env,
1434
+ getApi: (env) => {
1435
+ return this.GetIdmApi({ env });
1436
+ }
1437
+ };
1438
+ }
1439
+ GetCamApi(params) {
1440
+ let { env } = params;
1441
+ env = env ? env : this.env;
1442
+ const key = `${env}`;
1443
+ if (!this.cam[key]) {
1444
+ this.cam[key] = new CamApi.Api({
1445
+ env
1446
+ });
1447
+ this.cam[key].SetSessionId(this.sessionId);
1448
+ }
1449
+ return this.cam[key];
1450
+ }
1451
+ GetCamGetter() {
1452
+ return {
1453
+ env: this.env,
1454
+ getApi: (env) => {
1455
+ return this.GetCamApi({ env });
1456
+ }
1457
+ };
1458
+ }
1459
+ GetGlobalApi(params) {
1460
+ let { env } = params;
1461
+ env = env ? env : this.env;
1462
+ const key = `${env}`;
1463
+ if (!this.global[key]) {
1464
+ this.global[key] = new GlobalApi.Api({
1465
+ env
1466
+ });
1467
+ this.global[key].SetSessionId(this.sessionId);
1468
+ }
1469
+ return this.global[key];
1470
+ }
1471
+ GetGlobalGetter() {
1472
+ return {
1473
+ env: this.env,
1474
+ getApi: (env) => {
1475
+ return this.GetGlobalApi({ env });
1476
+ }
1477
+ };
1478
+ }
1479
+ }
1480
+
1355
1481
  var Color;
1356
1482
  (function (Color) {
1357
1483
  let EBlendMode;
@@ -6969,5 +7095,5 @@ var Markup;
6969
7095
  })(Circle = Markup.Circle || (Markup.Circle = {}));
6970
7096
  })(Markup || (Markup = {}));
6971
7097
 
6972
- export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, 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, Style, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup };
7098
+ export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, 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, Style, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup };
6973
7099
  //# sourceMappingURL=bruce-models.es5.js.map