@e-llm-studio/instant-learning 0.1.1-alpha.19 → 0.1.1-alpha.20
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.
- package/dist/cjs/features/LearningManagement/apis/scopeApis.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/features/LearningManagement/apis/scopeApis.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from"tslib";import r from"axios";import{API_ENDPOINTS as n}from"./apiConfig.js";import o from"../store/useAuthStore.js";import s from"../store/useEnvStore.js";var i=function(e){return e.interceptors.request.use(function(e){var t=o.getState().user,r=null==t?void 0:t.accessToken;return r&&(e.headers.Authorization="Bearer ".concat(r)),e}),e},a=function(e,t){return e.interceptors.request.use(function(e){return e.baseURL=t(),e}),e},c=a(i(r.create({headers:{"Content-Type":"application/json"}})),function(){return s.getState().audacyBackendUrl||""}),u=a(i(r.create({headers:{"Content-Type":"application/json"}})),function(){return s.getState().llmStudioUrl||""}),d=function(e){return a(i(r.create({headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},withCredentials:!0})),function(){return s.getState().llmStudioUrl||""})},l=function(r,o){return e(void 0,void 0,void 0,function(){var e,
|
|
1
|
+
import{__awaiter as e,__generator as t}from"tslib";import r from"axios";import{API_ENDPOINTS as n}from"./apiConfig.js";import o from"../store/useAuthStore.js";import s from"../store/useEnvStore.js";var i=function(e){return e.interceptors.request.use(function(e){var t=o.getState().user,r=null==t?void 0:t.accessToken;return r&&(e.headers.Authorization="Bearer ".concat(r)),e}),e},a=function(e,t){return e.interceptors.request.use(function(e){return e.baseURL=t(),e}),e},c=a(i(r.create({headers:{"Content-Type":"application/json"}})),function(){return s.getState().audacyBackendUrl||""}),u=a(i(r.create({headers:{"Content-Type":"application/json"}})),function(){return s.getState().llmStudioUrl||""}),d=function(e){return a(i(r.create({headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},withCredentials:!0})),function(){return s.getState().llmStudioUrl||""})},l=function(r,o){return e(void 0,void 0,void 0,function(){var e,o;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="".concat(n.publishFeedback),[4,u.post(e,r)];case 1:return[2,t.sent().data];case 2:throw o=t.sent(),console.error("Error publishing feedback to LLM Studio:",o),o;case 3:return[2]}})})},h=function(r){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.post(n.submitChatFeedback,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error submitting chat feedback:",e),e;case 3:return[2]}})})},v=function(r){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.post(n.saveInstantLearningQuestion,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error saving instant learning question:",e),e;case 3:return[2]}})})},f=function(r,o){return e(void 0,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="".concat(n.fetchScopes,"/").concat(r),[4,d(o).get(e)];case 1:return[2,t.sent().data];case 2:throw s=t.sent(),console.error("Error fetching rule sets:",s),s;case 3:return[2]}})})},p=function(r){return e(void 0,void 0,void 0,function(){var e,o;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="".concat(n.renameScope),[4,u.put(e,r)];case 1:return[2,t.sent().data];case 2:throw o=t.sent(),console.error("Error renaming scope:",o),o;case 3:return[2]}})})},w=function(r,o){return e(void 0,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="".concat(n.getRulesInRuleSetById,"/").concat(r),[4,d(o).get(e)];case 1:return[2,t.sent().data];case 2:return s=t.sent(),console.error("Error fetching rules in rule set:",s),[3,3];case 3:return[2]}})})},g=function(r){return e(void 0,void 0,void 0,function(){var e,o;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="".concat(n.getRuleOverrideHistory,"/").concat(r),[4,u.get(e)];case 1:return[2,t.sent().data];case 2:throw o=t.sent(),console.error("Error getting rule override history:",o),o;case 3:return[2]}})})},y=function(r,o){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,d(o).post(n.createRuleSet,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error creating rule set:",e),e;case 3:return[2]}})})},b=function(r,o){return void 0===o&&(o=!1),e(void 0,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="".concat(n.fetchStationsByKeyword.replace("{keyword}",r),"?allow_existing=").concat(o),[4,c.get(e)];case 1:return[2,t.sent().data];case 2:throw s=t.sent(),console.error("Error fetching station name by keyword:",s),s;case 3:return[2]}})})},m=function(r,o){return e(void 0,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=n.deleteRuleSet.replace("{ruleSetId}",r),[4,d(o).delete(e)];case 1:return[2,t.sent().data];case 2:throw s=t.sent(),console.error("Error deleting rule set:",s),s;case 3:return[2]}})})},S=function(r){return e(void 0,void 0,void 0,function(){var e,o;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=n.deleteRule.replace("{ruleId}",r),[4,u.delete(e)];case 1:return[2,t.sent().data];case 2:throw o=t.sent(),console.error("Error deleting rule:",o),o;case 3:return[2]}})})},E=function(r){return e(void 0,void 0,void 0,function(){var e,o;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=n.deleteQuestion.replace("{questionId}",r),[4,u.delete(e)];case 1:return[2,t.sent().data];case 2:throw o=t.sent(),console.error("Error deleting question:",o),o;case 3:return[2]}})})},I=function(r,o){return e(void 0,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=n.deleteTier.replace("{scopeId}",r).replace("{tierId}",o),[4,u.delete(e)];case 1:return[2,t.sent().data];case 2:throw s=t.sent(),console.error("Error deleting tier:",s),s;case 3:return[2]}})})},R=function(r,o){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.put(n.updateVariant,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error updating variant:",e),e;case 3:return[2]}})})},k=function(r){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.post(n.inheritScope,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error inheriting scope:",e),e;case 3:return[2]}})})},q=function(r){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,c.post(n.updateStation,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error updating station:",e),e;case 3:return[2]}})})},C=function(r){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:if(!r)throw new Error("scopeId is required for exporting rule sets");t.label=1;case 1:return t.trys.push([1,3,,4]),[4,u.post(n.exportRuleSet,{scope_id:r},{responseType:"blob"})];case 2:return[2,t.sent().data];case 3:throw e=t.sent(),console.error("Error exporting rule set:",e),e;case 4:return[2]}})})},x=function(r,o,s){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.patch(n.toggleVariant,{variant_ids:r,is_enabled:o})];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error toggling variant status:",e),e;case 3:return[2]}})})},L=function(r,o,s,i,a){return e(void 0,void 0,void 0,function(){var e,c;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e={scopeId:r,tierId:o,move:{movedRuleId:s,prevRuleId:i,nextRuleId:a}},[4,u.put(n.alterRulePriority,e)];case 1:return[2,t.sent().data];case 2:throw c=t.sent(),console.error("Error altering question priority:",c),c;case 3:return[2]}})})},T=function(r,o){return e(void 0,void 0,void 0,function(){var e,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=n.fetchRulesByQuestionId.replace("{questionId}",r).replace("{scopeId}",o),[4,u.get(e)];case 1:return[2,t.sent().data];case 2:throw s=t.sent(),console.error("Error fetching rules by question id:",s),s;case 3:return[2]}})})},j=function(r){return void 0===r&&(r={limit:"50",offset:"0"}),e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.post(n.retrieveGenreScopes,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error retrieving genre scopes:",e),e;case 3:return[2]}})})},z=function(r){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,u.post(n.searchScopes,r)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error searching scopes:",e),e;case 3:return[2]}})})},B=function(r){return e(void 0,void 0,void 0,function(){return t(this,function(e){return[2,new Promise(function(e){setTimeout(function(){e({data:[{stationId:"reetrtdfsds",stationName:"Hot 98.7",stationDesc:"Learnings that apply for Hot 98.7 Station",learningsCount:5},{stationId:"sta-102",stationName:"Smooth Jazz 102.1",stationDesc:"Learnings that apply for Smooth Jazz 102.1 Station",learningsCount:12},{stationId:"sta-103",stationName:"Rock 94",stationDesc:"Learnings that apply for Rock 94 Station",learningsCount:8}]})},500)})]})})};export{L as alterQuestionPriority,c as audacyApi,y as createRuleSet,u as default,E as deleteQuestion,S as deleteRule,m as deleteRuleSet,I as deleteTier,C as exportRuleSet,T as fetchRulesByQuestionId,f as fetchScopes,b as fetchStationsByKeyword,g as getRuleOverrideHistory,w as getRulesInRuleSetById,B as getStationsByScopeId,k as inheritScope,d as llmApiWithToken,l as publishFeedback,p as renameScope,j as retrieveGenreScopes,v as saveInstantLearningQuestion,z as searchScopes,h as submitChatFeedback,x as toggleVariant,q as updateStation,R as updateVariant};
|
|
2
2
|
//# sourceMappingURL=scopeApis.js.map
|