@burdenoff/fluidgrids-fe-sdk 2026.1112.11 → 2026.1113.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiStudioPage-Q3455WO6.js → AiStudioPage-5KYZ8r8-.js} +464 -7
- package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
- package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/{DataSinkDashboardPage-B5bqPnUn.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
- package/dist/{DataTablesPage-Zz23QZQp.js → DataTablesPage-BBvABuxE.js} +5 -4
- package/dist/{EntityTagPicker-CuZAMby_.js → EntityTagPicker-BppBSEJk.js} +2 -2
- package/dist/{ExecutionDetailPage-UyXErYuS.js → ExecutionDetailPage-BXDF2eoT.js} +1601 -31
- package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
- package/dist/{ExecutionsListPage-CUJQA0Vk.js → ExecutionsListPage--4BthM8L.js} +286 -12
- package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
- package/dist/{FluidGridsProvider-CGi9a1So.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
- package/dist/{HistoryPage-DLqmeQ12.js → HistoryPage-BvFk2m1m.js} +4 -3
- package/dist/{InsightsPage-CqtPCpj7.js → InsightsPage-Dwmb02F6.js} +2682 -5
- package/dist/{MissingNodesInstallModal-Df4fEAnr.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
- package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
- package/dist/{OpenTemplateAsCodeButton-BmuHhDRr.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
- package/dist/{PaidTemplateConfirm-BTrK35af.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
- package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
- package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
- package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
- package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
- package/dist/{SettingsPage-CVvaQ_g9.js → SettingsPage-CfjXiGpb.js} +694 -14
- package/dist/{TagFilterSelect-DcusTt1p.js → TagFilterSelect-CAShgvbS.js} +1 -1
- package/dist/{TaskQueuesPage-C2dkenVF.js → TaskQueuesPage--Mmn36b-.js} +3 -3
- package/dist/{TemplateCard-DFbYdC2c.js → TemplateCard-BA_9em22.js} +644 -352
- package/dist/{TemplateConfigurationModal-Dw2UgWYF.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
- package/dist/{TemplateDetailPanel-DDySr7_1.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
- package/dist/{TemplatePreview-D8zWdTGv.js → TemplatePreview-Bagja6WN.js} +7 -7
- package/dist/{TemplatesPage-XCwxJjN6.js → TemplatesPage-CAajpJ5w.js} +711 -6
- package/dist/{VariablesPage-DpiLh99E.js → VariablesPage-CgUBKhAe.js} +3 -3
- package/dist/{VersionDiffDialog-c27yet_-.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
- package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
- package/dist/{WorkflowBuilder-CXqwzR7a.js → WorkflowBuilder-DMpSPElu.js} +16 -13
- package/dist/{WorkflowBuilder-BaNAX7Nk.js → WorkflowBuilder-v8h8skwG.js} +5 -5
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
- package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/{WorkflowSearchRedirect-DsQ71VcC.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
- package/dist/{WorkflowShareDialog-BRwTF9QB.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
- package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
- package/dist/{WorkflowsList-DQW-WLl5.js → WorkflowsList-CPYzfE4K.js} +11 -9
- package/dist/agent-form-D0uLvzx4.js +718 -0
- package/dist/{agentTools-edsllozS.js → agentTools-DTXUqtfu.js} +4 -4
- package/dist/api-BZVyX5d2.js +2286 -0
- package/dist/api-BqA-f-AD.js +8064 -0
- package/dist/app-BJUvugPM.js +3813 -0
- package/dist/assert-rules-CPNrO44K.js +318 -0
- package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/{canvasNoteTools-DzNTcQGo.js → canvasNoteTools-DmfZwtnL.js} +3 -3
- package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
- package/dist/client-Ctl4jmY3.js +127 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/{code-editor-field-B2l-B8in.js → code-editor-field-Cv907s3W.js} +2 -2
- package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
- package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
- package/dist/config-X97zrIvn.js +600 -0
- package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
- package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
- package/dist/durable-nodes-DXCCQYWD.js +81 -0
- package/dist/errors-xPZ-IbQd.js +142 -0
- package/dist/executions.js +2 -2
- package/dist/{flow-builder-B2JGvYeK.js → flow-builder-Dv5fWJ6F.js} +9781 -8416
- package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
- package/dist/global-operations-7pvXw_j9.js +145 -0
- package/dist/history.js +1 -1
- package/dist/{index-ChYBGz_a.d.ts → index-DtMUtXNq.d.ts} +306 -246
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4404 -47
- package/dist/input-ChT6Q-Pr.js +17 -0
- package/dist/logs-panel-DtG93ocy.js +342 -0
- package/dist/mapping-colors-BIX_YeCQ.js +48 -0
- package/dist/{node-detail-view-BDXhEGVD.js → node-detail-view-BKI_2kM6.js} +12 -11
- package/dist/{node-editor-tab-body-DBnsqYUK.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
- package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/nodes.js +1 -1
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/{popover-Cl7_tXph.js → popover-DDv7J1Kl.js} +717 -6
- package/dist/{quick-config-panel-C_Z0RXEG.js → quick-config-panel-BPCRfqWI.js} +4 -4
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/{schedule-panel-CFAKmrBH.js → schedule-panel-C1KwfLCE.js} +197 -79
- package/dist/settings.js +1 -1
- package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
- package/dist/{sidebar-node-editor-DZZlDElK.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
- package/dist/sticky-notes-23j-wL6Q.js +96 -0
- package/dist/template-code-dqRunGOv.js +184 -0
- package/dist/template-preview-C01KV277.js +29 -0
- package/dist/templates.js +2 -2
- package/dist/token-refresh-link-BjN7H4qA.js +291 -0
- package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
- package/dist/useConnections-BlB0gbOB.js +931 -0
- package/dist/useDurableParity-BgLH_SCF.js +2088 -0
- package/dist/{useEntityTags-BpDeLhzV.js → useEntityTags-4iW6UTly.js} +227 -3
- package/dist/{useExecutions-D2iKpt1Z.js → useExecutions-Bm7q_UwN.js} +6 -3
- package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
- package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
- package/dist/{useObservability-DIhzs9F-.js → useObservability-DPATdbw7.js} +4 -2
- package/dist/{useRunHistory-BhVY82Pg.js → useRunHistory-CGfjCsJ3.js} +1122 -4
- package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
- package/dist/{useWorkflowCodeExport-BXy4NPsE.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
- package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
- package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
- package/dist/{useWorkflows-Clsu0o8t.js → useWorkflows-aqVD7kGa.js} +694 -4
- package/dist/workflow-builder.js +5 -5
- package/dist/{workflow-code-transfer-DemcCpOv.js → workflow-code-transfer-5C0HUzae.js} +1 -53
- package/dist/workflow-host.js +4 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +19 -19
- package/dist/workflow-preview.js +3 -2
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
- package/dist/FailureTriagePanel-BjatYyAa.js +0 -311
- package/dist/WorkflowProposalCard-BvmJ5ea8.js +0 -1245
- package/dist/agent-form-Bfvm32j1.js +0 -83
- package/dist/api-Dw8nfVRD.js +0 -55
- package/dist/api-m8hX_l2k.js +0 -224
- package/dist/client-C9XSzSXr.js +0 -1147
- package/dist/graphql-operation-types-DZVhCBEi.js +0 -52817
- package/dist/useAgentDefinitions-B4sw7bLw.js +0 -550
- package/dist/useConnections-Cs7LCWEM.js +0 -401
- package/dist/useDurableParity-jtqJF547.js +0 -504
- package/dist/useWorkflowOrganization-C4y6BOnN.js +0 -282
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { o as throwIfResultError } from "./errors-xPZ-IbQd.js";
|
|
3
|
+
import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
|
|
4
|
+
import { useCallback, useEffect, useState } from "react";
|
|
5
|
+
import { gql } from "@apollo/client";
|
|
6
|
+
|
|
7
|
+
// src/generated/documents/wspace/RemoveNodeFromWorkflowsDocument.ts
|
|
8
|
+
const RemoveNodeFromWorkflowsDocument = {
|
|
9
|
+
"kind": "Document",
|
|
10
|
+
"definitions": [{
|
|
11
|
+
"kind": "OperationDefinition",
|
|
12
|
+
"operation": "mutation",
|
|
13
|
+
"name": {
|
|
14
|
+
"kind": "Name",
|
|
15
|
+
"value": "RemoveNodeFromWorkflows"
|
|
16
|
+
},
|
|
17
|
+
"variableDefinitions": [
|
|
18
|
+
{
|
|
19
|
+
"kind": "VariableDefinition",
|
|
20
|
+
"variable": {
|
|
21
|
+
"kind": "Variable",
|
|
22
|
+
"name": {
|
|
23
|
+
"kind": "Name",
|
|
24
|
+
"value": "nodeType"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": {
|
|
28
|
+
"kind": "NonNullType",
|
|
29
|
+
"type": {
|
|
30
|
+
"kind": "NamedType",
|
|
31
|
+
"name": {
|
|
32
|
+
"kind": "Name",
|
|
33
|
+
"value": "String"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"directives": []
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"kind": "VariableDefinition",
|
|
41
|
+
"variable": {
|
|
42
|
+
"kind": "Variable",
|
|
43
|
+
"name": {
|
|
44
|
+
"kind": "Name",
|
|
45
|
+
"value": "nodeVersion"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"type": {
|
|
49
|
+
"kind": "NonNullType",
|
|
50
|
+
"type": {
|
|
51
|
+
"kind": "NamedType",
|
|
52
|
+
"name": {
|
|
53
|
+
"kind": "Name",
|
|
54
|
+
"value": "String"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"directives": []
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"kind": "VariableDefinition",
|
|
62
|
+
"variable": {
|
|
63
|
+
"kind": "Variable",
|
|
64
|
+
"name": {
|
|
65
|
+
"kind": "Name",
|
|
66
|
+
"value": "workflowIds"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"type": {
|
|
70
|
+
"kind": "NonNullType",
|
|
71
|
+
"type": {
|
|
72
|
+
"kind": "ListType",
|
|
73
|
+
"type": {
|
|
74
|
+
"kind": "NonNullType",
|
|
75
|
+
"type": {
|
|
76
|
+
"kind": "NamedType",
|
|
77
|
+
"name": {
|
|
78
|
+
"kind": "Name",
|
|
79
|
+
"value": "ID"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"directives": []
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"kind": "VariableDefinition",
|
|
89
|
+
"variable": {
|
|
90
|
+
"kind": "Variable",
|
|
91
|
+
"name": {
|
|
92
|
+
"kind": "Name",
|
|
93
|
+
"value": "allVersions"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"type": {
|
|
97
|
+
"kind": "NamedType",
|
|
98
|
+
"name": {
|
|
99
|
+
"kind": "Name",
|
|
100
|
+
"value": "Boolean"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"directives": []
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"directives": [],
|
|
107
|
+
"selectionSet": {
|
|
108
|
+
"kind": "SelectionSet",
|
|
109
|
+
"selections": [{
|
|
110
|
+
"kind": "Field",
|
|
111
|
+
"name": {
|
|
112
|
+
"kind": "Name",
|
|
113
|
+
"value": "removeNodeFromWorkflows"
|
|
114
|
+
},
|
|
115
|
+
"arguments": [{
|
|
116
|
+
"kind": "Argument",
|
|
117
|
+
"name": {
|
|
118
|
+
"kind": "Name",
|
|
119
|
+
"value": "input"
|
|
120
|
+
},
|
|
121
|
+
"value": {
|
|
122
|
+
"kind": "ObjectValue",
|
|
123
|
+
"fields": [
|
|
124
|
+
{
|
|
125
|
+
"kind": "ObjectField",
|
|
126
|
+
"name": {
|
|
127
|
+
"kind": "Name",
|
|
128
|
+
"value": "nodeType"
|
|
129
|
+
},
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "Variable",
|
|
132
|
+
"name": {
|
|
133
|
+
"kind": "Name",
|
|
134
|
+
"value": "nodeType"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"kind": "ObjectField",
|
|
140
|
+
"name": {
|
|
141
|
+
"kind": "Name",
|
|
142
|
+
"value": "nodeVersion"
|
|
143
|
+
},
|
|
144
|
+
"value": {
|
|
145
|
+
"kind": "Variable",
|
|
146
|
+
"name": {
|
|
147
|
+
"kind": "Name",
|
|
148
|
+
"value": "nodeVersion"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"kind": "ObjectField",
|
|
154
|
+
"name": {
|
|
155
|
+
"kind": "Name",
|
|
156
|
+
"value": "workflowIds"
|
|
157
|
+
},
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "Variable",
|
|
160
|
+
"name": {
|
|
161
|
+
"kind": "Name",
|
|
162
|
+
"value": "workflowIds"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"kind": "ObjectField",
|
|
168
|
+
"name": {
|
|
169
|
+
"kind": "Name",
|
|
170
|
+
"value": "allVersions"
|
|
171
|
+
},
|
|
172
|
+
"value": {
|
|
173
|
+
"kind": "Variable",
|
|
174
|
+
"name": {
|
|
175
|
+
"kind": "Name",
|
|
176
|
+
"value": "allVersions"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}],
|
|
183
|
+
"directives": [],
|
|
184
|
+
"selectionSet": {
|
|
185
|
+
"kind": "SelectionSet",
|
|
186
|
+
"selections": [
|
|
187
|
+
{
|
|
188
|
+
"kind": "Field",
|
|
189
|
+
"name": {
|
|
190
|
+
"kind": "Name",
|
|
191
|
+
"value": "success"
|
|
192
|
+
},
|
|
193
|
+
"arguments": [],
|
|
194
|
+
"directives": []
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"kind": "Field",
|
|
198
|
+
"name": {
|
|
199
|
+
"kind": "Name",
|
|
200
|
+
"value": "removedFromWorkflows"
|
|
201
|
+
},
|
|
202
|
+
"arguments": [],
|
|
203
|
+
"directives": []
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"kind": "Field",
|
|
207
|
+
"name": {
|
|
208
|
+
"kind": "Name",
|
|
209
|
+
"value": "deactivatedWorkflows"
|
|
210
|
+
},
|
|
211
|
+
"arguments": [],
|
|
212
|
+
"directives": []
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"kind": "Field",
|
|
216
|
+
"name": {
|
|
217
|
+
"kind": "Name",
|
|
218
|
+
"value": "cleanedUsageEntries"
|
|
219
|
+
},
|
|
220
|
+
"arguments": [],
|
|
221
|
+
"directives": []
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
}]
|
|
226
|
+
}
|
|
227
|
+
}]
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
// src/generated/documents/wspace/NodeSchemaIntrospectionDocument.ts
|
|
231
|
+
const NodeSchemaIntrospectionDocument = {
|
|
232
|
+
"kind": "Document",
|
|
233
|
+
"definitions": [{
|
|
234
|
+
"kind": "OperationDefinition",
|
|
235
|
+
"operation": "query",
|
|
236
|
+
"name": {
|
|
237
|
+
"kind": "Name",
|
|
238
|
+
"value": "NodeSchemaIntrospection"
|
|
239
|
+
},
|
|
240
|
+
"variableDefinitions": [{
|
|
241
|
+
"kind": "VariableDefinition",
|
|
242
|
+
"variable": {
|
|
243
|
+
"kind": "Variable",
|
|
244
|
+
"name": {
|
|
245
|
+
"kind": "Name",
|
|
246
|
+
"value": "nodeType"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"type": {
|
|
250
|
+
"kind": "NonNullType",
|
|
251
|
+
"type": {
|
|
252
|
+
"kind": "NamedType",
|
|
253
|
+
"name": {
|
|
254
|
+
"kind": "Name",
|
|
255
|
+
"value": "String"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"directives": []
|
|
260
|
+
}, {
|
|
261
|
+
"kind": "VariableDefinition",
|
|
262
|
+
"variable": {
|
|
263
|
+
"kind": "Variable",
|
|
264
|
+
"name": {
|
|
265
|
+
"kind": "Name",
|
|
266
|
+
"value": "version"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"type": {
|
|
270
|
+
"kind": "NonNullType",
|
|
271
|
+
"type": {
|
|
272
|
+
"kind": "NamedType",
|
|
273
|
+
"name": {
|
|
274
|
+
"kind": "Name",
|
|
275
|
+
"value": "String"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"directives": []
|
|
280
|
+
}],
|
|
281
|
+
"directives": [],
|
|
282
|
+
"selectionSet": {
|
|
283
|
+
"kind": "SelectionSet",
|
|
284
|
+
"selections": [{
|
|
285
|
+
"kind": "Field",
|
|
286
|
+
"name": {
|
|
287
|
+
"kind": "Name",
|
|
288
|
+
"value": "nodeSchemaIntrospection"
|
|
289
|
+
},
|
|
290
|
+
"arguments": [{
|
|
291
|
+
"kind": "Argument",
|
|
292
|
+
"name": {
|
|
293
|
+
"kind": "Name",
|
|
294
|
+
"value": "nodeType"
|
|
295
|
+
},
|
|
296
|
+
"value": {
|
|
297
|
+
"kind": "Variable",
|
|
298
|
+
"name": {
|
|
299
|
+
"kind": "Name",
|
|
300
|
+
"value": "nodeType"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}, {
|
|
304
|
+
"kind": "Argument",
|
|
305
|
+
"name": {
|
|
306
|
+
"kind": "Name",
|
|
307
|
+
"value": "version"
|
|
308
|
+
},
|
|
309
|
+
"value": {
|
|
310
|
+
"kind": "Variable",
|
|
311
|
+
"name": {
|
|
312
|
+
"kind": "Name",
|
|
313
|
+
"value": "version"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}],
|
|
317
|
+
"directives": []
|
|
318
|
+
}]
|
|
319
|
+
}
|
|
320
|
+
}]
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
// src/generated/documents/wspace/NodeUsageStatusDocument.ts
|
|
324
|
+
const NodeUsageStatusDocument = {
|
|
325
|
+
"kind": "Document",
|
|
326
|
+
"definitions": [{
|
|
327
|
+
"kind": "OperationDefinition",
|
|
328
|
+
"operation": "query",
|
|
329
|
+
"name": {
|
|
330
|
+
"kind": "Name",
|
|
331
|
+
"value": "NodeUsageStatus"
|
|
332
|
+
},
|
|
333
|
+
"variableDefinitions": [
|
|
334
|
+
{
|
|
335
|
+
"kind": "VariableDefinition",
|
|
336
|
+
"variable": {
|
|
337
|
+
"kind": "Variable",
|
|
338
|
+
"name": {
|
|
339
|
+
"kind": "Name",
|
|
340
|
+
"value": "nodeType"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"type": {
|
|
344
|
+
"kind": "NonNullType",
|
|
345
|
+
"type": {
|
|
346
|
+
"kind": "NamedType",
|
|
347
|
+
"name": {
|
|
348
|
+
"kind": "Name",
|
|
349
|
+
"value": "String"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"directives": []
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"kind": "VariableDefinition",
|
|
357
|
+
"variable": {
|
|
358
|
+
"kind": "Variable",
|
|
359
|
+
"name": {
|
|
360
|
+
"kind": "Name",
|
|
361
|
+
"value": "nodeVersion"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"type": {
|
|
365
|
+
"kind": "NonNullType",
|
|
366
|
+
"type": {
|
|
367
|
+
"kind": "NamedType",
|
|
368
|
+
"name": {
|
|
369
|
+
"kind": "Name",
|
|
370
|
+
"value": "String"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"directives": []
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"kind": "VariableDefinition",
|
|
378
|
+
"variable": {
|
|
379
|
+
"kind": "Variable",
|
|
380
|
+
"name": {
|
|
381
|
+
"kind": "Name",
|
|
382
|
+
"value": "allVersions"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"type": {
|
|
386
|
+
"kind": "NamedType",
|
|
387
|
+
"name": {
|
|
388
|
+
"kind": "Name",
|
|
389
|
+
"value": "Boolean"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"directives": []
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"directives": [],
|
|
396
|
+
"selectionSet": {
|
|
397
|
+
"kind": "SelectionSet",
|
|
398
|
+
"selections": [{
|
|
399
|
+
"kind": "Field",
|
|
400
|
+
"name": {
|
|
401
|
+
"kind": "Name",
|
|
402
|
+
"value": "nodeUsageStatus"
|
|
403
|
+
},
|
|
404
|
+
"arguments": [
|
|
405
|
+
{
|
|
406
|
+
"kind": "Argument",
|
|
407
|
+
"name": {
|
|
408
|
+
"kind": "Name",
|
|
409
|
+
"value": "nodeType"
|
|
410
|
+
},
|
|
411
|
+
"value": {
|
|
412
|
+
"kind": "Variable",
|
|
413
|
+
"name": {
|
|
414
|
+
"kind": "Name",
|
|
415
|
+
"value": "nodeType"
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"kind": "Argument",
|
|
421
|
+
"name": {
|
|
422
|
+
"kind": "Name",
|
|
423
|
+
"value": "nodeVersion"
|
|
424
|
+
},
|
|
425
|
+
"value": {
|
|
426
|
+
"kind": "Variable",
|
|
427
|
+
"name": {
|
|
428
|
+
"kind": "Name",
|
|
429
|
+
"value": "nodeVersion"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"kind": "Argument",
|
|
435
|
+
"name": {
|
|
436
|
+
"kind": "Name",
|
|
437
|
+
"value": "allVersions"
|
|
438
|
+
},
|
|
439
|
+
"value": {
|
|
440
|
+
"kind": "Variable",
|
|
441
|
+
"name": {
|
|
442
|
+
"kind": "Name",
|
|
443
|
+
"value": "allVersions"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
"directives": [],
|
|
449
|
+
"selectionSet": {
|
|
450
|
+
"kind": "SelectionSet",
|
|
451
|
+
"selections": [
|
|
452
|
+
{
|
|
453
|
+
"kind": "Field",
|
|
454
|
+
"name": {
|
|
455
|
+
"kind": "Name",
|
|
456
|
+
"value": "nodeType"
|
|
457
|
+
},
|
|
458
|
+
"arguments": [],
|
|
459
|
+
"directives": []
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"kind": "Field",
|
|
463
|
+
"name": {
|
|
464
|
+
"kind": "Name",
|
|
465
|
+
"value": "nodeVersion"
|
|
466
|
+
},
|
|
467
|
+
"arguments": [],
|
|
468
|
+
"directives": []
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"kind": "Field",
|
|
472
|
+
"name": {
|
|
473
|
+
"kind": "Name",
|
|
474
|
+
"value": "isInUse"
|
|
475
|
+
},
|
|
476
|
+
"arguments": [],
|
|
477
|
+
"directives": []
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"kind": "Field",
|
|
481
|
+
"name": {
|
|
482
|
+
"kind": "Name",
|
|
483
|
+
"value": "workflowCount"
|
|
484
|
+
},
|
|
485
|
+
"arguments": [],
|
|
486
|
+
"directives": []
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"kind": "Field",
|
|
490
|
+
"name": {
|
|
491
|
+
"kind": "Name",
|
|
492
|
+
"value": "workflows"
|
|
493
|
+
},
|
|
494
|
+
"arguments": [],
|
|
495
|
+
"directives": [],
|
|
496
|
+
"selectionSet": {
|
|
497
|
+
"kind": "SelectionSet",
|
|
498
|
+
"selections": [
|
|
499
|
+
{
|
|
500
|
+
"kind": "Field",
|
|
501
|
+
"name": {
|
|
502
|
+
"kind": "Name",
|
|
503
|
+
"value": "workflowId"
|
|
504
|
+
},
|
|
505
|
+
"arguments": [],
|
|
506
|
+
"directives": []
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"kind": "Field",
|
|
510
|
+
"name": {
|
|
511
|
+
"kind": "Name",
|
|
512
|
+
"value": "workflowKey"
|
|
513
|
+
},
|
|
514
|
+
"arguments": [],
|
|
515
|
+
"directives": []
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"kind": "Field",
|
|
519
|
+
"name": {
|
|
520
|
+
"kind": "Name",
|
|
521
|
+
"value": "workflowName"
|
|
522
|
+
},
|
|
523
|
+
"arguments": [],
|
|
524
|
+
"directives": []
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
}]
|
|
532
|
+
}
|
|
533
|
+
}]
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
// src/modules/connections/hooks/useConnections.ts
|
|
537
|
+
/**
|
|
538
|
+
* Custom hooks for fetching connections from the integrations service.
|
|
539
|
+
*
|
|
540
|
+
* These hooks query the wspace-integrations-svc via the federated GraphQL gateway.
|
|
541
|
+
* Connections replace the legacy credentials system for third-party authentication.
|
|
542
|
+
*/
|
|
543
|
+
const PROVIDER_FIELDS = gql`
|
|
544
|
+
fragment ProviderFields on IntegrationProvider {
|
|
545
|
+
id
|
|
546
|
+
key
|
|
547
|
+
name
|
|
548
|
+
description
|
|
549
|
+
category
|
|
550
|
+
authType
|
|
551
|
+
icon
|
|
552
|
+
color
|
|
553
|
+
website
|
|
554
|
+
docsUrl
|
|
555
|
+
isBuiltIn
|
|
556
|
+
isEnabled
|
|
557
|
+
availableScopes
|
|
558
|
+
# How this provider can be authenticated, as data. The builder renders the
|
|
559
|
+
# form from this rather than from a per-provider React component, so a
|
|
560
|
+
# provider or a new method added by an administrator shows up here with no
|
|
561
|
+
# frontend change.
|
|
562
|
+
authMethods {
|
|
563
|
+
key
|
|
564
|
+
displayName
|
|
565
|
+
description
|
|
566
|
+
flow
|
|
567
|
+
authType
|
|
568
|
+
configSchema
|
|
569
|
+
availableScopes
|
|
570
|
+
defaultScopes
|
|
571
|
+
isConfigured
|
|
572
|
+
isEnabled
|
|
573
|
+
displayOrder
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
`;
|
|
577
|
+
const CONNECTION_FIELDS = gql`
|
|
578
|
+
${PROVIDER_FIELDS}
|
|
579
|
+
fragment ConnectionFields on IntegrationConnection {
|
|
580
|
+
id
|
|
581
|
+
name
|
|
582
|
+
description
|
|
583
|
+
providerId
|
|
584
|
+
provider {
|
|
585
|
+
...ProviderFields
|
|
586
|
+
}
|
|
587
|
+
status
|
|
588
|
+
lastHealthCheck
|
|
589
|
+
lastUsedAt
|
|
590
|
+
errorMessage
|
|
591
|
+
externalAccountId
|
|
592
|
+
externalAccountEmail
|
|
593
|
+
externalAccountName
|
|
594
|
+
grantedScopes
|
|
595
|
+
createdBy
|
|
596
|
+
createdAt
|
|
597
|
+
updatedAt
|
|
598
|
+
visibility
|
|
599
|
+
myAccess
|
|
600
|
+
canUse
|
|
601
|
+
}
|
|
602
|
+
`;
|
|
603
|
+
const GET_CONNECTIONS = gql`
|
|
604
|
+
${CONNECTION_FIELDS}
|
|
605
|
+
query GetConnections(
|
|
606
|
+
$filter: ConnectionFilterInput
|
|
607
|
+
$pagination: IntegrationsPaginationInput
|
|
608
|
+
) {
|
|
609
|
+
getConnections(filter: $filter, pagination: $pagination) {
|
|
610
|
+
items {
|
|
611
|
+
...ConnectionFields
|
|
612
|
+
}
|
|
613
|
+
total
|
|
614
|
+
hasMore
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
`;
|
|
618
|
+
const GET_CONNECTION = gql`
|
|
619
|
+
${CONNECTION_FIELDS}
|
|
620
|
+
query GetConnection($id: ID!) {
|
|
621
|
+
getConnection(id: $id) {
|
|
622
|
+
...ConnectionFields
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
`;
|
|
626
|
+
const GET_CONNECTIONS_BY_PROVIDER = gql`
|
|
627
|
+
${CONNECTION_FIELDS}
|
|
628
|
+
query GetConnectionsByProvider(
|
|
629
|
+
$providerId: ID!
|
|
630
|
+
$pagination: IntegrationsPaginationInput
|
|
631
|
+
) {
|
|
632
|
+
getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {
|
|
633
|
+
items {
|
|
634
|
+
...ConnectionFields
|
|
635
|
+
}
|
|
636
|
+
total
|
|
637
|
+
hasMore
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
`;
|
|
641
|
+
const GET_PROVIDERS = gql`
|
|
642
|
+
${PROVIDER_FIELDS}
|
|
643
|
+
query GetProviders(
|
|
644
|
+
$filter: ProviderFilterInput
|
|
645
|
+
$pagination: IntegrationsPaginationInput
|
|
646
|
+
) {
|
|
647
|
+
getProviders(filter: $filter, pagination: $pagination) {
|
|
648
|
+
items {
|
|
649
|
+
...ProviderFields
|
|
650
|
+
}
|
|
651
|
+
total
|
|
652
|
+
hasMore
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
`;
|
|
656
|
+
const INITIATE_OAUTH = gql`
|
|
657
|
+
mutation InitiateOAuth($input: InitiateOAuthInput!) {
|
|
658
|
+
initiateOAuth(input: $input) {
|
|
659
|
+
redirectUrl
|
|
660
|
+
state
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
`;
|
|
664
|
+
const CREATE_CONNECTION = gql`
|
|
665
|
+
${CONNECTION_FIELDS}
|
|
666
|
+
mutation CreateConnection($input: CreateConnectionInput!) {
|
|
667
|
+
createConnection(input: $input) {
|
|
668
|
+
...ConnectionFields
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
`;
|
|
672
|
+
/** Page size the integrations service allows; it clamps larger limits to 100. */
|
|
673
|
+
const CONNECTIONS_PAGE_SIZE = 100;
|
|
674
|
+
/**
|
|
675
|
+
* Every page of a connection list. A picker that accepts any provider (the
|
|
676
|
+
* HTTP Request node) must offer every saved connection, not the first 100.
|
|
677
|
+
*
|
|
678
|
+
* Reads until the server says there is no more, the reported total is reached,
|
|
679
|
+
* or a page adds no connection it has not already returned, so a server that
|
|
680
|
+
* keeps answering `hasMore` without progressing cannot loop forever.
|
|
681
|
+
*/
|
|
682
|
+
async function fetchAllConnectionPages(fetchPage) {
|
|
683
|
+
const items = [];
|
|
684
|
+
const seen = /* @__PURE__ */ new Set();
|
|
685
|
+
let total = 0;
|
|
686
|
+
let hasMore = false;
|
|
687
|
+
for (let offset = 0;; offset += 100) {
|
|
688
|
+
const result = await fetchPage(offset);
|
|
689
|
+
const fresh = (result?.items ?? []).filter((item) => !seen.has(item.id));
|
|
690
|
+
for (const item of fresh) {
|
|
691
|
+
seen.add(item.id);
|
|
692
|
+
items.push(item);
|
|
693
|
+
}
|
|
694
|
+
total = result?.total ?? items.length;
|
|
695
|
+
hasMore = result?.hasMore ?? false;
|
|
696
|
+
if (!hasMore || fresh.length === 0 || items.length >= total) break;
|
|
697
|
+
}
|
|
698
|
+
return {
|
|
699
|
+
items,
|
|
700
|
+
total,
|
|
701
|
+
hasMore: hasMore && items.length < total
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Hook to fetch list of connections from the integrations service.
|
|
706
|
+
*/
|
|
707
|
+
function useConnections(filter) {
|
|
708
|
+
const [connections, setConnections] = useState([]);
|
|
709
|
+
const [total, setTotal] = useState(0);
|
|
710
|
+
const [hasMore, setHasMore] = useState(false);
|
|
711
|
+
const [loading, setLoading] = useState(true);
|
|
712
|
+
const [error, setError] = useState(null);
|
|
713
|
+
const filterKey = JSON.stringify(filter);
|
|
714
|
+
const fetchData = useCallback(async () => {
|
|
715
|
+
setLoading(true);
|
|
716
|
+
setError(null);
|
|
717
|
+
try {
|
|
718
|
+
const client = getFluidGridsClient();
|
|
719
|
+
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
720
|
+
const list = await fetchAllConnectionPages(async (offset) => {
|
|
721
|
+
return (await client.query({
|
|
722
|
+
query: GET_CONNECTIONS,
|
|
723
|
+
variables: {
|
|
724
|
+
filter: parsedFilter,
|
|
725
|
+
pagination: {
|
|
726
|
+
limit: 100,
|
|
727
|
+
offset
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
fetchPolicy: "network-only"
|
|
731
|
+
})).data?.getConnections;
|
|
732
|
+
});
|
|
733
|
+
setConnections(list.items);
|
|
734
|
+
setTotal(list.total);
|
|
735
|
+
setHasMore(list.hasMore);
|
|
736
|
+
} catch (err) {
|
|
737
|
+
setError(err);
|
|
738
|
+
} finally {
|
|
739
|
+
setLoading(false);
|
|
740
|
+
}
|
|
741
|
+
}, [filterKey]);
|
|
742
|
+
useEffect(() => {
|
|
743
|
+
fetchData();
|
|
744
|
+
}, [fetchData]);
|
|
745
|
+
return {
|
|
746
|
+
connections,
|
|
747
|
+
total,
|
|
748
|
+
hasMore,
|
|
749
|
+
loading,
|
|
750
|
+
error,
|
|
751
|
+
refetch: fetchData
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Hook to fetch a single connection by ID.
|
|
756
|
+
*/
|
|
757
|
+
function useConnection(connectionId) {
|
|
758
|
+
const [connection, setConnection] = useState(null);
|
|
759
|
+
const [loading, setLoading] = useState(true);
|
|
760
|
+
const [error, setError] = useState(null);
|
|
761
|
+
const fetchData = useCallback(async () => {
|
|
762
|
+
if (!connectionId) {
|
|
763
|
+
setLoading(false);
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
setLoading(true);
|
|
767
|
+
setError(null);
|
|
768
|
+
try {
|
|
769
|
+
const result = await getFluidGridsClient().query({
|
|
770
|
+
query: GET_CONNECTION,
|
|
771
|
+
variables: { id: connectionId },
|
|
772
|
+
fetchPolicy: "cache-first"
|
|
773
|
+
});
|
|
774
|
+
setConnection(result.data?.getConnection ?? null);
|
|
775
|
+
} catch (err) {
|
|
776
|
+
setError(err);
|
|
777
|
+
} finally {
|
|
778
|
+
setLoading(false);
|
|
779
|
+
}
|
|
780
|
+
}, [connectionId]);
|
|
781
|
+
useEffect(() => {
|
|
782
|
+
fetchData();
|
|
783
|
+
}, [fetchData]);
|
|
784
|
+
return {
|
|
785
|
+
connection,
|
|
786
|
+
loading,
|
|
787
|
+
error,
|
|
788
|
+
refetch: fetchData
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Hook to fetch connections for a specific provider.
|
|
793
|
+
*/
|
|
794
|
+
function useConnectionsByProvider(providerId) {
|
|
795
|
+
const [connections, setConnections] = useState([]);
|
|
796
|
+
const [total, setTotal] = useState(0);
|
|
797
|
+
const [loading, setLoading] = useState(true);
|
|
798
|
+
const [error, setError] = useState(null);
|
|
799
|
+
const fetchData = useCallback(async () => {
|
|
800
|
+
if (!providerId) {
|
|
801
|
+
setLoading(false);
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
setLoading(true);
|
|
805
|
+
setError(null);
|
|
806
|
+
try {
|
|
807
|
+
const result = await getFluidGridsClient().query({
|
|
808
|
+
query: GET_CONNECTIONS_BY_PROVIDER,
|
|
809
|
+
variables: {
|
|
810
|
+
providerId,
|
|
811
|
+
pagination: { limit: 100 }
|
|
812
|
+
},
|
|
813
|
+
fetchPolicy: "network-only"
|
|
814
|
+
});
|
|
815
|
+
setConnections(result.data?.getConnectionsByProvider?.items ?? []);
|
|
816
|
+
setTotal(result.data?.getConnectionsByProvider?.total ?? 0);
|
|
817
|
+
} catch (err) {
|
|
818
|
+
setError(err);
|
|
819
|
+
} finally {
|
|
820
|
+
setLoading(false);
|
|
821
|
+
}
|
|
822
|
+
}, [providerId]);
|
|
823
|
+
useEffect(() => {
|
|
824
|
+
fetchData();
|
|
825
|
+
}, [fetchData]);
|
|
826
|
+
return {
|
|
827
|
+
connections,
|
|
828
|
+
total,
|
|
829
|
+
loading,
|
|
830
|
+
error,
|
|
831
|
+
refetch: fetchData
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Hook to fetch available integration providers.
|
|
836
|
+
*/
|
|
837
|
+
function useProviders(filter) {
|
|
838
|
+
const [providers, setProviders] = useState([]);
|
|
839
|
+
const [total, setTotal] = useState(0);
|
|
840
|
+
const [loading, setLoading] = useState(true);
|
|
841
|
+
const [error, setError] = useState(null);
|
|
842
|
+
const filterKey = JSON.stringify(filter);
|
|
843
|
+
const fetchData = useCallback(async () => {
|
|
844
|
+
setLoading(true);
|
|
845
|
+
setError(null);
|
|
846
|
+
try {
|
|
847
|
+
const client = getFluidGridsClient();
|
|
848
|
+
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
849
|
+
const result = await client.query({
|
|
850
|
+
query: GET_PROVIDERS,
|
|
851
|
+
variables: {
|
|
852
|
+
filter: parsedFilter,
|
|
853
|
+
pagination: { limit: 100 }
|
|
854
|
+
},
|
|
855
|
+
fetchPolicy: "cache-first"
|
|
856
|
+
});
|
|
857
|
+
setProviders(result.data?.getProviders?.items ?? []);
|
|
858
|
+
setTotal(result.data?.getProviders?.total ?? 0);
|
|
859
|
+
} catch (err) {
|
|
860
|
+
setError(err);
|
|
861
|
+
} finally {
|
|
862
|
+
setLoading(false);
|
|
863
|
+
}
|
|
864
|
+
}, [filterKey]);
|
|
865
|
+
useEffect(() => {
|
|
866
|
+
fetchData();
|
|
867
|
+
}, [fetchData]);
|
|
868
|
+
return {
|
|
869
|
+
providers,
|
|
870
|
+
total,
|
|
871
|
+
loading,
|
|
872
|
+
error,
|
|
873
|
+
refetch: fetchData
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Hook to create a new connection.
|
|
878
|
+
*/
|
|
879
|
+
function useCreateConnection() {
|
|
880
|
+
const [loading, setLoading] = useState(false);
|
|
881
|
+
const [error, setError] = useState(null);
|
|
882
|
+
return {
|
|
883
|
+
createConnection: useCallback(async (input) => {
|
|
884
|
+
setLoading(true);
|
|
885
|
+
setError(null);
|
|
886
|
+
try {
|
|
887
|
+
const client = getFluidGridsClient();
|
|
888
|
+
return throwIfResultError(await client.mutate({
|
|
889
|
+
mutation: CREATE_CONNECTION,
|
|
890
|
+
variables: { input }
|
|
891
|
+
})).data?.createConnection ?? null;
|
|
892
|
+
} catch (err) {
|
|
893
|
+
setError(err);
|
|
894
|
+
return null;
|
|
895
|
+
} finally {
|
|
896
|
+
setLoading(false);
|
|
897
|
+
}
|
|
898
|
+
}, []),
|
|
899
|
+
loading,
|
|
900
|
+
error
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Hook to initiate OAuth flow for a connection.
|
|
905
|
+
*/
|
|
906
|
+
function useInitiateOAuth() {
|
|
907
|
+
const [loading, setLoading] = useState(false);
|
|
908
|
+
const [error, setError] = useState(null);
|
|
909
|
+
return {
|
|
910
|
+
initiateOAuth: useCallback(async (input) => {
|
|
911
|
+
setLoading(true);
|
|
912
|
+
setError(null);
|
|
913
|
+
try {
|
|
914
|
+
const client = getFluidGridsClient();
|
|
915
|
+
return throwIfResultError(await client.mutate({
|
|
916
|
+
mutation: INITIATE_OAUTH,
|
|
917
|
+
variables: { input }
|
|
918
|
+
})).data?.initiateOAuth ?? null;
|
|
919
|
+
} catch (err) {
|
|
920
|
+
setError(err);
|
|
921
|
+
return null;
|
|
922
|
+
} finally {
|
|
923
|
+
setLoading(false);
|
|
924
|
+
}
|
|
925
|
+
}, []),
|
|
926
|
+
loading,
|
|
927
|
+
error
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
export { useInitiateOAuth as a, NodeSchemaIntrospectionDocument as c, useCreateConnection as i, RemoveNodeFromWorkflowsDocument as l, useConnections as n, useProviders as o, useConnectionsByProvider as r, NodeUsageStatusDocument as s, useConnection as t };
|