@n8n/stores 2.36.3 → 2.37.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 (39) hide show
  1. package/dist/cloudPlan.store.d.mts +66 -66
  2. package/dist/composables/useBasePageRedirectionHelper.cjs +28 -8
  3. package/dist/composables/useBasePageRedirectionHelper.cjs.map +1 -1
  4. package/dist/composables/useBasePageRedirectionHelper.d.cts +7 -0
  5. package/dist/composables/useBasePageRedirectionHelper.d.mts +7 -0
  6. package/dist/composables/useBasePageRedirectionHelper.mjs +28 -8
  7. package/dist/composables/useBasePageRedirectionHelper.mjs.map +1 -1
  8. package/dist/constants2.cjs +1 -0
  9. package/dist/constants2.cjs.map +1 -1
  10. package/dist/constants2.d.cts +1 -0
  11. package/dist/constants2.d.mts +1 -0
  12. package/dist/constants2.mjs +1 -0
  13. package/dist/constants2.mjs.map +1 -1
  14. package/dist/notifications.store.d.cts +2 -2
  15. package/dist/notifications.store.d.mts +2 -2
  16. package/dist/pageRedirection.d.cts +2 -2
  17. package/dist/pageRedirection.d.mts +2 -2
  18. package/dist/rbac.store.cjs +1 -0
  19. package/dist/rbac.store.cjs.map +1 -1
  20. package/dist/rbac.store.d.cts +135 -129
  21. package/dist/rbac.store.d.mts +135 -129
  22. package/dist/rbac.store.mjs +1 -0
  23. package/dist/rbac.store.mjs.map +1 -1
  24. package/dist/roles.store.d.cts +19 -19
  25. package/dist/roles.store.d.mts +21 -21
  26. package/dist/settings.store.d.cts +256 -250
  27. package/dist/settings.store.d.mts +254 -248
  28. package/dist/settings2.store.cjs +9 -0
  29. package/dist/settings2.store.cjs.map +1 -1
  30. package/dist/settings2.store.mjs +9 -0
  31. package/dist/settings2.store.mjs.map +1 -1
  32. package/dist/useAgentRequestStore.d.cts +2 -2
  33. package/dist/useRootStore.d.cts +73 -73
  34. package/dist/useRootStore.d.mts +75 -75
  35. package/dist/users.store.d.cts +52 -52
  36. package/dist/users.store.d.mts +52 -52
  37. package/dist/versions.store.d.cts +30 -30
  38. package/dist/versions.store.d.mts +30 -30
  39. package/package.json +13 -13
@@ -1,6 +1,6 @@
1
1
  import { Cloud, InstanceUsage } from "@n8n/rest-api-client/api/cloudPlans";
2
- import * as pinia6 from "pinia";
3
- import * as vue413 from "vue";
2
+ import * as pinia0 from "pinia";
3
+ import * as vue0 from "vue";
4
4
 
5
5
  //#region src/cloudPlan.store.d.ts
6
6
  interface CloudPlanState {
@@ -9,7 +9,7 @@ interface CloudPlanState {
9
9
  usage: InstanceUsage | null;
10
10
  loadingPlan: boolean;
11
11
  }
12
- declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
12
+ declare const useCloudPlanStore: pinia0.StoreDefinition<"cloudPlan", Pick<{
13
13
  state: {
14
14
  initialized: boolean;
15
15
  data: {
@@ -56,17 +56,17 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
56
56
  } | null;
57
57
  loadingPlan: boolean;
58
58
  };
59
- usageLeft: vue413.ComputedRef<{
59
+ usageLeft: vue0.ComputedRef<{
60
60
  workflowsLeft: number;
61
61
  executionsLeft: number;
62
62
  }>;
63
- trialDaysLeft: vue413.ComputedRef<number>;
64
- trialTimeLeft: vue413.ComputedRef<{
63
+ trialDaysLeft: vue0.ComputedRef<number>;
64
+ trialTimeLeft: vue0.ComputedRef<{
65
65
  count: number;
66
66
  unit: "days" | "hours" | "minutes";
67
67
  }>;
68
- userIsTrialing: vue413.ComputedRef<boolean>;
69
- currentPlanData: vue413.ComputedRef<{
68
+ userIsTrialing: vue0.ComputedRef<boolean>;
69
+ currentPlanData: vue0.ComputedRef<{
70
70
  planId: number;
71
71
  monthlyExecutionsLimit: number;
72
72
  activeWorkflowsLimit: number;
@@ -103,15 +103,15 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
103
103
  } | undefined;
104
104
  licenseFeatures?: Record<string, number> | undefined;
105
105
  } | null>;
106
- currentUsageData: vue413.ComputedRef<{
106
+ currentUsageData: vue0.ComputedRef<{
107
107
  timeframe?: string | undefined;
108
108
  executions: number;
109
109
  activeWorkflows: number;
110
110
  } | null>;
111
- trialExpired: vue413.ComputedRef<boolean | undefined>;
112
- allExecutionsUsed: vue413.ComputedRef<boolean>;
113
- hasCloudPlan: vue413.ComputedRef<boolean>;
114
- currentUserCloudInfo: vue413.Ref<{
111
+ trialExpired: vue0.ComputedRef<boolean | undefined>;
112
+ allExecutionsUsed: vue0.ComputedRef<boolean>;
113
+ hasCloudPlan: vue0.ComputedRef<boolean>;
114
+ currentUserCloudInfo: vue0.Ref<{
115
115
  confirmed: boolean;
116
116
  username: string;
117
117
  email: string;
@@ -144,10 +144,10 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
144
144
  getAutoLoginCode: () => Promise<{
145
145
  code: string;
146
146
  }>;
147
- selectedApps: vue413.ComputedRef<string[] | undefined>;
148
- codingSkill: vue413.ComputedRef<number>;
149
- shouldShowBanner: vue413.ComputedRef<boolean>;
150
- bannerConfig: vue413.ComputedRef<{
147
+ selectedApps: vue0.ComputedRef<string[] | undefined>;
148
+ codingSkill: vue0.ComputedRef<number>;
149
+ shouldShowBanner: vue0.ComputedRef<boolean>;
150
+ bannerConfig: vue0.ComputedRef<{
151
151
  timeLeft?: {
152
152
  text?: string | undefined;
153
153
  } | undefined;
@@ -164,14 +164,14 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
164
164
  dismissible?: boolean | undefined;
165
165
  forceShow?: boolean | undefined;
166
166
  } | undefined>;
167
- bannerForceShow: vue413.ComputedRef<boolean>;
168
- isBannerDismissed: vue413.ComputedRef<boolean>;
169
- bannerTimeLeft: vue413.ComputedRef<{
167
+ bannerForceShow: vue0.ComputedRef<boolean>;
168
+ isBannerDismissed: vue0.ComputedRef<boolean>;
169
+ bannerTimeLeft: vue0.ComputedRef<{
170
170
  show: boolean;
171
171
  text: string | undefined;
172
172
  }>;
173
- showExecutions: vue413.ComputedRef<boolean>;
174
- bannerCta: vue413.ComputedRef<{
173
+ showExecutions: vue0.ComputedRef<boolean>;
174
+ bannerCta: vue0.ComputedRef<{
175
175
  text: string;
176
176
  icon: string;
177
177
  size: "small" | "medium";
@@ -179,8 +179,8 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
179
179
  variant: "success" | "solid" | "subtle" | "ghost" | "outline" | "destructive" | undefined;
180
180
  href: string | undefined;
181
181
  }>;
182
- bannerIcon: vue413.ComputedRef<string | undefined>;
183
- bannerDismissible: vue413.ComputedRef<boolean>;
182
+ bannerIcon: vue0.ComputedRef<string | undefined>;
183
+ bannerDismissible: vue0.ComputedRef<boolean>;
184
184
  setIsInstanceOwner: (getter: () => boolean) => void;
185
185
  }, "state" | "currentUserCloudInfo">, Pick<{
186
186
  state: {
@@ -229,17 +229,17 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
229
229
  } | null;
230
230
  loadingPlan: boolean;
231
231
  };
232
- usageLeft: vue413.ComputedRef<{
232
+ usageLeft: vue0.ComputedRef<{
233
233
  workflowsLeft: number;
234
234
  executionsLeft: number;
235
235
  }>;
236
- trialDaysLeft: vue413.ComputedRef<number>;
237
- trialTimeLeft: vue413.ComputedRef<{
236
+ trialDaysLeft: vue0.ComputedRef<number>;
237
+ trialTimeLeft: vue0.ComputedRef<{
238
238
  count: number;
239
239
  unit: "days" | "hours" | "minutes";
240
240
  }>;
241
- userIsTrialing: vue413.ComputedRef<boolean>;
242
- currentPlanData: vue413.ComputedRef<{
241
+ userIsTrialing: vue0.ComputedRef<boolean>;
242
+ currentPlanData: vue0.ComputedRef<{
243
243
  planId: number;
244
244
  monthlyExecutionsLimit: number;
245
245
  activeWorkflowsLimit: number;
@@ -276,15 +276,15 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
276
276
  } | undefined;
277
277
  licenseFeatures?: Record<string, number> | undefined;
278
278
  } | null>;
279
- currentUsageData: vue413.ComputedRef<{
279
+ currentUsageData: vue0.ComputedRef<{
280
280
  timeframe?: string | undefined;
281
281
  executions: number;
282
282
  activeWorkflows: number;
283
283
  } | null>;
284
- trialExpired: vue413.ComputedRef<boolean | undefined>;
285
- allExecutionsUsed: vue413.ComputedRef<boolean>;
286
- hasCloudPlan: vue413.ComputedRef<boolean>;
287
- currentUserCloudInfo: vue413.Ref<{
284
+ trialExpired: vue0.ComputedRef<boolean | undefined>;
285
+ allExecutionsUsed: vue0.ComputedRef<boolean>;
286
+ hasCloudPlan: vue0.ComputedRef<boolean>;
287
+ currentUserCloudInfo: vue0.Ref<{
288
288
  confirmed: boolean;
289
289
  username: string;
290
290
  email: string;
@@ -317,10 +317,10 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
317
317
  getAutoLoginCode: () => Promise<{
318
318
  code: string;
319
319
  }>;
320
- selectedApps: vue413.ComputedRef<string[] | undefined>;
321
- codingSkill: vue413.ComputedRef<number>;
322
- shouldShowBanner: vue413.ComputedRef<boolean>;
323
- bannerConfig: vue413.ComputedRef<{
320
+ selectedApps: vue0.ComputedRef<string[] | undefined>;
321
+ codingSkill: vue0.ComputedRef<number>;
322
+ shouldShowBanner: vue0.ComputedRef<boolean>;
323
+ bannerConfig: vue0.ComputedRef<{
324
324
  timeLeft?: {
325
325
  text?: string | undefined;
326
326
  } | undefined;
@@ -337,14 +337,14 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
337
337
  dismissible?: boolean | undefined;
338
338
  forceShow?: boolean | undefined;
339
339
  } | undefined>;
340
- bannerForceShow: vue413.ComputedRef<boolean>;
341
- isBannerDismissed: vue413.ComputedRef<boolean>;
342
- bannerTimeLeft: vue413.ComputedRef<{
340
+ bannerForceShow: vue0.ComputedRef<boolean>;
341
+ isBannerDismissed: vue0.ComputedRef<boolean>;
342
+ bannerTimeLeft: vue0.ComputedRef<{
343
343
  show: boolean;
344
344
  text: string | undefined;
345
345
  }>;
346
- showExecutions: vue413.ComputedRef<boolean>;
347
- bannerCta: vue413.ComputedRef<{
346
+ showExecutions: vue0.ComputedRef<boolean>;
347
+ bannerCta: vue0.ComputedRef<{
348
348
  text: string;
349
349
  icon: string;
350
350
  size: "small" | "medium";
@@ -352,8 +352,8 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
352
352
  variant: "success" | "solid" | "subtle" | "ghost" | "outline" | "destructive" | undefined;
353
353
  href: string | undefined;
354
354
  }>;
355
- bannerIcon: vue413.ComputedRef<string | undefined>;
356
- bannerDismissible: vue413.ComputedRef<boolean>;
355
+ bannerIcon: vue0.ComputedRef<string | undefined>;
356
+ bannerDismissible: vue0.ComputedRef<boolean>;
357
357
  setIsInstanceOwner: (getter: () => boolean) => void;
358
358
  }, "userIsTrialing" | "bannerConfig" | "selectedApps" | "showExecutions" | "usageLeft" | "trialDaysLeft" | "trialTimeLeft" | "currentPlanData" | "currentUsageData" | "trialExpired" | "allExecutionsUsed" | "hasCloudPlan" | "codingSkill" | "shouldShowBanner" | "bannerForceShow" | "isBannerDismissed" | "bannerTimeLeft" | "bannerCta" | "bannerIcon" | "bannerDismissible">, Pick<{
359
359
  state: {
@@ -402,17 +402,17 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
402
402
  } | null;
403
403
  loadingPlan: boolean;
404
404
  };
405
- usageLeft: vue413.ComputedRef<{
405
+ usageLeft: vue0.ComputedRef<{
406
406
  workflowsLeft: number;
407
407
  executionsLeft: number;
408
408
  }>;
409
- trialDaysLeft: vue413.ComputedRef<number>;
410
- trialTimeLeft: vue413.ComputedRef<{
409
+ trialDaysLeft: vue0.ComputedRef<number>;
410
+ trialTimeLeft: vue0.ComputedRef<{
411
411
  count: number;
412
412
  unit: "days" | "hours" | "minutes";
413
413
  }>;
414
- userIsTrialing: vue413.ComputedRef<boolean>;
415
- currentPlanData: vue413.ComputedRef<{
414
+ userIsTrialing: vue0.ComputedRef<boolean>;
415
+ currentPlanData: vue0.ComputedRef<{
416
416
  planId: number;
417
417
  monthlyExecutionsLimit: number;
418
418
  activeWorkflowsLimit: number;
@@ -449,15 +449,15 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
449
449
  } | undefined;
450
450
  licenseFeatures?: Record<string, number> | undefined;
451
451
  } | null>;
452
- currentUsageData: vue413.ComputedRef<{
452
+ currentUsageData: vue0.ComputedRef<{
453
453
  timeframe?: string | undefined;
454
454
  executions: number;
455
455
  activeWorkflows: number;
456
456
  } | null>;
457
- trialExpired: vue413.ComputedRef<boolean | undefined>;
458
- allExecutionsUsed: vue413.ComputedRef<boolean>;
459
- hasCloudPlan: vue413.ComputedRef<boolean>;
460
- currentUserCloudInfo: vue413.Ref<{
457
+ trialExpired: vue0.ComputedRef<boolean | undefined>;
458
+ allExecutionsUsed: vue0.ComputedRef<boolean>;
459
+ hasCloudPlan: vue0.ComputedRef<boolean>;
460
+ currentUserCloudInfo: vue0.Ref<{
461
461
  confirmed: boolean;
462
462
  username: string;
463
463
  email: string;
@@ -490,10 +490,10 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
490
490
  getAutoLoginCode: () => Promise<{
491
491
  code: string;
492
492
  }>;
493
- selectedApps: vue413.ComputedRef<string[] | undefined>;
494
- codingSkill: vue413.ComputedRef<number>;
495
- shouldShowBanner: vue413.ComputedRef<boolean>;
496
- bannerConfig: vue413.ComputedRef<{
493
+ selectedApps: vue0.ComputedRef<string[] | undefined>;
494
+ codingSkill: vue0.ComputedRef<number>;
495
+ shouldShowBanner: vue0.ComputedRef<boolean>;
496
+ bannerConfig: vue0.ComputedRef<{
497
497
  timeLeft?: {
498
498
  text?: string | undefined;
499
499
  } | undefined;
@@ -510,14 +510,14 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
510
510
  dismissible?: boolean | undefined;
511
511
  forceShow?: boolean | undefined;
512
512
  } | undefined>;
513
- bannerForceShow: vue413.ComputedRef<boolean>;
514
- isBannerDismissed: vue413.ComputedRef<boolean>;
515
- bannerTimeLeft: vue413.ComputedRef<{
513
+ bannerForceShow: vue0.ComputedRef<boolean>;
514
+ isBannerDismissed: vue0.ComputedRef<boolean>;
515
+ bannerTimeLeft: vue0.ComputedRef<{
516
516
  show: boolean;
517
517
  text: string | undefined;
518
518
  }>;
519
- showExecutions: vue413.ComputedRef<boolean>;
520
- bannerCta: vue413.ComputedRef<{
519
+ showExecutions: vue0.ComputedRef<boolean>;
520
+ bannerCta: vue0.ComputedRef<{
521
521
  text: string;
522
522
  icon: string;
523
523
  size: "small" | "medium";
@@ -525,8 +525,8 @@ declare const useCloudPlanStore: pinia6.StoreDefinition<"cloudPlan", Pick<{
525
525
  variant: "success" | "solid" | "subtle" | "ghost" | "outline" | "destructive" | undefined;
526
526
  href: string | undefined;
527
527
  }>;
528
- bannerIcon: vue413.ComputedRef<string | undefined>;
529
- bannerDismissible: vue413.ComputedRef<boolean>;
528
+ bannerIcon: vue0.ComputedRef<string | undefined>;
529
+ bannerDismissible: vue0.ComputedRef<boolean>;
530
530
  setIsInstanceOwner: (getter: () => boolean) => void;
531
531
  }, "reset" | "initialize" | "generateCloudDashboardAutoLoginLink" | "getOwnerCurrentPlan" | "getInstanceCurrentUsage" | "checkForCloudPlanData" | "fetchUserCloudAccount" | "getAutoLoginCode" | "setIsInstanceOwner">>;
532
532
  //#endregion
@@ -27,23 +27,42 @@ function useBasePageRedirectionHelper({ guard }) {
27
27
  const versionsStore = require_versions_store.useVersionsStore();
28
28
  const telemetry = (0, __n8n_composables_useTelemetry.useTelemetry)();
29
29
  const settingsStore = require_settings_store.useSettingsStore();
30
+ const canAutoLoginToCloudDashboard = () => usersStore.isInstanceOwner && settingsStore.isCloudDeployment;
31
+ /**
32
+ * `open` reserves the tab in the click so later navigation is not treated as a popup.
33
+ */
34
+ const goToCloudDashboard = async ({ redirectionPath, mode = "redirect" }) => {
35
+ if (!canAutoLoginToCloudDashboard()) return false;
36
+ if (mode === "redirect") {
37
+ location.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath });
38
+ return true;
39
+ }
40
+ const tab = window.open("", "_blank");
41
+ if (tab) tab.opener = null;
42
+ try {
43
+ const link = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath });
44
+ if (tab) tab.location.href = link;
45
+ else location.href = link;
46
+ } catch (error) {
47
+ tab?.close();
48
+ throw error;
49
+ }
50
+ return true;
51
+ };
30
52
  /**
31
53
  * If the user is an instance owner in the cloud, it generates an auto-login link to the
32
54
  * cloud dashboard that redirects the user to the /manage page where they can upgrade to a new n8n version.
33
55
  * Otherwise, it redirect them to our docs.
34
56
  */
35
57
  const goToVersions = async () => {
36
- if (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {
37
- location.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/manage" });
58
+ if (!canAutoLoginToCloudDashboard()) {
59
+ window.open(versionsStore.infoUrl, "_blank", "noopener");
38
60
  return;
39
61
  }
40
- window.open(versionsStore.infoUrl, "_blank", "noopener");
62
+ await goToCloudDashboard({ redirectionPath: "/manage" });
41
63
  };
42
64
  const goToDashboard = async () => {
43
- if (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {
44
- const dashboardLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/dashboard" });
45
- location.href = dashboardLink;
46
- }
65
+ await goToCloudDashboard({ redirectionPath: "/dashboard" });
47
66
  };
48
67
  /**
49
68
  * If the user is an instance owner in the cloud, it generates an auto-login link to the
@@ -69,13 +88,14 @@ function useBasePageRedirectionHelper({ guard }) {
69
88
  };
70
89
  const generateUpgradeLink = async (source, utm_campaign) => {
71
90
  let upgradeLink = __n8n_frontend_constants_urls.N8N_PRICING_PAGE_URL;
72
- if (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) upgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/account/change-plan" });
91
+ if (canAutoLoginToCloudDashboard()) upgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/account/change-plan" });
73
92
  const url = new URL(upgradeLink);
74
93
  if (utm_campaign) url.searchParams.set("utm_campaign", utm_campaign);
75
94
  if (source) url.searchParams.set("source", source);
76
95
  return url.toString();
77
96
  };
78
97
  return {
98
+ goToCloudDashboard,
79
99
  goToDashboard,
80
100
  goToVersions,
81
101
  goToUpgrade
@@ -1 +1 @@
1
- {"version":3,"file":"useBasePageRedirectionHelper.cjs","names":["useUsersStore","useCloudPlanStore","useVersionsStore","useSettingsStore","N8N_PRICING_PAGE_URL"],"sources":["../../src/composables/useBasePageRedirectionHelper.ts"],"sourcesContent":["import { useTelemetry } from '@n8n/composables/useTelemetry';\nimport { N8N_PRICING_PAGE_URL } from '@n8n/frontend-constants/urls';\n\nimport { useCloudPlanStore } from '../cloudPlan.store';\nimport { useSettingsStore } from '../settings.store';\nimport type { CloudUpdateLinkSourceType, UTMCampaign } from '../types/pageRedirection';\nimport { useUsersStore } from '../users.store';\nimport { useVersionsStore } from '../versions.store';\n\n/**\n * Guard consulted before an upgrade redirect. Resolves `true` to proceed, `false`\n * to abort. Required and injected by the caller, so this composable carries no\n * feature dependency of its own (e.g. the AI builder streaming confirmation).\n */\nexport type UpgradeRedirectGuard = () => Promise<boolean>;\n\n/**\n * Injectable page-redirection composable. The app-facing `usePageRedirectionHelper`\n * wraps this and supplies the guard, which keeps this base free of any feature\n * dependency.\n *\n * It lives in `@n8n/stores` rather than `@n8n/composables` because its body is\n * store orchestration end to end — all four stores it reads are in this package,\n * and `@n8n/composables` sits *below* the stores tier (see that package's\n * `packageBoundary.test.ts`), so it cannot reach them.\n */\nexport function useBasePageRedirectionHelper({ guard }: { guard: UpgradeRedirectGuard }) {\n\tconst usersStore = useUsersStore();\n\tconst cloudPlanStore = useCloudPlanStore();\n\tconst versionsStore = useVersionsStore();\n\tconst telemetry = useTelemetry();\n\tconst settingsStore = useSettingsStore();\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /manage page where they can upgrade to a new n8n version.\n\t * Otherwise, it redirect them to our docs.\n\t */\n\tconst goToVersions = async () => {\n\t\tif (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {\n\t\t\tlocation.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/manage',\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\twindow.open(versionsStore.infoUrl, '_blank', 'noopener');\n\t};\n\n\tconst goToDashboard = async () => {\n\t\tif (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {\n\t\t\tconst dashboardLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/dashboard',\n\t\t\t});\n\n\t\t\tlocation.href = dashboardLink;\n\t\t}\n\n\t\treturn;\n\t};\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /account/change-plan page where they upgrade/downgrade the current plan.\n\t * Otherwise, it redirect them our website.\n\t */\n\n\tconst goToUpgrade = async (\n\t\tsource: CloudUpdateLinkSourceType,\n\t\tutm_campaign: UTMCampaign,\n\t\tmode: 'open' | 'redirect' = 'open',\n\t) => {\n\t\tconst shouldProceed = await guard();\n\t\tif (!shouldProceed) return;\n\n\t\tconst { usageLeft, trialDaysLeft, userIsTrialing } = cloudPlanStore;\n\t\tconst { executionsLeft, workflowsLeft } = usageLeft;\n\t\tconst deploymentType = settingsStore.deploymentType;\n\n\t\ttelemetry.track('User clicked upgrade CTA', {\n\t\t\tsource,\n\t\t\tisTrial: userIsTrialing,\n\t\t\tdeploymentType,\n\t\t\ttrialDaysLeft,\n\t\t\texecutionsLeft,\n\t\t\tworkflowsLeft,\n\t\t});\n\n\t\tconst upgradeLink = await generateUpgradeLink(source, utm_campaign);\n\n\t\tif (mode === 'open') {\n\t\t\twindow.open(upgradeLink, '_blank');\n\t\t} else {\n\t\t\tlocation.href = upgradeLink;\n\t\t}\n\t};\n\n\tconst generateUpgradeLink = async (source: string, utm_campaign: string) => {\n\t\tlet upgradeLink = N8N_PRICING_PAGE_URL;\n\n\t\tif (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {\n\t\t\tupgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/account/change-plan',\n\t\t\t});\n\t\t}\n\n\t\tconst url = new URL(upgradeLink);\n\n\t\tif (utm_campaign) {\n\t\t\turl.searchParams.set('utm_campaign', utm_campaign);\n\t\t}\n\n\t\tif (source) {\n\t\t\turl.searchParams.set('source', source);\n\t\t}\n\n\t\treturn url.toString();\n\t};\n\n\treturn {\n\t\tgoToDashboard,\n\t\tgoToVersions,\n\t\tgoToUpgrade,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,6BAA6B,EAAE,SAA0C;CACxF,MAAM,aAAaA,mCAAe;CAClC,MAAM,iBAAiBC,2CAAmB;CAC1C,MAAM,gBAAgBC,yCAAkB;CACxC,MAAM,8DAA0B;CAChC,MAAM,gBAAgBC,yCAAkB;;;;;;CAOxC,MAAM,eAAe,YAAY;AAChC,MAAI,WAAW,mBAAmB,cAAc,mBAAmB;AAClE,YAAS,OAAO,MAAM,eAAe,oCAAoC,EACxE,iBAAiB,WACjB,CAAC;AACF;;AAGD,SAAO,KAAK,cAAc,SAAS,UAAU,WAAW;;CAGzD,MAAM,gBAAgB,YAAY;AACjC,MAAI,WAAW,mBAAmB,cAAc,mBAAmB;GAClE,MAAM,gBAAgB,MAAM,eAAe,oCAAoC,EAC9E,iBAAiB,cACjB,CAAC;AAEF,YAAS,OAAO;;;;;;;;CAYlB,MAAM,cAAc,OACnB,QACA,cACA,OAA4B,WACxB;AAEJ,MAAI,CADkB,MAAM,OAAO,CACf;EAEpB,MAAM,EAAE,WAAW,eAAe,mBAAmB;EACrD,MAAM,EAAE,gBAAgB,kBAAkB;EAC1C,MAAM,iBAAiB,cAAc;AAErC,YAAU,MAAM,4BAA4B;GAC3C;GACA,SAAS;GACT;GACA;GACA;GACA;GACA,CAAC;EAEF,MAAM,cAAc,MAAM,oBAAoB,QAAQ,aAAa;AAEnE,MAAI,SAAS,OACZ,QAAO,KAAK,aAAa,SAAS;MAElC,UAAS,OAAO;;CAIlB,MAAM,sBAAsB,OAAO,QAAgB,iBAAyB;EAC3E,IAAI,cAAcC;AAElB,MAAI,WAAW,mBAAmB,cAAc,kBAC/C,eAAc,MAAM,eAAe,oCAAoC,EACtE,iBAAiB,wBACjB,CAAC;EAGH,MAAM,MAAM,IAAI,IAAI,YAAY;AAEhC,MAAI,aACH,KAAI,aAAa,IAAI,gBAAgB,aAAa;AAGnD,MAAI,OACH,KAAI,aAAa,IAAI,UAAU,OAAO;AAGvC,SAAO,IAAI,UAAU;;AAGtB,QAAO;EACN;EACA;EACA;EACA"}
1
+ {"version":3,"file":"useBasePageRedirectionHelper.cjs","names":["useUsersStore","useCloudPlanStore","useVersionsStore","useSettingsStore","N8N_PRICING_PAGE_URL"],"sources":["../../src/composables/useBasePageRedirectionHelper.ts"],"sourcesContent":["import { useTelemetry } from '@n8n/composables/useTelemetry';\nimport { N8N_PRICING_PAGE_URL } from '@n8n/frontend-constants/urls';\n\nimport { useCloudPlanStore } from '../cloudPlan.store';\nimport { useSettingsStore } from '../settings.store';\nimport type { CloudUpdateLinkSourceType, UTMCampaign } from '../types/pageRedirection';\nimport { useUsersStore } from '../users.store';\nimport { useVersionsStore } from '../versions.store';\n\n/**\n * Guard consulted before an upgrade redirect. Resolves `true` to proceed, `false`\n * to abort. Required and injected by the caller, so this composable carries no\n * feature dependency of its own (e.g. the AI builder streaming confirmation).\n */\nexport type UpgradeRedirectGuard = () => Promise<boolean>;\n\n/**\n * Injectable page-redirection composable. The app-facing `usePageRedirectionHelper`\n * wraps this and supplies the guard, which keeps this base free of any feature\n * dependency.\n *\n * It lives in `@n8n/stores` rather than `@n8n/composables` because its body is\n * store orchestration end to end — all four stores it reads are in this package,\n * and `@n8n/composables` sits *below* the stores tier (see that package's\n * `packageBoundary.test.ts`), so it cannot reach them.\n */\nexport function useBasePageRedirectionHelper({ guard }: { guard: UpgradeRedirectGuard }) {\n\tconst usersStore = useUsersStore();\n\tconst cloudPlanStore = useCloudPlanStore();\n\tconst versionsStore = useVersionsStore();\n\tconst telemetry = useTelemetry();\n\tconst settingsStore = useSettingsStore();\n\n\tconst canAutoLoginToCloudDashboard = () =>\n\t\tusersStore.isInstanceOwner && settingsStore.isCloudDeployment;\n\n\t/**\n\t * `open` reserves the tab in the click so later navigation is not treated as a popup.\n\t */\n\tconst goToCloudDashboard = async ({\n\t\tredirectionPath,\n\t\tmode = 'redirect',\n\t}: {\n\t\tredirectionPath: string;\n\t\tmode?: 'open' | 'redirect';\n\t}): Promise<boolean> => {\n\t\tif (!canAutoLoginToCloudDashboard()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (mode === 'redirect') {\n\t\t\tlocation.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath,\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\n\t\tconst tab = window.open('', '_blank');\n\t\tif (tab) tab.opener = null;\n\t\ttry {\n\t\t\tconst link = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath,\n\t\t\t});\n\t\t\tif (tab) {\n\t\t\t\ttab.location.href = link;\n\t\t\t} else {\n\t\t\t\tlocation.href = link;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\ttab?.close();\n\t\t\tthrow error;\n\t\t}\n\t\treturn true;\n\t};\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /manage page where they can upgrade to a new n8n version.\n\t * Otherwise, it redirect them to our docs.\n\t */\n\tconst goToVersions = async () => {\n\t\tif (!canAutoLoginToCloudDashboard()) {\n\t\t\twindow.open(versionsStore.infoUrl, '_blank', 'noopener');\n\t\t\treturn;\n\t\t}\n\n\t\tawait goToCloudDashboard({ redirectionPath: '/manage' });\n\t};\n\n\tconst goToDashboard = async () => {\n\t\tawait goToCloudDashboard({ redirectionPath: '/dashboard' });\n\t};\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /account/change-plan page where they upgrade/downgrade the current plan.\n\t * Otherwise, it redirect them our website.\n\t */\n\n\tconst goToUpgrade = async (\n\t\tsource: CloudUpdateLinkSourceType,\n\t\tutm_campaign: UTMCampaign,\n\t\tmode: 'open' | 'redirect' = 'open',\n\t) => {\n\t\tconst shouldProceed = await guard();\n\t\tif (!shouldProceed) return;\n\n\t\tconst { usageLeft, trialDaysLeft, userIsTrialing } = cloudPlanStore;\n\t\tconst { executionsLeft, workflowsLeft } = usageLeft;\n\t\tconst deploymentType = settingsStore.deploymentType;\n\n\t\ttelemetry.track('User clicked upgrade CTA', {\n\t\t\tsource,\n\t\t\tisTrial: userIsTrialing,\n\t\t\tdeploymentType,\n\t\t\ttrialDaysLeft,\n\t\t\texecutionsLeft,\n\t\t\tworkflowsLeft,\n\t\t});\n\n\t\tconst upgradeLink = await generateUpgradeLink(source, utm_campaign);\n\n\t\tif (mode === 'open') {\n\t\t\twindow.open(upgradeLink, '_blank');\n\t\t} else {\n\t\t\tlocation.href = upgradeLink;\n\t\t}\n\t};\n\n\tconst generateUpgradeLink = async (source: string, utm_campaign: string) => {\n\t\tlet upgradeLink = N8N_PRICING_PAGE_URL;\n\n\t\tif (canAutoLoginToCloudDashboard()) {\n\t\t\tupgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/account/change-plan',\n\t\t\t});\n\t\t}\n\n\t\tconst url = new URL(upgradeLink);\n\n\t\tif (utm_campaign) {\n\t\t\turl.searchParams.set('utm_campaign', utm_campaign);\n\t\t}\n\n\t\tif (source) {\n\t\t\turl.searchParams.set('source', source);\n\t\t}\n\n\t\treturn url.toString();\n\t};\n\n\treturn {\n\t\tgoToCloudDashboard,\n\t\tgoToDashboard,\n\t\tgoToVersions,\n\t\tgoToUpgrade,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,6BAA6B,EAAE,SAA0C;CACxF,MAAM,aAAaA,mCAAe;CAClC,MAAM,iBAAiBC,2CAAmB;CAC1C,MAAM,gBAAgBC,yCAAkB;CACxC,MAAM,8DAA0B;CAChC,MAAM,gBAAgBC,yCAAkB;CAExC,MAAM,qCACL,WAAW,mBAAmB,cAAc;;;;CAK7C,MAAM,qBAAqB,OAAO,EACjC,iBACA,OAAO,iBAIgB;AACvB,MAAI,CAAC,8BAA8B,CAClC,QAAO;AAGR,MAAI,SAAS,YAAY;AACxB,YAAS,OAAO,MAAM,eAAe,oCAAoC,EACxE,iBACA,CAAC;AACF,UAAO;;EAGR,MAAM,MAAM,OAAO,KAAK,IAAI,SAAS;AACrC,MAAI,IAAK,KAAI,SAAS;AACtB,MAAI;GACH,MAAM,OAAO,MAAM,eAAe,oCAAoC,EACrE,iBACA,CAAC;AACF,OAAI,IACH,KAAI,SAAS,OAAO;OAEpB,UAAS,OAAO;WAET,OAAO;AACf,QAAK,OAAO;AACZ,SAAM;;AAEP,SAAO;;;;;;;CAQR,MAAM,eAAe,YAAY;AAChC,MAAI,CAAC,8BAA8B,EAAE;AACpC,UAAO,KAAK,cAAc,SAAS,UAAU,WAAW;AACxD;;AAGD,QAAM,mBAAmB,EAAE,iBAAiB,WAAW,CAAC;;CAGzD,MAAM,gBAAgB,YAAY;AACjC,QAAM,mBAAmB,EAAE,iBAAiB,cAAc,CAAC;;;;;;;CAS5D,MAAM,cAAc,OACnB,QACA,cACA,OAA4B,WACxB;AAEJ,MAAI,CADkB,MAAM,OAAO,CACf;EAEpB,MAAM,EAAE,WAAW,eAAe,mBAAmB;EACrD,MAAM,EAAE,gBAAgB,kBAAkB;EAC1C,MAAM,iBAAiB,cAAc;AAErC,YAAU,MAAM,4BAA4B;GAC3C;GACA,SAAS;GACT;GACA;GACA;GACA;GACA,CAAC;EAEF,MAAM,cAAc,MAAM,oBAAoB,QAAQ,aAAa;AAEnE,MAAI,SAAS,OACZ,QAAO,KAAK,aAAa,SAAS;MAElC,UAAS,OAAO;;CAIlB,MAAM,sBAAsB,OAAO,QAAgB,iBAAyB;EAC3E,IAAI,cAAcC;AAElB,MAAI,8BAA8B,CACjC,eAAc,MAAM,eAAe,oCAAoC,EACtE,iBAAiB,wBACjB,CAAC;EAGH,MAAM,MAAM,IAAI,IAAI,YAAY;AAEhC,MAAI,aACH,KAAI,aAAa,IAAI,gBAAgB,aAAa;AAGnD,MAAI,OACH,KAAI,aAAa,IAAI,UAAU,OAAO;AAGvC,SAAO,IAAI,UAAU;;AAGtB,QAAO;EACN;EACA;EACA;EACA;EACA"}
@@ -7,6 +7,13 @@ declare function useBasePageRedirectionHelper({
7
7
  }: {
8
8
  guard: UpgradeRedirectGuard;
9
9
  }): {
10
+ goToCloudDashboard: ({
11
+ redirectionPath,
12
+ mode
13
+ }: {
14
+ redirectionPath: string;
15
+ mode?: "open" | "redirect";
16
+ }) => Promise<boolean>;
10
17
  goToDashboard: () => Promise<void>;
11
18
  goToVersions: () => Promise<void>;
12
19
  goToUpgrade: (source: CloudUpdateLinkSourceType, utm_campaign: UTMCampaign, mode?: "open" | "redirect") => Promise<void>;
@@ -7,6 +7,13 @@ declare function useBasePageRedirectionHelper({
7
7
  }: {
8
8
  guard: UpgradeRedirectGuard;
9
9
  }): {
10
+ goToCloudDashboard: ({
11
+ redirectionPath,
12
+ mode
13
+ }: {
14
+ redirectionPath: string;
15
+ mode?: "open" | "redirect";
16
+ }) => Promise<boolean>;
10
17
  goToDashboard: () => Promise<void>;
11
18
  goToVersions: () => Promise<void>;
12
19
  goToUpgrade: (source: CloudUpdateLinkSourceType, utm_campaign: UTMCampaign, mode?: "open" | "redirect") => Promise<void>;
@@ -27,23 +27,42 @@ function useBasePageRedirectionHelper({ guard }) {
27
27
  const versionsStore = useVersionsStore();
28
28
  const telemetry = useTelemetry();
29
29
  const settingsStore = useSettingsStore();
30
+ const canAutoLoginToCloudDashboard = () => usersStore.isInstanceOwner && settingsStore.isCloudDeployment;
31
+ /**
32
+ * `open` reserves the tab in the click so later navigation is not treated as a popup.
33
+ */
34
+ const goToCloudDashboard = async ({ redirectionPath, mode = "redirect" }) => {
35
+ if (!canAutoLoginToCloudDashboard()) return false;
36
+ if (mode === "redirect") {
37
+ location.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath });
38
+ return true;
39
+ }
40
+ const tab = window.open("", "_blank");
41
+ if (tab) tab.opener = null;
42
+ try {
43
+ const link = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath });
44
+ if (tab) tab.location.href = link;
45
+ else location.href = link;
46
+ } catch (error) {
47
+ tab?.close();
48
+ throw error;
49
+ }
50
+ return true;
51
+ };
30
52
  /**
31
53
  * If the user is an instance owner in the cloud, it generates an auto-login link to the
32
54
  * cloud dashboard that redirects the user to the /manage page where they can upgrade to a new n8n version.
33
55
  * Otherwise, it redirect them to our docs.
34
56
  */
35
57
  const goToVersions = async () => {
36
- if (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {
37
- location.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/manage" });
58
+ if (!canAutoLoginToCloudDashboard()) {
59
+ window.open(versionsStore.infoUrl, "_blank", "noopener");
38
60
  return;
39
61
  }
40
- window.open(versionsStore.infoUrl, "_blank", "noopener");
62
+ await goToCloudDashboard({ redirectionPath: "/manage" });
41
63
  };
42
64
  const goToDashboard = async () => {
43
- if (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {
44
- const dashboardLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/dashboard" });
45
- location.href = dashboardLink;
46
- }
65
+ await goToCloudDashboard({ redirectionPath: "/dashboard" });
47
66
  };
48
67
  /**
49
68
  * If the user is an instance owner in the cloud, it generates an auto-login link to the
@@ -69,13 +88,14 @@ function useBasePageRedirectionHelper({ guard }) {
69
88
  };
70
89
  const generateUpgradeLink = async (source, utm_campaign) => {
71
90
  let upgradeLink = N8N_PRICING_PAGE_URL;
72
- if (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) upgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/account/change-plan" });
91
+ if (canAutoLoginToCloudDashboard()) upgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({ redirectionPath: "/account/change-plan" });
73
92
  const url = new URL(upgradeLink);
74
93
  if (utm_campaign) url.searchParams.set("utm_campaign", utm_campaign);
75
94
  if (source) url.searchParams.set("source", source);
76
95
  return url.toString();
77
96
  };
78
97
  return {
98
+ goToCloudDashboard,
79
99
  goToDashboard,
80
100
  goToVersions,
81
101
  goToUpgrade
@@ -1 +1 @@
1
- {"version":3,"file":"useBasePageRedirectionHelper.mjs","names":[],"sources":["../../src/composables/useBasePageRedirectionHelper.ts"],"sourcesContent":["import { useTelemetry } from '@n8n/composables/useTelemetry';\nimport { N8N_PRICING_PAGE_URL } from '@n8n/frontend-constants/urls';\n\nimport { useCloudPlanStore } from '../cloudPlan.store';\nimport { useSettingsStore } from '../settings.store';\nimport type { CloudUpdateLinkSourceType, UTMCampaign } from '../types/pageRedirection';\nimport { useUsersStore } from '../users.store';\nimport { useVersionsStore } from '../versions.store';\n\n/**\n * Guard consulted before an upgrade redirect. Resolves `true` to proceed, `false`\n * to abort. Required and injected by the caller, so this composable carries no\n * feature dependency of its own (e.g. the AI builder streaming confirmation).\n */\nexport type UpgradeRedirectGuard = () => Promise<boolean>;\n\n/**\n * Injectable page-redirection composable. The app-facing `usePageRedirectionHelper`\n * wraps this and supplies the guard, which keeps this base free of any feature\n * dependency.\n *\n * It lives in `@n8n/stores` rather than `@n8n/composables` because its body is\n * store orchestration end to end — all four stores it reads are in this package,\n * and `@n8n/composables` sits *below* the stores tier (see that package's\n * `packageBoundary.test.ts`), so it cannot reach them.\n */\nexport function useBasePageRedirectionHelper({ guard }: { guard: UpgradeRedirectGuard }) {\n\tconst usersStore = useUsersStore();\n\tconst cloudPlanStore = useCloudPlanStore();\n\tconst versionsStore = useVersionsStore();\n\tconst telemetry = useTelemetry();\n\tconst settingsStore = useSettingsStore();\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /manage page where they can upgrade to a new n8n version.\n\t * Otherwise, it redirect them to our docs.\n\t */\n\tconst goToVersions = async () => {\n\t\tif (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {\n\t\t\tlocation.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/manage',\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\twindow.open(versionsStore.infoUrl, '_blank', 'noopener');\n\t};\n\n\tconst goToDashboard = async () => {\n\t\tif (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {\n\t\t\tconst dashboardLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/dashboard',\n\t\t\t});\n\n\t\t\tlocation.href = dashboardLink;\n\t\t}\n\n\t\treturn;\n\t};\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /account/change-plan page where they upgrade/downgrade the current plan.\n\t * Otherwise, it redirect them our website.\n\t */\n\n\tconst goToUpgrade = async (\n\t\tsource: CloudUpdateLinkSourceType,\n\t\tutm_campaign: UTMCampaign,\n\t\tmode: 'open' | 'redirect' = 'open',\n\t) => {\n\t\tconst shouldProceed = await guard();\n\t\tif (!shouldProceed) return;\n\n\t\tconst { usageLeft, trialDaysLeft, userIsTrialing } = cloudPlanStore;\n\t\tconst { executionsLeft, workflowsLeft } = usageLeft;\n\t\tconst deploymentType = settingsStore.deploymentType;\n\n\t\ttelemetry.track('User clicked upgrade CTA', {\n\t\t\tsource,\n\t\t\tisTrial: userIsTrialing,\n\t\t\tdeploymentType,\n\t\t\ttrialDaysLeft,\n\t\t\texecutionsLeft,\n\t\t\tworkflowsLeft,\n\t\t});\n\n\t\tconst upgradeLink = await generateUpgradeLink(source, utm_campaign);\n\n\t\tif (mode === 'open') {\n\t\t\twindow.open(upgradeLink, '_blank');\n\t\t} else {\n\t\t\tlocation.href = upgradeLink;\n\t\t}\n\t};\n\n\tconst generateUpgradeLink = async (source: string, utm_campaign: string) => {\n\t\tlet upgradeLink = N8N_PRICING_PAGE_URL;\n\n\t\tif (usersStore.isInstanceOwner && settingsStore.isCloudDeployment) {\n\t\t\tupgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/account/change-plan',\n\t\t\t});\n\t\t}\n\n\t\tconst url = new URL(upgradeLink);\n\n\t\tif (utm_campaign) {\n\t\t\turl.searchParams.set('utm_campaign', utm_campaign);\n\t\t}\n\n\t\tif (source) {\n\t\t\turl.searchParams.set('source', source);\n\t\t}\n\n\t\treturn url.toString();\n\t};\n\n\treturn {\n\t\tgoToDashboard,\n\t\tgoToVersions,\n\t\tgoToUpgrade,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,6BAA6B,EAAE,SAA0C;CACxF,MAAM,aAAa,eAAe;CAClC,MAAM,iBAAiB,mBAAmB;CAC1C,MAAM,gBAAgB,kBAAkB;CACxC,MAAM,YAAY,cAAc;CAChC,MAAM,gBAAgB,kBAAkB;;;;;;CAOxC,MAAM,eAAe,YAAY;AAChC,MAAI,WAAW,mBAAmB,cAAc,mBAAmB;AAClE,YAAS,OAAO,MAAM,eAAe,oCAAoC,EACxE,iBAAiB,WACjB,CAAC;AACF;;AAGD,SAAO,KAAK,cAAc,SAAS,UAAU,WAAW;;CAGzD,MAAM,gBAAgB,YAAY;AACjC,MAAI,WAAW,mBAAmB,cAAc,mBAAmB;GAClE,MAAM,gBAAgB,MAAM,eAAe,oCAAoC,EAC9E,iBAAiB,cACjB,CAAC;AAEF,YAAS,OAAO;;;;;;;;CAYlB,MAAM,cAAc,OACnB,QACA,cACA,OAA4B,WACxB;AAEJ,MAAI,CADkB,MAAM,OAAO,CACf;EAEpB,MAAM,EAAE,WAAW,eAAe,mBAAmB;EACrD,MAAM,EAAE,gBAAgB,kBAAkB;EAC1C,MAAM,iBAAiB,cAAc;AAErC,YAAU,MAAM,4BAA4B;GAC3C;GACA,SAAS;GACT;GACA;GACA;GACA;GACA,CAAC;EAEF,MAAM,cAAc,MAAM,oBAAoB,QAAQ,aAAa;AAEnE,MAAI,SAAS,OACZ,QAAO,KAAK,aAAa,SAAS;MAElC,UAAS,OAAO;;CAIlB,MAAM,sBAAsB,OAAO,QAAgB,iBAAyB;EAC3E,IAAI,cAAc;AAElB,MAAI,WAAW,mBAAmB,cAAc,kBAC/C,eAAc,MAAM,eAAe,oCAAoC,EACtE,iBAAiB,wBACjB,CAAC;EAGH,MAAM,MAAM,IAAI,IAAI,YAAY;AAEhC,MAAI,aACH,KAAI,aAAa,IAAI,gBAAgB,aAAa;AAGnD,MAAI,OACH,KAAI,aAAa,IAAI,UAAU,OAAO;AAGvC,SAAO,IAAI,UAAU;;AAGtB,QAAO;EACN;EACA;EACA;EACA"}
1
+ {"version":3,"file":"useBasePageRedirectionHelper.mjs","names":[],"sources":["../../src/composables/useBasePageRedirectionHelper.ts"],"sourcesContent":["import { useTelemetry } from '@n8n/composables/useTelemetry';\nimport { N8N_PRICING_PAGE_URL } from '@n8n/frontend-constants/urls';\n\nimport { useCloudPlanStore } from '../cloudPlan.store';\nimport { useSettingsStore } from '../settings.store';\nimport type { CloudUpdateLinkSourceType, UTMCampaign } from '../types/pageRedirection';\nimport { useUsersStore } from '../users.store';\nimport { useVersionsStore } from '../versions.store';\n\n/**\n * Guard consulted before an upgrade redirect. Resolves `true` to proceed, `false`\n * to abort. Required and injected by the caller, so this composable carries no\n * feature dependency of its own (e.g. the AI builder streaming confirmation).\n */\nexport type UpgradeRedirectGuard = () => Promise<boolean>;\n\n/**\n * Injectable page-redirection composable. The app-facing `usePageRedirectionHelper`\n * wraps this and supplies the guard, which keeps this base free of any feature\n * dependency.\n *\n * It lives in `@n8n/stores` rather than `@n8n/composables` because its body is\n * store orchestration end to end — all four stores it reads are in this package,\n * and `@n8n/composables` sits *below* the stores tier (see that package's\n * `packageBoundary.test.ts`), so it cannot reach them.\n */\nexport function useBasePageRedirectionHelper({ guard }: { guard: UpgradeRedirectGuard }) {\n\tconst usersStore = useUsersStore();\n\tconst cloudPlanStore = useCloudPlanStore();\n\tconst versionsStore = useVersionsStore();\n\tconst telemetry = useTelemetry();\n\tconst settingsStore = useSettingsStore();\n\n\tconst canAutoLoginToCloudDashboard = () =>\n\t\tusersStore.isInstanceOwner && settingsStore.isCloudDeployment;\n\n\t/**\n\t * `open` reserves the tab in the click so later navigation is not treated as a popup.\n\t */\n\tconst goToCloudDashboard = async ({\n\t\tredirectionPath,\n\t\tmode = 'redirect',\n\t}: {\n\t\tredirectionPath: string;\n\t\tmode?: 'open' | 'redirect';\n\t}): Promise<boolean> => {\n\t\tif (!canAutoLoginToCloudDashboard()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (mode === 'redirect') {\n\t\t\tlocation.href = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath,\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\n\t\tconst tab = window.open('', '_blank');\n\t\tif (tab) tab.opener = null;\n\t\ttry {\n\t\t\tconst link = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath,\n\t\t\t});\n\t\t\tif (tab) {\n\t\t\t\ttab.location.href = link;\n\t\t\t} else {\n\t\t\t\tlocation.href = link;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\ttab?.close();\n\t\t\tthrow error;\n\t\t}\n\t\treturn true;\n\t};\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /manage page where they can upgrade to a new n8n version.\n\t * Otherwise, it redirect them to our docs.\n\t */\n\tconst goToVersions = async () => {\n\t\tif (!canAutoLoginToCloudDashboard()) {\n\t\t\twindow.open(versionsStore.infoUrl, '_blank', 'noopener');\n\t\t\treturn;\n\t\t}\n\n\t\tawait goToCloudDashboard({ redirectionPath: '/manage' });\n\t};\n\n\tconst goToDashboard = async () => {\n\t\tawait goToCloudDashboard({ redirectionPath: '/dashboard' });\n\t};\n\n\t/**\n\t * If the user is an instance owner in the cloud, it generates an auto-login link to the\n\t * cloud dashboard that redirects the user to the /account/change-plan page where they upgrade/downgrade the current plan.\n\t * Otherwise, it redirect them our website.\n\t */\n\n\tconst goToUpgrade = async (\n\t\tsource: CloudUpdateLinkSourceType,\n\t\tutm_campaign: UTMCampaign,\n\t\tmode: 'open' | 'redirect' = 'open',\n\t) => {\n\t\tconst shouldProceed = await guard();\n\t\tif (!shouldProceed) return;\n\n\t\tconst { usageLeft, trialDaysLeft, userIsTrialing } = cloudPlanStore;\n\t\tconst { executionsLeft, workflowsLeft } = usageLeft;\n\t\tconst deploymentType = settingsStore.deploymentType;\n\n\t\ttelemetry.track('User clicked upgrade CTA', {\n\t\t\tsource,\n\t\t\tisTrial: userIsTrialing,\n\t\t\tdeploymentType,\n\t\t\ttrialDaysLeft,\n\t\t\texecutionsLeft,\n\t\t\tworkflowsLeft,\n\t\t});\n\n\t\tconst upgradeLink = await generateUpgradeLink(source, utm_campaign);\n\n\t\tif (mode === 'open') {\n\t\t\twindow.open(upgradeLink, '_blank');\n\t\t} else {\n\t\t\tlocation.href = upgradeLink;\n\t\t}\n\t};\n\n\tconst generateUpgradeLink = async (source: string, utm_campaign: string) => {\n\t\tlet upgradeLink = N8N_PRICING_PAGE_URL;\n\n\t\tif (canAutoLoginToCloudDashboard()) {\n\t\t\tupgradeLink = await cloudPlanStore.generateCloudDashboardAutoLoginLink({\n\t\t\t\tredirectionPath: '/account/change-plan',\n\t\t\t});\n\t\t}\n\n\t\tconst url = new URL(upgradeLink);\n\n\t\tif (utm_campaign) {\n\t\t\turl.searchParams.set('utm_campaign', utm_campaign);\n\t\t}\n\n\t\tif (source) {\n\t\t\turl.searchParams.set('source', source);\n\t\t}\n\n\t\treturn url.toString();\n\t};\n\n\treturn {\n\t\tgoToCloudDashboard,\n\t\tgoToDashboard,\n\t\tgoToVersions,\n\t\tgoToUpgrade,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,6BAA6B,EAAE,SAA0C;CACxF,MAAM,aAAa,eAAe;CAClC,MAAM,iBAAiB,mBAAmB;CAC1C,MAAM,gBAAgB,kBAAkB;CACxC,MAAM,YAAY,cAAc;CAChC,MAAM,gBAAgB,kBAAkB;CAExC,MAAM,qCACL,WAAW,mBAAmB,cAAc;;;;CAK7C,MAAM,qBAAqB,OAAO,EACjC,iBACA,OAAO,iBAIgB;AACvB,MAAI,CAAC,8BAA8B,CAClC,QAAO;AAGR,MAAI,SAAS,YAAY;AACxB,YAAS,OAAO,MAAM,eAAe,oCAAoC,EACxE,iBACA,CAAC;AACF,UAAO;;EAGR,MAAM,MAAM,OAAO,KAAK,IAAI,SAAS;AACrC,MAAI,IAAK,KAAI,SAAS;AACtB,MAAI;GACH,MAAM,OAAO,MAAM,eAAe,oCAAoC,EACrE,iBACA,CAAC;AACF,OAAI,IACH,KAAI,SAAS,OAAO;OAEpB,UAAS,OAAO;WAET,OAAO;AACf,QAAK,OAAO;AACZ,SAAM;;AAEP,SAAO;;;;;;;CAQR,MAAM,eAAe,YAAY;AAChC,MAAI,CAAC,8BAA8B,EAAE;AACpC,UAAO,KAAK,cAAc,SAAS,UAAU,WAAW;AACxD;;AAGD,QAAM,mBAAmB,EAAE,iBAAiB,WAAW,CAAC;;CAGzD,MAAM,gBAAgB,YAAY;AACjC,QAAM,mBAAmB,EAAE,iBAAiB,cAAc,CAAC;;;;;;;CAS5D,MAAM,cAAc,OACnB,QACA,cACA,OAA4B,WACxB;AAEJ,MAAI,CADkB,MAAM,OAAO,CACf;EAEpB,MAAM,EAAE,WAAW,eAAe,mBAAmB;EACrD,MAAM,EAAE,gBAAgB,kBAAkB;EAC1C,MAAM,iBAAiB,cAAc;AAErC,YAAU,MAAM,4BAA4B;GAC3C;GACA,SAAS;GACT;GACA;GACA;GACA;GACA,CAAC;EAEF,MAAM,cAAc,MAAM,oBAAoB,QAAQ,aAAa;AAEnE,MAAI,SAAS,OACZ,QAAO,KAAK,aAAa,SAAS;MAElC,UAAS,OAAO;;CAIlB,MAAM,sBAAsB,OAAO,QAAgB,iBAAyB;EAC3E,IAAI,cAAc;AAElB,MAAI,8BAA8B,CACjC,eAAc,MAAM,eAAe,oCAAoC,EACtE,iBAAiB,wBACjB,CAAC;EAGH,MAAM,MAAM,IAAI,IAAI,YAAY;AAEhC,MAAI,aACH,KAAI,aAAa,IAAI,gBAAgB,aAAa;AAGnD,MAAI,OACH,KAAI,aAAa,IAAI,UAAU,OAAO;AAGvC,SAAO,IAAI,UAAU;;AAGtB,QAAO;EACN;EACA;EACA;EACA;EACA"}
@@ -58,6 +58,7 @@ const STORES = {
58
58
  EXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: "surfaceMcpToNewCloudUsers",
59
59
  EXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: "exposeAllWorkflowsToMcp",
60
60
  EXPERIMENT_TRIAL_INTRO_MODAL: "trialIntroModal",
61
+ EXPERIMENT_INSTANCE_AI_FREE_NUDGE: "instanceAiFreeNudge",
61
62
  SETUP_PANEL: "setupPanel",
62
63
  FOCUSED_NODES: "focusedNodes",
63
64
  FAVORITES: "favorites",
@@ -1 +1 @@
1
- {"version":3,"file":"constants2.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const STORES = {\n\tCOMMUNITY_NODES: 'communityNodes',\n\tROOT: 'root',\n\tSETTINGS: 'settings',\n\tNOTIFICATIONS: 'notifications',\n\tUI: 'ui',\n\tUSERS: 'users',\n\tWORKFLOWS: 'workflows',\n\tWORKFLOWS_LIST: 'workflowsList',\n\tWORKFLOWS_V2: 'workflowsV2',\n\tWORKFLOWS_EE: 'workflowsEE',\n\tWORKFLOW_DOCUMENTS: 'workflowDocuments',\n\tEXECUTION_DATA: 'executionData',\n\tWORKFLOW_EXECUTION_STATES: 'workflowExecutionStates',\n\tEXECUTIONS: 'executions',\n\tNDV: 'ndv',\n\tTEMPLATES: 'templates',\n\tNODE_TYPES: 'nodeTypes',\n\tCREDENTIALS: 'credentials',\n\tTAGS: 'tags',\n\tANNOTATION_TAGS: 'annotationTags',\n\tVERSIONS: 'versions',\n\tNODE_CREATOR: 'nodeCreator',\n\tWEBHOOKS: 'webhooks',\n\tHISTORY: 'history',\n\tCLOUD_PLAN: 'cloudPlan',\n\tRBAC: 'rbac',\n\tPUSH: 'push',\n\tCOLLABORATION: 'collaboration',\n\tASSISTANT: 'assistant',\n\tBUILDER: 'builder',\n\tCHAT_PANEL: 'chatPanel',\n\tCHAT_PANEL_STATE: 'chatPanelState',\n\tBECOME_TEMPLATE_CREATOR: 'becomeTemplateCreator',\n\tPROJECTS: 'projects',\n\tAPI_KEYS: 'apiKeys',\n\tEVALUATION: 'evaluation',\n\tEVAL_COLLECTIONS: 'evalCollections',\n\tAGENT_EVALS: 'agentEvals',\n\tFOLDERS: 'folders',\n\tMODULES: 'modules',\n\tFOCUS_PANEL: 'focusPanel',\n\tAI_TEMPLATES_STARTER_COLLECTION: 'aiTemplatesStarterCollection',\n\tPERSONALIZED_TEMPLATES: 'personalizedTemplates',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS: 'readyToRunWorkflows',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS_V2: 'readyToRunWorkflowsV2',\n\tEXPERIMENT_TEMPLATE_RECO_V2: 'templateRecoV2',\n\tPERSONALIZED_TEMPLATES_V3: 'personalizedTemplatesV3',\n\tREADY_TO_RUN: 'readyToRun',\n\tTEMPLATES_DATA_QUALITY: 'templatesDataQuality',\n\tBANNERS: 'banners',\n\tCONSENT: 'consent',\n\tCHAT_HUB: 'chatHub',\n\tCHAT_HUB_PANEL: 'chatHubPanel',\n\tEXPERIMENT_CREDENTIALS_APP_SELECTION: 'credentialsAppSelection',\n\tEXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: 'surfaceMcpToNewCloudUsers',\n\tEXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: 'exposeAllWorkflowsToMcp',\n\tEXPERIMENT_TRIAL_INTRO_MODAL: 'trialIntroModal',\n\tSETUP_PANEL: 'setupPanel',\n\tFOCUSED_NODES: 'focusedNodes',\n\tFAVORITES: 'favorites',\n\tAI_GATEWAY: 'aiGateway',\n\tEVALUATIONS_WIZARD_SIDEPANEL: 'evaluationsWizardSidepanel',\n} as const;\n"],"mappings":";;AAAA,MAAa,SAAS;CACrB,iBAAiB;CACjB,MAAM;CACN,UAAU;CACV,eAAe;CACf,IAAI;CACJ,OAAO;CACP,WAAW;CACX,gBAAgB;CAChB,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,gBAAgB;CAChB,2BAA2B;CAC3B,YAAY;CACZ,KAAK;CACL,WAAW;CACX,YAAY;CACZ,aAAa;CACb,MAAM;CACN,iBAAiB;CACjB,UAAU;CACV,cAAc;CACd,UAAU;CACV,SAAS;CACT,YAAY;CACZ,MAAM;CACN,MAAM;CACN,eAAe;CACf,WAAW;CACX,SAAS;CACT,YAAY;CACZ,kBAAkB;CAClB,yBAAyB;CACzB,UAAU;CACV,UAAU;CACV,YAAY;CACZ,kBAAkB;CAClB,aAAa;CACb,SAAS;CACT,SAAS;CACT,aAAa;CACb,iCAAiC;CACjC,wBAAwB;CACxB,mCAAmC;CACnC,sCAAsC;CACtC,6BAA6B;CAC7B,2BAA2B;CAC3B,cAAc;CACd,wBAAwB;CACxB,SAAS;CACT,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,sCAAsC;CACtC,2CAA2C;CAC3C,wCAAwC;CACxC,8BAA8B;CAC9B,aAAa;CACb,eAAe;CACf,WAAW;CACX,YAAY;CACZ,8BAA8B;CAC9B"}
1
+ {"version":3,"file":"constants2.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const STORES = {\n\tCOMMUNITY_NODES: 'communityNodes',\n\tROOT: 'root',\n\tSETTINGS: 'settings',\n\tNOTIFICATIONS: 'notifications',\n\tUI: 'ui',\n\tUSERS: 'users',\n\tWORKFLOWS: 'workflows',\n\tWORKFLOWS_LIST: 'workflowsList',\n\tWORKFLOWS_V2: 'workflowsV2',\n\tWORKFLOWS_EE: 'workflowsEE',\n\tWORKFLOW_DOCUMENTS: 'workflowDocuments',\n\tEXECUTION_DATA: 'executionData',\n\tWORKFLOW_EXECUTION_STATES: 'workflowExecutionStates',\n\tEXECUTIONS: 'executions',\n\tNDV: 'ndv',\n\tTEMPLATES: 'templates',\n\tNODE_TYPES: 'nodeTypes',\n\tCREDENTIALS: 'credentials',\n\tTAGS: 'tags',\n\tANNOTATION_TAGS: 'annotationTags',\n\tVERSIONS: 'versions',\n\tNODE_CREATOR: 'nodeCreator',\n\tWEBHOOKS: 'webhooks',\n\tHISTORY: 'history',\n\tCLOUD_PLAN: 'cloudPlan',\n\tRBAC: 'rbac',\n\tPUSH: 'push',\n\tCOLLABORATION: 'collaboration',\n\tASSISTANT: 'assistant',\n\tBUILDER: 'builder',\n\tCHAT_PANEL: 'chatPanel',\n\tCHAT_PANEL_STATE: 'chatPanelState',\n\tBECOME_TEMPLATE_CREATOR: 'becomeTemplateCreator',\n\tPROJECTS: 'projects',\n\tAPI_KEYS: 'apiKeys',\n\tEVALUATION: 'evaluation',\n\tEVAL_COLLECTIONS: 'evalCollections',\n\tAGENT_EVALS: 'agentEvals',\n\tFOLDERS: 'folders',\n\tMODULES: 'modules',\n\tFOCUS_PANEL: 'focusPanel',\n\tAI_TEMPLATES_STARTER_COLLECTION: 'aiTemplatesStarterCollection',\n\tPERSONALIZED_TEMPLATES: 'personalizedTemplates',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS: 'readyToRunWorkflows',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS_V2: 'readyToRunWorkflowsV2',\n\tEXPERIMENT_TEMPLATE_RECO_V2: 'templateRecoV2',\n\tPERSONALIZED_TEMPLATES_V3: 'personalizedTemplatesV3',\n\tREADY_TO_RUN: 'readyToRun',\n\tTEMPLATES_DATA_QUALITY: 'templatesDataQuality',\n\tBANNERS: 'banners',\n\tCONSENT: 'consent',\n\tCHAT_HUB: 'chatHub',\n\tCHAT_HUB_PANEL: 'chatHubPanel',\n\tEXPERIMENT_CREDENTIALS_APP_SELECTION: 'credentialsAppSelection',\n\tEXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: 'surfaceMcpToNewCloudUsers',\n\tEXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: 'exposeAllWorkflowsToMcp',\n\tEXPERIMENT_TRIAL_INTRO_MODAL: 'trialIntroModal',\n\tEXPERIMENT_INSTANCE_AI_FREE_NUDGE: 'instanceAiFreeNudge',\n\tSETUP_PANEL: 'setupPanel',\n\tFOCUSED_NODES: 'focusedNodes',\n\tFAVORITES: 'favorites',\n\tAI_GATEWAY: 'aiGateway',\n\tEVALUATIONS_WIZARD_SIDEPANEL: 'evaluationsWizardSidepanel',\n} as const;\n"],"mappings":";;AAAA,MAAa,SAAS;CACrB,iBAAiB;CACjB,MAAM;CACN,UAAU;CACV,eAAe;CACf,IAAI;CACJ,OAAO;CACP,WAAW;CACX,gBAAgB;CAChB,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,gBAAgB;CAChB,2BAA2B;CAC3B,YAAY;CACZ,KAAK;CACL,WAAW;CACX,YAAY;CACZ,aAAa;CACb,MAAM;CACN,iBAAiB;CACjB,UAAU;CACV,cAAc;CACd,UAAU;CACV,SAAS;CACT,YAAY;CACZ,MAAM;CACN,MAAM;CACN,eAAe;CACf,WAAW;CACX,SAAS;CACT,YAAY;CACZ,kBAAkB;CAClB,yBAAyB;CACzB,UAAU;CACV,UAAU;CACV,YAAY;CACZ,kBAAkB;CAClB,aAAa;CACb,SAAS;CACT,SAAS;CACT,aAAa;CACb,iCAAiC;CACjC,wBAAwB;CACxB,mCAAmC;CACnC,sCAAsC;CACtC,6BAA6B;CAC7B,2BAA2B;CAC3B,cAAc;CACd,wBAAwB;CACxB,SAAS;CACT,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,sCAAsC;CACtC,2CAA2C;CAC3C,wCAAwC;CACxC,8BAA8B;CAC9B,mCAAmC;CACnC,aAAa;CACb,eAAe;CACf,WAAW;CACX,YAAY;CACZ,8BAA8B;CAC9B"}
@@ -57,6 +57,7 @@ declare const STORES: {
57
57
  readonly EXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: "surfaceMcpToNewCloudUsers";
58
58
  readonly EXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: "exposeAllWorkflowsToMcp";
59
59
  readonly EXPERIMENT_TRIAL_INTRO_MODAL: "trialIntroModal";
60
+ readonly EXPERIMENT_INSTANCE_AI_FREE_NUDGE: "instanceAiFreeNudge";
60
61
  readonly SETUP_PANEL: "setupPanel";
61
62
  readonly FOCUSED_NODES: "focusedNodes";
62
63
  readonly FAVORITES: "favorites";
@@ -57,6 +57,7 @@ declare const STORES: {
57
57
  readonly EXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: "surfaceMcpToNewCloudUsers";
58
58
  readonly EXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: "exposeAllWorkflowsToMcp";
59
59
  readonly EXPERIMENT_TRIAL_INTRO_MODAL: "trialIntroModal";
60
+ readonly EXPERIMENT_INSTANCE_AI_FREE_NUDGE: "instanceAiFreeNudge";
60
61
  readonly SETUP_PANEL: "setupPanel";
61
62
  readonly FOCUSED_NODES: "focusedNodes";
62
63
  readonly FAVORITES: "favorites";
@@ -57,6 +57,7 @@ const STORES = {
57
57
  EXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: "surfaceMcpToNewCloudUsers",
58
58
  EXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: "exposeAllWorkflowsToMcp",
59
59
  EXPERIMENT_TRIAL_INTRO_MODAL: "trialIntroModal",
60
+ EXPERIMENT_INSTANCE_AI_FREE_NUDGE: "instanceAiFreeNudge",
60
61
  SETUP_PANEL: "setupPanel",
61
62
  FOCUSED_NODES: "focusedNodes",
62
63
  FAVORITES: "favorites",
@@ -1 +1 @@
1
- {"version":3,"file":"constants2.mjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const STORES = {\n\tCOMMUNITY_NODES: 'communityNodes',\n\tROOT: 'root',\n\tSETTINGS: 'settings',\n\tNOTIFICATIONS: 'notifications',\n\tUI: 'ui',\n\tUSERS: 'users',\n\tWORKFLOWS: 'workflows',\n\tWORKFLOWS_LIST: 'workflowsList',\n\tWORKFLOWS_V2: 'workflowsV2',\n\tWORKFLOWS_EE: 'workflowsEE',\n\tWORKFLOW_DOCUMENTS: 'workflowDocuments',\n\tEXECUTION_DATA: 'executionData',\n\tWORKFLOW_EXECUTION_STATES: 'workflowExecutionStates',\n\tEXECUTIONS: 'executions',\n\tNDV: 'ndv',\n\tTEMPLATES: 'templates',\n\tNODE_TYPES: 'nodeTypes',\n\tCREDENTIALS: 'credentials',\n\tTAGS: 'tags',\n\tANNOTATION_TAGS: 'annotationTags',\n\tVERSIONS: 'versions',\n\tNODE_CREATOR: 'nodeCreator',\n\tWEBHOOKS: 'webhooks',\n\tHISTORY: 'history',\n\tCLOUD_PLAN: 'cloudPlan',\n\tRBAC: 'rbac',\n\tPUSH: 'push',\n\tCOLLABORATION: 'collaboration',\n\tASSISTANT: 'assistant',\n\tBUILDER: 'builder',\n\tCHAT_PANEL: 'chatPanel',\n\tCHAT_PANEL_STATE: 'chatPanelState',\n\tBECOME_TEMPLATE_CREATOR: 'becomeTemplateCreator',\n\tPROJECTS: 'projects',\n\tAPI_KEYS: 'apiKeys',\n\tEVALUATION: 'evaluation',\n\tEVAL_COLLECTIONS: 'evalCollections',\n\tAGENT_EVALS: 'agentEvals',\n\tFOLDERS: 'folders',\n\tMODULES: 'modules',\n\tFOCUS_PANEL: 'focusPanel',\n\tAI_TEMPLATES_STARTER_COLLECTION: 'aiTemplatesStarterCollection',\n\tPERSONALIZED_TEMPLATES: 'personalizedTemplates',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS: 'readyToRunWorkflows',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS_V2: 'readyToRunWorkflowsV2',\n\tEXPERIMENT_TEMPLATE_RECO_V2: 'templateRecoV2',\n\tPERSONALIZED_TEMPLATES_V3: 'personalizedTemplatesV3',\n\tREADY_TO_RUN: 'readyToRun',\n\tTEMPLATES_DATA_QUALITY: 'templatesDataQuality',\n\tBANNERS: 'banners',\n\tCONSENT: 'consent',\n\tCHAT_HUB: 'chatHub',\n\tCHAT_HUB_PANEL: 'chatHubPanel',\n\tEXPERIMENT_CREDENTIALS_APP_SELECTION: 'credentialsAppSelection',\n\tEXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: 'surfaceMcpToNewCloudUsers',\n\tEXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: 'exposeAllWorkflowsToMcp',\n\tEXPERIMENT_TRIAL_INTRO_MODAL: 'trialIntroModal',\n\tSETUP_PANEL: 'setupPanel',\n\tFOCUSED_NODES: 'focusedNodes',\n\tFAVORITES: 'favorites',\n\tAI_GATEWAY: 'aiGateway',\n\tEVALUATIONS_WIZARD_SIDEPANEL: 'evaluationsWizardSidepanel',\n} as const;\n"],"mappings":";AAAA,MAAa,SAAS;CACrB,iBAAiB;CACjB,MAAM;CACN,UAAU;CACV,eAAe;CACf,IAAI;CACJ,OAAO;CACP,WAAW;CACX,gBAAgB;CAChB,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,gBAAgB;CAChB,2BAA2B;CAC3B,YAAY;CACZ,KAAK;CACL,WAAW;CACX,YAAY;CACZ,aAAa;CACb,MAAM;CACN,iBAAiB;CACjB,UAAU;CACV,cAAc;CACd,UAAU;CACV,SAAS;CACT,YAAY;CACZ,MAAM;CACN,MAAM;CACN,eAAe;CACf,WAAW;CACX,SAAS;CACT,YAAY;CACZ,kBAAkB;CAClB,yBAAyB;CACzB,UAAU;CACV,UAAU;CACV,YAAY;CACZ,kBAAkB;CAClB,aAAa;CACb,SAAS;CACT,SAAS;CACT,aAAa;CACb,iCAAiC;CACjC,wBAAwB;CACxB,mCAAmC;CACnC,sCAAsC;CACtC,6BAA6B;CAC7B,2BAA2B;CAC3B,cAAc;CACd,wBAAwB;CACxB,SAAS;CACT,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,sCAAsC;CACtC,2CAA2C;CAC3C,wCAAwC;CACxC,8BAA8B;CAC9B,aAAa;CACb,eAAe;CACf,WAAW;CACX,YAAY;CACZ,8BAA8B;CAC9B"}
1
+ {"version":3,"file":"constants2.mjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const STORES = {\n\tCOMMUNITY_NODES: 'communityNodes',\n\tROOT: 'root',\n\tSETTINGS: 'settings',\n\tNOTIFICATIONS: 'notifications',\n\tUI: 'ui',\n\tUSERS: 'users',\n\tWORKFLOWS: 'workflows',\n\tWORKFLOWS_LIST: 'workflowsList',\n\tWORKFLOWS_V2: 'workflowsV2',\n\tWORKFLOWS_EE: 'workflowsEE',\n\tWORKFLOW_DOCUMENTS: 'workflowDocuments',\n\tEXECUTION_DATA: 'executionData',\n\tWORKFLOW_EXECUTION_STATES: 'workflowExecutionStates',\n\tEXECUTIONS: 'executions',\n\tNDV: 'ndv',\n\tTEMPLATES: 'templates',\n\tNODE_TYPES: 'nodeTypes',\n\tCREDENTIALS: 'credentials',\n\tTAGS: 'tags',\n\tANNOTATION_TAGS: 'annotationTags',\n\tVERSIONS: 'versions',\n\tNODE_CREATOR: 'nodeCreator',\n\tWEBHOOKS: 'webhooks',\n\tHISTORY: 'history',\n\tCLOUD_PLAN: 'cloudPlan',\n\tRBAC: 'rbac',\n\tPUSH: 'push',\n\tCOLLABORATION: 'collaboration',\n\tASSISTANT: 'assistant',\n\tBUILDER: 'builder',\n\tCHAT_PANEL: 'chatPanel',\n\tCHAT_PANEL_STATE: 'chatPanelState',\n\tBECOME_TEMPLATE_CREATOR: 'becomeTemplateCreator',\n\tPROJECTS: 'projects',\n\tAPI_KEYS: 'apiKeys',\n\tEVALUATION: 'evaluation',\n\tEVAL_COLLECTIONS: 'evalCollections',\n\tAGENT_EVALS: 'agentEvals',\n\tFOLDERS: 'folders',\n\tMODULES: 'modules',\n\tFOCUS_PANEL: 'focusPanel',\n\tAI_TEMPLATES_STARTER_COLLECTION: 'aiTemplatesStarterCollection',\n\tPERSONALIZED_TEMPLATES: 'personalizedTemplates',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS: 'readyToRunWorkflows',\n\tEXPERIMENT_READY_TO_RUN_WORKFLOWS_V2: 'readyToRunWorkflowsV2',\n\tEXPERIMENT_TEMPLATE_RECO_V2: 'templateRecoV2',\n\tPERSONALIZED_TEMPLATES_V3: 'personalizedTemplatesV3',\n\tREADY_TO_RUN: 'readyToRun',\n\tTEMPLATES_DATA_QUALITY: 'templatesDataQuality',\n\tBANNERS: 'banners',\n\tCONSENT: 'consent',\n\tCHAT_HUB: 'chatHub',\n\tCHAT_HUB_PANEL: 'chatHubPanel',\n\tEXPERIMENT_CREDENTIALS_APP_SELECTION: 'credentialsAppSelection',\n\tEXPERIMENT_SURFACE_MCP_TO_NEW_CLOUD_USERS: 'surfaceMcpToNewCloudUsers',\n\tEXPERIMENT_EXPOSE_ALL_WORKFLOWS_TO_MCP: 'exposeAllWorkflowsToMcp',\n\tEXPERIMENT_TRIAL_INTRO_MODAL: 'trialIntroModal',\n\tEXPERIMENT_INSTANCE_AI_FREE_NUDGE: 'instanceAiFreeNudge',\n\tSETUP_PANEL: 'setupPanel',\n\tFOCUSED_NODES: 'focusedNodes',\n\tFAVORITES: 'favorites',\n\tAI_GATEWAY: 'aiGateway',\n\tEVALUATIONS_WIZARD_SIDEPANEL: 'evaluationsWizardSidepanel',\n} as const;\n"],"mappings":";AAAA,MAAa,SAAS;CACrB,iBAAiB;CACjB,MAAM;CACN,UAAU;CACV,eAAe;CACf,IAAI;CACJ,OAAO;CACP,WAAW;CACX,gBAAgB;CAChB,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,gBAAgB;CAChB,2BAA2B;CAC3B,YAAY;CACZ,KAAK;CACL,WAAW;CACX,YAAY;CACZ,aAAa;CACb,MAAM;CACN,iBAAiB;CACjB,UAAU;CACV,cAAc;CACd,UAAU;CACV,SAAS;CACT,YAAY;CACZ,MAAM;CACN,MAAM;CACN,eAAe;CACf,WAAW;CACX,SAAS;CACT,YAAY;CACZ,kBAAkB;CAClB,yBAAyB;CACzB,UAAU;CACV,UAAU;CACV,YAAY;CACZ,kBAAkB;CAClB,aAAa;CACb,SAAS;CACT,SAAS;CACT,aAAa;CACb,iCAAiC;CACjC,wBAAwB;CACxB,mCAAmC;CACnC,sCAAsC;CACtC,6BAA6B;CAC7B,2BAA2B;CAC3B,cAAc;CACd,wBAAwB;CACxB,SAAS;CACT,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,sCAAsC;CACtC,2CAA2C;CAC3C,wCAAwC;CACxC,8BAA8B;CAC9B,mCAAmC;CACnC,aAAa;CACb,eAAe;CACf,WAAW;CACX,YAAY;CACZ,8BAA8B;CAC9B"}
@@ -1,5 +1,5 @@
1
1
  import { Ref } from "vue";
2
- import * as pinia0 from "pinia";
2
+ import * as pinia4 from "pinia";
3
3
 
4
4
  //#region src/notifications.store.d.ts
5
5
  interface NotificationsStore {
@@ -9,7 +9,7 @@ interface NotificationsStore {
9
9
  allowErrors?: boolean;
10
10
  }) => void;
11
11
  }
12
- declare const useNotificationsStore: pinia0.StoreDefinition<"notifications", Pick<NotificationsStore, "areNotificationsSuppressed" | "allowErrorNotificationsWhenSuppressed">, Pick<NotificationsStore, never>, Pick<NotificationsStore, "setNotificationsSuppressed">>;
12
+ declare const useNotificationsStore: pinia4.StoreDefinition<"notifications", Pick<NotificationsStore, "areNotificationsSuppressed" | "allowErrorNotificationsWhenSuppressed">, Pick<NotificationsStore, never>, Pick<NotificationsStore, "setNotificationsSuppressed">>;
13
13
  //#endregion
14
14
  export { NotificationsStore, useNotificationsStore };
15
15
  //# sourceMappingURL=notifications.store.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as pinia7 from "pinia";
1
+ import * as pinia0 from "pinia";
2
2
  import { Ref } from "vue";
3
3
 
4
4
  //#region src/notifications.store.d.ts
@@ -9,7 +9,7 @@ interface NotificationsStore {
9
9
  allowErrors?: boolean;
10
10
  }) => void;
11
11
  }
12
- declare const useNotificationsStore: pinia7.StoreDefinition<"notifications", Pick<NotificationsStore, "areNotificationsSuppressed" | "allowErrorNotificationsWhenSuppressed">, Pick<NotificationsStore, never>, Pick<NotificationsStore, "setNotificationsSuppressed">>;
12
+ declare const useNotificationsStore: pinia0.StoreDefinition<"notifications", Pick<NotificationsStore, "areNotificationsSuppressed" | "allowErrorNotificationsWhenSuppressed">, Pick<NotificationsStore, never>, Pick<NotificationsStore, "setNotificationsSuppressed">>;
13
13
  //#endregion
14
14
  export { NotificationsStore, useNotificationsStore };
15
15
  //# sourceMappingURL=notifications.store.d.mts.map