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.
- package/dist/bruce-models.es5.js +34 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +34 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +31 -5
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-attribute.js +2 -0
- package/dist/lib/entity/entity-attribute.js.map +1 -1
- package/dist/types/ann-document/ann-document.d.ts +43 -2
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-attribute.d.ts +2 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -2220,6 +2220,7 @@
|
|
|
2220
2220
|
EHotspotSource["SVGTextExtraction"] = "SVGTextExtraction";
|
|
2221
2221
|
EHotspotSource["PDFTextExtraction"] = "PDFTextExtraction";
|
|
2222
2222
|
EHotspotSource["OCR"] = "OCR";
|
|
2223
|
+
EHotspotSource["AIImage"] = "AIImage";
|
|
2223
2224
|
})(EHotspotSource = AnnDocument.EHotspotSource || (AnnDocument.EHotspotSource = {}));
|
|
2224
2225
|
/**
|
|
2225
2226
|
* Returns an annotated document by ID.
|
|
@@ -2267,14 +2268,14 @@
|
|
|
2267
2268
|
*/
|
|
2268
2269
|
function GetList(params) {
|
|
2269
2270
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2270
|
-
let { api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
|
|
2271
|
+
let { search, api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
|
|
2271
2272
|
if (!api) {
|
|
2272
2273
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2273
2274
|
}
|
|
2274
2275
|
if (!type) {
|
|
2275
2276
|
type = "";
|
|
2276
2277
|
}
|
|
2277
|
-
const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize), reqParams);
|
|
2278
|
+
const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search), reqParams);
|
|
2278
2279
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2279
2280
|
return cache.data;
|
|
2280
2281
|
}
|
|
@@ -2294,6 +2295,9 @@
|
|
|
2294
2295
|
urlParams.append("PageIndex", String(pageIndex || 0));
|
|
2295
2296
|
urlParams.append("PageSize", String(pageSize || 0));
|
|
2296
2297
|
}
|
|
2298
|
+
if (search) {
|
|
2299
|
+
urlParams.append("search", search);
|
|
2300
|
+
}
|
|
2297
2301
|
const url = "documentViews" + `?${urlParams.toString()}`;
|
|
2298
2302
|
const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
|
|
2299
2303
|
res({
|
|
@@ -2305,7 +2309,7 @@
|
|
|
2305
2309
|
}
|
|
2306
2310
|
}));
|
|
2307
2311
|
api.SetCacheItem({
|
|
2308
|
-
key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize),
|
|
2312
|
+
key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search),
|
|
2309
2313
|
value: req,
|
|
2310
2314
|
req: reqParams
|
|
2311
2315
|
});
|
|
@@ -2332,6 +2336,25 @@
|
|
|
2332
2336
|
});
|
|
2333
2337
|
}
|
|
2334
2338
|
AnnDocument.SuggestHotspots = SuggestHotspots;
|
|
2339
|
+
/**
|
|
2340
|
+
* Uses the configured AI vision model to suggest hotspots from document view page images.
|
|
2341
|
+
*/
|
|
2342
|
+
function SuggestHotspotsAI(params) {
|
|
2343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2344
|
+
let { api, docId, body, req: reqParams } = params;
|
|
2345
|
+
if (!docId) {
|
|
2346
|
+
throw ("Doc ID is required.");
|
|
2347
|
+
}
|
|
2348
|
+
if (!api) {
|
|
2349
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2350
|
+
}
|
|
2351
|
+
if (!body) {
|
|
2352
|
+
body = {};
|
|
2353
|
+
}
|
|
2354
|
+
return api.POST(`documentView/${docId}/suggestHotspotsAI`, body, exports.Api.PrepReqParams(reqParams));
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
AnnDocument.SuggestHotspotsAI = SuggestHotspotsAI;
|
|
2335
2358
|
/**
|
|
2336
2359
|
* Returns cache identifier for an annotated document by ID.
|
|
2337
2360
|
* Example: {
|
|
@@ -2360,20 +2383,23 @@
|
|
|
2360
2383
|
* @param pageSize
|
|
2361
2384
|
* @returns
|
|
2362
2385
|
*/
|
|
2363
|
-
function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize) {
|
|
2386
|
+
function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search) {
|
|
2364
2387
|
if (!expandSettings) {
|
|
2365
2388
|
expandSettings = false;
|
|
2366
2389
|
}
|
|
2367
2390
|
if (!entityId) {
|
|
2368
2391
|
entityId = "";
|
|
2369
2392
|
}
|
|
2393
|
+
if (!search) {
|
|
2394
|
+
search = "";
|
|
2395
|
+
}
|
|
2370
2396
|
if (!pageIndex) {
|
|
2371
2397
|
pageIndex = 0;
|
|
2372
2398
|
}
|
|
2373
2399
|
if (!pageSize) {
|
|
2374
2400
|
pageSize = 0;
|
|
2375
2401
|
}
|
|
2376
|
-
return exports.Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize;
|
|
2402
|
+
return exports.Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize + "_" + search;
|
|
2377
2403
|
}
|
|
2378
2404
|
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
2379
2405
|
})(exports.AnnDocument || (exports.AnnDocument = {}));
|
|
@@ -3168,6 +3194,8 @@
|
|
|
3168
3194
|
EType["Url"] = "Url";
|
|
3169
3195
|
// Serial number that increments for each new entity/missing-attr-value.
|
|
3170
3196
|
EType["Serial"] = "Serial";
|
|
3197
|
+
// Number ID or string hotspot-key lookup.
|
|
3198
|
+
EType["DocumentView"] = "DocumentView";
|
|
3171
3199
|
})(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
|
|
3172
3200
|
/**
|
|
3173
3201
|
* Describes url open behavior.
|
|
@@ -17882,7 +17910,7 @@
|
|
|
17882
17910
|
})(exports.ChangeSet || (exports.ChangeSet = {}));
|
|
17883
17911
|
|
|
17884
17912
|
// This is updated with the package.json version on build.
|
|
17885
|
-
const VERSION = "7.1.
|
|
17913
|
+
const VERSION = "7.1.36";
|
|
17886
17914
|
|
|
17887
17915
|
exports.VERSION = VERSION;
|
|
17888
17916
|
exports.AbstractApi = AbstractApi;
|