bruce-models 7.1.33 → 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.
@@ -15648,6 +15648,108 @@
15648
15648
  DataLab.Run = Run;
15649
15649
  })(exports.DataLab || (exports.DataLab = {}));
15650
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
+
15651
15753
  (function (DataLabGroup) {
15652
15754
  /**
15653
15755
  * Returns the list of all saved query groups.
@@ -17780,7 +17882,7 @@
17780
17882
  })(exports.ChangeSet || (exports.ChangeSet = {}));
17781
17883
 
17782
17884
  // This is updated with the package.json version on build.
17783
- const VERSION = "7.1.33";
17885
+ const VERSION = "7.1.34";
17784
17886
 
17785
17887
  exports.VERSION = VERSION;
17786
17888
  exports.AbstractApi = AbstractApi;