@oomol-lab/open-flow 0.1.0-beta.29 → 0.1.0-beta.30
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/browser/{createResourceDialog-C_8I3Fua.js → createResourceDialog-_y2xHaUA.js} +1 -1
- package/dist/browser/flow-authoring.js +60 -60
- package/dist/browser/flow-change-schema.d.ts +1 -0
- package/dist/browser/flow-change.d.ts +3 -2
- package/dist/browser/flow-change.js +943 -943
- package/dist/browser/{flowChanges-BBtkyUGd.js → flowChanges-AdN0Iqma.js} +1 -1
- package/dist/browser/{flowWorkspace-DNmBb3ZW.js → flowWorkspace-BrtzLKWB.js} +4 -4
- package/dist/browser/{inputValues-BbSVOWQP.js → inputValues-DJfFraxG.js} +1 -1
- package/dist/browser/workbench.js +4 -4
- package/dist/browser/{workbenchSelect-CQOvpteT.js → workbenchSelect-BDPIQxYK.js} +104 -104
- package/dist/common/control-api-conformance.js +73 -73
- package/dist/common/control-api.js +148 -148
- package/dist/common/control-requests.js +94 -94
- package/dist/common/flow-encoding.d.ts +2 -0
- package/dist/common/flow-encoding.js +1103 -947
- package/dist/common/flow-semantics.js +817 -757
- package/dist/common/mcp.js +257 -257
- package/dist/common/provider-triggers.js +1283 -1283
- package/dist/common/scheduler.js +566 -558
- package/package.json +1 -1
|
@@ -4988,18 +4988,18 @@ var mc = P(L([F({
|
|
|
4988
4988
|
subflows: R(Y, zc.extend({ graph: Bc })),
|
|
4989
4989
|
tasks: R(Y, Oc)
|
|
4990
4990
|
}), Wc = F({
|
|
4991
|
-
modelVersion: B(2),
|
|
4991
|
+
modelVersion: L([B(2), B(3)]),
|
|
4992
4992
|
document: Uc,
|
|
4993
4993
|
modules: R(Y, Hc)
|
|
4994
|
-
});
|
|
4994
|
+
}), Gc = Wc.extend({ modelVersion: B(3) });
|
|
4995
4995
|
Wc.extend({
|
|
4996
4996
|
kind: B("open-flow-flow-revision"),
|
|
4997
4997
|
version: B(1)
|
|
4998
4998
|
});
|
|
4999
|
-
function
|
|
5000
|
-
return pc(e),
|
|
4999
|
+
function Kc(e) {
|
|
5000
|
+
return pc(e), Gc.parse(e);
|
|
5001
5001
|
}
|
|
5002
|
-
var
|
|
5002
|
+
var qc = {
|
|
5003
5003
|
"binding.create": {
|
|
5004
5004
|
bindingId: Y,
|
|
5005
5005
|
binding: Vc
|
|
@@ -5162,13 +5162,13 @@ var Kc = {
|
|
|
5162
5162
|
value: Y
|
|
5163
5163
|
}
|
|
5164
5164
|
};
|
|
5165
|
-
P(L([...new Map(Object.entries(
|
|
5165
|
+
P(L([...new Map(Object.entries(qc).map(([e, t]) => [e, t instanceof O ? t : F({
|
|
5166
5166
|
kind: B(e),
|
|
5167
5167
|
...t
|
|
5168
5168
|
})])).values()])).min(1);
|
|
5169
5169
|
//#endregion
|
|
5170
5170
|
//#region src/flow/common/change.ts
|
|
5171
|
-
var
|
|
5171
|
+
var Jc = /* @__PURE__ */ new Set([
|
|
5172
5172
|
"const",
|
|
5173
5173
|
"enum",
|
|
5174
5174
|
"exclusiveMaximum",
|
|
@@ -5186,44 +5186,44 @@ var qc = /* @__PURE__ */ new Set([
|
|
|
5186
5186
|
"required",
|
|
5187
5187
|
"type"
|
|
5188
5188
|
]);
|
|
5189
|
-
function
|
|
5190
|
-
return
|
|
5189
|
+
function Yc(e) {
|
|
5190
|
+
return Jc.has(e);
|
|
5191
5191
|
}
|
|
5192
5192
|
//#endregion
|
|
5193
5193
|
//#region src/control/common/checkDecoders.ts
|
|
5194
|
-
function
|
|
5194
|
+
function Xc(e) {
|
|
5195
5195
|
return Array.isArray(e) ? e.map((e) => typeof e == "string" || Number.isSafeInteger(e) ? e : U()) : U();
|
|
5196
5196
|
}
|
|
5197
|
-
function
|
|
5197
|
+
function Zc(e) {
|
|
5198
5198
|
let t = W(e), n = G(t.kind);
|
|
5199
5199
|
return n == "artifact" || n == "binary" || n == "nullable" ? { kind: n } : n == "schema" ? {
|
|
5200
5200
|
kind: n,
|
|
5201
|
-
path: t.path == null ? void 0 :
|
|
5202
|
-
} : n != "keyword" || typeof t.keyword != "string" || !
|
|
5201
|
+
path: t.path == null ? void 0 : Xc(t.path)
|
|
5202
|
+
} : n != "keyword" || typeof t.keyword != "string" || !Yc(t.keyword) ? U() : {
|
|
5203
5203
|
kind: n,
|
|
5204
5204
|
keyword: t.keyword,
|
|
5205
|
-
path:
|
|
5205
|
+
path: Xc(t.path),
|
|
5206
5206
|
source: t.source === void 0 ? void 0 : J(t.source),
|
|
5207
5207
|
target: t.target === void 0 ? void 0 : J(t.target)
|
|
5208
5208
|
};
|
|
5209
5209
|
}
|
|
5210
|
-
function
|
|
5210
|
+
function Qc(e) {
|
|
5211
5211
|
let t = W(e), n = t.values == null ? void 0 : W(t.values);
|
|
5212
5212
|
return {
|
|
5213
5213
|
code: G(t.code),
|
|
5214
5214
|
column: q(t.column),
|
|
5215
5215
|
line: q(t.line),
|
|
5216
5216
|
message: G(t.message),
|
|
5217
|
-
mismatch: t.mismatch == null ? void 0 :
|
|
5217
|
+
mismatch: t.mismatch == null ? void 0 : Zc(t.mismatch),
|
|
5218
5218
|
path: typeof t.path == "string" ? t.path : U(),
|
|
5219
5219
|
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : U()])) }
|
|
5220
5220
|
};
|
|
5221
5221
|
}
|
|
5222
|
-
function
|
|
5222
|
+
function $c(e) {
|
|
5223
5223
|
let t = W(e);
|
|
5224
5224
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? U() : {
|
|
5225
5225
|
closureDigest: G(t.closureDigest),
|
|
5226
|
-
diagnostics: t.diagnostics.map(
|
|
5226
|
+
diagnostics: t.diagnostics.map(Qc),
|
|
5227
5227
|
engineContract: G(t.engineContract),
|
|
5228
5228
|
flowId: G(t.flowId),
|
|
5229
5229
|
modelVersion: q(t.modelVersion),
|
|
@@ -5235,7 +5235,7 @@ function Qc(e) {
|
|
|
5235
5235
|
}
|
|
5236
5236
|
//#endregion
|
|
5237
5237
|
//#region src/control/common/connectorDecoders.ts
|
|
5238
|
-
function
|
|
5238
|
+
function el(e) {
|
|
5239
5239
|
let t = W(e);
|
|
5240
5240
|
if (K(t, [
|
|
5241
5241
|
...Object.hasOwn(t, "providerAccountId") ? ["providerAccountId"] : [],
|
|
@@ -5259,7 +5259,7 @@ function $c(e) {
|
|
|
5259
5259
|
status: n
|
|
5260
5260
|
};
|
|
5261
5261
|
}
|
|
5262
|
-
function
|
|
5262
|
+
function tl(e, t = !1) {
|
|
5263
5263
|
let n = W(e), r = n.description, i = t && Object.hasOwn(n, "value");
|
|
5264
5264
|
return K(n, [
|
|
5265
5265
|
"jsonSchema",
|
|
@@ -5273,13 +5273,13 @@ function el(e, t = !1) {
|
|
|
5273
5273
|
...i ? { value: J(n.value) } : {}
|
|
5274
5274
|
};
|
|
5275
5275
|
}
|
|
5276
|
-
function
|
|
5277
|
-
return
|
|
5276
|
+
function nl(e) {
|
|
5277
|
+
return tl(e, !0);
|
|
5278
5278
|
}
|
|
5279
|
-
function
|
|
5279
|
+
function rl(e, t) {
|
|
5280
5280
|
return Object.fromEntries(Object.entries(W(e)).map(([e, n]) => [e, t(n)]));
|
|
5281
5281
|
}
|
|
5282
|
-
function
|
|
5282
|
+
function il(e) {
|
|
5283
5283
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
5284
5284
|
return K(t, [
|
|
5285
5285
|
"actionId",
|
|
@@ -5304,23 +5304,23 @@ function rl(e) {
|
|
|
5304
5304
|
description: typeof t.description == "string" ? t.description : U(),
|
|
5305
5305
|
...n == null ? {} : { homepageUrl: n },
|
|
5306
5306
|
...r == null ? {} : { icon: r },
|
|
5307
|
-
inputs:
|
|
5307
|
+
inputs: rl(t.inputs, nl),
|
|
5308
5308
|
name: G(t.name),
|
|
5309
|
-
outputs:
|
|
5309
|
+
outputs: rl(t.outputs, tl),
|
|
5310
5310
|
serviceId: G(t.serviceId),
|
|
5311
5311
|
serviceName: G(t.serviceName)
|
|
5312
5312
|
};
|
|
5313
5313
|
}
|
|
5314
|
-
function
|
|
5315
|
-
let { defaultConnection: t, ...n } = W(e), r =
|
|
5314
|
+
function al(e) {
|
|
5315
|
+
let { defaultConnection: t, ...n } = W(e), r = il(n);
|
|
5316
5316
|
if (t == null) return r;
|
|
5317
|
-
let i =
|
|
5317
|
+
let i = el(t);
|
|
5318
5318
|
return i.serviceId != r.serviceId || i.status != "active" ? U() : {
|
|
5319
5319
|
...r,
|
|
5320
5320
|
defaultConnection: i
|
|
5321
5321
|
};
|
|
5322
5322
|
}
|
|
5323
|
-
function
|
|
5323
|
+
function ol(e) {
|
|
5324
5324
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
5325
5325
|
return t.noSetup !== void 0 && typeof t.noSetup != "boolean" || (K(t, [
|
|
5326
5326
|
...Object.hasOwn(t, "noSetup") ? ["noSetup"] : [],
|
|
@@ -5338,8 +5338,8 @@ function al(e) {
|
|
|
5338
5338
|
}
|
|
5339
5339
|
//#endregion
|
|
5340
5340
|
//#region src/control/common/connectorQueries.ts
|
|
5341
|
-
var
|
|
5342
|
-
function
|
|
5341
|
+
var sl = (e) => e == null ? "" : `?flowId=${encodeURIComponent(e)}`;
|
|
5342
|
+
function cl(e, t) {
|
|
5343
5343
|
let n = new URLSearchParams({
|
|
5344
5344
|
...e == null ? {} : { flowId: e },
|
|
5345
5345
|
...t == null ? {} : { locale: t }
|
|
@@ -5348,11 +5348,11 @@ function sl(e, t) {
|
|
|
5348
5348
|
path: `/v1/connector/providers${n ? `?${n}` : ""}`,
|
|
5349
5349
|
decode: (e) => {
|
|
5350
5350
|
let t = W(e);
|
|
5351
|
-
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(
|
|
5351
|
+
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(ol);
|
|
5352
5352
|
}
|
|
5353
5353
|
};
|
|
5354
5354
|
}
|
|
5355
|
-
function
|
|
5355
|
+
function ll(e, t, n) {
|
|
5356
5356
|
let r = new URLSearchParams({
|
|
5357
5357
|
...t == null ? {} : { flowId: t },
|
|
5358
5358
|
...n == null ? {} : { locale: n }
|
|
@@ -5361,35 +5361,35 @@ function cl(e, t, n) {
|
|
|
5361
5361
|
path: `/v1/connector/actions/${encodeURIComponent(e)}${r ? `?${r}` : ""}`,
|
|
5362
5362
|
decode: (e) => {
|
|
5363
5363
|
let t = W(e);
|
|
5364
|
-
return K(t, ["action", "version"]), t.version == 1 ?
|
|
5364
|
+
return K(t, ["action", "version"]), t.version == 1 ? al(t.action) : U();
|
|
5365
5365
|
}
|
|
5366
5366
|
};
|
|
5367
5367
|
}
|
|
5368
|
-
function
|
|
5368
|
+
function ul(e) {
|
|
5369
5369
|
return {
|
|
5370
|
-
path: `/v1/connector/connections${
|
|
5370
|
+
path: `/v1/connector/connections${sl(e)}`,
|
|
5371
5371
|
decode: (e) => {
|
|
5372
5372
|
let t = W(e);
|
|
5373
|
-
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(
|
|
5373
|
+
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(el);
|
|
5374
5374
|
}
|
|
5375
5375
|
};
|
|
5376
5376
|
}
|
|
5377
|
-
function
|
|
5377
|
+
function dl(e, t) {
|
|
5378
5378
|
return {
|
|
5379
|
-
path: `/v1/connector/connections/${encodeURIComponent(e)}${
|
|
5379
|
+
path: `/v1/connector/connections/${encodeURIComponent(e)}${sl(t)}`,
|
|
5380
5380
|
decode: (t) => {
|
|
5381
5381
|
let n = W(t);
|
|
5382
5382
|
return K(n, [
|
|
5383
5383
|
"connections",
|
|
5384
5384
|
"serviceId",
|
|
5385
5385
|
"version"
|
|
5386
|
-
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(
|
|
5386
|
+
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(el);
|
|
5387
5387
|
}
|
|
5388
5388
|
};
|
|
5389
5389
|
}
|
|
5390
5390
|
//#endregion
|
|
5391
5391
|
//#region src/control/common/flowDecoders.ts
|
|
5392
|
-
function
|
|
5392
|
+
function fl(e) {
|
|
5393
5393
|
let t = W(e), n = t.status;
|
|
5394
5394
|
if (t.version != 1 || n != "active" && n != "retiring") return U();
|
|
5395
5395
|
let r = t.live == null ? void 0 : W(t.live);
|
|
@@ -5408,18 +5408,18 @@ function dl(e) {
|
|
|
5408
5408
|
version: 1
|
|
5409
5409
|
};
|
|
5410
5410
|
}
|
|
5411
|
-
function
|
|
5411
|
+
function pl(e) {
|
|
5412
5412
|
let t = W(e);
|
|
5413
5413
|
if (t.version != 1 || !Array.isArray(t.flows)) return U();
|
|
5414
5414
|
let n = t.nextCursor, r = t.total;
|
|
5415
5415
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
5416
5416
|
...n == null ? {} : { nextCursor: n },
|
|
5417
|
-
flows: t.flows.map(
|
|
5417
|
+
flows: t.flows.map(fl),
|
|
5418
5418
|
...r == null ? {} : { total: r },
|
|
5419
5419
|
version: 1
|
|
5420
5420
|
};
|
|
5421
5421
|
}
|
|
5422
|
-
function
|
|
5422
|
+
function ml(e) {
|
|
5423
5423
|
let t = W(e);
|
|
5424
5424
|
if (K(t, [
|
|
5425
5425
|
"name",
|
|
@@ -5442,7 +5442,7 @@ function pl(e) {
|
|
|
5442
5442
|
}
|
|
5443
5443
|
//#endregion
|
|
5444
5444
|
//#region src/control/common/publicationDecoders.ts
|
|
5445
|
-
function
|
|
5445
|
+
function hl(e) {
|
|
5446
5446
|
let t = W(e), n = t.operation, r = t.sourcePublicationId;
|
|
5447
5447
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? U() : {
|
|
5448
5448
|
actorId: G(t.actorId),
|
|
@@ -5459,7 +5459,7 @@ function ml(e) {
|
|
|
5459
5459
|
version: 1
|
|
5460
5460
|
};
|
|
5461
5461
|
}
|
|
5462
|
-
function
|
|
5462
|
+
function gl(e) {
|
|
5463
5463
|
let t = W(e), n = t.status, r = {
|
|
5464
5464
|
createdAt: G(t.createdAt),
|
|
5465
5465
|
flowId: G(t.flowId),
|
|
@@ -5525,33 +5525,33 @@ function hl(e) {
|
|
|
5525
5525
|
default: return U();
|
|
5526
5526
|
}
|
|
5527
5527
|
}
|
|
5528
|
-
function
|
|
5528
|
+
function _l(e) {
|
|
5529
5529
|
let t = W(e), n = t.status, r = t.publication;
|
|
5530
5530
|
return t.version != 1 || typeof t.hasUnpublishedChanges != "boolean" || n != "not-published" && n != "runnable" && n != "suspended" || n == "not-published" && r !== null || n != "not-published" && r === null ? U() : {
|
|
5531
5531
|
flowId: G(t.flowId),
|
|
5532
5532
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
5533
|
-
publication: r === null ? null :
|
|
5533
|
+
publication: r === null ? null : hl(r),
|
|
5534
5534
|
revision: q(t.revision),
|
|
5535
5535
|
status: n,
|
|
5536
5536
|
version: 1
|
|
5537
5537
|
};
|
|
5538
5538
|
}
|
|
5539
|
-
function
|
|
5539
|
+
function vl(e) {
|
|
5540
5540
|
let t = W(e), n = t.nextCursor, r = t.total;
|
|
5541
5541
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
5542
5542
|
...n == null ? {} : { nextCursor: n },
|
|
5543
|
-
publications: t.publications.map(
|
|
5543
|
+
publications: t.publications.map(hl),
|
|
5544
5544
|
...r == null ? {} : { total: r },
|
|
5545
5545
|
version: 1
|
|
5546
5546
|
};
|
|
5547
5547
|
}
|
|
5548
5548
|
new TextEncoder();
|
|
5549
|
-
var
|
|
5549
|
+
var yl = R(k(), N()), bl = F({
|
|
5550
5550
|
jsonSchema: N(),
|
|
5551
5551
|
nullable: M(),
|
|
5552
5552
|
value: N().optional(),
|
|
5553
5553
|
description: k().optional()
|
|
5554
|
-
}).strict(),
|
|
5554
|
+
}).strict(), xl = R(k(), bl), Sl = L([F({
|
|
5555
5555
|
kind: B("value"),
|
|
5556
5556
|
value: N()
|
|
5557
5557
|
}).strict(), F({
|
|
@@ -5561,36 +5561,36 @@ var vl = R(k(), N()), yl = F({
|
|
|
5561
5561
|
nodeId: k(),
|
|
5562
5562
|
output: k()
|
|
5563
5563
|
}).strict())
|
|
5564
|
-
}).strict()]),
|
|
5564
|
+
}).strict()]), Cl = {
|
|
5565
5565
|
name: k().optional(),
|
|
5566
5566
|
description: k().optional(),
|
|
5567
5567
|
icon: k().optional()
|
|
5568
|
-
},
|
|
5568
|
+
}, wl = L([
|
|
5569
5569
|
F({
|
|
5570
|
-
...
|
|
5570
|
+
...Cl,
|
|
5571
5571
|
kind: B("cron"),
|
|
5572
5572
|
cronTimes: P(N())
|
|
5573
5573
|
}).strict(),
|
|
5574
5574
|
F({
|
|
5575
|
-
...
|
|
5575
|
+
...Cl,
|
|
5576
5576
|
kind: B("manual")
|
|
5577
5577
|
}).strict(),
|
|
5578
5578
|
F({
|
|
5579
|
-
...
|
|
5579
|
+
...Cl,
|
|
5580
5580
|
kind: B("task"),
|
|
5581
5581
|
concurrency: B(1).optional(),
|
|
5582
|
-
inputs: R(k(),
|
|
5582
|
+
inputs: R(k(), Sl),
|
|
5583
5583
|
task: F({
|
|
5584
5584
|
name: k(),
|
|
5585
5585
|
moduleId: k(),
|
|
5586
|
-
inputs:
|
|
5587
|
-
outputs: R(k(),
|
|
5586
|
+
inputs: xl,
|
|
5587
|
+
outputs: R(k(), bl.omit({ value: !0 }))
|
|
5588
5588
|
}).strict()
|
|
5589
5589
|
}).strict()
|
|
5590
5590
|
]);
|
|
5591
5591
|
F({
|
|
5592
5592
|
name: k(),
|
|
5593
|
-
graph: F({ nodes: R(k(),
|
|
5593
|
+
graph: F({ nodes: R(k(), wl) }).strict()
|
|
5594
5594
|
}).strict(), F({
|
|
5595
5595
|
kind: B("open-flow-project-revision"),
|
|
5596
5596
|
version: B(1),
|
|
@@ -5601,15 +5601,15 @@ F({
|
|
|
5601
5601
|
imports: P(k())
|
|
5602
5602
|
}).strict()),
|
|
5603
5603
|
document: F({
|
|
5604
|
-
bindings:
|
|
5605
|
-
flows:
|
|
5606
|
-
subflows:
|
|
5607
|
-
tasks:
|
|
5604
|
+
bindings: yl,
|
|
5605
|
+
flows: yl,
|
|
5606
|
+
subflows: yl,
|
|
5607
|
+
tasks: yl
|
|
5608
5608
|
}).strict()
|
|
5609
5609
|
}).strict();
|
|
5610
5610
|
//#endregion
|
|
5611
5611
|
//#region src/control/common/revisionDecoders.ts
|
|
5612
|
-
function
|
|
5612
|
+
function Tl(e) {
|
|
5613
5613
|
let t = W(e), n = t.parentRevisionId;
|
|
5614
5614
|
return t.version != 1 || n !== null && typeof n != "string" ? U() : {
|
|
5615
5615
|
actorId: G(t.actorId),
|
|
@@ -5622,18 +5622,18 @@ function wl(e) {
|
|
|
5622
5622
|
version: 1
|
|
5623
5623
|
};
|
|
5624
5624
|
}
|
|
5625
|
-
function
|
|
5625
|
+
function El(e) {
|
|
5626
5626
|
let t = W(e);
|
|
5627
5627
|
try {
|
|
5628
5628
|
return {
|
|
5629
|
-
...
|
|
5630
|
-
content:
|
|
5629
|
+
...Tl(t),
|
|
5630
|
+
content: Kc(t.content)
|
|
5631
5631
|
};
|
|
5632
5632
|
} catch {
|
|
5633
5633
|
return U();
|
|
5634
5634
|
}
|
|
5635
5635
|
}
|
|
5636
|
-
function
|
|
5636
|
+
function Dl(e) {
|
|
5637
5637
|
let t = W(e);
|
|
5638
5638
|
return t.version != 1 || q(t.revision) < 1 ? U() : {
|
|
5639
5639
|
revision: q(t.revision),
|
|
@@ -5642,24 +5642,24 @@ function El(e) {
|
|
|
5642
5642
|
version: 1
|
|
5643
5643
|
};
|
|
5644
5644
|
}
|
|
5645
|
-
function
|
|
5645
|
+
function Ol(e) {
|
|
5646
5646
|
let t = W(e);
|
|
5647
5647
|
return t.version == 1 ? {
|
|
5648
|
-
revision:
|
|
5648
|
+
revision: Tl(t.revision),
|
|
5649
5649
|
version: 1
|
|
5650
5650
|
} : U();
|
|
5651
5651
|
}
|
|
5652
|
-
function
|
|
5652
|
+
function kl(e) {
|
|
5653
5653
|
let t = W(e);
|
|
5654
5654
|
return t.version != 1 || t.kind != "snapshot" ? U() : {
|
|
5655
|
-
draft:
|
|
5655
|
+
draft: El(t.draft),
|
|
5656
5656
|
kind: "snapshot",
|
|
5657
5657
|
version: 1
|
|
5658
5658
|
};
|
|
5659
5659
|
}
|
|
5660
5660
|
//#endregion
|
|
5661
5661
|
//#region src/control/common/runDecoders.ts
|
|
5662
|
-
var
|
|
5662
|
+
var Al = /* @__PURE__ */ new Set([
|
|
5663
5663
|
"canceled",
|
|
5664
5664
|
"completed",
|
|
5665
5665
|
"failed",
|
|
@@ -5669,10 +5669,10 @@ var kl = /* @__PURE__ */ new Set([
|
|
|
5669
5669
|
"starting",
|
|
5670
5670
|
"waiting"
|
|
5671
5671
|
]);
|
|
5672
|
-
function Al(e) {
|
|
5673
|
-
return typeof e == "string" && kl.has(e) ? e : U();
|
|
5674
|
-
}
|
|
5675
5672
|
function jl(e) {
|
|
5673
|
+
return typeof e == "string" && Al.has(e) ? e : U();
|
|
5674
|
+
}
|
|
5675
|
+
function Ml(e) {
|
|
5676
5676
|
let t = W(e), n = t.source, r = t.startedAt, i = t.finishedAt;
|
|
5677
5677
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || i != null && typeof i != "string" ? U() : {
|
|
5678
5678
|
createdAt: G(t.createdAt),
|
|
@@ -5682,11 +5682,11 @@ function jl(e) {
|
|
|
5682
5682
|
runId: G(t.runId),
|
|
5683
5683
|
source: n,
|
|
5684
5684
|
...r == null ? {} : { startedAt: r },
|
|
5685
|
-
status:
|
|
5685
|
+
status: jl(t.status),
|
|
5686
5686
|
version: 1
|
|
5687
5687
|
};
|
|
5688
5688
|
}
|
|
5689
|
-
function
|
|
5689
|
+
function Nl(e) {
|
|
5690
5690
|
let t = W(e);
|
|
5691
5691
|
K(t, [
|
|
5692
5692
|
"actions",
|
|
@@ -5706,10 +5706,10 @@ function Ml(e) {
|
|
|
5706
5706
|
waitingSince: G(t.waitingSince)
|
|
5707
5707
|
};
|
|
5708
5708
|
}
|
|
5709
|
-
function
|
|
5710
|
-
let t = W(e), n =
|
|
5709
|
+
function Pl(e) {
|
|
5710
|
+
let t = W(e), n = Ml(t), r = t.eventsExpiresAt;
|
|
5711
5711
|
if (r != null && typeof r != "string" || t.waiting !== void 0 || !Array.isArray(t.waits)) return U();
|
|
5712
|
-
let i = t.waits.map(
|
|
5712
|
+
let i = t.waits.map(Nl);
|
|
5713
5713
|
if (new Set(i.map((e) => e.waitId)).size != i.length || n.status == "waiting" && i.length == 0 || [
|
|
5714
5714
|
"completed",
|
|
5715
5715
|
"failed",
|
|
@@ -5748,17 +5748,17 @@ function Nl(e) {
|
|
|
5748
5748
|
};
|
|
5749
5749
|
}
|
|
5750
5750
|
}
|
|
5751
|
-
function
|
|
5751
|
+
function Fl(e) {
|
|
5752
5752
|
let t = W(e), n = t.nextCursor;
|
|
5753
5753
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? U() : {
|
|
5754
5754
|
flowId: G(t.flowId),
|
|
5755
5755
|
...n == null ? {} : { nextCursor: n },
|
|
5756
|
-
runs: t.runs.map(
|
|
5756
|
+
runs: t.runs.map(Ml),
|
|
5757
5757
|
version: 1
|
|
5758
5758
|
};
|
|
5759
5759
|
}
|
|
5760
|
-
function
|
|
5761
|
-
let t = W(e), n =
|
|
5760
|
+
function Il(e) {
|
|
5761
|
+
let t = W(e), n = jl(t.status);
|
|
5762
5762
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" || n == "waiting" ? U() : {
|
|
5763
5763
|
cancelAccepted: t.cancelAccepted,
|
|
5764
5764
|
runId: G(t.runId),
|
|
@@ -5766,7 +5766,7 @@ function Fl(e) {
|
|
|
5766
5766
|
version: 1
|
|
5767
5767
|
};
|
|
5768
5768
|
}
|
|
5769
|
-
function
|
|
5769
|
+
function Ll(e) {
|
|
5770
5770
|
let t = W(e);
|
|
5771
5771
|
K(t, [
|
|
5772
5772
|
"action",
|
|
@@ -5783,12 +5783,12 @@ function Il(e) {
|
|
|
5783
5783
|
resolutionAccepted: t.resolutionAccepted,
|
|
5784
5784
|
resolvedAt: r,
|
|
5785
5785
|
runId: G(t.runId),
|
|
5786
|
-
status:
|
|
5786
|
+
status: jl(t.status),
|
|
5787
5787
|
version: 1,
|
|
5788
5788
|
waitId: G(t.waitId)
|
|
5789
5789
|
};
|
|
5790
5790
|
}
|
|
5791
|
-
function
|
|
5791
|
+
function Rl(e) {
|
|
5792
5792
|
let t = W(e), n = t.status;
|
|
5793
5793
|
if (t.version != 1) return U();
|
|
5794
5794
|
let r = {
|
|
@@ -5831,7 +5831,7 @@ function Ll(e) {
|
|
|
5831
5831
|
}
|
|
5832
5832
|
//#endregion
|
|
5833
5833
|
//#region src/control/common/random.ts
|
|
5834
|
-
function
|
|
5834
|
+
function zl() {
|
|
5835
5835
|
let e = globalThis.crypto;
|
|
5836
5836
|
if (e != null) {
|
|
5837
5837
|
try {
|
|
@@ -5848,7 +5848,7 @@ function Rl() {
|
|
|
5848
5848
|
}
|
|
5849
5849
|
//#endregion
|
|
5850
5850
|
//#region src/control/common/api.ts
|
|
5851
|
-
function
|
|
5851
|
+
function Bl(e) {
|
|
5852
5852
|
let t = W(e), n = q(t.sequence);
|
|
5853
5853
|
if (n < 0) return U();
|
|
5854
5854
|
let r = {
|
|
@@ -5876,7 +5876,7 @@ function zl(e) {
|
|
|
5876
5876
|
payload: {
|
|
5877
5877
|
flowId: G(i.flowId),
|
|
5878
5878
|
scopeId: G(i.scopeId),
|
|
5879
|
-
progress:
|
|
5879
|
+
progress: Vl(i.progress)
|
|
5880
5880
|
}
|
|
5881
5881
|
};
|
|
5882
5882
|
case "run.waiting": return Array.isArray(i.waitIds) ? {
|
|
@@ -5984,7 +5984,7 @@ function zl(e) {
|
|
|
5984
5984
|
kind: a,
|
|
5985
5985
|
payload: {
|
|
5986
5986
|
...e,
|
|
5987
|
-
progress:
|
|
5987
|
+
progress: Vl(i.progress)
|
|
5988
5988
|
}
|
|
5989
5989
|
};
|
|
5990
5990
|
case "node.artifact": {
|
|
@@ -6010,14 +6010,14 @@ function zl(e) {
|
|
|
6010
6010
|
default: return U();
|
|
6011
6011
|
}
|
|
6012
6012
|
}
|
|
6013
|
-
function
|
|
6013
|
+
function Vl(e) {
|
|
6014
6014
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : U();
|
|
6015
6015
|
}
|
|
6016
|
-
function
|
|
6016
|
+
function Hl(e) {
|
|
6017
6017
|
let t = W(e), n = t.eventsExpiresAt, r = q(t.nextAfter);
|
|
6018
6018
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? U() : {
|
|
6019
6019
|
done: t.done,
|
|
6020
|
-
events: t.events.map(
|
|
6020
|
+
events: t.events.map(Bl),
|
|
6021
6021
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
6022
6022
|
historyComplete: t.historyComplete,
|
|
6023
6023
|
nextAfter: r,
|
|
@@ -6026,10 +6026,10 @@ function Vl(e) {
|
|
|
6026
6026
|
};
|
|
6027
6027
|
}
|
|
6028
6028
|
var $ = encodeURIComponent;
|
|
6029
|
-
function
|
|
6030
|
-
return `${e}-${
|
|
6029
|
+
function Ul(e) {
|
|
6030
|
+
return `${e}-${zl()}`;
|
|
6031
6031
|
}
|
|
6032
|
-
var
|
|
6032
|
+
var Wl = class {
|
|
6033
6033
|
constructor(e) {
|
|
6034
6034
|
this.requestControl = e;
|
|
6035
6035
|
}
|
|
@@ -6037,14 +6037,14 @@ var Ul = class {
|
|
|
6037
6037
|
let t = new URLSearchParams();
|
|
6038
6038
|
e.cursor != null && t.set("cursor", e.cursor), e.limit != null && t.set("limit", String(e.limit)), e.includeTotal != null && t.set("includeTotal", String(e.includeTotal));
|
|
6039
6039
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
6040
|
-
return
|
|
6040
|
+
return pl(await this.request(`/v1/flows${n}`));
|
|
6041
6041
|
}
|
|
6042
6042
|
async listEventSources(e, t) {
|
|
6043
6043
|
return Is(await this.request("/v1/event-sources" + (e == null ? "" : `?flowId=${$(e)}`), { signal: t }));
|
|
6044
6044
|
}
|
|
6045
6045
|
async listEventSourceConnections(e, t) {
|
|
6046
6046
|
let n = W(await this.request(`/v1/event-sources/connections${e == null ? "" : `?teamId=${$(e)}`}`, { signal: t }));
|
|
6047
|
-
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(
|
|
6047
|
+
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(el);
|
|
6048
6048
|
}
|
|
6049
6049
|
async createEventSource(e) {
|
|
6050
6050
|
return Fs(await this.request("/v1/event-sources", {
|
|
@@ -6070,15 +6070,15 @@ var Ul = class {
|
|
|
6070
6070
|
async listVariables() {
|
|
6071
6071
|
let e = W(await this.request("/v1/variables"));
|
|
6072
6072
|
return K(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? U() : {
|
|
6073
|
-
variables: e.variables.map(
|
|
6073
|
+
variables: e.variables.map(ml),
|
|
6074
6074
|
version: 1
|
|
6075
6075
|
};
|
|
6076
6076
|
}
|
|
6077
6077
|
async getVariable(e) {
|
|
6078
|
-
return
|
|
6078
|
+
return ml(await this.request(`/v1/variables/${$(e)}`));
|
|
6079
6079
|
}
|
|
6080
6080
|
async putVariable(e, t) {
|
|
6081
|
-
return
|
|
6081
|
+
return ml(await this.request(`/v1/variables/${$(e)}`, {
|
|
6082
6082
|
body: JSON.stringify({ value: t }),
|
|
6083
6083
|
method: "PUT"
|
|
6084
6084
|
}));
|
|
@@ -6087,8 +6087,8 @@ var Ul = class {
|
|
|
6087
6087
|
let t = W(await this.request(`/v1/variables/${$(e)}`, { method: "DELETE" }));
|
|
6088
6088
|
if (K(t, ["version"]), t.version != 1) return U();
|
|
6089
6089
|
}
|
|
6090
|
-
async createFlow(e, t = `flow-${
|
|
6091
|
-
return
|
|
6090
|
+
async createFlow(e, t = `flow-${zl()}`) {
|
|
6091
|
+
return fl(await this.request("/v1/flows", {
|
|
6092
6092
|
body: JSON.stringify({
|
|
6093
6093
|
name: e,
|
|
6094
6094
|
version: 1
|
|
@@ -6098,10 +6098,10 @@ var Ul = class {
|
|
|
6098
6098
|
}));
|
|
6099
6099
|
}
|
|
6100
6100
|
async getFlow(e) {
|
|
6101
|
-
return
|
|
6101
|
+
return fl(await this.request(`/v1/flows/${$(e)}`));
|
|
6102
6102
|
}
|
|
6103
6103
|
async renameFlow(e, t) {
|
|
6104
|
-
return
|
|
6104
|
+
return fl(await this.request(`/v1/flows/${$(e)}`, {
|
|
6105
6105
|
body: JSON.stringify({
|
|
6106
6106
|
name: t,
|
|
6107
6107
|
version: 1
|
|
@@ -6110,7 +6110,7 @@ var Ul = class {
|
|
|
6110
6110
|
}));
|
|
6111
6111
|
}
|
|
6112
6112
|
async deleteFlow(e) {
|
|
6113
|
-
return
|
|
6113
|
+
return fl(await this.request(`/v1/flows/${$(e)}`, { method: "DELETE" }));
|
|
6114
6114
|
}
|
|
6115
6115
|
async listTriggerKeys(e, t) {
|
|
6116
6116
|
let n = W(await this.request(`/v1/trigger-keys${t == null ? "" : `?locale=${encodeURIComponent(t)}`}`, { signal: e }));
|
|
@@ -6190,25 +6190,25 @@ var Ul = class {
|
|
|
6190
6190
|
let t = W(await this.request(`/v1/flows/${$(e)}/editor`));
|
|
6191
6191
|
if (t.version != 1) return U();
|
|
6192
6192
|
let n = {
|
|
6193
|
-
flow:
|
|
6194
|
-
draft:
|
|
6195
|
-
live:
|
|
6196
|
-
presentation:
|
|
6193
|
+
flow: fl(t.flow),
|
|
6194
|
+
draft: El(t.draft),
|
|
6195
|
+
live: _l(t.live),
|
|
6196
|
+
presentation: Dl(t.presentation),
|
|
6197
6197
|
version: 1
|
|
6198
6198
|
};
|
|
6199
6199
|
return n.flow.flowId != e || n.draft.flowId != e || n.live.flowId != e || n.flow.draftRevisionId != n.draft.revisionId ? U() : n;
|
|
6200
6200
|
}
|
|
6201
6201
|
async getPresentation(e) {
|
|
6202
|
-
return
|
|
6202
|
+
return Dl(await this.request(`/v1/flows/${$(e)}/presentation`));
|
|
6203
6203
|
}
|
|
6204
6204
|
async getDraft(e) {
|
|
6205
|
-
return
|
|
6205
|
+
return El(await this.request(`/v1/flows/${$(e)}/draft`));
|
|
6206
6206
|
}
|
|
6207
6207
|
async syncDraft(e) {
|
|
6208
|
-
return
|
|
6208
|
+
return kl(await this.request(`/v1/flows/${$(e)}/draft/sync`));
|
|
6209
6209
|
}
|
|
6210
6210
|
async getRevision(e, t) {
|
|
6211
|
-
return
|
|
6211
|
+
return El(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}`));
|
|
6212
6212
|
}
|
|
6213
6213
|
async listTriggerConfigOptions(e, t, n, r) {
|
|
6214
6214
|
let i = W(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}/options/${$(n)}`, { signal: r }));
|
|
@@ -6231,7 +6231,7 @@ var Ul = class {
|
|
|
6231
6231
|
});
|
|
6232
6232
|
}
|
|
6233
6233
|
async listConnectorProviders(e, t, n) {
|
|
6234
|
-
let r =
|
|
6234
|
+
let r = cl(t, n);
|
|
6235
6235
|
return this.connectorRequest(r.path, "providers", e, r.decode);
|
|
6236
6236
|
}
|
|
6237
6237
|
async listConnectorActions(e, t, n, r) {
|
|
@@ -6249,15 +6249,15 @@ var Ul = class {
|
|
|
6249
6249
|
}, t);
|
|
6250
6250
|
}
|
|
6251
6251
|
async getConnectorAction(e, t, n, r, i = !1) {
|
|
6252
|
-
let a =
|
|
6252
|
+
let a = ll(e, n, r);
|
|
6253
6253
|
return this.connectorRequest(a.path, "actions", t, a.decode, i);
|
|
6254
6254
|
}
|
|
6255
6255
|
async listAllConnectorConnections(e, t, n = !1) {
|
|
6256
|
-
let r =
|
|
6256
|
+
let r = ul(t);
|
|
6257
6257
|
return this.connectorRequest(r.path, "connections", e, r.decode, n);
|
|
6258
6258
|
}
|
|
6259
6259
|
async listConnectorConnections(e, t, n, r = !1) {
|
|
6260
|
-
let i =
|
|
6260
|
+
let i = dl(e, n);
|
|
6261
6261
|
return this.connectorRequest(i.path, "connections", t, i.decode, r);
|
|
6262
6262
|
}
|
|
6263
6263
|
async createConnectorConnectionPage(e, t, n) {
|
|
@@ -6275,8 +6275,8 @@ var Ul = class {
|
|
|
6275
6275
|
return U();
|
|
6276
6276
|
}
|
|
6277
6277
|
}
|
|
6278
|
-
async changeDraft(e, t, n, r =
|
|
6279
|
-
return
|
|
6278
|
+
async changeDraft(e, t, n, r = Ul("change")) {
|
|
6279
|
+
return Ol(await this.request(`/v1/flows/${$(e)}/draft/changes`, {
|
|
6280
6280
|
body: JSON.stringify({
|
|
6281
6281
|
expectedRevisionId: t,
|
|
6282
6282
|
operations: n,
|
|
@@ -6286,8 +6286,8 @@ var Ul = class {
|
|
|
6286
6286
|
method: "POST"
|
|
6287
6287
|
}));
|
|
6288
6288
|
}
|
|
6289
|
-
async repairDraft(e, t, n =
|
|
6290
|
-
return
|
|
6289
|
+
async repairDraft(e, t, n = Ul("repair")) {
|
|
6290
|
+
return Ol(await this.request(`/v1/flows/${$(e)}/draft/repair`, {
|
|
6291
6291
|
body: JSON.stringify({
|
|
6292
6292
|
expectedRevisionId: t,
|
|
6293
6293
|
version: 1
|
|
@@ -6297,7 +6297,7 @@ var Ul = class {
|
|
|
6297
6297
|
}));
|
|
6298
6298
|
}
|
|
6299
6299
|
async checkFlow(e, t) {
|
|
6300
|
-
return
|
|
6300
|
+
return $c(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}/check`, {
|
|
6301
6301
|
body: JSON.stringify({
|
|
6302
6302
|
engineContract: "open-flow-engine/v5",
|
|
6303
6303
|
version: 1
|
|
@@ -6306,42 +6306,42 @@ var Ul = class {
|
|
|
6306
6306
|
}));
|
|
6307
6307
|
}
|
|
6308
6308
|
async getLive(e, t) {
|
|
6309
|
-
return
|
|
6309
|
+
return _l(await this.request(`/v1/flows/${$(e)}/live`, { signal: t }));
|
|
6310
6310
|
}
|
|
6311
6311
|
async listPublications(e, t = {}, n) {
|
|
6312
6312
|
let r = new URLSearchParams();
|
|
6313
6313
|
t.cursor != null && r.set("cursor", t.cursor), t.limit != null && r.set("limit", String(t.limit)), t.includeTotal != null && r.set("includeTotal", String(t.includeTotal));
|
|
6314
6314
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6315
|
-
return
|
|
6315
|
+
return vl(await this.request(`/v1/flows/${$(e)}/publications${i}`, { signal: n }));
|
|
6316
6316
|
}
|
|
6317
6317
|
async createDraftRun(e, t, n) {
|
|
6318
|
-
let r =
|
|
6318
|
+
let r = Pl(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}/runs`, {
|
|
6319
6319
|
body: JSON.stringify({
|
|
6320
6320
|
engineContract: "open-flow-engine/v5",
|
|
6321
6321
|
inputs: n.inputs ?? {},
|
|
6322
6322
|
trigger: n.trigger,
|
|
6323
6323
|
version: 2
|
|
6324
6324
|
}),
|
|
6325
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
6325
|
+
headers: { "idempotency-key": n.idempotencyKey ?? Ul("run") },
|
|
6326
6326
|
method: "POST"
|
|
6327
6327
|
}));
|
|
6328
6328
|
return r.source == "draft" ? r : U();
|
|
6329
6329
|
}
|
|
6330
6330
|
async createLiveRun(e, t) {
|
|
6331
|
-
let n =
|
|
6331
|
+
let n = Pl(await this.request("/v1/runs", {
|
|
6332
6332
|
body: JSON.stringify({
|
|
6333
6333
|
inputs: t.inputs ?? {},
|
|
6334
6334
|
trigger: t.trigger,
|
|
6335
6335
|
publicationId: e,
|
|
6336
6336
|
version: 2
|
|
6337
6337
|
}),
|
|
6338
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
6338
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Ul("run") },
|
|
6339
6339
|
method: "POST"
|
|
6340
6340
|
}));
|
|
6341
6341
|
return n.source == "live" ? n : U();
|
|
6342
6342
|
}
|
|
6343
6343
|
async setFlowEnabled(e, t, n) {
|
|
6344
|
-
return
|
|
6344
|
+
return fl(await this.request(`/v1/flows/${$(e)}/enabled`, {
|
|
6345
6345
|
method: "PUT",
|
|
6346
6346
|
body: JSON.stringify({
|
|
6347
6347
|
enabled: n,
|
|
@@ -6351,43 +6351,43 @@ var Ul = class {
|
|
|
6351
6351
|
}));
|
|
6352
6352
|
}
|
|
6353
6353
|
async publishFlow(e, t, n, r = {}) {
|
|
6354
|
-
return
|
|
6354
|
+
return gl(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}/publications`, {
|
|
6355
6355
|
body: JSON.stringify({
|
|
6356
6356
|
engineContract: "open-flow-engine/v5",
|
|
6357
6357
|
expectedLivePublicationId: n,
|
|
6358
6358
|
version: 1
|
|
6359
6359
|
}),
|
|
6360
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6360
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Ul("publication") },
|
|
6361
6361
|
method: "POST"
|
|
6362
6362
|
}));
|
|
6363
6363
|
}
|
|
6364
6364
|
async getPublishOperation(e, t, n) {
|
|
6365
|
-
return
|
|
6365
|
+
return gl(await this.request(`/v1/flows/${$(e)}/publish-operations/${$(t)}`, { signal: n }));
|
|
6366
6366
|
}
|
|
6367
6367
|
async rollbackFlow(e, t, n, r = {}) {
|
|
6368
|
-
return
|
|
6368
|
+
return hl(await this.request(`/v1/flows/${$(e)}/publications/${$(t)}/rollback`, {
|
|
6369
6369
|
body: JSON.stringify({
|
|
6370
6370
|
expectedLivePublicationId: n,
|
|
6371
6371
|
version: 1
|
|
6372
6372
|
}),
|
|
6373
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6373
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Ul("publication") },
|
|
6374
6374
|
method: "POST"
|
|
6375
6375
|
}));
|
|
6376
6376
|
}
|
|
6377
6377
|
async getRun(e, t) {
|
|
6378
|
-
return
|
|
6378
|
+
return Pl(await this.request(`/v1/runs/${$(e)}`, { signal: t }));
|
|
6379
6379
|
}
|
|
6380
6380
|
async listRuns(e, t = {}) {
|
|
6381
6381
|
let n = new URLSearchParams();
|
|
6382
6382
|
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status), t.pendingWait != null && n.set("pendingWait", String(t.pendingWait)), t.source != null && n.set("source", t.source), t.createdFrom != null && n.set("createdFrom", t.createdFrom), t.createdBefore != null && n.set("createdBefore", t.createdBefore), t.runId != null && n.set("runId", t.runId);
|
|
6383
6383
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
6384
|
-
return
|
|
6384
|
+
return Fl(await this.request(`/v1/flows/${$(e)}/runs${r}`));
|
|
6385
6385
|
}
|
|
6386
6386
|
async getRunEvents(e, t = {}, n) {
|
|
6387
6387
|
let r = new URLSearchParams();
|
|
6388
6388
|
t.after != null && r.set("after", String(t.after)), t.limit != null && r.set("limit", String(t.limit));
|
|
6389
6389
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6390
|
-
return
|
|
6390
|
+
return Hl(await this.request(`/v1/runs/${$(e)}/events${i}`, { signal: n }));
|
|
6391
6391
|
}
|
|
6392
6392
|
async listRunResults(e, t, n) {
|
|
6393
6393
|
return sc(await this.request(`/v1/runs/${$(e)}/results${t == null ? "" : `?after=${encodeURIComponent(t)}`}`, { signal: n }));
|
|
@@ -6400,16 +6400,16 @@ var Ul = class {
|
|
|
6400
6400
|
return (await this.response(`/v1/runs/${$(e)}/results/${$(t)}/content`, { signal: n })).blob();
|
|
6401
6401
|
}
|
|
6402
6402
|
async getRunResult(e, t) {
|
|
6403
|
-
return
|
|
6403
|
+
return Rl(await this.request(`/v1/runs/${$(e)}/result`, { signal: t }));
|
|
6404
6404
|
}
|
|
6405
6405
|
async cancelRun(e) {
|
|
6406
|
-
return
|
|
6406
|
+
return Il(await this.request(`/v1/runs/${$(e)}/cancel`, {
|
|
6407
6407
|
body: JSON.stringify({ version: 1 }),
|
|
6408
6408
|
method: "POST"
|
|
6409
6409
|
}));
|
|
6410
6410
|
}
|
|
6411
6411
|
async resolveRunWait(e, t, n) {
|
|
6412
|
-
return
|
|
6412
|
+
return Ll(await this.request(`/v1/runs/${$(e)}/waits/${$(t)}/resolve`, {
|
|
6413
6413
|
body: JSON.stringify({
|
|
6414
6414
|
action: n,
|
|
6415
6415
|
version: 1
|
|
@@ -6421,7 +6421,7 @@ var Ul = class {
|
|
|
6421
6421
|
let n = Object.entries(e).map(([e, t]) => `${$(e)}=${$(t)}`).join("&"), r = n == "" ? "" : `?${n}`;
|
|
6422
6422
|
return this.connectorRequest(`/v1/connector/actions${r}`, "actions", t, (e) => {
|
|
6423
6423
|
let t = W(e);
|
|
6424
|
-
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(
|
|
6424
|
+
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(al);
|
|
6425
6425
|
});
|
|
6426
6426
|
}
|
|
6427
6427
|
async connectorRequest(e, t, n, r, i = !1) {
|
|
@@ -6456,4 +6456,4 @@ var Ul = class {
|
|
|
6456
6456
|
}
|
|
6457
6457
|
};
|
|
6458
6458
|
//#endregion
|
|
6459
|
-
export { Bs as ApiError,
|
|
6459
|
+
export { Bs as ApiError, Wl as ControlClient, H as controlErrorCode, zs as controlErrorMetadata, Fs as decodeEventSource, Is as decodeEventSources, sc as decodeResultList, cc as decodeResultRead, Bl as decodeRunEvent, Qs as decodeTriggerCatalog, e as inspectFlowDraft, oc as parseResultQuery, fc as readResult };
|