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