import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{getDataAppStorageAggregate as n}from"../../clients/jsonApi/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import{CORVA_COMPANY_ID as s}from"../../constants/corvaCompanyId.js";import"lodash";import"../GradientManager/configuration/constants.js";import{METADATA as i}from"./constants.js";function e(t){return o.apply(this,arguments)}function o(){return(o=t(r.mark((function t(e){var o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={match:JSON.stringify({company_id:s,"data.app_id":e}),limit:100,sort:JSON.stringify({timestamp:1}),project:JSON.stringify({app_id:"$data.app_id",rule_id:"$data.wcu_rules.rule_id",_id:0})},t.abrupt("return",n(i.recordProvider,i.recordCollections.wcuRuleMapping,o));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(t){return p.apply(this,arguments)}function p(){return(p=t(r.mark((function t(e){var o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={sort:JSON.stringify({ts_desc:1}),match:JSON.stringify({company_id:s,"data.rule_id":{$in:e}}),limit:1e3},t.abrupt("return",n(i.recordProvider,i.recordCollections.wellnessRuleSettings,o));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(t,r){return u.apply(this,arguments)}function u(){return(u=t(r.mark((function t(s,e){var o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={sort:JSON.stringify({timestamp:-1}),match:JSON.stringify({asset_id:{$in:s},"data.rule_id":{$in:e}}),limit:100},t.abrupt("return",n(i.recordProvider,i.recordCollections.wellnessAlerts,o));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{e as getWCURuleMapping,c as getWellnessAlerts,a as getWellnessRuleSettings};
//# sourceMappingURL=api.js.map
