@burdenoff/sdk-libs 2026.1026.2 → 2026.1028.1

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.
@@ -1,40 +1,40 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var ke=["password","secret","clientSecret","apiKey","token","mfaCode","accessToken","refreshToken","workspaceToken","authorization"],Se=/\b(eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)\b/g;function he(o){let t=o.replace(Se,"<redacted-jwt>");for(let s of ke){let d=new RegExp(`("${s}"\\s*:\\s*")[^"]*(")`,"gi");t=t.replace(d,"$1<redacted>$2");}return t}var n=class extends Error{code;cause;constructor(t,s="SDK_ERROR",d){super(he(t)),this.name="SdkError",this.code=s,this.cause=d;}};var w=class extends n{constructor(t,s){super(t,"VALIDATION_ERROR",s),this.name="ValidationError";}};var u=`
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var ii=require('cross-fetch');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ii__default=/*#__PURE__*/_interopDefault(ii);var ze=["password","secret","clientSecret","apiKey","token","mfaCode","accessToken","refreshToken","workspaceToken","authorization"],Qe=/\b(eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)\b/g;function Xe(r){let t=r.replace(Qe,"<redacted-jwt>");for(let s of ze){let l=new RegExp(`("${s}"\\s*:\\s*")[^"]*(")`,"gi");t=t.replace(l,"$1<redacted>$2");}return t}var n=class extends Error{code;cause;constructor(t,s="SDK_ERROR",l){super(Xe(t)),this.name="SdkError",this.code=s,this.cause=l;}};var S=class extends n{constructor(t,s){super(t,"NETWORK_ERROR",s),this.name="NetworkError";}},F=class extends n{constructor(t,s){super(t,"VALIDATION_ERROR",s),this.name="ValidationError";}};var p=`
2
2
  id workflowKey name description version status category tags icon isActive
3
3
  totalVersions projectId createdAt updatedAt
4
- `,k=`
4
+ `,b=`
5
5
  query FluidgridsListWorkflows($input: ListWorkflowDefinitionsInput!) {
6
6
  workflowDefinitions(input: $input) {
7
- items { ${u} }
7
+ items { ${p} }
8
8
  total
9
9
  hasMore
10
10
  }
11
11
  }
12
- `,S=`
12
+ `,N=`
13
13
  query FluidgridsGetWorkflow($id: ID, $workflowKey: String, $version: String) {
14
14
  workflowDefinition(id: $id, workflowKey: $workflowKey, version: $version) {
15
- ${u}
15
+ ${p}
16
16
  alias
17
17
  definitionJson
18
18
  context
19
19
  }
20
20
  }
21
- `,h=`
21
+ `,P=`
22
22
  query FluidgridsWorkflowVersions($workflowKey: String!) {
23
- workflowVersions(workflowKey: $workflowKey) { ${u} }
23
+ workflowVersions(workflowKey: $workflowKey) { ${p} }
24
24
  }
25
- `,W=`
25
+ `,v=`
26
26
  mutation FluidgridsCreateWorkflow($input: CreateWorkflowDefinitionInput!) {
27
- createWorkflowDefinition(input: $input) { ${u} }
27
+ createWorkflowDefinition(input: $input) { ${p} }
28
28
  }
29
- `,C=`
29
+ `,x=`
30
30
  mutation FluidgridsUpdateWorkflow($id: ID!, $input: UpdateWorkflowDefinitionInput!) {
31
- updateWorkflowDefinition(id: $id, input: $input) { ${u} }
31
+ updateWorkflowDefinition(id: $id, input: $input) { ${p} }
32
32
  }
33
- `,A=`
33
+ `,K=`
34
34
  mutation FluidgridsDeleteWorkflow($workflowKey: String!, $version: String) {
35
35
  deleteWorkflowDefinition(workflowKey: $workflowKey, version: $version)
36
36
  }
37
- `,$=`
37
+ `,U=`
38
38
  mutation FluidgridsTriggerWorkflow($input: TriggerWorkflowInput!) {
39
39
  triggerWorkflow(input: $input) {
40
40
  runId
@@ -44,19 +44,19 @@
44
44
  triggerNodeId
45
45
  }
46
46
  }
47
- `,D=`
47
+ `,q=`
48
48
  mutation FluidgridsPublishWorkflow($id: ID!) {
49
- publishWorkflow(id: $id) { ${u} }
49
+ publishWorkflow(id: $id) { ${p} }
50
50
  }
51
- `,b=`
51
+ `,J=`
52
52
  mutation FluidgridsActivateWorkflow($id: ID!) {
53
- activateWorkflowDefinition(id: $id) { ${u} }
53
+ activateWorkflowDefinition(id: $id) { ${p} }
54
54
  }
55
- `,L=`
55
+ `,M=`
56
56
  mutation FluidgridsDeactivateWorkflow($id: ID!) {
57
- deactivateWorkflowDefinition(id: $id) { ${u} }
57
+ deactivateWorkflowDefinition(id: $id) { ${p} }
58
58
  }
59
- `,_=`
59
+ `,V=`
60
60
  mutation FluidgridsDuplicateWorkflow(
61
61
  $workflowKey: String!
62
62
  $version: String!
@@ -65,37 +65,37 @@
65
65
  duplicateWorkflow(workflowKey: $workflowKey, version: $version, input: $input) {
66
66
  success
67
67
  message
68
- workflow { ${u} }
68
+ workflow { ${p} }
69
69
  }
70
70
  }
71
- `,O=`
71
+ `,H=`
72
72
  mutation FluidgridsArchiveWorkflow($id: ID!) {
73
- archiveWorkflow(id: $id) { ${u} }
73
+ archiveWorkflow(id: $id) { ${p} }
74
74
  }
75
- `,N=`
75
+ `,B=`
76
76
  mutation FluidgridsImportWorkflowTemplate($input: ImportWorkflowTemplateInput!) {
77
77
  importWorkflowTemplate(input: $input) {
78
78
  success
79
79
  message
80
- workflow { ${u} }
80
+ workflow { ${p} }
81
81
  }
82
82
  }
83
- `,P=`
83
+ `,D=`
84
84
  id workflowId workflowKey version status mode startedAt completedAt duration
85
85
  triggeredById triggerNodeId errorMessage errorType progress totalNodes
86
86
  completedNodes failedNodes skippedNodes createdAt
87
- `,v=`
87
+ `,G=`
88
88
  query FluidgridsListRuns($input: ListWorkflowRunsInput!) {
89
89
  workflowRuns(input: $input) {
90
- items { ${P} }
90
+ items { ${D} }
91
91
  total
92
92
  hasMore
93
93
  }
94
94
  }
95
- `,x=`
95
+ `,j=`
96
96
  query FluidgridsGetRun($id: ID!) {
97
97
  workflowRun(id: $id) {
98
- ${P}
98
+ ${D}
99
99
  triggerData
100
100
  nodeStates {
101
101
  id nodeId nodeType nodeVersion status error errorType attemptCount
@@ -103,7 +103,7 @@
103
103
  }
104
104
  }
105
105
  }
106
- `,U=`
106
+ `,Y=`
107
107
  query FluidgridsRunLogs(
108
108
  $runId: ID!
109
109
  $nodeId: String
@@ -131,34 +131,34 @@
131
131
  limitReached
132
132
  }
133
133
  }
134
- `,m="id status completedAt errorMessage",K=`
134
+ `,h="id status completedAt errorMessage",z=`
135
135
  mutation FluidgridsCancelRun($id: ID!) {
136
- cancelWorkflowRun(id: $id) { ${m} }
136
+ cancelWorkflowRun(id: $id) { ${h} }
137
137
  }
138
- `,q=`
138
+ `,Q=`
139
139
  mutation FluidgridsPauseRun($id: ID!) {
140
- pauseWorkflowRun(id: $id) { ${m} }
140
+ pauseWorkflowRun(id: $id) { ${h} }
141
141
  }
142
- `,J=`
142
+ `,X=`
143
143
  mutation FluidgridsResumeRun($id: ID!, $payload: JSON) {
144
144
  resumeWorkflowRun(id: $id, payload: $payload) {
145
145
  success
146
146
  message
147
147
  resumedFromNodeId
148
- run { ${m} }
148
+ run { ${h} }
149
149
  }
150
150
  }
151
- `,M=`
151
+ `,Z=`
152
152
  mutation FluidgridsRetryNode($id: ID!, $nodeId: String!) {
153
153
  retryNode(id: $id, nodeId: $nodeId) {
154
154
  id nodeId nodeType status error attemptCount
155
155
  }
156
156
  }
157
- `,B=`
157
+ `,ee=`
158
158
  id nodeType nodeVersion name description category icon logo keywords kind author
159
159
  publishType status isLatest endpointUrl operations supportsAdapterMode
160
160
  adapterOutputType docsUrl createdAt updatedAt
161
- `,H=`
161
+ `,ie=`
162
162
  query FluidgridsListNodes(
163
163
  $nodeType: String
164
164
  $publishType: PublishType
@@ -171,40 +171,40 @@
171
171
  status: $status
172
172
  pagination: $pagination
173
173
  ) {
174
- configs { ${B} }
174
+ configs { ${ee} }
175
175
  pagination { total limit offset hasMore }
176
176
  }
177
177
  }
178
- `,G=`
178
+ `,te=`
179
179
  query FluidgridsGetNode($nodeType: String!, $nodeVersion: String!) {
180
180
  nodeEndpointConfig(nodeType: $nodeType, nodeVersion: $nodeVersion) {
181
- ${B}
181
+ ${ee}
182
182
  healthCheckUrl
183
183
  nodeAdapters
184
184
  }
185
185
  }
186
- `,I=`
186
+ `,O=`
187
187
  id name description status providerId credentialSource externalAccountId
188
188
  externalAccountName externalAccountEmail grantedScopes lastUsedAt lastHealthCheck
189
189
  errorMessage createdAt updatedAt
190
- `,V=`
190
+ `,re=`
191
191
  query FluidgridsListCredentials(
192
192
  $filter: ConnectionFilterInput
193
193
  $pagination: IntegrationsPaginationInput
194
194
  ) {
195
195
  getConnections(filter: $filter, pagination: $pagination) {
196
196
  items {
197
- ${I}
197
+ ${O}
198
198
  provider { id key name category authType icon }
199
199
  }
200
200
  total
201
201
  hasMore
202
202
  }
203
203
  }
204
- `,j=`
204
+ `,oe=`
205
205
  query FluidgridsGetCredential($id: ID!) {
206
206
  getConnection(id: $id) {
207
- ${I}
207
+ ${O}
208
208
  config
209
209
  metadata
210
210
  workspaceId
@@ -214,7 +214,7 @@
214
214
  }
215
215
  }
216
216
  }
217
- `,Y=`
217
+ `,se=`
218
218
  query FluidgridsListCredentialTypes(
219
219
  $filter: ProviderFilterInput
220
220
  $pagination: IntegrationsPaginationInput
@@ -228,107 +228,107 @@
228
228
  hasMore
229
229
  }
230
230
  }
231
- `,z=`
231
+ `,ne=`
232
232
  mutation FluidgridsCreateCredential($input: CreateConnectionInput!) {
233
233
  createConnection(input: $input) {
234
- ${I}
234
+ ${O}
235
235
  provider { id key name authType }
236
236
  }
237
237
  }
238
- `,Q=`
238
+ `,de=`
239
239
  id name status grantedScopes externalAccountName errorMessage updatedAt
240
- `,Z=`
240
+ `,ue=`
241
241
  mutation FluidgridsAuthenticateCredentialApiKey($input: ApiKeyAuthInput!) {
242
- authenticateWithApiKey(input: $input) { ${Q} }
242
+ authenticateWithApiKey(input: $input) { ${de} }
243
243
  }
244
- `,X=`
244
+ `,le=`
245
245
  mutation FluidgridsAuthenticateCredentialBasic($input: BasicAuthInput!) {
246
- authenticateWithBasicAuth(input: $input) { ${Q} }
246
+ authenticateWithBasicAuth(input: $input) { ${de} }
247
247
  }
248
- `,ee=`
248
+ `,ae=`
249
249
  mutation FluidgridsUpdateCredential($id: ID!, $input: UpdateConnectionInput!) {
250
250
  updateConnection(id: $id, input: $input) {
251
251
  id name description status config updatedAt
252
252
  }
253
253
  }
254
- `,ie=`
254
+ `,ge=`
255
255
  mutation FluidgridsDeleteCredential($id: ID!, $deleteVaultSecret: Boolean) {
256
256
  deleteConnection(id: $id, deleteVaultSecret: $deleteVaultSecret)
257
257
  }
258
- `,te=`
258
+ `,ce=`
259
259
  mutation FluidgridsTestCredential($connectionId: ID!) {
260
260
  testConnection(connectionId: $connectionId) { success message latencyMs }
261
261
  }
262
- `,c=`
262
+ `,T=`
263
263
  id name description workflowKey triggerNodeId eventSource eventType status isActive
264
264
  webhookUrl webhookToken validationMethod signatureHeader apiKeyHeader payloadMapping
265
265
  config tags totalTriggers successfulTriggers failedTriggers lastTriggeredAt
266
266
  projectId createdAt updatedAt
267
- `,re=`
267
+ `,pe=`
268
268
  query FluidgridsListWebhooks($status: EventStatus, $workflowKey: String) {
269
- eventRegistrations(status: $status, workflowKey: $workflowKey) { ${c} }
269
+ eventRegistrations(status: $status, workflowKey: $workflowKey) { ${T} }
270
270
  }
271
- `,oe=`
271
+ `,fe=`
272
272
  query FluidgridsGetWebhook($id: ID!) {
273
- eventRegistration(id: $id) { ${c} }
273
+ eventRegistration(id: $id) { ${T} }
274
274
  }
275
- `,de=`
275
+ `,Fe=`
276
276
  mutation FluidgridsCreateWebhook($input: CreateEventRegistrationInput!) {
277
- createEventRegistration(input: $input) { ${c} }
277
+ createEventRegistration(input: $input) { ${T} }
278
278
  }
279
- `,se=`
279
+ `,we=`
280
280
  mutation FluidgridsUpdateWebhook($id: ID!, $input: UpdateEventRegistrationInput!) {
281
- updateEventRegistration(id: $id, input: $input) { ${c} }
281
+ updateEventRegistration(id: $id, input: $input) { ${T} }
282
282
  }
283
- `,ne=`
283
+ `,Re=`
284
284
  mutation FluidgridsDeleteWebhook($id: ID!) {
285
285
  deleteEventRegistration(id: $id)
286
286
  }
287
- `,ue=`
287
+ `,ye=`
288
288
  mutation FluidgridsToggleWebhook($id: ID!, $isActive: Boolean!) {
289
- toggleEventRegistration(id: $id, isActive: $isActive) { ${c} }
289
+ toggleEventRegistration(id: $id, isActive: $isActive) { ${T} }
290
290
  }
291
- `,E=`
291
+ `,$=`
292
292
  id name workflowKey version schedule enabled nextRun lastRun config createdAt updatedAt
293
- `,le=`
293
+ `,me=`
294
294
  query FluidgridsListScheduledJobs(
295
295
  $enabled: Boolean
296
296
  $workflowKey: String
297
297
  $pagination: WorkflowPaginationInput
298
298
  ) {
299
299
  workflowScheduledJobs(enabled: $enabled, workflowKey: $workflowKey, pagination: $pagination) {
300
- jobs { ${E} }
300
+ jobs { ${$} }
301
301
  pagination { total limit offset hasMore }
302
302
  }
303
303
  }
304
- `,ae=`
304
+ `,Ee=`
305
305
  query FluidgridsGetScheduledJob($jobId: ID!) {
306
306
  workflowScheduledJob(jobId: $jobId) {
307
- ${E}
307
+ ${$}
308
308
  workspaceId
309
309
  }
310
310
  }
311
- `,ge=`
311
+ `,ke=`
312
312
  mutation FluidgridsCreateScheduledJob($input: ScheduledJobInput!) {
313
313
  createWorkflowScheduledJob(input: $input) {
314
314
  success
315
315
  message
316
- job { ${E} }
316
+ job { ${$} }
317
317
  }
318
318
  }
319
- `,pe=`
319
+ `,Ie=`
320
320
  mutation FluidgridsUpdateScheduledJob($jobId: ID!, $input: WorkflowUpdateScheduledJobInput!) {
321
321
  updateWorkflowScheduledJob(jobId: $jobId, input: $input) {
322
322
  success
323
323
  message
324
- job { ${E} }
324
+ job { ${$} }
325
325
  }
326
326
  }
327
- `,ce=`
327
+ `,Te=`
328
328
  mutation FluidgridsDeleteScheduledJob($jobId: ID!) {
329
329
  deleteWorkflowScheduledJob(jobId: $jobId) { success message }
330
330
  }
331
- `,Fe=`
331
+ `,We=`
332
332
  query FluidgridsDashboardSummary($projectId: String) {
333
333
  dashboardSummary(projectId: $projectId) {
334
334
  userId
@@ -359,7 +359,7 @@
359
359
  nodeUsageStats { nodeType totalExecutions successCount failureCount avgExecutionTime }
360
360
  }
361
361
  }
362
- `,fe=`
362
+ `,Se=`
363
363
  query FluidgridsUsageMetrics($input: UsageQueryInput!) {
364
364
  usageMetrics(input: $input) {
365
365
  period
@@ -373,11 +373,11 @@
373
373
  }
374
374
  }
375
375
  }
376
- `,we="query results entityCounts totalResults metadata",Ee=`
376
+ `,he="query results entityCounts totalResults metadata",$e=`
377
377
  query FluidgridsSearch($input: SearchRequestInput!) {
378
- search(input: $input) { ${we} }
378
+ search(input: $input) { ${he} }
379
379
  }
380
- `,Re=`
380
+ `,Ae=`
381
381
  query FluidgridsSearchByEntityType(
382
382
  $entityType: String!
383
383
  $query: String!
@@ -391,10 +391,125 @@
391
391
  filters: $filters
392
392
  limit: $limit
393
393
  offset: $offset
394
- ) { ${we} }
394
+ ) { ${he} }
395
395
  }
396
- `,ye=`
396
+ `,Ce=`
397
397
  query FluidgridsSystemConfig {
398
398
  systemConfig { version revision environment deploymentType hostname hostIp }
399
399
  }
400
- `;var Ce=["CANCELLED","COMPLETED","FAILED","TERMINATED"];function me(o){let t=o.toUpperCase();return Ce.some(s=>s===t)}function Ie(o,t,s){let d=s.filter(g=>g.nodeId===t);if(d.length===0)throw new n(`Node ${t} not found in run ${o}`,"NOT_FOUND");let a=d.filter(g=>["FAILED","TIMEOUT"].includes(g.status.toUpperCase()));if(a.length===0)throw new n(`Node ${t} is not failed in run ${o}`,"INVALID_STATE");let[F,...R]=a;if(!F||R.length>0)throw new n(`Node ${t} is ambiguous in run ${o}; retry a specific node state`,"AMBIGUOUS");return F}function l(o){if(!o)return;let t={},s=false;for(let d of Object.keys(o))o[d]!==void 0&&(t[d]=o[d],s=true);return s?t:void 0}function Ae(o,t){return new Promise((s,d)=>{if(t?.aborted){d(new n("Aborted","ABORTED"));return}let a=setTimeout(s,o);t?.addEventListener("abort",()=>{clearTimeout(a),d(new n("Aborted","ABORTED"));},{once:true});})}function Te(o){let{workspace:t}=o.gql,s={async list(e){return (await t.request(k,{input:l(e)??{}})).workflowDefinitions},async get(e){return (await t.request(S,e.id!==void 0?{id:e.id}:{workflowKey:e.workflowKey,version:e.version})).workflowDefinition},async versions(e){return (await t.request(h,{workflowKey:e})).workflowVersions},async create(e){return (await t.request(W,{input:e})).createWorkflowDefinition},async update(e,i){return (await t.request(C,{id:e,input:i})).updateWorkflowDefinition},async delete(e,i){return (await t.request(A,{workflowKey:e,version:i})).deleteWorkflowDefinition},async trigger(e){return (await t.request($,{input:e})).triggerWorkflow},async publish(e){return (await t.request(D,{id:e})).publishWorkflow},async activate(e){return (await t.request(b,{id:e})).activateWorkflowDefinition},async deactivate(e){return (await t.request(L,{id:e})).deactivateWorkflowDefinition},async archive(e){return (await t.request(O,{id:e})).archiveWorkflow},async duplicate(e,i,r){return (await t.request(_,{workflowKey:e,version:i,input:r})).duplicateWorkflow},async importTemplate(e){return (await t.request(N,{input:e})).importWorkflowTemplate}},d={async list(e){return (await t.request(v,{input:l(e)??{}})).workflowRuns},async get(e){return (await t.request(x,{id:e})).workflowRun},async logs(e,i){if(i?.limit!==void 0&&(i.limit<1||i.limit>1e3))throw new w("logs limit must be between 1 and 1000");return (await t.request(U,{runId:e,...l(i)})).workflowRunLogs},async cancel(e){return (await t.request(K,{id:e})).cancelWorkflowRun},async pause(e){return (await t.request(q,{id:e})).pauseWorkflowRun},async resume(e,i){return (await t.request(J,{id:e,payload:i})).resumeWorkflowRun},async retryNode(e,i){let r=await d.get(e);if(!r)throw new n(`Run ${e} not found`,"NOT_FOUND");let p=Ie(e,i,r.nodeStates??[]);return (await t.request(M,{id:p.id,nodeId:i})).retryNode},async waitForCompletion(e,i){let r=i?.pollInterval??1e3,p=i?.timeout??3e5,T=Date.now();for(;;){let f=await d.get(e);if(!f)throw new n(`Run ${e} not found`,"NOT_FOUND");if(me(f.status))return f;if(Date.now()-T>p)throw new n(`Timed out waiting for run ${e} (last status ${f.status})`,"TIMEOUT");await Ae(r,o.signal);}}},a={async list(e){return (await t.request(H,{nodeType:e?.nodeType,publishType:e?.publishType,status:e?.status,pagination:l({limit:e?.limit,offset:e?.offset})})).nodeEndpointConfigs},async get(e,i){return (await t.request(G,{nodeType:e,nodeVersion:i})).nodeEndpointConfig}},F={async list(e,i){return (await t.request(V,{filter:l(e),pagination:l(i)})).getConnections},async get(e){return (await t.request(j,{id:e})).getConnection},async listTypes(e,i){return (await t.request(Y,{filter:l(e),pagination:l(i)})).getProviders},async create(e){return (await t.request(z,{input:e})).createConnection},async authenticateWithApiKey(e,i){return (await t.request(Z,{input:{connectionId:e,apiKey:i}})).authenticateWithApiKey},async authenticateWithBasicAuth(e,i,r){return (await t.request(X,{input:{connectionId:e,username:i,password:r}})).authenticateWithBasicAuth},async update(e,i){return (await t.request(ee,{id:e,input:i})).updateConnection},async delete(e,i){return (await t.request(ie,{id:e,deleteVaultSecret:i?.deleteVaultSecret})).deleteConnection},async test(e){return (await t.request(te,{connectionId:e})).testConnection}},R={async list(e){return (await t.request(re,{status:e?.status,workflowKey:e?.workflowKey})).eventRegistrations},async get(e){return (await t.request(oe,{id:e})).eventRegistration},async create(e){return (await t.request(de,{input:e})).createEventRegistration},async update(e,i){return (await t.request(se,{id:e,input:i})).updateEventRegistration},async delete(e){return (await t.request(ne,{id:e})).deleteEventRegistration},async toggle(e,i){return (await t.request(ue,{id:e,isActive:i})).toggleEventRegistration}},g={async list(e){return (await t.request(le,{enabled:e?.enabled,workflowKey:e?.workflowKey,pagination:l({limit:e?.limit,offset:e?.offset})})).workflowScheduledJobs},async get(e){return (await t.request(ae,{jobId:e})).workflowScheduledJob},async create(e){return (await t.request(ge,{input:e})).createWorkflowScheduledJob},async update(e,i){return (await t.request(pe,{jobId:e,input:i})).updateWorkflowScheduledJob},async delete(e){return (await t.request(ce,{jobId:e})).deleteWorkflowScheduledJob},setEnabled(e,i){return g.update(e,{enabled:i})}};return {workflows:s,runs:d,nodes:a,credentials:F,webhooks:R,scheduledJobs:g,dashboard:{async summary(e){return (await t.request(Fe,{projectId:e})).dashboardSummary},async usage(e){return (await t.request(fe,{input:e})).usageMetrics}},search:{async search(e){return (await t.request(Ee,{input:e})).search},async byEntityType(e,i,r){return (await t.request(Re,{entityType:e,query:i,...l(r)})).searchByEntityType}},admin:{async systemInfo(){return (await t.request(ye)).systemConfig}}}}var $e={id:"fluidgrids",version:"1.0.0",displayName:"FluidGrids",dependsOn:["auth"],attach(o){return Te(o)}},Ke=$e;exports.createFluidgridsApi=Te;exports.default=Ke;exports.isTerminalRunStatus=me;exports.resolveRetryableNodeState=Ie;
400
+ `,Ze=`
401
+ valid errors warnings missingNodes { nodeId nodeType nodeVersion }
402
+ `,De=`
403
+ query FluidgridsExportWorkflow(
404
+ $workflowKey: String!
405
+ $version: String
406
+ $format: WorkflowExportFormat
407
+ $options: ExportOptionsInput
408
+ ) {
409
+ exportWorkflow(
410
+ workflowKey: $workflowKey
411
+ version: $version
412
+ format: $format
413
+ options: $options
414
+ ) {
415
+ format schemaVersion exportedAt workflowKey version name description
416
+ definitionJson context tags icon category
417
+ nodeReferences { nodeId nodeType nodeVersion }
418
+ exportFormat
419
+ files { path contentType content url }
420
+ fidelity { level items { nodeId path kind detail } }
421
+ irHash
422
+ }
423
+ }
424
+ `,Oe=`
425
+ mutation FluidgridsImportWorkflow($input: ImportWorkflowInput!) {
426
+ importWorkflow(input: $input) {
427
+ success
428
+ message
429
+ workflow { ${p} }
430
+ validation { ${Ze} }
431
+ }
432
+ }
433
+ `,_e=`
434
+ mutation FluidgridsCreateWorkflowVersion(
435
+ $workflowKey: String!
436
+ $input: CreateWorkflowVersionInput!
437
+ ) {
438
+ createWorkflowVersion(workflowKey: $workflowKey, input: $input) {
439
+ success
440
+ message
441
+ workflow { ${p} }
442
+ }
443
+ }
444
+ `,Le=`
445
+ query FluidgridsValidateWorkflowDefinition($definitionJson: JSON!, $strict: Boolean) {
446
+ validateWorkflowDefinition(definitionJson: $definitionJson, strict: $strict) {
447
+ valid
448
+ errors { code message nodeId path }
449
+ warnings { code message nodeId path }
450
+ schemaVersion
451
+ irHash
452
+ taskQueues
453
+ }
454
+ }
455
+ `,be=`
456
+ query FluidgridsWorkflowInterface($workflowKey: String!, $version: String) {
457
+ workflowInterface(workflowKey: $workflowKey, version: $version)
458
+ }
459
+ `,Ne=`
460
+ ${D}
461
+ executionKind workflowFn taskQueue buildId historyLength parentClosePolicy
462
+ cancelRequestedAt
463
+ determinism { failing cause attempts since lastFailureSeq message }
464
+ `,Pe=`
465
+ mutation FluidgridsStartWorkflow($input: StartWorkflowInput!) {
466
+ startWorkflow(input: $input) {
467
+ run { ${Ne} }
468
+ existing
469
+ }
470
+ }
471
+ `,ve=`
472
+ query FluidgridsDescribeRun($id: ID!) {
473
+ workflowRun(id: $id) { ${Ne} }
474
+ }
475
+ `,xe=`
476
+ query FluidgridsRunHistory($runId: ID!, $after: Int, $limit: Int) {
477
+ workflowRunHistory(runId: $runId, after: $after, limit: $limit) {
478
+ events { runId seq type taskId payload payloadUrl createdAt }
479
+ nextAfter
480
+ hasMore
481
+ historyLength
482
+ historyBytes
483
+ }
484
+ }
485
+ `,Ke=`
486
+ mutation FluidgridsSignalRun(
487
+ $runId: ID!
488
+ $name: String!
489
+ $payload: JSON
490
+ $idempotencyKey: String
491
+ ) {
492
+ signalWorkflowRun(
493
+ runId: $runId
494
+ name: $name
495
+ payload: $payload
496
+ idempotencyKey: $idempotencyKey
497
+ ) {
498
+ accepted delivered buffered forwardedToRunId seq duplicate
499
+ }
500
+ }
501
+ `,Ue=`
502
+ query FluidgridsRunStackTrace($runId: ID!, $enhanced: Boolean) {
503
+ workflowRunStackTrace(runId: $runId, enhanced: $enhanced) { trace enhanced }
504
+ }
505
+ `,qe=`
506
+ query FluidgridsRunDeterminismStatus($runId: ID!) {
507
+ workflowRunDeterminismStatus(runId: $runId) {
508
+ failing cause attempts since lastFailureSeq message
509
+ }
510
+ }
511
+ `,Je=`
512
+ mutation FluidgridsTerminateRun($runId: ID!, $reason: String) {
513
+ terminateWorkflowRun(runId: $runId, reason: $reason) { ${h} }
514
+ }
515
+ `;var A=class extends n{constructor(s,l,d={}){let c=oi(d.failure),m=typeof d.reason=="string"?d.reason:void 0,w=ri(d.timeoutType),W=l.toLowerCase().replace(/_/g," "),k=c?.message??m??w;super(k?`Run ${s} ${W}: ${k}`:`Run ${s} ${W}`,`WORKFLOW_${l}`);this.runId=s;this.outcome=l;this.name="FluidgridsWorkflowRunError",this.payload=d,c&&(this.failure=c),d.details!==void 0&&(this.details=d.details),m!==void 0&&(this.reason=m),d.actor!==void 0&&(this.actor=d.actor),w&&(this.timeoutType=w),typeof d.newRunId=="string"&&(this.newRunId=d.newRunId);}runId;outcome;payload;failure;details;reason;actor;timeoutType;newRunId},ti={WORKFLOW_COMPLETED:"COMPLETED",WORKFLOW_FAILED:"FAILED",WORKFLOW_CANCELLED:"CANCELLED",WORKFLOW_TERMINATED:"TERMINATED",WORKFLOW_TIMED_OUT:"TIMED_OUT",WORKFLOW_CONTINUED_AS_NEW:"CONTINUED_AS_NEW"};function L(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function He(r){return L(r)&&r.$offloaded===true}function Me(r,t){if(r!==void 0&&(!Number.isInteger(r)||r<1||r>1e3))throw new F(`${t} must be an integer between 1 and 1000`)}function ri(r){return r==="WORKFLOW_RUN"||r==="WORKFLOW_EXECUTION"?r:void 0}function oi(r){if(!L(r))return;let t=typeof r.message=="string"?r.message:"unknown failure";return {...r,message:t}}function Be(r){let t=typeof r=="object"&&r!==null?r.name:r;if(typeof t!="string"||t.trim()==="")throw new F("workflows.start needs a workflow key");return t}var si=["CANCELLED","COMPLETED","FAILED","TERMINATED"];function _(r){let t=r.toUpperCase();return si.some(s=>s===t)}function Ge(r,t,s){let l=s.filter(w=>w.nodeId===t);if(l.length===0)throw new n(`Node ${t} not found in run ${r}`,"NOT_FOUND");let d=l.filter(w=>["FAILED","TIMEOUT"].includes(w.status.toUpperCase()));if(d.length===0)throw new n(`Node ${t} is not failed in run ${r}`,"INVALID_STATE");let[c,...m]=d;if(!c||m.length>0)throw new n(`Node ${t} is ambiguous in run ${r}; retry a specific node state`,"AMBIGUOUS");return c}function g(r){if(!r)return;let t={},s=false;for(let l of Object.keys(r))r[l]!==void 0&&(t[l]=r[l],s=true);return s?t:void 0}function Ve(r,t){return new Promise((s,l)=>{if(t?.aborted){l(new n("Aborted","ABORTED"));return}let d=setTimeout(s,r);t?.addEventListener("abort",()=>{clearTimeout(d),l(new n("Aborted","ABORTED"));},{once:true});})}function je(r){let{workspace:t}=r.gql,s={async list(e){return (await t.request(b,{input:g(e)??{}})).workflowDefinitions},async get(e){return (await t.request(N,e.id!==void 0?{id:e.id}:{workflowKey:e.workflowKey,version:e.version})).workflowDefinition},async versions(e){return (await t.request(P,{workflowKey:e})).workflowVersions},async create(e){return (await t.request(v,{input:e})).createWorkflowDefinition},async update(e,i){return (await t.request(x,{id:e,input:i})).updateWorkflowDefinition},async delete(e,i){return (await t.request(K,{workflowKey:e,version:i})).deleteWorkflowDefinition},async trigger(e){return (await t.request(U,{input:e})).triggerWorkflow},async publish(e){return (await t.request(q,{id:e})).publishWorkflow},async activate(e){return (await t.request(J,{id:e})).activateWorkflowDefinition},async deactivate(e){return (await t.request(M,{id:e})).deactivateWorkflowDefinition},async archive(e){return (await t.request(H,{id:e})).archiveWorkflow},async duplicate(e,i,o){return (await t.request(V,{workflowKey:e,version:i,input:o})).duplicateWorkflow},async importTemplate(e){return (await t.request(B,{input:e})).importWorkflowTemplate},async export(e,i){return (await t.request(De,{workflowKey:e,version:i?.version,format:i?.format,options:g(i?.options)})).exportWorkflow},async import(e){if(e.definitionJson===void 0==(e.source===void 0))throw new F("workflows.import needs exactly one of definitionJson or source");return (await t.request(Oe,{input:g(e)})).importWorkflow},async createVersion(e,i){return (await t.request(_e,{workflowKey:e,input:g(i)})).createWorkflowVersion},async validate(e,i){return (await t.request(Le,{definitionJson:e,strict:i?.strict})).validateWorkflowDefinition},async interface(e,i){return (await t.request(be,{workflowKey:e,version:i})).workflowInterface??null},async start(e,i){let o=Be(e);return (await t.request(Pe,{input:{workflowKey:o,...g(i)}})).startWorkflow}};async function l(e,i){if(!i.payloadUrl)throw new n(`Payload of event ${i.seq} of run ${e} is offloaded but has no download URL`,"PAYLOAD_UNAVAILABLE");let o;try{o=await ii__default.default(i.payloadUrl,{method:"GET",signal:r.signal});}catch(a){throw new S(`Could not download the payload of event ${i.seq} of run ${e}`,a)}if(!o.ok)throw new n(`Payload of event ${i.seq} of run ${e} could not be downloaded (HTTP ${o.status})`,"PAYLOAD_UNAVAILABLE");return await o.json()}async function d(e,i,o){let a=i.payload??{};return o&&He(a)?l(e,i):a}let c={async list(e){return (await t.request(G,{input:g(e)??{}})).workflowRuns},async get(e){return (await t.request(j,{id:e})).workflowRun},async logs(e,i){if(i?.limit!==void 0&&(i.limit<1||i.limit>1e3))throw new F("logs limit must be between 1 and 1000");return (await t.request(Y,{runId:e,...g(i)})).workflowRunLogs},async cancel(e){return (await t.request(z,{id:e})).cancelWorkflowRun},async pause(e){return (await t.request(Q,{id:e})).pauseWorkflowRun},async resume(e,i){return (await t.request(X,{id:e,payload:i})).resumeWorkflowRun},async retryNode(e,i){let o=await c.get(e);if(!o)throw new n(`Run ${e} not found`,"NOT_FOUND");let a=Ge(e,i,o.nodeStates??[]);return (await t.request(Z,{id:a.id,nodeId:i})).retryNode},async waitForCompletion(e,i){let o=i?.pollInterval??1e3,a=i?.timeout??3e5,y=Date.now();for(;;){let u=await c.get(e);if(!u)throw new n(`Run ${e} not found`,"NOT_FOUND");if(_(u.status))return u;if(Date.now()-y>a)throw new n(`Timed out waiting for run ${e} (last status ${u.status})`,"TIMEOUT");await Ve(o,r.signal);}},async describe(e){return (await t.request(ve,{id:e})).workflowRun},async history(e,i){if(Me(i?.limit,"history limit"),i?.after!==void 0&&(!Number.isInteger(i.after)||i.after<0))throw new F("history after must be a non-negative integer");return (await t.request(xe,{runId:e,...g(i)})).workflowRunHistory},async historyAll(e,i){Me(i?.pageSize,"history pageSize");let o=i?.resolvePayloads??true,a=i?.pageSize??500,y=[],u=0;for(;;){let f=await c.history(e,{after:u,limit:a});for(let R of f.events){let I={seq:R.seq,type:R.type,payload:await d(e,R,o),createdAt:R.createdAt};R.taskId&&(I.taskId=R.taskId),y.push(I);}if(!f.hasMore)return {runId:e,events:y,historyLength:f.historyLength,historyBytes:f.historyBytes};let E=f.nextAfter??f.events.at(-1)?.seq;if(E===void 0||E<=u)throw new n(`History of run ${e} did not advance past seq ${u}`,"INVALID_STATE");u=E;}},async signal(e,i,o,a){if(i.trim()==="")throw new F("signal name must not be empty");return (await t.request(Ke,{runId:e,name:i,payload:o,idempotencyKey:a?.idempotencyKey})).signalWorkflowRun},async stackTrace(e,i){return (await t.request(Ue,{runId:e,enhanced:i?.enhanced})).workflowRunStackTrace},async determinism(e){return (await t.request(qe,{runId:e})).workflowRunDeterminismStatus},async terminate(e,i){return (await t.request(Je,{runId:e,reason:i})).terminateWorkflowRun},async result(e,i){let o=i?.pollInterval??1e3,a=i?.timeout??3e5,y=Date.now(),u=await c.describe(e);for(;;){if(!u)throw new n(`Run ${e} not found`,"NOT_FOUND");if(u.executionKind!=="DURABLE_FN")throw new F(`Run ${e} is a graph run; runs.result reads durable function runs (use runs.waitForCompletion)`);if(_(u.status))break;if(Date.now()-y>a)throw new n(`Timed out waiting for run ${e} (last status ${u.status})`,"TIMEOUT");await Ve(o,r.signal),u=await c.describe(e);}let f=u.historyLength>=1?(await c.history(e,{after:u.historyLength-1,limit:1})).events.find(Ye=>Ye.seq===u.historyLength):void 0,E=f?ti[f.type]:void 0;if(!f||!E)throw new n(`Run ${e} is ${u.status} but its history has no closing event`,"INVALID_STATE");let R=await d(e,f,true),I=L(R)?R:{};if(E==="COMPLETED")return I.output??null;throw new A(e,E,I)}},m={async list(e){return (await t.request(ie,{nodeType:e?.nodeType,publishType:e?.publishType,status:e?.status,pagination:g({limit:e?.limit,offset:e?.offset})})).nodeEndpointConfigs},async get(e,i){return (await t.request(te,{nodeType:e,nodeVersion:i})).nodeEndpointConfig}},w={async list(e,i){return (await t.request(re,{filter:g(e),pagination:g(i)})).getConnections},async get(e){return (await t.request(oe,{id:e})).getConnection},async listTypes(e,i){return (await t.request(se,{filter:g(e),pagination:g(i)})).getProviders},async create(e){return (await t.request(ne,{input:e})).createConnection},async authenticateWithApiKey(e,i){return (await t.request(ue,{input:{connectionId:e,apiKey:i}})).authenticateWithApiKey},async authenticateWithBasicAuth(e,i,o){return (await t.request(le,{input:{connectionId:e,username:i,password:o}})).authenticateWithBasicAuth},async update(e,i){return (await t.request(ae,{id:e,input:i})).updateConnection},async delete(e,i){return (await t.request(ge,{id:e,deleteVaultSecret:i?.deleteVaultSecret})).deleteConnection},async test(e){return (await t.request(ce,{connectionId:e})).testConnection}},W={async list(e){return (await t.request(pe,{status:e?.status,workflowKey:e?.workflowKey})).eventRegistrations},async get(e){return (await t.request(fe,{id:e})).eventRegistration},async create(e){return (await t.request(Fe,{input:e})).createEventRegistration},async update(e,i){return (await t.request(we,{id:e,input:i})).updateEventRegistration},async delete(e){return (await t.request(Re,{id:e})).deleteEventRegistration},async toggle(e,i){return (await t.request(ye,{id:e,isActive:i})).toggleEventRegistration}},k={async list(e){return (await t.request(me,{enabled:e?.enabled,workflowKey:e?.workflowKey,pagination:g({limit:e?.limit,offset:e?.offset})})).workflowScheduledJobs},async get(e){return (await t.request(Ee,{jobId:e})).workflowScheduledJob},async create(e){return (await t.request(ke,{input:e})).createWorkflowScheduledJob},async update(e,i){return (await t.request(Ie,{jobId:e,input:i})).updateWorkflowScheduledJob},async delete(e){return (await t.request(Te,{jobId:e})).deleteWorkflowScheduledJob},setEnabled(e,i){return k.update(e,{enabled:i})}};return {workflows:s,runs:c,nodes:m,credentials:w,webhooks:W,scheduledJobs:k,dashboard:{async summary(e){return (await t.request(We,{projectId:e})).dashboardSummary},async usage(e){return (await t.request(Se,{input:e})).usageMetrics}},search:{async search(e){return (await t.request($e,{input:e})).search},async byEntityType(e,i,o){return (await t.request(Ae,{entityType:e,query:i,...g(o)})).searchByEntityType}},admin:{async systemInfo(){return (await t.request(Ce)).systemConfig}}}}var ni={id:"fluidgrids",version:"1.0.0",displayName:"FluidGrids",dependsOn:["auth"],attach(r){return je(r)}},yi=ni;exports.FluidgridsWorkflowRunError=A;exports.createFluidgridsApi=je;exports.default=yi;exports.isOffloadedPayload=He;exports.isTerminalRunStatus=_;exports.resolveRetryableNodeState=Ge;exports.resolveWorkflowKey=Be;