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.13.4`}}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]=`a5bf171c-0389-4bc7-801f-eef043dc3837`,e._sentryDebugIdIdentifier=`sentry-dbid-a5bf171c-0389-4bc7-801f-eef043dc3837`)})()}catch{}import{Ft as e,S as t}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{al as n,il as r,nl as i,rl as a,sl as o,tl as s}from"./users.store-BHWXXawf.js";import{j as c,r as l}from"./_baseOrderBy-CaKruttV.js";const u=c(o.API_KEYS,()=>{let o=e([]),c=e([]),u=l(),d=t(()=>o.value.sort((e,t)=>t.createdAt.localeCompare(e.createdAt))),f=t(()=>o.value.reduce((e,t)=>(e[t.id]=t,e),{}));return{getAndCacheApiKeys:async()=>(o.value.length||(o.value=await r(u.restApiContext)),o.value),createApiKey:async e=>{let t=await s(u.restApiContext,e),{rawApiKey:n,...r}=t;return o.value.push(r),t},deleteApiKey:async e=>{await i(u.restApiContext,e),o.value=o.value.filter(t=>t.id!==e)},updateApiKey:async(e,t)=>{await n(u.restApiContext,e,t),f.value[e].label=t.label,f.value[e].scopes=t.scopes},getApiKeyAvailableScopes:async()=>(c.value=await a(u.restApiContext),c.value),apiKeysSortByCreationDate:d,apiKeysById:f,apiKeys:o,availableScopes:c}});export{u as t}; //# sourceMappingURL=apiKeys.store-CpIgHA9V.js.map