UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 3.23 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.16.1"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./users.store-legacy-azRUgFdP.js","./useRootStore-legacy-CC08el-l.js","./settings.store-legacy-I6rZOvfF.js"],(function(e,t){var n,o,s,a,i,c,r,u,l,f,d,p;return{setters:[function(e){n=e.Ft,o=e.S},function(e){s=e.Rr,a=e.oa,i=e.ra,c=e.s,r=e.sr},function(e){u=e.T,l=e.c,f=e.s,d=e.t},function(e){p=e.t}],execute:function(){try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(y=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[y]="c22a146a-a3a7-414b-ac4e-33421f106590",t._sentryDebugIdIdentifier="sentry-dbid-c22a146a-a3a7-414b-ac4e-33421f106590")}catch(t){}var t,y;e("t",u("mcp",(()=>{const e=c(),t=r(),u=d(),y=p(),w=n(null),g=n([]),m=n(!1);return{mcpAccessEnabled:o((()=>!!y.moduleSettings.mcp?.mcpAccessEnabled)),fetchWorkflowsAvailableForMCP:async function(e=1,n=50){return(await t.fetchWorkflowsPage(void 0,e,n,"updatedAt:desc",{isArchived:!1,availableInMCP:!0},!1,!1)).filter(s)},setMcpAccessEnabled:async function(e){const{mcpAccessEnabled:t}=await async function(e,t){return await l(e,"PATCH","/mcp/settings",{mcpAccessEnabled:t})}(u.restApiContext,e);return y.moduleSettings.mcp={...y.moduleSettings.mcp??{},mcpAccessEnabled:t},t},toggleWorkflowMcpAccess:async function(n,o){const s=await async function(e,t,n){return await l(e,"PATCH",`/mcp/workflows/${encodeURIComponent(t)}/toggle-access`,{availableInMCP:n})}(u.restApiContext,n,o),{id:c,settings:r,versionId:f}=s;return c===e.workflowId&&(e.setWorkflowVersionData({versionId:f,name:e.versionData?.name??null,description:e.versionData?.description??null}),r&&a(i(c)).mergeSettings(r)),t.workflowsById[c]&&(t.workflowsById[c]={...t.workflowsById[c],settings:r,versionId:f}),s},currentUserMCPKey:w,getOrCreateApiKey:async function(){const e=await async function(e){return await l(e,"GET","/mcp/api-key")}(u.restApiContext);return w.value=e,e},generateNewApiKey:async function(){const e=await async function(e){return await l(e,"POST","/mcp/api-key/rotate")}(u.restApiContext);return w.value=e,e},resetCurrentUserMCPKey:function(){w.value=null},oauthClients:g,getAllOAuthClients:async function(){const e=await async function(e){return await l(e,"GET","/mcp/oauth-clients")}(u.restApiContext);return g.value=e.data,e.data},removeOAuthClient:async function(e){const t=await async function(e,t){return await l(e,"DELETE",`/mcp/oauth-clients/${encodeURIComponent(t)}`)}(u.restApiContext,e);return g.value=g.value.filter((t=>t.id!==e)),t},getMcpEligibleWorkflows:async function(e){return await async function(e,t){const n={};return void 0!==t?.take&&(n.take=t.take),void 0!==t?.skip&&(n.skip=t.skip),t?.query&&(n.filter=JSON.stringify({query:t.query})),await f(e,"GET","/mcp/workflows",n)}(u.restApiContext,e)},connectPopoverOpen:m,openConnectPopover:function(){m.value=!0},closeConnectPopover:function(){m.value=!1}}})))}}})); //# sourceMappingURL=mcp.store-legacy-CshstdbT.js.map