@n8n/stores 2.32.2 → 2.34.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.
Files changed (106) hide show
  1. package/dist/cloudPlan.store.cjs +7 -0
  2. package/dist/cloudPlan.store.d.cts +534 -0
  3. package/dist/cloudPlan.store.d.mts +534 -0
  4. package/dist/cloudPlan.store.mjs +7 -0
  5. package/dist/cloudPlan2.store.cjs +247 -0
  6. package/dist/cloudPlan2.store.cjs.map +1 -0
  7. package/dist/cloudPlan2.store.mjs +242 -0
  8. package/dist/cloudPlan2.store.mjs.map +1 -0
  9. package/dist/composables/useBasePageRedirectionHelper.cjs +87 -0
  10. package/dist/composables/useBasePageRedirectionHelper.cjs.map +1 -0
  11. package/dist/composables/useBasePageRedirectionHelper.d.cts +16 -0
  12. package/dist/composables/useBasePageRedirectionHelper.d.mts +16 -0
  13. package/dist/composables/useBasePageRedirectionHelper.mjs +87 -0
  14. package/dist/composables/useBasePageRedirectionHelper.mjs.map +1 -0
  15. package/dist/constants2.cjs +2 -0
  16. package/dist/constants2.cjs.map +1 -1
  17. package/dist/constants2.d.cts +2 -0
  18. package/dist/constants2.d.mts +2 -0
  19. package/dist/constants2.mjs +2 -0
  20. package/dist/constants2.mjs.map +1 -1
  21. package/dist/invitation.api.cjs +4 -0
  22. package/dist/invitation.api.d.cts +2 -0
  23. package/dist/invitation.api.d.mts +2 -0
  24. package/dist/invitation.api.mjs +3 -0
  25. package/dist/invitation2.api.cjs +26 -0
  26. package/dist/invitation2.api.cjs.map +1 -0
  27. package/dist/invitation2.api.d.cts +30 -0
  28. package/dist/invitation2.api.d.mts +30 -0
  29. package/dist/invitation2.api.mjs +14 -0
  30. package/dist/invitation2.api.mjs.map +1 -0
  31. package/dist/modalOpeners.cjs +0 -0
  32. package/dist/modalOpeners.d.cts +2 -0
  33. package/dist/modalOpeners.d.mts +2 -0
  34. package/dist/modalOpeners.mjs +1 -0
  35. package/dist/modalOpeners2.d.cts +11 -0
  36. package/dist/modalOpeners2.d.mts +11 -0
  37. package/dist/notifications.store.cjs +27 -0
  38. package/dist/notifications.store.cjs.map +1 -0
  39. package/dist/notifications.store.d.cts +15 -0
  40. package/dist/notifications.store.d.mts +15 -0
  41. package/dist/notifications.store.mjs +26 -0
  42. package/dist/notifications.store.mjs.map +1 -0
  43. package/dist/onboarding.api.cjs +3 -0
  44. package/dist/onboarding.api.d.cts +7 -0
  45. package/dist/onboarding.api.d.mts +7 -0
  46. package/dist/onboarding.api.mjs +3 -0
  47. package/dist/onboarding2.api.cjs +24 -0
  48. package/dist/onboarding2.api.cjs.map +1 -0
  49. package/dist/onboarding2.api.mjs +18 -0
  50. package/dist/onboarding2.api.mjs.map +1 -0
  51. package/dist/pageRedirection.d.cts +6 -0
  52. package/dist/pageRedirection.d.mts +6 -0
  53. package/dist/rbac.store.cjs +2 -1
  54. package/dist/rbac.store.cjs.map +1 -1
  55. package/dist/rbac.store.d.cts +123 -123
  56. package/dist/rbac.store.d.mts +124 -124
  57. package/dist/rbac.store.mjs +1 -1
  58. package/dist/roles.store.cjs +88 -0
  59. package/dist/roles.store.cjs.map +1 -0
  60. package/dist/roles.store.d.cts +637 -0
  61. package/dist/roles.store.d.mts +637 -0
  62. package/dist/roles.store.mjs +87 -0
  63. package/dist/roles.store.mjs.map +1 -0
  64. package/dist/settings.store.cjs +6 -0
  65. package/dist/settings.store.d.cts +3801 -0
  66. package/dist/settings.store.d.mts +3801 -0
  67. package/dist/settings.store.mjs +6 -0
  68. package/dist/settings2.store.cjs +387 -0
  69. package/dist/settings2.store.cjs.map +1 -0
  70. package/dist/settings2.store.mjs +348 -0
  71. package/dist/settings2.store.mjs.map +1 -0
  72. package/dist/types/pageRedirection.cjs +0 -0
  73. package/dist/types/pageRedirection.d.cts +2 -0
  74. package/dist/types/pageRedirection.d.mts +2 -0
  75. package/dist/types/pageRedirection.mjs +1 -0
  76. package/dist/useAgentRequestStore.cjs +1 -0
  77. package/dist/useAgentRequestStore.cjs.map +1 -1
  78. package/dist/useAgentRequestStore.d.cts +1 -1
  79. package/dist/useAgentRequestStore.d.mts +6 -6
  80. package/dist/useRootStore.cjs +4 -182
  81. package/dist/useRootStore.d.cts +73 -73
  82. package/dist/useRootStore.d.mts +73 -73
  83. package/dist/useRootStore.mjs +4 -182
  84. package/dist/useRootStore2.cjs +189 -0
  85. package/dist/useRootStore2.cjs.map +1 -0
  86. package/dist/useRootStore2.mjs +183 -0
  87. package/dist/useRootStore2.mjs.map +1 -0
  88. package/dist/users.store.cjs +9 -0
  89. package/dist/users.store.d.cts +552 -0
  90. package/dist/users.store.d.mts +552 -0
  91. package/dist/users.store.mjs +9 -0
  92. package/dist/users2.store.cjs +362 -0
  93. package/dist/users2.store.cjs.map +1 -0
  94. package/dist/users2.store.mjs +353 -0
  95. package/dist/users2.store.mjs.map +1 -0
  96. package/dist/versions.store.cjs +11 -0
  97. package/dist/versions.store.d.cts +384 -0
  98. package/dist/versions.store.d.mts +384 -0
  99. package/dist/versions.store.mjs +10 -0
  100. package/dist/versions2.store.cjs +230 -0
  101. package/dist/versions2.store.cjs.map +1 -0
  102. package/dist/versions2.store.mjs +218 -0
  103. package/dist/versions2.store.mjs.map +1 -0
  104. package/package.json +13 -6
  105. package/dist/useRootStore.cjs.map +0 -1
  106. package/dist/useRootStore.mjs.map +0 -1
@@ -0,0 +1,348 @@
1
+ import { t as STORES } from "./constants2.mjs";
2
+ import { t as useRootStore } from "./useRootStore2.mjs";
3
+ import { defineStore } from "pinia";
4
+ import { computed, ref } from "vue";
5
+ import { AuthenticationMethod } from "@n8n/api-types";
6
+ import { i18n } from "@n8n/i18n";
7
+ import { makeRestApiRequest } from "@n8n/rest-api-client";
8
+ import * as aiUsageApi from "@n8n/rest-api-client/api/ai-usage";
9
+ import * as eventsApi from "@n8n/rest-api-client/api/events";
10
+ import * as moduleSettingsApi from "@n8n/rest-api-client/api/module-settings";
11
+ import * as settingsApi from "@n8n/rest-api-client/api/settings";
12
+ import { testHealthEndpoint } from "@n8n/rest-api-client/api/templates";
13
+ import Bowser from "bowser";
14
+
15
+ //#region src/settings.store.ts
16
+ /**
17
+ * Full-page warning rendered when the instance requires a secure cookie but the
18
+ * page is served over an insecure origin (or via Safari, which drops the cookie).
19
+ * The copy is localized; the structural markup and inline styles stay in code
20
+ * because this is written via `document.write` before the Vue app mounts.
21
+ */
22
+ const buildInsecureConnectionWarning = () => `
23
+ <body style="margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;">
24
+ <h1 style="font-size: 40px">&#x1F6AB;</h1>
25
+ <h2>${i18n.baseText("settings.authCookie.insecureConnection.title")}</h2>
26
+ <br/>
27
+ <div style="font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto">
28
+ ${i18n.baseText("settings.authCookie.insecureConnection.fixIntro")}
29
+ <ul>
30
+ <li>${i18n.baseText("settings.authCookie.insecureConnection.option.tls")}</li>
31
+ <li>${i18n.baseText("settings.authCookie.insecureConnection.option.localhost", { interpolate: { localhostUrl: "http://localhost:5678" } })}</li>
32
+ <li>${i18n.baseText("settings.authCookie.insecureConnection.option.disableSecureCookie", { interpolate: { envVar: "N8N_SECURE_COOKIE" } })}</li>
33
+ </ul>
34
+ </div>
35
+ </body>`;
36
+ const useSettingsStore = defineStore(STORES.SETTINGS, () => {
37
+ const initialized = ref(false);
38
+ const settings = ref({});
39
+ const moduleSettings = ref({});
40
+ const userManagement = ref({
41
+ quota: -1,
42
+ showSetupOnFirstLoad: false,
43
+ smtpSetup: false,
44
+ authenticationMethod: AuthenticationMethod.Email,
45
+ passwordMinLength: 8
46
+ });
47
+ const templatesEndpointHealthy = ref(false);
48
+ const api = ref({
49
+ enabled: false,
50
+ latestVersion: 0,
51
+ path: "/",
52
+ swaggerUi: { enabled: false }
53
+ });
54
+ const mfa = ref({ enabled: false });
55
+ const folders = ref({ enabled: false });
56
+ const saveDataErrorExecution = ref("all");
57
+ const saveDataSuccessExecution = ref("all");
58
+ const saveManualExecutions = ref(false);
59
+ const saveDataProgressExecution = ref(false);
60
+ const isMFAEnforced = ref(false);
61
+ const isDocker = computed(() => settings.value?.isDocker ?? false);
62
+ const databaseType = computed(() => settings.value?.databaseType);
63
+ const planName = computed(() => settings.value?.license?.planName ?? "Community");
64
+ const consumerId = computed(() => settings.value?.license?.consumerId);
65
+ const binaryDataMode = computed(() => settings.value?.binaryDataMode);
66
+ const pruning = computed(() => settings.value?.pruning);
67
+ const security = computed(() => ({
68
+ blockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,
69
+ secureCookie: settings.value?.authCookie?.secure
70
+ }));
71
+ const isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});
72
+ const nodeJsVersion = computed(() => settings.value.nodeJsVersion);
73
+ const nodeEnv = computed(() => settings.value.nodeEnv);
74
+ const concurrency = computed(() => settings.value.concurrency);
75
+ const isConcurrencyEnabled = computed(() => concurrency.value !== -1);
76
+ const isPublicApiEnabled = computed(() => api.value.enabled);
77
+ const isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);
78
+ const isPreviewMode = computed(() => settings.value.previewMode);
79
+ const isCanvasOnly = computed(() => settings.value.canvasOnly);
80
+ const isCrdtCollaborationEnabled = computed(() => (settings.value.collaboration?.crdt ?? "off") !== "off");
81
+ const publicApiLatestVersion = computed(() => api.value.latestVersion);
82
+ const publicApiPath = computed(() => api.value.path);
83
+ const isAiAssistantEnabled = computed(() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup);
84
+ const isAskAiEnabled = computed(() => settings.value.askAi?.enabled);
85
+ const isAiBuilderEnabled = computed(() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup);
86
+ const isAiAssistantOrBuilderEnabled = computed(() => isAiAssistantEnabled.value || isAiBuilderEnabled.value);
87
+ const showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);
88
+ const deploymentType = computed(() => settings.value.deployment?.type || "default");
89
+ const isCloudDeployment = computed(() => settings.value.deployment?.type === "cloud");
90
+ const activeModules = computed(() => settings.value.activeModules);
91
+ const isModuleActive = (moduleName) => {
92
+ return activeModules.value?.includes(moduleName);
93
+ };
94
+ /**
95
+ * Checks whether an agents-module sub-feature token (listed in
96
+ * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`
97
+ * unless the top-level `agents` module is active AND the token is
98
+ * present in the module settings' `modules` array.
99
+ *
100
+ * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.
101
+ */
102
+ const isAgentModuleActive = (name) => {
103
+ return isModuleActive("agents") && moduleSettings.value.agents?.modules?.includes(name) === true;
104
+ };
105
+ const isAiCreditsEnabled = computed(() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup);
106
+ const aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);
107
+ const isAiDataSharingEnabled = computed(() => settings.value.ai?.allowSendingParameterValues ?? true);
108
+ const isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);
109
+ const aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);
110
+ const isSmtpSetup = computed(() => userManagement.value.smtpSetup);
111
+ const isPersonalizationSurveyEnabled = computed(() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled);
112
+ const telemetry = computed(() => settings.value.telemetry);
113
+ const logLevel = computed(() => settings.value.logLevel);
114
+ const isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);
115
+ const isMFAEnforcementLicensed = computed(() => {
116
+ return settings.value.enterprise?.mfaEnforcement ?? false;
117
+ });
118
+ const isMfaFeatureEnabled = computed(() => mfa.value.enabled);
119
+ const isFoldersFeatureEnabled = computed(() => folders.value.enabled);
120
+ const isDataTableFeatureEnabled = computed(() => isModuleActive("data-table"));
121
+ const isChatFeatureEnabled = computed(() => isModuleActive("chat-hub") && moduleSettings.value["chat-hub"]?.enabled === true);
122
+ const isOtelCustomSpanAttributesEnabled = computed(() => {
123
+ const isOtelCustomSpanAttributesLicensed = settings.value.enterprise?.otelCustomSpanAttributes ?? false;
124
+ const isOtelModuleActive = isModuleActive("otel") && moduleSettings.value.otel?.enabled === true;
125
+ return isOtelCustomSpanAttributesLicensed && isOtelModuleActive;
126
+ });
127
+ const isAgentsKnowledgeBaseFeatureEnabled = computed(() => isModuleActive("agents") && moduleSettings.value.agents?.knowledgeBaseEnabled === true);
128
+ const isPublicChatTriggerDisabled = computed(() => settings.value.chatTrigger?.disablePublicChat ?? false);
129
+ const isCustomRolesFeatureEnabled = computed(() => settings.value.enterprise?.customRoles ?? false);
130
+ const areTagsEnabled = computed(() => settings.value.workflowTagsDisabled !== void 0 ? !settings.value.workflowTagsDisabled : true);
131
+ const isAutosaveEnabled = computed(() => settings.value.workflowsAutosaveDisabled !== void 0 ? !settings.value.workflowsAutosaveDisabled : true);
132
+ const isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);
133
+ const isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));
134
+ const isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);
135
+ const templatesHost = computed(() => settings.value.templates?.host ?? "");
136
+ const pushBackend = computed(() => settings.value.pushBackend);
137
+ const isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);
138
+ const isUnverifiedPackagesEnabled = computed(() => settings.value.unverifiedCommunityNodesEnabled);
139
+ const allowedModules = computed(() => settings.value.allowedModules);
140
+ const isQueueModeEnabled = computed(() => settings.value.executionMode === "queue");
141
+ const isMultiMain = computed(() => settings.value.isMultiMain);
142
+ const isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);
143
+ const workflowCallerPolicyDefaultOption = computed(() => settings.value.workflowCallerPolicyDefaultOption);
144
+ const permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);
145
+ const isCommunityPlan = computed(() => planName.value.toLowerCase() === "community");
146
+ const isDevRelease = computed(() => settings.value.releaseChannel === "dev");
147
+ const endpointHealth = computed(() => settings.value.endpointHealth);
148
+ const isWorkflowPublicationServiceEnabled = computed(() => settings.value.useWorkflowPublicationService ?? false);
149
+ const setSettings = (newSettings) => {
150
+ settings.value = newSettings;
151
+ userManagement.value = newSettings.userManagement;
152
+ if (userManagement.value) userManagement.value.showSetupOnFirstLoad = !!settings.value.userManagement.showSetupOnFirstLoad;
153
+ if (settings.value.publicApi) api.value = settings.value.publicApi;
154
+ mfa.value.enabled = settings.value.mfa?.enabled;
155
+ folders.value.enabled = settings.value.folders?.enabled;
156
+ if (settings.value.versionCli) useRootStore().setVersionCli(settings.value.versionCli);
157
+ if (settings.value.authCookie.secure) {
158
+ const { browser } = Bowser.parse(navigator.userAgent);
159
+ if (location.protocol === "http:" && (!["localhost", "127.0.0.1"].includes(location.hostname) || browser.name === "Safari")) {
160
+ document.write(buildInsecureConnectionWarning());
161
+ return;
162
+ }
163
+ }
164
+ };
165
+ const setAllowedModules = (allowedModules$1) => {
166
+ settings.value.allowedModules = allowedModules$1;
167
+ };
168
+ const setWorkflowReviewsPolicy = (policy) => {
169
+ settings.value.workflowReviews = policy;
170
+ };
171
+ const setSaveDataErrorExecution = (newValue) => {
172
+ saveDataErrorExecution.value = newValue;
173
+ };
174
+ const setSaveDataSuccessExecution = (newValue) => {
175
+ saveDataSuccessExecution.value = newValue;
176
+ };
177
+ const setSaveManualExecutions = (newValue) => {
178
+ saveManualExecutions.value = newValue;
179
+ };
180
+ const setSaveDataProgressExecution = (newValue) => {
181
+ saveDataProgressExecution.value = newValue;
182
+ };
183
+ const getSettings = async () => {
184
+ const rootStore = useRootStore();
185
+ const fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);
186
+ setSettings(fetchedSettings);
187
+ rootStore.setDefaultLocale(fetchedSettings.defaultLocale);
188
+ isMFAEnforced.value = settings.value.mfa?.enforced ?? false;
189
+ if (fetchedSettings.settingsMode === "public") return;
190
+ settings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;
191
+ settings.value.unverifiedCommunityNodesEnabled = fetchedSettings.unverifiedCommunityNodesEnabled;
192
+ setAllowedModules(fetchedSettings.allowedModules);
193
+ setSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);
194
+ setSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);
195
+ setSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);
196
+ setSaveManualExecutions(fetchedSettings.saveManualExecutions);
197
+ rootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);
198
+ rootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);
199
+ rootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);
200
+ rootStore.setEndpointForm(fetchedSettings.endpointForm);
201
+ rootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);
202
+ rootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);
203
+ rootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);
204
+ rootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);
205
+ rootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);
206
+ rootStore.setEndpointMcp(fetchedSettings.endpointMcp);
207
+ rootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);
208
+ rootStore.setTimezone(fetchedSettings.timezone);
209
+ rootStore.setExecutionTimeout(fetchedSettings.executionTimeout);
210
+ rootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);
211
+ rootStore.setInstanceId(fetchedSettings.instanceId);
212
+ rootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);
213
+ rootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});
214
+ rootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);
215
+ if (fetchedSettings.telemetry.enabled) eventsApi.sessionStarted(rootStore.restApiContext);
216
+ };
217
+ const initialize = async () => {
218
+ if (initialized.value) return;
219
+ await getSettings();
220
+ initialized.value = true;
221
+ };
222
+ const stopShowingSetupPage = () => {
223
+ userManagement.value.showSetupOnFirstLoad = false;
224
+ };
225
+ const disableTemplates = () => {
226
+ settings.value = {
227
+ ...settings.value,
228
+ templates: {
229
+ ...settings.value.templates,
230
+ enabled: false
231
+ }
232
+ };
233
+ };
234
+ const testTemplatesEndpoint = async () => {
235
+ const timeout = new Promise((_, reject) => setTimeout(() => reject(/* @__PURE__ */ new Error("Templates health check timed out")), 2e3));
236
+ await Promise.race([testHealthEndpoint(templatesHost.value), timeout]);
237
+ templatesEndpointHealthy.value = true;
238
+ };
239
+ const getTimezones = async () => {
240
+ return await makeRestApiRequest(useRootStore().restApiContext, "GET", "/options/timezones");
241
+ };
242
+ const reset = () => {
243
+ settings.value = {};
244
+ };
245
+ const getModuleSettings = async () => {
246
+ moduleSettings.value = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);
247
+ };
248
+ const updateAiDataSharingSettings = async (allowSendingParameterValues) => {
249
+ const rootStore = useRootStore();
250
+ await aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, { allowSendingParameterValues });
251
+ if (settings.value.ai) settings.value.ai.allowSendingParameterValues = allowSendingParameterValues;
252
+ };
253
+ return {
254
+ settings,
255
+ userManagement,
256
+ templatesEndpointHealthy,
257
+ api,
258
+ mfa,
259
+ isDocker,
260
+ isDevRelease,
261
+ endpointHealth,
262
+ isEnterpriseFeatureEnabled,
263
+ databaseType,
264
+ planName,
265
+ consumerId,
266
+ binaryDataMode,
267
+ pruning,
268
+ security,
269
+ nodeJsVersion,
270
+ nodeEnv,
271
+ concurrency,
272
+ isConcurrencyEnabled,
273
+ isPublicApiEnabled,
274
+ isSwaggerUIEnabled,
275
+ isPreviewMode,
276
+ isCanvasOnly,
277
+ isCrdtCollaborationEnabled,
278
+ publicApiLatestVersion,
279
+ publicApiPath,
280
+ showSetupPage,
281
+ deploymentType,
282
+ isCloudDeployment,
283
+ isSmtpSetup,
284
+ isPersonalizationSurveyEnabled,
285
+ telemetry,
286
+ logLevel,
287
+ isTelemetryEnabled,
288
+ isMfaFeatureEnabled,
289
+ isFoldersFeatureEnabled,
290
+ isAiAssistantEnabled,
291
+ isCustomRolesFeatureEnabled,
292
+ areTagsEnabled,
293
+ isAutosaveEnabled,
294
+ isHiringBannerEnabled,
295
+ isTemplatesEnabled,
296
+ isTemplatesEndpointReachable,
297
+ templatesHost,
298
+ pushBackend,
299
+ isCommunityNodesFeatureEnabled,
300
+ isUnverifiedPackagesEnabled,
301
+ allowedModules,
302
+ isQueueModeEnabled,
303
+ isMultiMain,
304
+ isWorkerViewAvailable,
305
+ workflowCallerPolicyDefaultOption,
306
+ permanentlyDismissedBanners,
307
+ saveDataErrorExecution,
308
+ saveDataSuccessExecution,
309
+ saveManualExecutions,
310
+ saveDataProgressExecution,
311
+ isCommunityPlan,
312
+ isAskAiEnabled,
313
+ isAiBuilderEnabled,
314
+ isAiAssistantOrBuilderEnabled,
315
+ isAiCreditsEnabled,
316
+ aiCreditsQuota,
317
+ isAiDataSharingEnabled,
318
+ isAiGatewayEnabled,
319
+ aiGatewayBudget,
320
+ reset,
321
+ getTimezones,
322
+ testTemplatesEndpoint,
323
+ disableTemplates,
324
+ stopShowingSetupPage,
325
+ getSettings,
326
+ setSettings,
327
+ setWorkflowReviewsPolicy,
328
+ initialize,
329
+ getModuleSettings,
330
+ moduleSettings,
331
+ updateAiDataSharingSettings,
332
+ isMFAEnforcementLicensed,
333
+ isMFAEnforced,
334
+ activeModules,
335
+ isModuleActive,
336
+ isAgentModuleActive,
337
+ isDataTableFeatureEnabled,
338
+ isChatFeatureEnabled,
339
+ isOtelCustomSpanAttributesEnabled,
340
+ isAgentsKnowledgeBaseFeatureEnabled,
341
+ isPublicChatTriggerDisabled,
342
+ isWorkflowPublicationServiceEnabled
343
+ };
344
+ });
345
+
346
+ //#endregion
347
+ export { useSettingsStore as t };
348
+ //# sourceMappingURL=settings2.store.mjs.map
@@ -0,0 +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\">&#x1F6AB;</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 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\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,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,S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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"}
File without changes
@@ -0,0 +1,2 @@
1
+ import { n as UTMCampaign, t as CloudUpdateLinkSourceType } from "../pageRedirection.cjs";
2
+ export { CloudUpdateLinkSourceType, UTMCampaign };
@@ -0,0 +1,2 @@
1
+ import { n as UTMCampaign, t as CloudUpdateLinkSourceType } from "../pageRedirection.mjs";
2
+ export { CloudUpdateLinkSourceType, UTMCampaign };
@@ -0,0 +1 @@
1
+ export { };
@@ -1,3 +1,4 @@
1
+ const require_settings_store = require('./settings2.store.cjs');
1
2
  let pinia = require("pinia");
2
3
  let __vueuse_core = require("@vueuse/core");
3
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"useAgentRequestStore.cjs","names":[],"sources":["../src/useAgentRequestStore.ts"],"sourcesContent":["import { useLocalStorage } from '@vueuse/core';\nimport type { AgentRequestQuery } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\n\nconst LOCAL_STORAGE_AGENT_REQUESTS = 'N8N_AGENT_REQUESTS';\n\nexport interface IAgentRequest {\n\tquery: AgentRequestQuery;\n\ttoolName?: string;\n}\n\nexport interface IAgentRequestStoreState {\n\t[workflowId: string]: {\n\t\t[nodeName: string]: IAgentRequest;\n\t};\n}\n\nexport const useAgentRequestStore = defineStore('agentRequest', () => {\n\t// State\n\tconst agentRequests = useLocalStorage<IAgentRequestStoreState>(LOCAL_STORAGE_AGENT_REQUESTS, {});\n\n\t// Helper function to ensure workflow and node entries exist\n\tconst ensureWorkflowAndNodeExist = (workflowId: string, nodeId: string): void => {\n\t\tif (!agentRequests.value[workflowId]) {\n\t\t\tagentRequests.value[workflowId] = {};\n\t\t}\n\n\t\tif (!agentRequests.value[workflowId][nodeId]) {\n\t\t\tagentRequests.value[workflowId][nodeId] = { query: {} };\n\t\t}\n\t};\n\n\t// Getters\n\tconst getAgentRequests = (workflowId: string, nodeId: string): IAgentRequest['query'] => {\n\t\treturn agentRequests.value[workflowId]?.[nodeId]?.query ?? {};\n\t};\n\n\tconst getQueryValue = (\n\t\tworkflowId: string,\n\t\tnodeId: string,\n\t\tnodeName: string,\n\t\tparamName?: string,\n\t): unknown => {\n\t\tconst query = agentRequests.value[workflowId]?.[nodeId]?.query?.[nodeName];\n\t\tif (typeof query === 'string' || !paramName) {\n\t\t\treturn query;\n\t\t}\n\t\treturn query?.[paramName];\n\t};\n\n\tconst setAgentRequestForNode = (\n\t\tworkflowId: string,\n\t\tnodeId: string,\n\t\trequest: IAgentRequest,\n\t): void => {\n\t\tensureWorkflowAndNodeExist(workflowId, nodeId);\n\n\t\tagentRequests.value[workflowId][nodeId] = {\n\t\t\t...request,\n\t\t\tquery: { ...request.query },\n\t\t};\n\t};\n\n\tconst clearAgentRequests = (workflowId: string, nodeId: string): void => {\n\t\tif (agentRequests.value[workflowId]) {\n\t\t\tagentRequests.value[workflowId][nodeId] = { query: {} };\n\t\t}\n\t};\n\n\tconst clearAllAgentRequests = (workflowId?: string): void => {\n\t\tif (workflowId) {\n\t\t\tagentRequests.value[workflowId] = {};\n\t\t} else {\n\t\t\tagentRequests.value = {};\n\t\t}\n\t};\n\n\tconst getAgentRequest = (workflowId: string, nodeId: string): IAgentRequest | undefined => {\n\t\tif (agentRequests.value[workflowId]) return agentRequests.value[workflowId]?.[nodeId];\n\t\treturn undefined;\n\t};\n\n\treturn {\n\t\tagentRequests,\n\t\tgetAgentRequests,\n\t\tgetQueryValue,\n\t\tsetAgentRequestForNode,\n\t\tclearAgentRequests,\n\t\tclearAllAgentRequests,\n\t\tgetAgentRequest,\n\t};\n});\n"],"mappings":";;;;AAIA,MAAM,+BAA+B;AAarC,MAAa,8CAAmC,sBAAsB;CAErE,MAAM,mDAAyD,8BAA8B,EAAE,CAAC;CAGhG,MAAM,8BAA8B,YAAoB,WAAyB;AAChF,MAAI,CAAC,cAAc,MAAM,YACxB,eAAc,MAAM,cAAc,EAAE;AAGrC,MAAI,CAAC,cAAc,MAAM,YAAY,QACpC,eAAc,MAAM,YAAY,UAAU,EAAE,OAAO,EAAE,EAAE;;CAKzD,MAAM,oBAAoB,YAAoB,WAA2C;AACxF,SAAO,cAAc,MAAM,cAAc,SAAS,SAAS,EAAE;;CAG9D,MAAM,iBACL,YACA,QACA,UACA,cACa;EACb,MAAM,QAAQ,cAAc,MAAM,cAAc,SAAS,QAAQ;AACjE,MAAI,OAAO,UAAU,YAAY,CAAC,UACjC,QAAO;AAER,SAAO,QAAQ;;CAGhB,MAAM,0BACL,YACA,QACA,YACU;AACV,6BAA2B,YAAY,OAAO;AAE9C,gBAAc,MAAM,YAAY,UAAU;GACzC,GAAG;GACH,OAAO,EAAE,GAAG,QAAQ,OAAO;GAC3B;;CAGF,MAAM,sBAAsB,YAAoB,WAAyB;AACxE,MAAI,cAAc,MAAM,YACvB,eAAc,MAAM,YAAY,UAAU,EAAE,OAAO,EAAE,EAAE;;CAIzD,MAAM,yBAAyB,eAA8B;AAC5D,MAAI,WACH,eAAc,MAAM,cAAc,EAAE;MAEpC,eAAc,QAAQ,EAAE;;CAI1B,MAAM,mBAAmB,YAAoB,WAA8C;AAC1F,MAAI,cAAc,MAAM,YAAa,QAAO,cAAc,MAAM,cAAc;;AAI/E,QAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
1
+ {"version":3,"file":"useAgentRequestStore.cjs","names":[],"sources":["../src/useAgentRequestStore.ts"],"sourcesContent":["import { useLocalStorage } from '@vueuse/core';\nimport type { AgentRequestQuery } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\n\nconst LOCAL_STORAGE_AGENT_REQUESTS = 'N8N_AGENT_REQUESTS';\n\nexport interface IAgentRequest {\n\tquery: AgentRequestQuery;\n\ttoolName?: string;\n}\n\nexport interface IAgentRequestStoreState {\n\t[workflowId: string]: {\n\t\t[nodeName: string]: IAgentRequest;\n\t};\n}\n\nexport const useAgentRequestStore = defineStore('agentRequest', () => {\n\t// State\n\tconst agentRequests = useLocalStorage<IAgentRequestStoreState>(LOCAL_STORAGE_AGENT_REQUESTS, {});\n\n\t// Helper function to ensure workflow and node entries exist\n\tconst ensureWorkflowAndNodeExist = (workflowId: string, nodeId: string): void => {\n\t\tif (!agentRequests.value[workflowId]) {\n\t\t\tagentRequests.value[workflowId] = {};\n\t\t}\n\n\t\tif (!agentRequests.value[workflowId][nodeId]) {\n\t\t\tagentRequests.value[workflowId][nodeId] = { query: {} };\n\t\t}\n\t};\n\n\t// Getters\n\tconst getAgentRequests = (workflowId: string, nodeId: string): IAgentRequest['query'] => {\n\t\treturn agentRequests.value[workflowId]?.[nodeId]?.query ?? {};\n\t};\n\n\tconst getQueryValue = (\n\t\tworkflowId: string,\n\t\tnodeId: string,\n\t\tnodeName: string,\n\t\tparamName?: string,\n\t): unknown => {\n\t\tconst query = agentRequests.value[workflowId]?.[nodeId]?.query?.[nodeName];\n\t\tif (typeof query === 'string' || !paramName) {\n\t\t\treturn query;\n\t\t}\n\t\treturn query?.[paramName];\n\t};\n\n\tconst setAgentRequestForNode = (\n\t\tworkflowId: string,\n\t\tnodeId: string,\n\t\trequest: IAgentRequest,\n\t): void => {\n\t\tensureWorkflowAndNodeExist(workflowId, nodeId);\n\n\t\tagentRequests.value[workflowId][nodeId] = {\n\t\t\t...request,\n\t\t\tquery: { ...request.query },\n\t\t};\n\t};\n\n\tconst clearAgentRequests = (workflowId: string, nodeId: string): void => {\n\t\tif (agentRequests.value[workflowId]) {\n\t\t\tagentRequests.value[workflowId][nodeId] = { query: {} };\n\t\t}\n\t};\n\n\tconst clearAllAgentRequests = (workflowId?: string): void => {\n\t\tif (workflowId) {\n\t\t\tagentRequests.value[workflowId] = {};\n\t\t} else {\n\t\t\tagentRequests.value = {};\n\t\t}\n\t};\n\n\tconst getAgentRequest = (workflowId: string, nodeId: string): IAgentRequest | undefined => {\n\t\tif (agentRequests.value[workflowId]) return agentRequests.value[workflowId]?.[nodeId];\n\t\treturn undefined;\n\t};\n\n\treturn {\n\t\tagentRequests,\n\t\tgetAgentRequests,\n\t\tgetQueryValue,\n\t\tsetAgentRequestForNode,\n\t\tclearAgentRequests,\n\t\tclearAllAgentRequests,\n\t\tgetAgentRequest,\n\t};\n});\n"],"mappings":";;;;;AAIA,MAAM,+BAA+B;AAarC,MAAa,8CAAmC,sBAAsB;CAErE,MAAM,mDAAyD,8BAA8B,EAAE,CAAC;CAGhG,MAAM,8BAA8B,YAAoB,WAAyB;AAChF,MAAI,CAAC,cAAc,MAAM,YACxB,eAAc,MAAM,cAAc,EAAE;AAGrC,MAAI,CAAC,cAAc,MAAM,YAAY,QACpC,eAAc,MAAM,YAAY,UAAU,EAAE,OAAO,EAAE,EAAE;;CAKzD,MAAM,oBAAoB,YAAoB,WAA2C;AACxF,SAAO,cAAc,MAAM,cAAc,SAAS,SAAS,EAAE;;CAG9D,MAAM,iBACL,YACA,QACA,UACA,cACa;EACb,MAAM,QAAQ,cAAc,MAAM,cAAc,SAAS,QAAQ;AACjE,MAAI,OAAO,UAAU,YAAY,CAAC,UACjC,QAAO;AAER,SAAO,QAAQ;;CAGhB,MAAM,0BACL,YACA,QACA,YACU;AACV,6BAA2B,YAAY,OAAO;AAE9C,gBAAc,MAAM,YAAY,UAAU;GACzC,GAAG;GACH,OAAO,EAAE,GAAG,QAAQ,OAAO;GAC3B;;CAGF,MAAM,sBAAsB,YAAoB,WAAyB;AACxE,MAAI,cAAc,MAAM,YACvB,eAAc,MAAM,YAAY,UAAU,EAAE,OAAO,EAAE,EAAE;;CAIzD,MAAM,yBAAyB,eAA8B;AAC5D,MAAI,WACH,eAAc,MAAM,cAAc,EAAE;MAEpC,eAAc,QAAQ,EAAE;;CAI1B,MAAM,mBAAmB,YAAoB,WAA8C;AAC1F,MAAI,cAAc,MAAM,YAAa,QAAO,cAAc,MAAM,cAAc;;AAI/E,QAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
@@ -1,6 +1,6 @@
1
1
  import * as pinia0 from "pinia";
2
- import * as _vueuse_core0 from "@vueuse/core";
3
2
  import { AgentRequestQuery } from "n8n-workflow";
3
+ import * as _vueuse_core0 from "@vueuse/core";
4
4
 
5
5
  //#region src/useAgentRequestStore.d.ts
6
6
  interface IAgentRequest {
@@ -1,6 +1,6 @@
1
- import * as pinia0 from "pinia";
2
- import * as _vueuse_core0 from "@vueuse/core";
1
+ import * as pinia7 from "pinia";
3
2
  import { AgentRequestQuery } from "n8n-workflow";
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: pinia0.StoreDefinition<"agentRequest", Pick<{
16
- agentRequests: _vueuse_core0.RemovableRef<IAgentRequestStoreState>;
15
+ declare const useAgentRequestStore: pinia7.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: pinia0.StoreDefinition<"agentRequest", Pick<
21
21
  clearAllAgentRequests: (workflowId?: string) => void;
22
22
  getAgentRequest: (workflowId: string, nodeId: string) => IAgentRequest | undefined;
23
23
  }, "agentRequests">, Pick<{
24
- agentRequests: _vueuse_core0.RemovableRef<IAgentRequestStoreState>;
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: pinia0.StoreDefinition<"agentRequest", Pick<
29
29
  clearAllAgentRequests: (workflowId?: string) => void;
30
30
  getAgentRequest: (workflowId: string, nodeId: string) => IAgentRequest | undefined;
31
31
  }, never>, Pick<{
32
- agentRequests: _vueuse_core0.RemovableRef<IAgentRequestStoreState>;
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;