UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.51 kB
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`48b33d18-1ab3-487b-974b-9290a283607f`,e._sentryDebugIdIdentifier=`sentry-dbid-48b33d18-1ab3-487b-974b-9290a283607f`)})()}catch{}import{Ft as e,S as t}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{T as n,t as r}from"./useRootStore-XEREVjMN.js";import{An as i,Sn as a,bn as o,vn as s,xn as c,yn as l}from"./settings.store-CAFiYCMH.js";var u=n(i.API_KEYS,()=>{let n=e([]),i=e([]),u=r(),d=t(()=>n.value.sort((e,t)=>t.createdAt.localeCompare(e.createdAt))),f=t(()=>n.value.reduce((e,t)=>(e[t.id]=t,e),{}));return{getAndCacheApiKeys:async()=>(n.value.length||(n.value=await c(u.restApiContext)),n.value),createApiKey:async e=>{let t=await s(u.restApiContext,e),{rawApiKey:r,...i}=t;return n.value.push(i),t},deleteApiKey:async e=>{await l(u.restApiContext,e),n.value=n.value.filter(t=>t.id!==e)},updateApiKey:async(e,t)=>{await a(u.restApiContext,e,t),f.value[e].label=t.label,f.value[e].scopes=t.scopes},getApiKeyAvailableScopes:async()=>(i.value=await o(u.restApiContext),i.value),apiKeysSortByCreationDate:d,apiKeysById:f,apiKeys:n,availableScopes:i}});export{u as t}; //# sourceMappingURL=apiKeys.store-afm7y2pf.js.map