bruce-models 4.8.7 → 4.8.9

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.
@@ -12991,6 +12991,48 @@
12991
12991
  EReqKey["Primary"] = "PrimarySelection";
12992
12992
  EReqKey["Secondary"] = "SecondarySelection";
12993
12993
  })(EReqKey = DataLab.EReqKey || (DataLab.EReqKey = {}));
12994
+ /**
12995
+ * Returns the list of saved queries in the account.
12996
+ * @param params
12997
+ * @returns
12998
+ */
12999
+ function GetList(params) {
13000
+ return __awaiter(this, void 0, void 0, function* () {
13001
+ if (!params) {
13002
+ params = {};
13003
+ }
13004
+ let { api, req } = params;
13005
+ if (!api) {
13006
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
13007
+ }
13008
+ const res = yield api.GET("entities/datalab/savedQueries", exports.Api.PrepReqParams(req));
13009
+ return {
13010
+ queries: (res === null || res === void 0 ? void 0 : res.Items) ? res.Items : []
13011
+ };
13012
+ });
13013
+ }
13014
+ DataLab.GetList = GetList;
13015
+ /**
13016
+ * Returns a saved query by ID.
13017
+ * @param params
13018
+ * @returns
13019
+ */
13020
+ function Get(params) {
13021
+ return __awaiter(this, void 0, void 0, function* () {
13022
+ let { api, queryId, req } = params;
13023
+ if (queryId) {
13024
+ throw new Error("queryId is required.");
13025
+ }
13026
+ if (!api) {
13027
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
13028
+ }
13029
+ const res = yield api.GET(`entities/datalab/savedQuery/${queryId}`, exports.Api.PrepReqParams(req));
13030
+ return {
13031
+ query: res
13032
+ };
13033
+ });
13034
+ }
13035
+ DataLab.Get = Get;
12994
13036
  /**
12995
13037
  * Runs a DataLab query.
12996
13038
  * @param params
@@ -14013,7 +14055,7 @@
14013
14055
  })(exports.DataSource || (exports.DataSource = {}));
14014
14056
 
14015
14057
  // This is updated with the package.json version on build.
14016
- const VERSION = "4.8.7";
14058
+ const VERSION = "4.8.9";
14017
14059
 
14018
14060
  exports.VERSION = VERSION;
14019
14061
  exports.AbstractApi = AbstractApi;