bruce-models 7.1.32 → 7.1.34

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.
@@ -9025,6 +9025,88 @@
9025
9025
  EntityTableView.Delete = Delete;
9026
9026
  })(exports.EntityTableView || (exports.EntityTableView = {}));
9027
9027
 
9028
+ (function (DashboardView) {
9029
+ /**
9030
+ * Returns a record matching the given viewId.
9031
+ * @param params
9032
+ */
9033
+ function Get(params) {
9034
+ return __awaiter(this, void 0, void 0, function* () {
9035
+ let { viewId, api, req } = params;
9036
+ if (!api) {
9037
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
9038
+ }
9039
+ req = exports.Api.PrepReqParams(req);
9040
+ const res = yield api.GET(`ui.dashboardview/${viewId}`, req);
9041
+ return {
9042
+ view: res
9043
+ };
9044
+ });
9045
+ }
9046
+ DashboardView.Get = Get;
9047
+ /**
9048
+ * Returns the list of all available Dashboard Views.
9049
+ * @param params
9050
+ */
9051
+ function GetList(params) {
9052
+ return __awaiter(this, void 0, void 0, function* () {
9053
+ if (!params) {
9054
+ params = {};
9055
+ }
9056
+ let { api, req } = params;
9057
+ if (!api) {
9058
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
9059
+ }
9060
+ req = exports.Api.PrepReqParams(req);
9061
+ const res = yield api.GET("ui.dashboardviews", req);
9062
+ let items = res === null || res === void 0 ? void 0 : res.Items;
9063
+ if (!items) {
9064
+ items = [];
9065
+ }
9066
+ return {
9067
+ views: items
9068
+ };
9069
+ });
9070
+ }
9071
+ DashboardView.GetList = GetList;
9072
+ /**
9073
+ * Creates or updates a Dashboard View record.
9074
+ */
9075
+ function Update(params) {
9076
+ return __awaiter(this, void 0, void 0, function* () {
9077
+ let { view, api, req } = params;
9078
+ if (!api) {
9079
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
9080
+ }
9081
+ req = exports.Api.PrepReqParams(req);
9082
+ let viewId = view.ID;
9083
+ if (!viewId) {
9084
+ viewId = 0;
9085
+ }
9086
+ const res = yield api.POST(`ui.dashboardview/${viewId}`, view, req);
9087
+ return {
9088
+ view: res
9089
+ };
9090
+ });
9091
+ }
9092
+ DashboardView.Update = Update;
9093
+ /**
9094
+ * Deletes a Dashboard View record.
9095
+ * @param params
9096
+ */
9097
+ function Delete(params) {
9098
+ return __awaiter(this, void 0, void 0, function* () {
9099
+ let { viewId, api, req } = params;
9100
+ if (!api) {
9101
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
9102
+ }
9103
+ req = exports.Api.PrepReqParams(req);
9104
+ return yield api.DELETE(`ui.dashboardview/${viewId}`, req);
9105
+ });
9106
+ }
9107
+ DashboardView.Delete = Delete;
9108
+ })(exports.DashboardView || (exports.DashboardView = {}));
9109
+
9028
9110
  (function (Style) {
9029
9111
  /**
9030
9112
  * Types of styles available.
@@ -15566,6 +15648,108 @@
15566
15648
  DataLab.Run = Run;
15567
15649
  })(exports.DataLab || (exports.DataLab = {}));
15568
15650
 
15651
+ (function (DataTransform) {
15652
+ /**
15653
+ * Supported Logic Flow diagram item types.
15654
+ */
15655
+ let ELogicFlowDiagramItemType;
15656
+ (function (ELogicFlowDiagramItemType) {
15657
+ ELogicFlowDiagramItemType["InputValue"] = "input-value";
15658
+ ELogicFlowDiagramItemType["OutputValue"] = "output-value";
15659
+ ELogicFlowDiagramItemType["If"] = "if";
15660
+ ELogicFlowDiagramItemType["Formula"] = "formula";
15661
+ ELogicFlowDiagramItemType["Switch"] = "switch";
15662
+ })(ELogicFlowDiagramItemType = DataTransform.ELogicFlowDiagramItemType || (DataTransform.ELogicFlowDiagramItemType = {}));
15663
+ /**
15664
+ * Supported Logic Flow connection point types.
15665
+ */
15666
+ let ELogicFlowConnectionPointType;
15667
+ (function (ELogicFlowConnectionPointType) {
15668
+ ELogicFlowConnectionPointType["Input"] = "input";
15669
+ ELogicFlowConnectionPointType["Output"] = "output";
15670
+ })(ELogicFlowConnectionPointType = DataTransform.ELogicFlowConnectionPointType || (DataTransform.ELogicFlowConnectionPointType = {}));
15671
+ /**
15672
+ * Supported Logic Flow connection end roles.
15673
+ */
15674
+ let ELogicFlowConnectionEndRole;
15675
+ (function (ELogicFlowConnectionEndRole) {
15676
+ ELogicFlowConnectionEndRole["From"] = "from";
15677
+ ELogicFlowConnectionEndRole["To"] = "to";
15678
+ })(ELogicFlowConnectionEndRole = DataTransform.ELogicFlowConnectionEndRole || (DataTransform.ELogicFlowConnectionEndRole = {}));
15679
+ /**
15680
+ * Requests a suggested Logic Flow diagram from a natural-language prompt.
15681
+ * Route: POST v1/entityType/{entityType_id}/DataTransform/SuggestLogicFlowDiagram
15682
+ */
15683
+ function SuggestLogicFlowDiagramByPrompt(params) {
15684
+ return __awaiter(this, void 0, void 0, function* () {
15685
+ let { api, entityTypeId, prompt, model, maxNodes, dataTransformId, dataTransform, dataTransformContext, sourceDataSchema, destinationDataSchema, inputAttributes, outputAttributes, req: reqParams } = params;
15686
+ if (!entityTypeId) {
15687
+ throw ("Entity Type ID is required.");
15688
+ }
15689
+ prompt = prompt === null || prompt === void 0 ? void 0 : prompt.trim();
15690
+ if (!prompt) {
15691
+ throw ("Prompt is required.");
15692
+ }
15693
+ if (!api) {
15694
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
15695
+ }
15696
+ const body = {
15697
+ Prompt: prompt
15698
+ };
15699
+ if (model) {
15700
+ body.Model = model;
15701
+ }
15702
+ if (typeof maxNodes == "number" && !isNaN(maxNodes)) {
15703
+ body.MaxNodes = maxNodes;
15704
+ }
15705
+ if (typeof dataTransformId == "number" && dataTransformId > 0) {
15706
+ body["DataTransform.ID"] = dataTransformId;
15707
+ }
15708
+ if (dataTransform != null) {
15709
+ body.DataTransform = dataTransform;
15710
+ }
15711
+ if (dataTransformContext != null) {
15712
+ body.DataTransformContext = dataTransformContext;
15713
+ }
15714
+ if (sourceDataSchema != null) {
15715
+ body.SourceDataSchema = sourceDataSchema;
15716
+ }
15717
+ if (destinationDataSchema != null) {
15718
+ body.DestinationDataSchema = destinationDataSchema;
15719
+ }
15720
+ if (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.length) {
15721
+ body.InputAttributes = inputAttributes;
15722
+ }
15723
+ if (outputAttributes === null || outputAttributes === void 0 ? void 0 : outputAttributes.length) {
15724
+ body.OutputAttributes = outputAttributes;
15725
+ }
15726
+ const route = `v1/entityType/${exports.Api.Encode(entityTypeId)}/DataTransform/SuggestLogicFlowDiagram`;
15727
+ const response = yield api.POST(route, body, exports.Api.PrepReqParams(reqParams));
15728
+ let diagram = (response === null || response === void 0 ? void 0 : response.diagram)
15729
+ || (response === null || response === void 0 ? void 0 : response.Diagram)
15730
+ || (response === null || response === void 0 ? void 0 : response.LogicFlowDiagram)
15731
+ || (response === null || response === void 0 ? void 0 : response.result)
15732
+ || (response === null || response === void 0 ? void 0 : response.Result)
15733
+ || response;
15734
+ if (typeof diagram == "string") {
15735
+ try {
15736
+ diagram = JSON.parse(diagram);
15737
+ }
15738
+ catch (e) {
15739
+ // Keep original shape if parse fails.
15740
+ }
15741
+ }
15742
+ if (!diagram || typeof diagram != "object") {
15743
+ throw ("No Logic Flow Diagram was returned by the suggestion API.");
15744
+ }
15745
+ return {
15746
+ diagram: diagram
15747
+ };
15748
+ });
15749
+ }
15750
+ DataTransform.SuggestLogicFlowDiagramByPrompt = SuggestLogicFlowDiagramByPrompt;
15751
+ })(exports.DataTransform || (exports.DataTransform = {}));
15752
+
15569
15753
  (function (DataLabGroup) {
15570
15754
  /**
15571
15755
  * Returns the list of all saved query groups.
@@ -17698,7 +17882,7 @@
17698
17882
  })(exports.ChangeSet || (exports.ChangeSet = {}));
17699
17883
 
17700
17884
  // This is updated with the package.json version on build.
17701
- const VERSION = "7.1.32";
17885
+ const VERSION = "7.1.34";
17702
17886
 
17703
17887
  exports.VERSION = VERSION;
17704
17888
  exports.AbstractApi = AbstractApi;