@burdenoff/fluidgrids-fe-sdk 2026.1022.1 → 2026.1022.3

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 (34) hide show
  1. package/dist/{ExecutionDetailPage-6UKPMPL2.js → ExecutionDetailPage-NFZVCUCA.js} +4 -4
  2. package/dist/{ExecutionsListPage-3IFRZU6A.js → ExecutionsListPage-KSOHJU4T.js} +5 -5
  3. package/dist/{WorkflowBuilder-PYJ5T23Q.js → WorkflowBuilder-E4GMHPVS.js} +7 -7
  4. package/dist/{WorkflowsList-3ZDCAB4D.js → WorkflowsList-BAYEP7TU.js} +5 -5
  5. package/dist/{chunk-GU233T6U.js → chunk-3XEIMQNT.js} +51 -41
  6. package/dist/chunk-4UAWCWS7.js +162 -0
  7. package/dist/{chunk-XGFADY55.js → chunk-5TW5JP5R.js} +1 -1
  8. package/dist/{chunk-QL7CDZ7B.js → chunk-6LMWVUD7.js} +3 -3
  9. package/dist/{chunk-OJL6UH5K.js → chunk-CU23L6GP.js} +2 -2
  10. package/dist/{chunk-3RIZZY32.js → chunk-FJHERSHE.js} +5 -5
  11. package/dist/{chunk-V2UCWUBQ.js → chunk-FLVFVYBE.js} +2 -2
  12. package/dist/{chunk-O6E247J6.js → chunk-HP3A6BPK.js} +29 -23
  13. package/dist/{chunk-OM5X65LG.js → chunk-KNFGMDDU.js} +48 -39
  14. package/dist/{chunk-2CDLVDSU.js → chunk-L5RW3DUB.js} +189 -22
  15. package/dist/{chunk-EPYVZPGU.js → chunk-LHOW7QKK.js} +1 -1
  16. package/dist/{chunk-RFG3PJX3.js → chunk-PWLDDAT6.js} +2 -2
  17. package/dist/{chunk-IKVHPXHC.js → chunk-QXJS7WIZ.js} +9 -9
  18. package/dist/{chunk-L2UWPFJM.js → chunk-SAZVBFMO.js} +2 -1
  19. package/dist/{chunk-SQFFJUAT.js → chunk-SYVLFHWV.js} +2 -2
  20. package/dist/{chunk-6B6XOZ4V.js → chunk-TWIORNPU.js} +2 -2
  21. package/dist/{chunk-CGRYQMWL.js → chunk-XQVQKEZK.js} +1 -1
  22. package/dist/{chunk-YB6WGQTY.js → chunk-YPF7LVUZ.js} +2 -2
  23. package/dist/executions.js +6 -6
  24. package/dist/history.js +4 -4
  25. package/dist/index.d.ts +185 -2
  26. package/dist/index.js +26 -26
  27. package/dist/nodes.js +3 -3
  28. package/dist/observability.js +3 -3
  29. package/dist/settings.js +4 -4
  30. package/dist/templates.js +7 -7
  31. package/dist/workflow-builder.js +8 -8
  32. package/dist/workflows-list.js +5 -5
  33. package/package.json +1 -1
  34. package/dist/chunk-CFCUM4CN.js +0 -41
@@ -1,12 +1,12 @@
1
- export { ExecutionDetailPage } from './chunk-QL7CDZ7B.js';
2
- import './chunk-GU233T6U.js';
1
+ export { ExecutionDetailPage } from './chunk-6LMWVUD7.js';
2
+ import './chunk-3XEIMQNT.js';
3
3
  import './chunk-QBFAJNUC.js';
4
4
  import './chunk-ONVGFVNH.js';
5
5
  import './chunk-JL7CASN5.js';
6
6
  import './chunk-D3UWK7GY.js';
7
7
  import './chunk-UZG3ZIQM.js';
8
8
  import './chunk-PJAWNFJV.js';
9
- import './chunk-L2UWPFJM.js';
10
- import './chunk-CFCUM4CN.js';
9
+ import './chunk-SAZVBFMO.js';
10
+ import './chunk-4UAWCWS7.js';
11
11
  import './chunk-UULVIT25.js';
12
12
  import './chunk-NTWG3CJX.js';
@@ -1,11 +1,11 @@
1
- export { ExecutionsListPage } from './chunk-YB6WGQTY.js';
2
- import './chunk-GU233T6U.js';
1
+ export { ExecutionsListPage } from './chunk-YPF7LVUZ.js';
2
+ import './chunk-3XEIMQNT.js';
3
3
  import './chunk-QBFAJNUC.js';
4
- import './chunk-O6E247J6.js';
4
+ import './chunk-HP3A6BPK.js';
5
5
  import './chunk-D3UWK7GY.js';
6
6
  import './chunk-UZG3ZIQM.js';
7
7
  import './chunk-PJAWNFJV.js';
8
- import './chunk-L2UWPFJM.js';
9
- import './chunk-CFCUM4CN.js';
8
+ import './chunk-SAZVBFMO.js';
9
+ import './chunk-4UAWCWS7.js';
10
10
  import './chunk-UULVIT25.js';
11
11
  import './chunk-NTWG3CJX.js';
@@ -1,20 +1,20 @@
1
- export { WorkflowBuilder } from './chunk-RFG3PJX3.js';
1
+ export { WorkflowBuilder } from './chunk-PWLDDAT6.js';
2
2
  import './chunk-6N27YGMB.js';
3
- import './chunk-2CDLVDSU.js';
3
+ import './chunk-L5RW3DUB.js';
4
4
  import './chunk-GEMNVFPK.js';
5
5
  import './chunk-IEVSFCFS.js';
6
6
  import './chunk-7LSGGJ7D.js';
7
7
  import './chunk-GDAFKRQO.js';
8
- import './chunk-SQFFJUAT.js';
8
+ import './chunk-SYVLFHWV.js';
9
9
  import './chunk-PXIFUMLA.js';
10
10
  import './chunk-WBH2XEWO.js';
11
11
  import './chunk-ONVGFVNH.js';
12
12
  import './chunk-JL7CASN5.js';
13
- import './chunk-O6E247J6.js';
13
+ import './chunk-HP3A6BPK.js';
14
14
  import './chunk-UZG3ZIQM.js';
15
- import './chunk-XGFADY55.js';
15
+ import './chunk-5TW5JP5R.js';
16
16
  import './chunk-EGYJKHAL.js';
17
- import './chunk-L2UWPFJM.js';
18
- import './chunk-CFCUM4CN.js';
17
+ import './chunk-SAZVBFMO.js';
18
+ import './chunk-4UAWCWS7.js';
19
19
  import './chunk-UULVIT25.js';
20
20
  import './chunk-NTWG3CJX.js';
@@ -1,14 +1,14 @@
1
- export { WorkflowsList } from './chunk-3RIZZY32.js';
1
+ export { WorkflowsList } from './chunk-FJHERSHE.js';
2
2
  import './chunk-6N27YGMB.js';
3
- import './chunk-SQFFJUAT.js';
3
+ import './chunk-SYVLFHWV.js';
4
4
  import './chunk-ONVGFVNH.js';
5
5
  import './chunk-JL7CASN5.js';
6
- import './chunk-O6E247J6.js';
6
+ import './chunk-HP3A6BPK.js';
7
7
  import './chunk-D3UWK7GY.js';
8
8
  import './chunk-UZG3ZIQM.js';
9
9
  import './chunk-PJAWNFJV.js';
10
10
  import './chunk-EGYJKHAL.js';
11
- import './chunk-L2UWPFJM.js';
12
- import './chunk-CFCUM4CN.js';
11
+ import './chunk-SAZVBFMO.js';
12
+ import './chunk-4UAWCWS7.js';
13
13
  import './chunk-UULVIT25.js';
14
14
  import './chunk-NTWG3CJX.js';
@@ -2,8 +2,8 @@ import { REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS } from './chunk-QBFAJNUC.js';
2
2
  import { executionsControls } from './chunk-D3UWK7GY.js';
3
3
  import { useExecutionsStore } from './chunk-UZG3ZIQM.js';
4
4
  import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
5
- import { ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument, ExecutionsListDocument } from './chunk-L2UWPFJM.js';
6
- import { throwIfResultError } from './chunk-CFCUM4CN.js';
5
+ import { ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument, ExecutionsListDocument } from './chunk-SAZVBFMO.js';
6
+ import { throwIfResultError, openRunQuotaUpgradePrompt } from './chunk-4UAWCWS7.js';
7
7
  import { useTr } from './chunk-UULVIT25.js';
8
8
  import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
9
9
  import { Icon } from '@iconify/react';
@@ -2885,6 +2885,7 @@ function useExecutionStats(options = {}) {
2885
2885
  };
2886
2886
  }
2887
2887
  function useExecutionActions() {
2888
+ const tr = useTr();
2888
2889
  const [loading, setLoading] = useState(false);
2889
2890
  const [error, setError] = useState(null);
2890
2891
  const pauseExecution = useCallback(async (id) => {
@@ -2991,51 +2992,60 @@ function useExecutionActions() {
2991
2992
  } catch (err) {
2992
2993
  const error2 = err;
2993
2994
  setError(error2);
2995
+ openRunQuotaUpgradePrompt(err, tr);
2994
2996
  return { ok: false, message: error2.message };
2995
2997
  } finally {
2996
2998
  setLoading(false);
2997
2999
  }
2998
3000
  },
2999
- []
3001
+ [tr]
3002
+ );
3003
+ const replayExecution = useCallback(
3004
+ async (runId) => {
3005
+ setLoading(true);
3006
+ setError(null);
3007
+ try {
3008
+ const client = getFluidGridsClient();
3009
+ const result = throwIfResultError(
3010
+ await client.mutate({
3011
+ mutation: REPLAY_WORKFLOW_RUN,
3012
+ variables: { runId }
3013
+ })
3014
+ );
3015
+ return result.data?.replayWorkflowRun ?? null;
3016
+ } catch (err) {
3017
+ setError(err);
3018
+ openRunQuotaUpgradePrompt(err, tr);
3019
+ return null;
3020
+ } finally {
3021
+ setLoading(false);
3022
+ }
3023
+ },
3024
+ [tr]
3025
+ );
3026
+ const retryExecutions = useCallback(
3027
+ async (runIds) => {
3028
+ setLoading(true);
3029
+ setError(null);
3030
+ try {
3031
+ const client = getFluidGridsClient();
3032
+ const result = throwIfResultError(
3033
+ await client.mutate({
3034
+ mutation: RETRY_WORKFLOW_RUNS,
3035
+ variables: { runIds }
3036
+ })
3037
+ );
3038
+ return result.data?.retryWorkflowRuns ?? [];
3039
+ } catch (err) {
3040
+ setError(err);
3041
+ openRunQuotaUpgradePrompt(err, tr);
3042
+ return [];
3043
+ } finally {
3044
+ setLoading(false);
3045
+ }
3046
+ },
3047
+ [tr]
3000
3048
  );
3001
- const replayExecution = useCallback(async (runId) => {
3002
- setLoading(true);
3003
- setError(null);
3004
- try {
3005
- const client = getFluidGridsClient();
3006
- const result = throwIfResultError(
3007
- await client.mutate({
3008
- mutation: REPLAY_WORKFLOW_RUN,
3009
- variables: { runId }
3010
- })
3011
- );
3012
- return result.data?.replayWorkflowRun ?? null;
3013
- } catch (err) {
3014
- setError(err);
3015
- return null;
3016
- } finally {
3017
- setLoading(false);
3018
- }
3019
- }, []);
3020
- const retryExecutions = useCallback(async (runIds) => {
3021
- setLoading(true);
3022
- setError(null);
3023
- try {
3024
- const client = getFluidGridsClient();
3025
- const result = throwIfResultError(
3026
- await client.mutate({
3027
- mutation: RETRY_WORKFLOW_RUNS,
3028
- variables: { runIds }
3029
- })
3030
- );
3031
- return result.data?.retryWorkflowRuns ?? [];
3032
- } catch (err) {
3033
- setError(err);
3034
- return [];
3035
- } finally {
3036
- setLoading(false);
3037
- }
3038
- }, []);
3039
3049
  const terminateExecution = useCallback(
3040
3050
  async (runId, reason) => {
3041
3051
  setLoading(true);
@@ -0,0 +1,162 @@
1
+ import { ENGLISH_FALLBACK_TRANSLATOR } from './chunk-UULVIT25.js';
2
+ import { CombinedGraphQLErrors, ServerError } from '@apollo/client/errors';
3
+ import { dispatchUpgradePrompt } from '@burdenoff/fe-libs/shared/components';
4
+
5
+ function describeGraphQLError(error) {
6
+ const code = typeof error.extensions?.code === "string" ? error.extensions.code : void 0;
7
+ switch (code) {
8
+ case "QUOTA_EXHAUSTED": {
9
+ const quota = /Quota exhausted for (\S+)/.exec(error.message)?.[1];
10
+ const allowance = quota ? `"${quota}" quota` : "usage quota";
11
+ return `Quota exhausted \u2014 your workspace has used up its ${allowance}. Upgrade your plan or wait for the quota to reset.`;
12
+ }
13
+ case "QUOTA_NOT_PROVISIONED":
14
+ return "This workspace's plan does not include this usage allowance yet. Contact your workspace admin or support to have it provisioned.";
15
+ case "UNAUTHENTICATED":
16
+ return "Your session has expired. Please sign in again.";
17
+ case "FORBIDDEN":
18
+ return error.message || "You don't have permission to perform this action.";
19
+ default:
20
+ return error.message || "Unknown error";
21
+ }
22
+ }
23
+ function firstGraphQLErrorInBody(bodyText) {
24
+ try {
25
+ const parsed = JSON.parse(bodyText);
26
+ if (typeof parsed !== "object" || parsed === null) return null;
27
+ const errors = parsed.errors;
28
+ if (!Array.isArray(errors) || errors.length === 0) return null;
29
+ const first = errors[0];
30
+ if (typeof first !== "object" || first === null) return null;
31
+ const message = first.message;
32
+ if (typeof message !== "string") return null;
33
+ return first;
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+ function describeOperationError(error, fallback = "Unknown error") {
39
+ if (CombinedGraphQLErrors.is(error)) {
40
+ const first = error.errors[0];
41
+ return first ? describeGraphQLError(first) : error.message || fallback;
42
+ }
43
+ if (ServerError.is(error)) {
44
+ const first = firstGraphQLErrorInBody(error.bodyText);
45
+ if (first) return describeGraphQLError(first);
46
+ }
47
+ if (error instanceof Error) {
48
+ return error.message || fallback;
49
+ }
50
+ if (typeof error === "string" && error.length > 0) {
51
+ return error;
52
+ }
53
+ return fallback;
54
+ }
55
+ function throwIfResultError(result) {
56
+ if (result.error) {
57
+ throw new Error(describeOperationError(result.error), {
58
+ cause: result.error
59
+ });
60
+ }
61
+ return result;
62
+ }
63
+
64
+ // src/billing/quota.ts
65
+ var RUNS_QUOTA_NAME = "fluidgrids.runs.monthly";
66
+ var WORKFLOWS_QUOTA_NAME = "fluidgrids.workflows.count";
67
+ var BILLING_PLANS_PATH = "/billing/plans";
68
+ var QUOTA_EXHAUSTED_CODE = "QUOTA_EXHAUSTED";
69
+ var QUOTA_NOT_PROVISIONED_CODE = "QUOTA_NOT_PROVISIONED";
70
+ function asRecord(value) {
71
+ return typeof value === "object" && value !== null ? value : null;
72
+ }
73
+ function extensionsOfList(list) {
74
+ if (!Array.isArray(list)) return [];
75
+ const found = [];
76
+ for (const entry of list) {
77
+ const extensions = asRecord(asRecord(entry)?.extensions);
78
+ if (extensions) found.push(extensions);
79
+ }
80
+ return found;
81
+ }
82
+ function extensionsOfBody(bodyText) {
83
+ if (typeof bodyText !== "string" || !bodyText.includes("errors")) return [];
84
+ try {
85
+ const parsed = JSON.parse(bodyText);
86
+ return extensionsOfList(asRecord(parsed)?.errors);
87
+ } catch {
88
+ return [];
89
+ }
90
+ }
91
+ var MAX_CAUSE_DEPTH = 5;
92
+ function collectExtensions(error) {
93
+ const found = [];
94
+ const seen = /* @__PURE__ */ new Set();
95
+ let current = error;
96
+ for (let depth = 0; depth < MAX_CAUSE_DEPTH; depth += 1) {
97
+ const host = asRecord(current);
98
+ if (!host || seen.has(host)) break;
99
+ seen.add(host);
100
+ const direct = asRecord(host.extensions);
101
+ if (direct) found.push(direct);
102
+ found.push(...extensionsOfList(host.errors));
103
+ found.push(...extensionsOfList(host.graphQLErrors));
104
+ const networkError = asRecord(host.networkError);
105
+ found.push(...extensionsOfList(asRecord(networkError?.result)?.errors));
106
+ found.push(...extensionsOfBody(networkError?.bodyText));
107
+ found.push(...extensionsOfList(asRecord(host.result)?.errors));
108
+ found.push(...extensionsOfBody(host.bodyText));
109
+ current = host.cause;
110
+ }
111
+ return found;
112
+ }
113
+ function stringField(extensions, key) {
114
+ const value = extensions[key];
115
+ return typeof value === "string" && value.length > 0 ? value : null;
116
+ }
117
+ function findQuotaRefusal(error) {
118
+ const all = collectExtensions(error);
119
+ const notProvisioned = all.find(
120
+ (ext) => ext.code === QUOTA_NOT_PROVISIONED_CODE
121
+ );
122
+ if (notProvisioned) {
123
+ return {
124
+ kind: "not-provisioned",
125
+ quotaName: stringField(notProvisioned, "quotaName"),
126
+ limitLeft: null
127
+ };
128
+ }
129
+ const exhausted = all.find((ext) => ext.code === QUOTA_EXHAUSTED_CODE);
130
+ if (exhausted) {
131
+ const limitLeft = exhausted.limitLeft;
132
+ return {
133
+ kind: "exhausted",
134
+ quotaName: stringField(exhausted, "quotaName"),
135
+ limitLeft: typeof limitLeft === "number" ? limitLeft : null
136
+ };
137
+ }
138
+ return null;
139
+ }
140
+ function isQuotaExhaustedFailure(error) {
141
+ return findQuotaRefusal(error)?.kind === "exhausted";
142
+ }
143
+ function openRunQuotaUpgradePrompt(error, tr = ENGLISH_FALLBACK_TRANSLATOR) {
144
+ const refusal = findQuotaRefusal(error);
145
+ if (refusal?.kind !== "exhausted") return false;
146
+ dispatchUpgradePrompt({
147
+ extensions: {
148
+ code: QUOTA_EXHAUSTED_CODE,
149
+ quotaName: refusal.quotaName ?? RUNS_QUOTA_NAME,
150
+ resource: tr("fluidgrids.billing.runQuota.resource", "workflow runs"),
151
+ ...refusal.limitLeft !== null ? { limitLeft: refusal.limitLeft } : {}
152
+ },
153
+ title: tr("fluidgrids.billing.runQuota.title", "Monthly run limit reached"),
154
+ description: tr(
155
+ "fluidgrids.billing.runQuota.description",
156
+ "Your workspace has used all the workflow runs included in its plan this month. Upgrade your plan to keep running workflows, or wait for the monthly reset."
157
+ )
158
+ });
159
+ return true;
160
+ }
161
+
162
+ export { BILLING_PLANS_PATH, RUNS_QUOTA_NAME, WORKFLOWS_QUOTA_NAME, describeOperationError, findQuotaRefusal, isQuotaExhaustedFailure, openRunQuotaUpgradePrompt, throwIfResultError };
@@ -1,4 +1,4 @@
1
- import { NodeEndpointConfigsDocument } from './chunk-L2UWPFJM.js';
1
+ import { NodeEndpointConfigsDocument } from './chunk-SAZVBFMO.js';
2
2
 
3
3
  // src/utils/node-endpoint-configs.ts
4
4
  var NODE_CONFIG_PAGE_SIZE = 500;
@@ -1,8 +1,8 @@
1
- import { useExecution, buildNodeDisplayMap, useExecutionActions, useAutoRefresh, ExecutionStatusBadge, formatRunVersion, NodeTimeline, RunLogViewer } from './chunk-GU233T6U.js';
1
+ import { useExecution, buildNodeDisplayMap, useExecutionActions, useAutoRefresh, ExecutionStatusBadge, formatRunVersion, NodeTimeline, RunLogViewer } from './chunk-3XEIMQNT.js';
2
2
  import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS } from './chunk-ONVGFVNH.js';
3
3
  import { getFluidGridsConfig } from './chunk-UZG3ZIQM.js';
4
- import { RunLogsDocument, RunLogAppendedDocument } from './chunk-L2UWPFJM.js';
5
- import { throwIfResultError } from './chunk-CFCUM4CN.js';
4
+ import { RunLogsDocument, RunLogAppendedDocument } from './chunk-SAZVBFMO.js';
5
+ import { throwIfResultError } from './chunk-4UAWCWS7.js';
6
6
  import { useTr } from './chunk-UULVIT25.js';
7
7
  import { getFluidGridsClient, getFluidGridsClientSafe } from './chunk-NTWG3CJX.js';
8
8
  import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
@@ -1,6 +1,6 @@
1
- import { useFluidGridsFlag, FLUIDGRIDS_FLAGS, LogStreamingTab } from './chunk-OM5X65LG.js';
1
+ import { useFluidGridsFlag, FLUIDGRIDS_FLAGS, LogStreamingTab } from './chunk-KNFGMDDU.js';
2
2
  import { useFlowStore } from './chunk-EGYJKHAL.js';
3
- import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-L2UWPFJM.js';
3
+ import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery } from './chunk-SAZVBFMO.js';
4
4
  import { useTr } from './chunk-UULVIT25.js';
5
5
  import { useState, useMemo, useEffect, useCallback } from 'react';
6
6
  import { useNavigate, useParams } from 'react-router';
@@ -1,10 +1,11 @@
1
1
  import { NEW_WORKFLOW_NAV } from './chunk-6N27YGMB.js';
2
- import { QuotaExhaustedDialog } from './chunk-SQFFJUAT.js';
2
+ import { QuotaExhaustedDialog } from './chunk-SYVLFHWV.js';
3
3
  import { SdkPermissionButton, FLUIDGRIDS_PERMISSIONS, SdkPermissionGate } from './chunk-ONVGFVNH.js';
4
- import { useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-O6E247J6.js';
4
+ import { useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-HP3A6BPK.js';
5
5
  import { workflowsListControls } from './chunk-D3UWK7GY.js';
6
6
  import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
7
7
  import { useFlowStore } from './chunk-EGYJKHAL.js';
8
+ import { BILLING_PLANS_PATH, isQuotaExhaustedFailure } from './chunk-4UAWCWS7.js';
8
9
  import { useTr } from './chunk-UULVIT25.js';
9
10
  import { useState, useMemo } from 'react';
10
11
  import { useNavigate } from 'react-router';
@@ -13,7 +14,6 @@ import { Icon } from '@iconify/react';
13
14
  import { Button, Badge, Input, IllustratedEmptyState, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Label, Textarea, DialogFooter, Skeleton, TooltipProvider, Card, Tooltip, TooltipTrigger, TooltipContent, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction } from '@burdenoff/fe-libs/ui';
14
15
  import { cn } from '@burdenoff/fe-libs/utils';
15
16
  import { TagBadge } from '@burdenoff/fe-libs/tag';
16
- import { isQuotaExhaustedError } from '@burdenoff/fe-libs/shared/utils';
17
17
  import { toast } from 'sonner';
18
18
  import { Share2, Copy } from 'lucide-react';
19
19
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -286,7 +286,7 @@ var CardWorkflow = ({
286
286
  }
287
287
  } catch (error) {
288
288
  const cause = error instanceof Error ? error.cause : void 0;
289
- if (isQuotaExhaustedError(cause) || isQuotaExhaustedError(error)) {
289
+ if (isQuotaExhaustedFailure(cause) || isQuotaExhaustedFailure(error)) {
290
290
  setShowQuotaExhausted(true);
291
291
  return;
292
292
  }
@@ -582,7 +582,7 @@ var CardWorkflow = ({
582
582
  onOpenChange: setShowQuotaExhausted,
583
583
  onUpgrade: () => {
584
584
  setShowQuotaExhausted(false);
585
- navigate("/billing");
585
+ navigate(BILLING_PLANS_PATH);
586
586
  }
587
587
  }
588
588
  )
@@ -1,8 +1,8 @@
1
- import { FluidGridsProvider, Card, FluidGridsMark } from './chunk-2CDLVDSU.js';
1
+ import { FluidGridsProvider, Card, FluidGridsMark } from './chunk-L5RW3DUB.js';
2
2
  import { Input } from './chunk-IEVSFCFS.js';
3
3
  import { Button } from './chunk-GDAFKRQO.js';
4
4
  import { cn } from './chunk-JL7CASN5.js';
5
- import { useWorkflowDefinition } from './chunk-O6E247J6.js';
5
+ import { useWorkflowDefinition } from './chunk-HP3A6BPK.js';
6
6
  import { useFlowStore } from './chunk-EGYJKHAL.js';
7
7
  import { useTr } from './chunk-UULVIT25.js';
8
8
  import { useState, useRef, useEffect, useCallback } from 'react';
@@ -1,6 +1,7 @@
1
1
  import { getFluidGridsConfig } from './chunk-UZG3ZIQM.js';
2
- import { WorkflowDefinitionsDocument, WorkflowDefinitionDocument, WorkflowVersionsDocument, CreateWorkflowDefinitionDocument, ImportWorkflowDocument, UpdateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, RestoreWorkflowVersionDocument, TriggerWorkflowDocument, WorkflowRunsDocument, WorkflowRunDocument, DashboardSummaryDocument, ActivateWorkflowDefinitionDocument, DeactivateWorkflowDefinitionDocument } from './chunk-L2UWPFJM.js';
3
- import { throwIfResultError } from './chunk-CFCUM4CN.js';
2
+ import { WorkflowDefinitionsDocument, WorkflowDefinitionDocument, WorkflowVersionsDocument, CreateWorkflowDefinitionDocument, ImportWorkflowDocument, UpdateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, DeleteWorkflowDefinitionDocument, DuplicateWorkflowDocument, RestoreWorkflowVersionDocument, TriggerWorkflowDocument, WorkflowRunsDocument, WorkflowRunDocument, DashboardSummaryDocument, ActivateWorkflowDefinitionDocument, DeactivateWorkflowDefinitionDocument } from './chunk-SAZVBFMO.js';
3
+ import { throwIfResultError, openRunQuotaUpgradePrompt } from './chunk-4UAWCWS7.js';
4
+ import { useTr } from './chunk-UULVIT25.js';
4
5
  import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
5
6
  import { useState, useCallback, useEffect, useMemo } from 'react';
6
7
 
@@ -474,30 +475,35 @@ function useRestoreWorkflowVersion() {
474
475
  };
475
476
  }
476
477
  function useTriggerWorkflow() {
478
+ const tr = useTr();
477
479
  const [result, setResult] = useState(null);
478
480
  const [loading, setLoading] = useState(false);
479
481
  const [error, setError] = useState(null);
480
- const triggerWorkflow = useCallback(async (input) => {
481
- setLoading(true);
482
- setError(null);
483
- try {
484
- const client = getFluidGridsClient();
485
- const response = throwIfResultError(
486
- await client.mutate({
487
- mutation: TRIGGER_WORKFLOW,
488
- variables: { input }
489
- })
490
- );
491
- const data = response.data?.triggerWorkflow ?? null;
492
- setResult(data);
493
- return data;
494
- } catch (err) {
495
- setError(err);
496
- return null;
497
- } finally {
498
- setLoading(false);
499
- }
500
- }, []);
482
+ const triggerWorkflow = useCallback(
483
+ async (input) => {
484
+ setLoading(true);
485
+ setError(null);
486
+ try {
487
+ const client = getFluidGridsClient();
488
+ const response = throwIfResultError(
489
+ await client.mutate({
490
+ mutation: TRIGGER_WORKFLOW,
491
+ variables: { input }
492
+ })
493
+ );
494
+ const data = response.data?.triggerWorkflow ?? null;
495
+ setResult(data);
496
+ return data;
497
+ } catch (err) {
498
+ setError(err);
499
+ openRunQuotaUpgradePrompt(err, tr);
500
+ return null;
501
+ } finally {
502
+ setLoading(false);
503
+ }
504
+ },
505
+ [tr]
506
+ );
501
507
  return {
502
508
  triggerWorkflow,
503
509
  result,
@@ -1,5 +1,5 @@
1
1
  import { LOG_STREAM_DESTINATIONS, CREATE_LOG_STREAM_DESTINATION, UPDATE_LOG_STREAM_DESTINATION, DELETE_LOG_STREAM_DESTINATION, TEST_LOG_STREAM_DESTINATION, REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS, OBSERVABILITY_DASHBOARD_SUMMARY, OBSERVABILITY_FAILED_RUNS, OBSERVABILITY_DATA_SINKS, OBSERVABILITY_DATA_SINK_DATA } from './chunk-QBFAJNUC.js';
2
- import { throwIfResultError, describeOperationError } from './chunk-CFCUM4CN.js';
2
+ import { throwIfResultError, describeOperationError, openRunQuotaUpgradePrompt } from './chunk-4UAWCWS7.js';
3
3
  import { useTr } from './chunk-UULVIT25.js';
4
4
  import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
5
5
  import { useOptionalFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';
@@ -128,46 +128,55 @@ function useLogStreamDestinationActions() {
128
128
  return { create, update, remove, test, loading, error };
129
129
  }
130
130
  function useRunReplayActions() {
131
+ const tr = useTr();
131
132
  const [loading, setLoading] = useState(false);
132
133
  const [error, setError] = useState(null);
133
- const replay = useCallback(async (runId) => {
134
- setLoading(true);
135
- setError(null);
136
- try {
137
- const result = throwIfResultError(
138
- await getFluidGridsClient().mutate({
139
- mutation: REPLAY_WORKFLOW_RUN,
140
- variables: { runId }
141
- })
142
- );
143
- return result.data?.replayWorkflowRun ?? null;
144
- } catch (cause) {
145
- const nextError = new Error(describeOperationError(cause));
146
- setError(nextError);
147
- return null;
148
- } finally {
149
- setLoading(false);
150
- }
151
- }, []);
152
- const retryMany = useCallback(async (runIds) => {
153
- setLoading(true);
154
- setError(null);
155
- try {
156
- const result = throwIfResultError(
157
- await getFluidGridsClient().mutate({
158
- mutation: RETRY_WORKFLOW_RUNS,
159
- variables: { runIds }
160
- })
161
- );
162
- return result.data?.retryWorkflowRuns ?? [];
163
- } catch (cause) {
164
- const nextError = new Error(describeOperationError(cause));
165
- setError(nextError);
166
- return [];
167
- } finally {
168
- setLoading(false);
169
- }
170
- }, []);
134
+ const replay = useCallback(
135
+ async (runId) => {
136
+ setLoading(true);
137
+ setError(null);
138
+ try {
139
+ const result = throwIfResultError(
140
+ await getFluidGridsClient().mutate({
141
+ mutation: REPLAY_WORKFLOW_RUN,
142
+ variables: { runId }
143
+ })
144
+ );
145
+ return result.data?.replayWorkflowRun ?? null;
146
+ } catch (cause) {
147
+ const nextError = new Error(describeOperationError(cause), { cause });
148
+ setError(nextError);
149
+ openRunQuotaUpgradePrompt(cause, tr);
150
+ return null;
151
+ } finally {
152
+ setLoading(false);
153
+ }
154
+ },
155
+ [tr]
156
+ );
157
+ const retryMany = useCallback(
158
+ async (runIds) => {
159
+ setLoading(true);
160
+ setError(null);
161
+ try {
162
+ const result = throwIfResultError(
163
+ await getFluidGridsClient().mutate({
164
+ mutation: RETRY_WORKFLOW_RUNS,
165
+ variables: { runIds }
166
+ })
167
+ );
168
+ return result.data?.retryWorkflowRuns ?? [];
169
+ } catch (cause) {
170
+ const nextError = new Error(describeOperationError(cause), { cause });
171
+ setError(nextError);
172
+ openRunQuotaUpgradePrompt(cause, tr);
173
+ return [];
174
+ } finally {
175
+ setLoading(false);
176
+ }
177
+ },
178
+ [tr]
179
+ );
171
180
  return { replay, retryMany, loading, error };
172
181
  }
173
182
  function useInsightsData() {