@n8n/stores 2.35.2 → 2.36.0
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/cloudPlan.store.d.cts +66 -66
- package/dist/rbac.store.d.cts +18 -18
- package/dist/roles.store.d.cts +21 -21
- package/dist/settings.store.d.cts +257 -242
- package/dist/settings.store.d.mts +16 -1
- package/dist/settings2.store.cjs +3 -0
- package/dist/settings2.store.cjs.map +1 -1
- package/dist/settings2.store.mjs +3 -0
- package/dist/settings2.store.mjs.map +1 -1
- package/dist/useAgentRequestStore.d.cts +6 -6
- package/dist/useAgentRequestStore.d.mts +2 -2
- package/dist/useRootStore.d.cts +87 -74
- package/dist/useRootStore.d.mts +87 -74
- package/dist/useRootStore2.cjs +8 -1
- package/dist/useRootStore2.cjs.map +1 -1
- package/dist/useRootStore2.mjs +8 -1
- package/dist/useRootStore2.mjs.map +1 -1
- package/dist/users.store.d.cts +55 -55
- package/dist/users.store.d.mts +49 -49
- package/dist/users2.store.cjs +11 -2
- package/dist/users2.store.cjs.map +1 -1
- package/dist/users2.store.mjs +11 -2
- package/dist/users2.store.mjs.map +1 -1
- package/dist/versions.store.d.cts +40 -40
- package/dist/versions.store.d.mts +28 -28
- package/package.json +11 -11
|
@@ -226,6 +226,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
226
226
|
aiGateway?: {
|
|
227
227
|
enabled: boolean;
|
|
228
228
|
budget: number;
|
|
229
|
+
cloudUbbEnabled: boolean;
|
|
229
230
|
} | undefined;
|
|
230
231
|
ai: {
|
|
231
232
|
allowSendingParameterValues: boolean;
|
|
@@ -471,6 +472,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
471
472
|
aiGateway?: {
|
|
472
473
|
enabled: boolean;
|
|
473
474
|
budget: number;
|
|
475
|
+
cloudUbbEnabled: boolean;
|
|
474
476
|
} | undefined;
|
|
475
477
|
ai: {
|
|
476
478
|
allowSendingParameterValues: boolean;
|
|
@@ -650,6 +652,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
650
652
|
aiCreditsQuota: vue95.ComputedRef<number>;
|
|
651
653
|
isAiDataSharingEnabled: vue95.ComputedRef<boolean>;
|
|
652
654
|
isAiGatewayEnabled: vue95.ComputedRef<boolean>;
|
|
655
|
+
isAiGatewayCloudUbbEnabled: vue95.ComputedRef<boolean>;
|
|
653
656
|
aiGatewayBudget: vue95.ComputedRef<number>;
|
|
654
657
|
reset: () => void;
|
|
655
658
|
getTimezones: () => Promise<IDataObject>;
|
|
@@ -676,6 +679,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
676
679
|
mcpAccessEnabled: boolean;
|
|
677
680
|
mcpManagedByEnv: boolean;
|
|
678
681
|
serverUrl?: string | undefined;
|
|
682
|
+
autoExposeNewWorkflows: boolean;
|
|
679
683
|
} | undefined;
|
|
680
684
|
'chat-hub'?: {
|
|
681
685
|
enabled: boolean;
|
|
@@ -976,6 +980,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
976
980
|
mcpAccessEnabled: boolean;
|
|
977
981
|
mcpManagedByEnv: boolean;
|
|
978
982
|
serverUrl?: string | undefined;
|
|
983
|
+
autoExposeNewWorkflows: boolean;
|
|
979
984
|
} | undefined;
|
|
980
985
|
'chat-hub'?: {
|
|
981
986
|
enabled: boolean;
|
|
@@ -1494,6 +1499,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
1494
1499
|
aiGateway?: {
|
|
1495
1500
|
enabled: boolean;
|
|
1496
1501
|
budget: number;
|
|
1502
|
+
cloudUbbEnabled: boolean;
|
|
1497
1503
|
} | undefined;
|
|
1498
1504
|
ai: {
|
|
1499
1505
|
allowSendingParameterValues: boolean;
|
|
@@ -1739,6 +1745,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
1739
1745
|
aiGateway?: {
|
|
1740
1746
|
enabled: boolean;
|
|
1741
1747
|
budget: number;
|
|
1748
|
+
cloudUbbEnabled: boolean;
|
|
1742
1749
|
} | undefined;
|
|
1743
1750
|
ai: {
|
|
1744
1751
|
allowSendingParameterValues: boolean;
|
|
@@ -1918,6 +1925,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
1918
1925
|
aiCreditsQuota: vue95.ComputedRef<number>;
|
|
1919
1926
|
isAiDataSharingEnabled: vue95.ComputedRef<boolean>;
|
|
1920
1927
|
isAiGatewayEnabled: vue95.ComputedRef<boolean>;
|
|
1928
|
+
isAiGatewayCloudUbbEnabled: vue95.ComputedRef<boolean>;
|
|
1921
1929
|
aiGatewayBudget: vue95.ComputedRef<number>;
|
|
1922
1930
|
reset: () => void;
|
|
1923
1931
|
getTimezones: () => Promise<IDataObject>;
|
|
@@ -1944,6 +1952,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
1944
1952
|
mcpAccessEnabled: boolean;
|
|
1945
1953
|
mcpManagedByEnv: boolean;
|
|
1946
1954
|
serverUrl?: string | undefined;
|
|
1955
|
+
autoExposeNewWorkflows: boolean;
|
|
1947
1956
|
} | undefined;
|
|
1948
1957
|
'chat-hub'?: {
|
|
1949
1958
|
enabled: boolean;
|
|
@@ -2244,6 +2253,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
2244
2253
|
mcpAccessEnabled: boolean;
|
|
2245
2254
|
mcpManagedByEnv: boolean;
|
|
2246
2255
|
serverUrl?: string | undefined;
|
|
2256
|
+
autoExposeNewWorkflows: boolean;
|
|
2247
2257
|
} | undefined;
|
|
2248
2258
|
'chat-hub'?: {
|
|
2249
2259
|
enabled: boolean;
|
|
@@ -2542,7 +2552,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
2542
2552
|
isAgentsKnowledgeBaseFeatureEnabled: vue95.ComputedRef<boolean>;
|
|
2543
2553
|
isPublicChatTriggerDisabled: vue95.ComputedRef<boolean>;
|
|
2544
2554
|
isWorkflowPublicationServiceEnabled: vue95.ComputedRef<boolean>;
|
|
2545
|
-
}, "isDocker" | "databaseType" | "endpointHealth" | "workflowCallerPolicyDefaultOption" | "nodeJsVersion" | "nodeEnv" | "concurrency" | "binaryDataMode" | "telemetry" | "logLevel" | "isMultiMain" | "pushBackend" | "allowedModules" | "pruning" | "security" | "activeModules" | "planName" | "consumerId" | "isDevRelease" | "isEnterpriseFeatureEnabled" | "isConcurrencyEnabled" | "isPublicApiEnabled" | "isSwaggerUIEnabled" | "isPreviewMode" | "isE2ETestMode" | "isCanvasOnly" | "isCrdtCollaborationEnabled" | "publicApiLatestVersion" | "publicApiPath" | "showSetupPage" | "deploymentType" | "isCloudDeployment" | "isSmtpSetup" | "isPersonalizationSurveyEnabled" | "isTelemetryEnabled" | "isMfaFeatureEnabled" | "isFoldersFeatureEnabled" | "isAiAssistantEnabled" | "isCustomRolesFeatureEnabled" | "areTagsEnabled" | "isAutosaveEnabled" | "isHiringBannerEnabled" | "isTemplatesEnabled" | "isTemplatesEndpointReachable" | "templatesHost" | "isCommunityNodesFeatureEnabled" | "isUnverifiedPackagesEnabled" | "isQueueModeEnabled" | "isWorkerViewAvailable" | "permanentlyDismissedBanners" | "isCommunityPlan" | "isAskAiEnabled" | "isAiBuilderEnabled" | "isAiAssistantOrBuilderEnabled" | "isAiCreditsEnabled" | "aiCreditsQuota" | "isAiDataSharingEnabled" | "isAiGatewayEnabled" | "aiGatewayBudget" | "isMFAEnforcementLicensed" | "isDataTableFeatureEnabled" | "isChatFeatureEnabled" | "isOtelCustomSpanAttributesEnabled" | "isAgentsKnowledgeBaseFeatureEnabled" | "isPublicChatTriggerDisabled" | "isWorkflowPublicationServiceEnabled">, Pick<{
|
|
2555
|
+
}, "isDocker" | "databaseType" | "endpointHealth" | "workflowCallerPolicyDefaultOption" | "nodeJsVersion" | "nodeEnv" | "concurrency" | "binaryDataMode" | "telemetry" | "logLevel" | "isMultiMain" | "pushBackend" | "allowedModules" | "pruning" | "security" | "activeModules" | "planName" | "consumerId" | "isDevRelease" | "isEnterpriseFeatureEnabled" | "isConcurrencyEnabled" | "isPublicApiEnabled" | "isSwaggerUIEnabled" | "isPreviewMode" | "isE2ETestMode" | "isCanvasOnly" | "isCrdtCollaborationEnabled" | "publicApiLatestVersion" | "publicApiPath" | "showSetupPage" | "deploymentType" | "isCloudDeployment" | "isSmtpSetup" | "isPersonalizationSurveyEnabled" | "isTelemetryEnabled" | "isMfaFeatureEnabled" | "isFoldersFeatureEnabled" | "isAiAssistantEnabled" | "isCustomRolesFeatureEnabled" | "areTagsEnabled" | "isAutosaveEnabled" | "isHiringBannerEnabled" | "isTemplatesEnabled" | "isTemplatesEndpointReachable" | "templatesHost" | "isCommunityNodesFeatureEnabled" | "isUnverifiedPackagesEnabled" | "isQueueModeEnabled" | "isWorkerViewAvailable" | "permanentlyDismissedBanners" | "isCommunityPlan" | "isAskAiEnabled" | "isAiBuilderEnabled" | "isAiAssistantOrBuilderEnabled" | "isAiCreditsEnabled" | "aiCreditsQuota" | "isAiDataSharingEnabled" | "isAiGatewayEnabled" | "isAiGatewayCloudUbbEnabled" | "aiGatewayBudget" | "isMFAEnforcementLicensed" | "isDataTableFeatureEnabled" | "isChatFeatureEnabled" | "isOtelCustomSpanAttributesEnabled" | "isAgentsKnowledgeBaseFeatureEnabled" | "isPublicChatTriggerDisabled" | "isWorkflowPublicationServiceEnabled">, Pick<{
|
|
2546
2556
|
settings: vue95.Ref<{
|
|
2547
2557
|
settingsMode?: "public" | "authenticated" | undefined;
|
|
2548
2558
|
inE2ETests: boolean;
|
|
@@ -2762,6 +2772,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
2762
2772
|
aiGateway?: {
|
|
2763
2773
|
enabled: boolean;
|
|
2764
2774
|
budget: number;
|
|
2775
|
+
cloudUbbEnabled: boolean;
|
|
2765
2776
|
} | undefined;
|
|
2766
2777
|
ai: {
|
|
2767
2778
|
allowSendingParameterValues: boolean;
|
|
@@ -3007,6 +3018,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
3007
3018
|
aiGateway?: {
|
|
3008
3019
|
enabled: boolean;
|
|
3009
3020
|
budget: number;
|
|
3021
|
+
cloudUbbEnabled: boolean;
|
|
3010
3022
|
} | undefined;
|
|
3011
3023
|
ai: {
|
|
3012
3024
|
allowSendingParameterValues: boolean;
|
|
@@ -3186,6 +3198,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
3186
3198
|
aiCreditsQuota: vue95.ComputedRef<number>;
|
|
3187
3199
|
isAiDataSharingEnabled: vue95.ComputedRef<boolean>;
|
|
3188
3200
|
isAiGatewayEnabled: vue95.ComputedRef<boolean>;
|
|
3201
|
+
isAiGatewayCloudUbbEnabled: vue95.ComputedRef<boolean>;
|
|
3189
3202
|
aiGatewayBudget: vue95.ComputedRef<number>;
|
|
3190
3203
|
reset: () => void;
|
|
3191
3204
|
getTimezones: () => Promise<IDataObject>;
|
|
@@ -3212,6 +3225,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
3212
3225
|
mcpAccessEnabled: boolean;
|
|
3213
3226
|
mcpManagedByEnv: boolean;
|
|
3214
3227
|
serverUrl?: string | undefined;
|
|
3228
|
+
autoExposeNewWorkflows: boolean;
|
|
3215
3229
|
} | undefined;
|
|
3216
3230
|
'chat-hub'?: {
|
|
3217
3231
|
enabled: boolean;
|
|
@@ -3512,6 +3526,7 @@ declare const useSettingsStore: pinia3.StoreDefinition<"settings", Pick<{
|
|
|
3512
3526
|
mcpAccessEnabled: boolean;
|
|
3513
3527
|
mcpManagedByEnv: boolean;
|
|
3514
3528
|
serverUrl?: string | undefined;
|
|
3529
|
+
autoExposeNewWorkflows: boolean;
|
|
3515
3530
|
} | undefined;
|
|
3516
3531
|
'chat-hub'?: {
|
|
3517
3532
|
enabled: boolean;
|
package/dist/settings2.store.cjs
CHANGED
|
@@ -135,6 +135,7 @@ const useSettingsStore = (0, pinia.defineStore)(require_constants.STORES.SETTING
|
|
|
135
135
|
const aiCreditsQuota = (0, vue.computed)(() => settings.value.aiCredits?.credits);
|
|
136
136
|
const isAiDataSharingEnabled = (0, vue.computed)(() => settings.value.ai?.allowSendingParameterValues ?? true);
|
|
137
137
|
const isAiGatewayEnabled = (0, vue.computed)(() => settings.value.aiGateway?.enabled ?? false);
|
|
138
|
+
const isAiGatewayCloudUbbEnabled = (0, vue.computed)(() => settings.value.aiGateway?.cloudUbbEnabled ?? false);
|
|
138
139
|
const aiGatewayBudget = (0, vue.computed)(() => settings.value.aiGateway?.budget ?? 0);
|
|
139
140
|
const isSmtpSetup = (0, vue.computed)(() => userManagement.value.smtpSetup);
|
|
140
141
|
const isPersonalizationSurveyEnabled = (0, vue.computed)(() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled);
|
|
@@ -237,6 +238,7 @@ const useSettingsStore = (0, pinia.defineStore)(require_constants.STORES.SETTING
|
|
|
237
238
|
rootStore.setTimezone(fetchedSettings.timezone);
|
|
238
239
|
rootStore.setExecutionTimeout(fetchedSettings.executionTimeout);
|
|
239
240
|
rootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);
|
|
241
|
+
rootStore.setPublicApiPath(`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`);
|
|
240
242
|
rootStore.setInstanceId(fetchedSettings.instanceId);
|
|
241
243
|
rootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);
|
|
242
244
|
rootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});
|
|
@@ -346,6 +348,7 @@ const useSettingsStore = (0, pinia.defineStore)(require_constants.STORES.SETTING
|
|
|
346
348
|
aiCreditsQuota,
|
|
347
349
|
isAiDataSharingEnabled,
|
|
348
350
|
isAiGatewayEnabled,
|
|
351
|
+
isAiGatewayCloudUbbEnabled,
|
|
349
352
|
aiGatewayBudget,
|
|
350
353
|
reset,
|
|
351
354
|
getTimezones,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings2.store.cjs","names":["i18n","STORES","AuthenticationMethod","Bowser","allowedModules","useRootStore","settingsApi","eventsApi","moduleSettingsApi","aiUsageApi"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport type { IDataObject, WorkflowSettings } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag: enabled when the backend's Daytona sandbox env vars\n\t// (`N8N_AGENTS_AI_SANDBOX_ENABLED=true` + `N8N_AGENTS_AI_SANDBOX_PROVIDER=daytona`)\n\t// are set, OR the AI Assistant proxy is available.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uCAAuC;;;MAGvCA,gBAAK,SAAS,+CAA+C,CAAC;;;GAGjEA,gBAAK,SAAS,kDAAkD,CAAC;;QAE5DA,gBAAK,SAAS,oDAAoD,CAAC;QACnEA,gBAAK,SAAS,2DAA2D,EAAE,aAAa,EAAE,cAAc,yBAAyB,EAAE,CAAC,CAAC;QACrIA,gBAAK,SAAS,qEAAqE,EAAE,aAAa,EAAE,QAAQ,qBAAqB,EAAE,CAAC,CAAC;;;;AAK7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A;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
1
|
+
{"version":3,"file":"settings2.store.cjs","names":["i18n","STORES","AuthenticationMethod","Bowser","allowedModules","useRootStore","settingsApi","eventsApi","moduleSettingsApi","aiUsageApi"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport type { IDataObject, WorkflowSettings } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst isAiGatewayCloudUbbEnabled = computed(\n\t\t() => settings.value.aiGateway?.cloudUbbEnabled ?? false,\n\t);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag controlled by the backend's N8N_AGENTS_AI_SANDBOX_ENABLED setting.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setPublicApiPath(\n\t\t\t`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`,\n\t\t);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\tisAiGatewayCloudUbbEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uCAAuC;;;MAGvCA,gBAAK,SAAS,+CAA+C,CAAC;;;GAGjEA,gBAAK,SAAS,kDAAkD,CAAC;;QAE5DA,gBAAK,SAAS,oDAAoD,CAAC;QACnEA,gBAAK,SAAS,2DAA2D,EAAE,aAAa,EA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A;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
package/dist/settings2.store.mjs
CHANGED
|
@@ -107,6 +107,7 @@ const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|
|
107
107
|
const aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);
|
|
108
108
|
const isAiDataSharingEnabled = computed(() => settings.value.ai?.allowSendingParameterValues ?? true);
|
|
109
109
|
const isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);
|
|
110
|
+
const isAiGatewayCloudUbbEnabled = computed(() => settings.value.aiGateway?.cloudUbbEnabled ?? false);
|
|
110
111
|
const aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);
|
|
111
112
|
const isSmtpSetup = computed(() => userManagement.value.smtpSetup);
|
|
112
113
|
const isPersonalizationSurveyEnabled = computed(() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled);
|
|
@@ -209,6 +210,7 @@ const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|
|
209
210
|
rootStore.setTimezone(fetchedSettings.timezone);
|
|
210
211
|
rootStore.setExecutionTimeout(fetchedSettings.executionTimeout);
|
|
211
212
|
rootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);
|
|
213
|
+
rootStore.setPublicApiPath(`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`);
|
|
212
214
|
rootStore.setInstanceId(fetchedSettings.instanceId);
|
|
213
215
|
rootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);
|
|
214
216
|
rootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});
|
|
@@ -318,6 +320,7 @@ const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|
|
318
320
|
aiCreditsQuota,
|
|
319
321
|
isAiDataSharingEnabled,
|
|
320
322
|
isAiGatewayEnabled,
|
|
323
|
+
isAiGatewayCloudUbbEnabled,
|
|
321
324
|
aiGatewayBudget,
|
|
322
325
|
reset,
|
|
323
326
|
getTimezones,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings2.store.mjs","names":["allowedModules"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport type { IDataObject, WorkflowSettings } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag: enabled when the backend's Daytona sandbox env vars\n\t// (`N8N_AGENTS_AI_SANDBOX_ENABLED=true` + `N8N_AGENTS_AI_SANDBOX_PROVIDER=daytona`)\n\t// are set, OR the AI Assistant proxy is available.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uCAAuC;;;MAGvC,KAAK,SAAS,+CAA+C,CAAC;;;GAGjE,KAAK,SAAS,kDAAkD,CAAC;;QAE5D,KAAK,SAAS,oDAAoD,CAAC;QACnE,KAAK,SAAS,2DAA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,EAAE;;CAGpB,MAAM,oBAAoB,YAAY;AAErC,iBAAe,QADC,MAAM,kBAAkB,kBAAkB,cAAc,CAAC,eAAe;;CAIzF,MAAM,8BAA8B,OAAO,gCAAyC;EACnF,MAAM,YAAY,cAAc;AAChC,QAAM,WAAW,sBAAsB,UAAU,gBAAgB,EAChE,6BACA,CAAC;AACF,MAAI,SAAS,MAAM,GAClB,UAAS,MAAM,GAAG,8BAA8B;;AAIlD,QAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
1
|
+
{"version":3,"file":"settings2.store.mjs","names":["allowedModules"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport type { IDataObject, WorkflowSettings } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst isAiGatewayCloudUbbEnabled = computed(\n\t\t() => settings.value.aiGateway?.cloudUbbEnabled ?? false,\n\t);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag controlled by the backend's N8N_AGENTS_AI_SANDBOX_ENABLED setting.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setPublicApiPath(\n\t\t\t`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`,\n\t\t);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\tisAiGatewayCloudUbbEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uCAAuC;;;MAGvC,KAAK,SAAS,+CAA+C,CAAC;;;GAGjE,KAAK,SAAS,kDAAkD,CAAC;;QAE5D,KAAK,SAAS,oDAAoD,CAAC;QACnE,KAAK,SAAS,2DAA2D,EAAE,aAAa,EAAE,cAAc,yBAAyB,EAAE,CAAC,CAAC;QACrI,KAAK,SAAS,qEAAqE,EAAE,aAAa,EAAE,QAAQ,qBAAqB,EAAE,CAAC,CAAC;;;;AAK7I,MAAa,mBAAmB,YAAY,OAAO,gBAAgB;CAClE,MAAM,cAAc,IAAI,MAAM;CAC9B,MAAM,WAAW,IAAsB,EAAE,CAAqB;CAC9D,MAAM,iBAAiB,IAA4B,EAAE,CAAC;CACtD,MAAM,iBAAiB,IAA6B;EACnD,OAAO;EACP,sBAAsB;EACtB,WAAW;EACX,sBAAsB,qBAAqB;EAC3C,mBAAmB;EACnB,CAAC;CACF,MAAM,2BAA2B,IAAI,MAAM;CAC3C,MAAM,MAAM,IAAI;EACf,SAAS;EACT,eAAe;EACf,MAAM;EACN,WAAW,EACV,SAAS,OACT;EACD,CAAC;CACF,MAAM,MAAM,IAAI,EAAE,SAAS,OAAO,CAAC;CACnC,MAAM,UAAU,IAAI,EAAE,SAAS,OAAO,CAAC;CAEvC,MAAM,yBAAyB,IAAwC,MAAM;CAC7E,MAAM,2BAA2B,IAAwC,MAAM;CAC/E,MAAM,uBAAuB,IAAI,MAAM;CACvC,MAAM,4BAA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A;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as pinia3 from "pinia";
|
|
2
2
|
import { AgentRequestQuery } from "n8n-workflow";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _vueuse_core2 from "@vueuse/core";
|
|
4
4
|
|
|
5
5
|
//#region src/useAgentRequestStore.d.ts
|
|
6
6
|
interface IAgentRequest {
|
|
@@ -12,8 +12,8 @@ interface IAgentRequestStoreState {
|
|
|
12
12
|
[nodeName: string]: IAgentRequest;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
declare const useAgentRequestStore:
|
|
16
|
-
agentRequests:
|
|
15
|
+
declare const useAgentRequestStore: pinia3.StoreDefinition<"agentRequest", Pick<{
|
|
16
|
+
agentRequests: _vueuse_core2.RemovableRef<IAgentRequestStoreState>;
|
|
17
17
|
getAgentRequests: (workflowId: string, nodeId: string) => IAgentRequest["query"];
|
|
18
18
|
getQueryValue: (workflowId: string, nodeId: string, nodeName: string, paramName?: string) => unknown;
|
|
19
19
|
setAgentRequestForNode: (workflowId: string, nodeId: string, request: IAgentRequest) => void;
|
|
@@ -21,7 +21,7 @@ declare const useAgentRequestStore: pinia4.StoreDefinition<"agentRequest", Pick<
|
|
|
21
21
|
clearAllAgentRequests: (workflowId?: string) => void;
|
|
22
22
|
getAgentRequest: (workflowId: string, nodeId: string) => IAgentRequest | undefined;
|
|
23
23
|
}, "agentRequests">, Pick<{
|
|
24
|
-
agentRequests:
|
|
24
|
+
agentRequests: _vueuse_core2.RemovableRef<IAgentRequestStoreState>;
|
|
25
25
|
getAgentRequests: (workflowId: string, nodeId: string) => IAgentRequest["query"];
|
|
26
26
|
getQueryValue: (workflowId: string, nodeId: string, nodeName: string, paramName?: string) => unknown;
|
|
27
27
|
setAgentRequestForNode: (workflowId: string, nodeId: string, request: IAgentRequest) => void;
|
|
@@ -29,7 +29,7 @@ declare const useAgentRequestStore: pinia4.StoreDefinition<"agentRequest", Pick<
|
|
|
29
29
|
clearAllAgentRequests: (workflowId?: string) => void;
|
|
30
30
|
getAgentRequest: (workflowId: string, nodeId: string) => IAgentRequest | undefined;
|
|
31
31
|
}, never>, Pick<{
|
|
32
|
-
agentRequests:
|
|
32
|
+
agentRequests: _vueuse_core2.RemovableRef<IAgentRequestStoreState>;
|
|
33
33
|
getAgentRequests: (workflowId: string, nodeId: string) => IAgentRequest["query"];
|
|
34
34
|
getQueryValue: (workflowId: string, nodeId: string, nodeName: string, paramName?: string) => unknown;
|
|
35
35
|
setAgentRequestForNode: (workflowId: string, nodeId: string, request: IAgentRequest) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as pinia5 from "pinia";
|
|
2
2
|
import { AgentRequestQuery } from "n8n-workflow";
|
|
3
3
|
import * as _vueuse_core0 from "@vueuse/core";
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ interface IAgentRequestStoreState {
|
|
|
12
12
|
[nodeName: string]: IAgentRequest;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
declare const useAgentRequestStore:
|
|
15
|
+
declare const useAgentRequestStore: pinia5.StoreDefinition<"agentRequest", Pick<{
|
|
16
16
|
agentRequests: _vueuse_core0.RemovableRef<IAgentRequestStoreState>;
|
|
17
17
|
getAgentRequests: (workflowId: string, nodeId: string) => IAgentRequest["query"];
|
|
18
18
|
getQueryValue: (workflowId: string, nodeId: string, nodeName: string, paramName?: string) => unknown;
|