bruce-models 7.1.34 → 7.1.36

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.
@@ -2247,6 +2247,7 @@ var AnnDocument;
2247
2247
  EHotspotSource["SVGTextExtraction"] = "SVGTextExtraction";
2248
2248
  EHotspotSource["PDFTextExtraction"] = "PDFTextExtraction";
2249
2249
  EHotspotSource["OCR"] = "OCR";
2250
+ EHotspotSource["AIImage"] = "AIImage";
2250
2251
  })(EHotspotSource = AnnDocument.EHotspotSource || (AnnDocument.EHotspotSource = {}));
2251
2252
  /**
2252
2253
  * Returns an annotated document by ID.
@@ -2294,14 +2295,14 @@ var AnnDocument;
2294
2295
  */
2295
2296
  function GetList(params) {
2296
2297
  return __awaiter(this, void 0, void 0, function* () {
2297
- let { api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
2298
+ let { search, api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
2298
2299
  if (!api) {
2299
2300
  api = ENVIRONMENT.Api().GetBruceApi();
2300
2301
  }
2301
2302
  if (!type) {
2302
2303
  type = "";
2303
2304
  }
2304
- const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize), reqParams);
2305
+ const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search), reqParams);
2305
2306
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2306
2307
  return cache.data;
2307
2308
  }
@@ -2321,6 +2322,9 @@ var AnnDocument;
2321
2322
  urlParams.append("PageIndex", String(pageIndex || 0));
2322
2323
  urlParams.append("PageSize", String(pageSize || 0));
2323
2324
  }
2325
+ if (search) {
2326
+ urlParams.append("search", search);
2327
+ }
2324
2328
  const url = "documentViews" + `?${urlParams.toString()}`;
2325
2329
  const data = yield api.GET(url, Api.PrepReqParams(reqParams));
2326
2330
  res({
@@ -2332,7 +2336,7 @@ var AnnDocument;
2332
2336
  }
2333
2337
  }));
2334
2338
  api.SetCacheItem({
2335
- key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize),
2339
+ key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search),
2336
2340
  value: req,
2337
2341
  req: reqParams
2338
2342
  });
@@ -2359,6 +2363,25 @@ var AnnDocument;
2359
2363
  });
2360
2364
  }
2361
2365
  AnnDocument.SuggestHotspots = SuggestHotspots;
2366
+ /**
2367
+ * Uses the configured AI vision model to suggest hotspots from document view page images.
2368
+ */
2369
+ function SuggestHotspotsAI(params) {
2370
+ return __awaiter(this, void 0, void 0, function* () {
2371
+ let { api, docId, body, req: reqParams } = params;
2372
+ if (!docId) {
2373
+ throw ("Doc ID is required.");
2374
+ }
2375
+ if (!api) {
2376
+ api = ENVIRONMENT.Api().GetBruceApi();
2377
+ }
2378
+ if (!body) {
2379
+ body = {};
2380
+ }
2381
+ return api.POST(`documentView/${docId}/suggestHotspotsAI`, body, Api.PrepReqParams(reqParams));
2382
+ });
2383
+ }
2384
+ AnnDocument.SuggestHotspotsAI = SuggestHotspotsAI;
2362
2385
  /**
2363
2386
  * Returns cache identifier for an annotated document by ID.
2364
2387
  * Example: {
@@ -2387,20 +2410,23 @@ var AnnDocument;
2387
2410
  * @param pageSize
2388
2411
  * @returns
2389
2412
  */
2390
- function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize) {
2413
+ function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search) {
2391
2414
  if (!expandSettings) {
2392
2415
  expandSettings = false;
2393
2416
  }
2394
2417
  if (!entityId) {
2395
2418
  entityId = "";
2396
2419
  }
2420
+ if (!search) {
2421
+ search = "";
2422
+ }
2397
2423
  if (!pageIndex) {
2398
2424
  pageIndex = 0;
2399
2425
  }
2400
2426
  if (!pageSize) {
2401
2427
  pageSize = 0;
2402
2428
  }
2403
- return Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize;
2429
+ return Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize + "_" + search;
2404
2430
  }
2405
2431
  AnnDocument.GetListCacheKey = GetListCacheKey;
2406
2432
  })(AnnDocument || (AnnDocument = {}));
@@ -3205,6 +3231,8 @@ var EntityAttribute;
3205
3231
  EType["Url"] = "Url";
3206
3232
  // Serial number that increments for each new entity/missing-attr-value.
3207
3233
  EType["Serial"] = "Serial";
3234
+ // Number ID or string hotspot-key lookup.
3235
+ EType["DocumentView"] = "DocumentView";
3208
3236
  })(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
3209
3237
  /**
3210
3238
  * Describes url open behavior.
@@ -18217,7 +18245,7 @@ var ChangeSet;
18217
18245
  })(ChangeSet || (ChangeSet = {}));
18218
18246
 
18219
18247
  // This is updated with the package.json version on build.
18220
- const VERSION = "7.1.34";
18248
+ const VERSION = "7.1.36";
18221
18249
 
18222
18250
  export { VERSION, Assembly, 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, EntityTypeTrigger, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, DashboardView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataTransform, DataLabGroup, DataFeed, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportLcc, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
18223
18251
  //# sourceMappingURL=bruce-models.es5.js.map