bruce-models 7.1.33 → 7.1.35

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.
@@ -2267,14 +2267,14 @@
2267
2267
  */
2268
2268
  function GetList(params) {
2269
2269
  return __awaiter(this, void 0, void 0, function* () {
2270
- let { api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
2270
+ let { search, api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
2271
2271
  if (!api) {
2272
2272
  api = exports.ENVIRONMENT.Api().GetBruceApi();
2273
2273
  }
2274
2274
  if (!type) {
2275
2275
  type = "";
2276
2276
  }
2277
- const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize), reqParams);
2277
+ const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search), reqParams);
2278
2278
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2279
2279
  return cache.data;
2280
2280
  }
@@ -2294,6 +2294,9 @@
2294
2294
  urlParams.append("PageIndex", String(pageIndex || 0));
2295
2295
  urlParams.append("PageSize", String(pageSize || 0));
2296
2296
  }
2297
+ if (search) {
2298
+ urlParams.append("search", search);
2299
+ }
2297
2300
  const url = "documentViews" + `?${urlParams.toString()}`;
2298
2301
  const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
2299
2302
  res({
@@ -2305,7 +2308,7 @@
2305
2308
  }
2306
2309
  }));
2307
2310
  api.SetCacheItem({
2308
- key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize),
2311
+ key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search),
2309
2312
  value: req,
2310
2313
  req: reqParams
2311
2314
  });
@@ -2360,20 +2363,23 @@
2360
2363
  * @param pageSize
2361
2364
  * @returns
2362
2365
  */
2363
- function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize) {
2366
+ function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize, search) {
2364
2367
  if (!expandSettings) {
2365
2368
  expandSettings = false;
2366
2369
  }
2367
2370
  if (!entityId) {
2368
2371
  entityId = "";
2369
2372
  }
2373
+ if (!search) {
2374
+ search = "";
2375
+ }
2370
2376
  if (!pageIndex) {
2371
2377
  pageIndex = 0;
2372
2378
  }
2373
2379
  if (!pageSize) {
2374
2380
  pageSize = 0;
2375
2381
  }
2376
- return exports.Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize;
2382
+ return exports.Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize + "_" + search;
2377
2383
  }
2378
2384
  AnnDocument.GetListCacheKey = GetListCacheKey;
2379
2385
  })(exports.AnnDocument || (exports.AnnDocument = {}));
@@ -3168,6 +3174,8 @@
3168
3174
  EType["Url"] = "Url";
3169
3175
  // Serial number that increments for each new entity/missing-attr-value.
3170
3176
  EType["Serial"] = "Serial";
3177
+ // Number ID or string hotspot-key lookup.
3178
+ EType["DocumentView"] = "DocumentView";
3171
3179
  })(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
3172
3180
  /**
3173
3181
  * Describes url open behavior.
@@ -15648,6 +15656,108 @@
15648
15656
  DataLab.Run = Run;
15649
15657
  })(exports.DataLab || (exports.DataLab = {}));
15650
15658
 
15659
+ (function (DataTransform) {
15660
+ /**
15661
+ * Supported Logic Flow diagram item types.
15662
+ */
15663
+ let ELogicFlowDiagramItemType;
15664
+ (function (ELogicFlowDiagramItemType) {
15665
+ ELogicFlowDiagramItemType["InputValue"] = "input-value";
15666
+ ELogicFlowDiagramItemType["OutputValue"] = "output-value";
15667
+ ELogicFlowDiagramItemType["If"] = "if";
15668
+ ELogicFlowDiagramItemType["Formula"] = "formula";
15669
+ ELogicFlowDiagramItemType["Switch"] = "switch";
15670
+ })(ELogicFlowDiagramItemType = DataTransform.ELogicFlowDiagramItemType || (DataTransform.ELogicFlowDiagramItemType = {}));
15671
+ /**
15672
+ * Supported Logic Flow connection point types.
15673
+ */
15674
+ let ELogicFlowConnectionPointType;
15675
+ (function (ELogicFlowConnectionPointType) {
15676
+ ELogicFlowConnectionPointType["Input"] = "input";
15677
+ ELogicFlowConnectionPointType["Output"] = "output";
15678
+ })(ELogicFlowConnectionPointType = DataTransform.ELogicFlowConnectionPointType || (DataTransform.ELogicFlowConnectionPointType = {}));
15679
+ /**
15680
+ * Supported Logic Flow connection end roles.
15681
+ */
15682
+ let ELogicFlowConnectionEndRole;
15683
+ (function (ELogicFlowConnectionEndRole) {
15684
+ ELogicFlowConnectionEndRole["From"] = "from";
15685
+ ELogicFlowConnectionEndRole["To"] = "to";
15686
+ })(ELogicFlowConnectionEndRole = DataTransform.ELogicFlowConnectionEndRole || (DataTransform.ELogicFlowConnectionEndRole = {}));
15687
+ /**
15688
+ * Requests a suggested Logic Flow diagram from a natural-language prompt.
15689
+ * Route: POST v1/entityType/{entityType_id}/DataTransform/SuggestLogicFlowDiagram
15690
+ */
15691
+ function SuggestLogicFlowDiagramByPrompt(params) {
15692
+ return __awaiter(this, void 0, void 0, function* () {
15693
+ let { api, entityTypeId, prompt, model, maxNodes, dataTransformId, dataTransform, dataTransformContext, sourceDataSchema, destinationDataSchema, inputAttributes, outputAttributes, req: reqParams } = params;
15694
+ if (!entityTypeId) {
15695
+ throw ("Entity Type ID is required.");
15696
+ }
15697
+ prompt = prompt === null || prompt === void 0 ? void 0 : prompt.trim();
15698
+ if (!prompt) {
15699
+ throw ("Prompt is required.");
15700
+ }
15701
+ if (!api) {
15702
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
15703
+ }
15704
+ const body = {
15705
+ Prompt: prompt
15706
+ };
15707
+ if (model) {
15708
+ body.Model = model;
15709
+ }
15710
+ if (typeof maxNodes == "number" && !isNaN(maxNodes)) {
15711
+ body.MaxNodes = maxNodes;
15712
+ }
15713
+ if (typeof dataTransformId == "number" && dataTransformId > 0) {
15714
+ body["DataTransform.ID"] = dataTransformId;
15715
+ }
15716
+ if (dataTransform != null) {
15717
+ body.DataTransform = dataTransform;
15718
+ }
15719
+ if (dataTransformContext != null) {
15720
+ body.DataTransformContext = dataTransformContext;
15721
+ }
15722
+ if (sourceDataSchema != null) {
15723
+ body.SourceDataSchema = sourceDataSchema;
15724
+ }
15725
+ if (destinationDataSchema != null) {
15726
+ body.DestinationDataSchema = destinationDataSchema;
15727
+ }
15728
+ if (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.length) {
15729
+ body.InputAttributes = inputAttributes;
15730
+ }
15731
+ if (outputAttributes === null || outputAttributes === void 0 ? void 0 : outputAttributes.length) {
15732
+ body.OutputAttributes = outputAttributes;
15733
+ }
15734
+ const route = `v1/entityType/${exports.Api.Encode(entityTypeId)}/DataTransform/SuggestLogicFlowDiagram`;
15735
+ const response = yield api.POST(route, body, exports.Api.PrepReqParams(reqParams));
15736
+ let diagram = (response === null || response === void 0 ? void 0 : response.diagram)
15737
+ || (response === null || response === void 0 ? void 0 : response.Diagram)
15738
+ || (response === null || response === void 0 ? void 0 : response.LogicFlowDiagram)
15739
+ || (response === null || response === void 0 ? void 0 : response.result)
15740
+ || (response === null || response === void 0 ? void 0 : response.Result)
15741
+ || response;
15742
+ if (typeof diagram == "string") {
15743
+ try {
15744
+ diagram = JSON.parse(diagram);
15745
+ }
15746
+ catch (e) {
15747
+ // Keep original shape if parse fails.
15748
+ }
15749
+ }
15750
+ if (!diagram || typeof diagram != "object") {
15751
+ throw ("No Logic Flow Diagram was returned by the suggestion API.");
15752
+ }
15753
+ return {
15754
+ diagram: diagram
15755
+ };
15756
+ });
15757
+ }
15758
+ DataTransform.SuggestLogicFlowDiagramByPrompt = SuggestLogicFlowDiagramByPrompt;
15759
+ })(exports.DataTransform || (exports.DataTransform = {}));
15760
+
15651
15761
  (function (DataLabGroup) {
15652
15762
  /**
15653
15763
  * Returns the list of all saved query groups.
@@ -17780,7 +17890,7 @@
17780
17890
  })(exports.ChangeSet || (exports.ChangeSet = {}));
17781
17891
 
17782
17892
  // This is updated with the package.json version on build.
17783
- const VERSION = "7.1.33";
17893
+ const VERSION = "7.1.35";
17784
17894
 
17785
17895
  exports.VERSION = VERSION;
17786
17896
  exports.AbstractApi = AbstractApi;