@oomol-lab/open-flow 0.1.0-beta.22 → 0.1.0-beta.23
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-CjuJryCv.js → createResourceDialog-PKbMMpEk.js} +29 -29
- package/dist/browser/event-sources.d.ts +30 -0
- package/dist/browser/{flowChanges-Tg1duLry.js → flowChanges-BUlMz4iC.js} +4236 -3019
- package/dist/browser/{flowWorkspace-CoK10XHY.js → flowWorkspace-DLArN17T.js} +49585 -42617
- package/dist/browser/{i18n-CVBh0Ni1.js → input-group-C2frNYAx.js} +1801 -75
- package/dist/browser/{inputValues-CDiBMKu8.js → inputValues-CcGVt51C.js} +10 -10
- package/dist/browser/licenses.md +60 -0
- package/dist/browser/lite-Cy6aeiL6.js +8538 -0
- package/dist/browser/{markdownContent-BBgH9ZIV.js → markdownContent-SIlWuHve.js} +17 -17
- package/dist/browser/theme.css +45 -5
- package/dist/browser/ui.css +1 -1
- package/dist/browser/ui.d.ts +23 -1
- package/dist/browser/ui.js +59 -27
- package/dist/browser/workbench-contract.d.ts +19 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -0
- package/dist/browser/workbench.js +1176 -734
- package/dist/browser/workbenchSelect-CPRUXKbf.js +6088 -0
- package/dist/common/control-api-conformance.js +273 -232
- package/dist/common/control-api-errors.d.ts +20 -0
- package/dist/common/control-api.d.ts +50 -10
- package/dist/common/control-api.js +899 -661
- package/dist/common/control-requests.d.ts +23 -0
- package/dist/common/control-requests.js +377 -351
- package/dist/common/event-sources.d.ts +50 -0
- package/dist/common/feishu-events.d.ts +20 -0
- package/dist/common/feishu-subscriptions.d.ts +10 -0
- package/dist/common/fr-iv1541dF.js +93 -0
- package/dist/common/integration-trigger.d.ts +4 -0
- package/dist/common/ja-Bq-ZDOD4.js +93 -0
- package/dist/common/ko-Z-k9R2c6.js +93 -0
- package/dist/common/localization.d.ts +2 -0
- package/dist/common/localization.js +37 -1
- package/dist/common/mcp.js +615 -382
- package/dist/common/poll-trigger.d.ts +2 -0
- package/dist/common/provider-triggers.d.ts +4 -0
- package/dist/common/provider-triggers.js +3225 -2692
- package/dist/common/ru-B4gFecYZ.js +93 -0
- package/dist/common/trigger-catalog.d.ts +17 -0
- package/dist/common/trigger-config-options.d.ts +13 -0
- package/dist/common/trigger-localization.d.ts +7 -0
- package/dist/common/zh-CN-ByQ6nYam.js +93 -0
- package/dist/common/zh-TW-QjIarvX9.js +93 -0
- package/package.json +1 -1
- package/dist/browser/useValueChanged-BY05Usw-.js +0 -2944
- package/dist/browser/workbenchSelect-DEmv7SLW.js +0 -11666
|
@@ -3583,7 +3583,7 @@ var A = /*@__PURE__*/ b("ZodType", (e, t) => (go(), w.init(e, t), e.def = t, e.t
|
|
|
3583
3583
|
return ws(this, e);
|
|
3584
3584
|
},
|
|
3585
3585
|
array() {
|
|
3586
|
-
return
|
|
3586
|
+
return F(this);
|
|
3587
3587
|
},
|
|
3588
3588
|
or(e) {
|
|
3589
3589
|
return R([this, e]);
|
|
@@ -3948,16 +3948,16 @@ function Jo(e) {
|
|
|
3948
3948
|
var Yo = /*@__PURE__*/ b("ZodUnknown", (e, t) => {
|
|
3949
3949
|
tr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3950
3950
|
});
|
|
3951
|
-
function
|
|
3951
|
+
function Xo() {
|
|
3952
3952
|
return /* @__PURE__ */ zi(Yo);
|
|
3953
3953
|
}
|
|
3954
|
-
var
|
|
3954
|
+
var Zo = /*@__PURE__*/ b("ZodNever", (e, t) => {
|
|
3955
3955
|
nr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r);
|
|
3956
3956
|
});
|
|
3957
|
-
function
|
|
3958
|
-
return /* @__PURE__ */ Bi(
|
|
3957
|
+
function Qo(e) {
|
|
3958
|
+
return /* @__PURE__ */ Bi(Zo, e);
|
|
3959
3959
|
}
|
|
3960
|
-
var
|
|
3960
|
+
var $o = /*@__PURE__*/ b("ZodArray", (e, t) => {
|
|
3961
3961
|
_o(), ir.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.element = t.element;
|
|
3962
3962
|
}, {
|
|
3963
3963
|
min(e, t) {
|
|
@@ -3976,10 +3976,10 @@ var Qo = /*@__PURE__*/ b("ZodArray", (e, t) => {
|
|
|
3976
3976
|
return this.element;
|
|
3977
3977
|
}
|
|
3978
3978
|
});
|
|
3979
|
-
function
|
|
3980
|
-
return /* @__PURE__ */ sa(
|
|
3979
|
+
function F(e, t) {
|
|
3980
|
+
return /* @__PURE__ */ sa($o, e, t);
|
|
3981
3981
|
}
|
|
3982
|
-
var
|
|
3982
|
+
var es = /*@__PURE__*/ b("ZodObject", (e, t) => {
|
|
3983
3983
|
_o(), dr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), Me(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3984
3984
|
}, {
|
|
3985
3985
|
keyof() {
|
|
@@ -3994,19 +3994,19 @@ var $o = /*@__PURE__*/ b("ZodObject", (e, t) => {
|
|
|
3994
3994
|
passthrough() {
|
|
3995
3995
|
return this.clone({
|
|
3996
3996
|
...this._zod.def,
|
|
3997
|
-
catchall:
|
|
3997
|
+
catchall: Xo()
|
|
3998
3998
|
});
|
|
3999
3999
|
},
|
|
4000
4000
|
loose() {
|
|
4001
4001
|
return this.clone({
|
|
4002
4002
|
...this._zod.def,
|
|
4003
|
-
catchall:
|
|
4003
|
+
catchall: Xo()
|
|
4004
4004
|
});
|
|
4005
4005
|
},
|
|
4006
4006
|
strict() {
|
|
4007
4007
|
return this.clone({
|
|
4008
4008
|
...this._zod.def,
|
|
4009
|
-
catchall:
|
|
4009
|
+
catchall: Qo()
|
|
4010
4010
|
});
|
|
4011
4011
|
},
|
|
4012
4012
|
strip() {
|
|
@@ -4040,18 +4040,18 @@ var $o = /*@__PURE__*/ b("ZodObject", (e, t) => {
|
|
|
4040
4040
|
return me(Cs, this, e[0]);
|
|
4041
4041
|
}
|
|
4042
4042
|
});
|
|
4043
|
-
function
|
|
4044
|
-
return new
|
|
4043
|
+
function I(e, t) {
|
|
4044
|
+
return new es({
|
|
4045
4045
|
type: "object",
|
|
4046
4046
|
shape: e ?? {},
|
|
4047
4047
|
...g(t)
|
|
4048
4048
|
});
|
|
4049
4049
|
}
|
|
4050
|
-
function
|
|
4051
|
-
return new
|
|
4050
|
+
function L(e, t) {
|
|
4051
|
+
return new es({
|
|
4052
4052
|
type: "object",
|
|
4053
4053
|
shape: e,
|
|
4054
|
-
catchall:
|
|
4054
|
+
catchall: Qo(),
|
|
4055
4055
|
...g(t)
|
|
4056
4056
|
});
|
|
4057
4057
|
}
|
|
@@ -4311,19 +4311,349 @@ function Is(e) {
|
|
|
4311
4311
|
N(),
|
|
4312
4312
|
P(),
|
|
4313
4313
|
Jo(),
|
|
4314
|
-
|
|
4314
|
+
F(t),
|
|
4315
4315
|
z(j(), t)
|
|
4316
4316
|
]));
|
|
4317
4317
|
return t;
|
|
4318
4318
|
}
|
|
4319
4319
|
//#endregion
|
|
4320
|
+
//#region src/control/common/eventSources.ts
|
|
4321
|
+
var Ls = j().min(1).max(256), Rs = j().regex(/^[a-z][a-z0-9_.]{0,127}$/), zs = j().trim().min(1).max(128), Bs = L({
|
|
4322
|
+
version: V(1),
|
|
4323
|
+
sourceId: Ls,
|
|
4324
|
+
revision: Go().positive(),
|
|
4325
|
+
name: zs,
|
|
4326
|
+
provider: B(["feishu", "feishu_app_bot"]),
|
|
4327
|
+
appId: Ls,
|
|
4328
|
+
tenantKey: Ls,
|
|
4329
|
+
connectionId: Ls,
|
|
4330
|
+
teamId: Ls.nullable(),
|
|
4331
|
+
enabled: P(),
|
|
4332
|
+
eventTypes: F(Rs),
|
|
4333
|
+
manageSubscriptions: P(),
|
|
4334
|
+
verificationTokenConfigured: P(),
|
|
4335
|
+
encryptKeyConfigured: P(),
|
|
4336
|
+
endpointUrl: j().nullable(),
|
|
4337
|
+
verifiedAt: j().nullable(),
|
|
4338
|
+
lastReceivedAt: j().nullable(),
|
|
4339
|
+
updatedAt: j(),
|
|
4340
|
+
consumers: F(L({
|
|
4341
|
+
flowId: Ls,
|
|
4342
|
+
flowName: j(),
|
|
4343
|
+
triggerNodeId: Ls
|
|
4344
|
+
}))
|
|
4345
|
+
});
|
|
4346
|
+
function Vs(e) {
|
|
4347
|
+
return Bs.parse(e);
|
|
4348
|
+
}
|
|
4349
|
+
function Hs(e) {
|
|
4350
|
+
return L({
|
|
4351
|
+
version: V(1),
|
|
4352
|
+
sources: F(Bs),
|
|
4353
|
+
teamId: Ls.nullable().optional()
|
|
4354
|
+
}).parse(e);
|
|
4355
|
+
}
|
|
4356
|
+
var Us = new Map([
|
|
4357
|
+
"en",
|
|
4358
|
+
"zh-CN",
|
|
4359
|
+
"zh-TW",
|
|
4360
|
+
"ja",
|
|
4361
|
+
"ko",
|
|
4362
|
+
"ru",
|
|
4363
|
+
"fr"
|
|
4364
|
+
].map((e) => [e.toLowerCase(), e]));
|
|
4365
|
+
function Ws(e) {
|
|
4366
|
+
return typeof e == "string" && Us.get(e.toLowerCase()) == e;
|
|
4367
|
+
}
|
|
4368
|
+
//#endregion
|
|
4369
|
+
//#region src/control/common/errors.ts
|
|
4370
|
+
var H = {
|
|
4371
|
+
authenticationRequired: "authentication.required",
|
|
4372
|
+
authorizationDenied: "authorization.denied",
|
|
4373
|
+
bindingUnresolved: "binding.unresolved",
|
|
4374
|
+
connectorActionNotFound: "connector.action-not-found",
|
|
4375
|
+
connectorUnconfigured: "connector.unconfigured",
|
|
4376
|
+
connectorUnavailable: "connector.unavailable",
|
|
4377
|
+
connectorConsoleUnconfigured: "connector.console-unconfigured",
|
|
4378
|
+
engineUnavailable: "engine.unavailable",
|
|
4379
|
+
engineUnsupported: "engine.unsupported",
|
|
4380
|
+
eventSourceInvalid: "event-source.invalid",
|
|
4381
|
+
eventSourceIdentityUnavailable: "event-source.identity-unavailable",
|
|
4382
|
+
eventSourceNotFound: "event-source.not-found",
|
|
4383
|
+
eventSourceConflict: "event-source.conflict",
|
|
4384
|
+
flowInvalid: "flow.invalid",
|
|
4385
|
+
flowNotFound: "flow.not-found",
|
|
4386
|
+
flowBusy: "flow.busy",
|
|
4387
|
+
flowConflict: "flow.conflict",
|
|
4388
|
+
flowPresentationConflict: "flow.presentation-conflict",
|
|
4389
|
+
flowRevisionConflict: "flow.revision-conflict",
|
|
4390
|
+
liveConflict: "live.conflict",
|
|
4391
|
+
liveNotFound: "live.not-found",
|
|
4392
|
+
pageInvalidCursor: "page.invalid-cursor",
|
|
4393
|
+
publicationConflict: "publication.conflict",
|
|
4394
|
+
publicationNotFound: "publication.not-found",
|
|
4395
|
+
publicationUnsupported: "publication.unsupported",
|
|
4396
|
+
publishOperationNotFound: "publication.operation-not-found",
|
|
4397
|
+
routeNotFound: "route.not-found",
|
|
4398
|
+
runConflict: "run.conflict",
|
|
4399
|
+
runEventsExpired: "run.events-expired",
|
|
4400
|
+
runInvalid: "run.invalid",
|
|
4401
|
+
runNotFound: "run.not-found",
|
|
4402
|
+
runNotTerminal: "run.not-terminal",
|
|
4403
|
+
runOverloaded: "run.overloaded",
|
|
4404
|
+
runWaitNotFound: "run.wait-not-found",
|
|
4405
|
+
triggerKeyInvalid: "trigger-key.invalid",
|
|
4406
|
+
triggerKeyNotFound: "trigger-key.not-found",
|
|
4407
|
+
triggerNotFound: "trigger.not-found",
|
|
4408
|
+
variableInvalid: "variable.invalid",
|
|
4409
|
+
variableLimitReached: "variable.limit-reached",
|
|
4410
|
+
variableNotFound: "variable.not-found"
|
|
4411
|
+
}, Gs = {
|
|
4412
|
+
[H.eventSourceInvalid]: { status: 400 },
|
|
4413
|
+
[H.eventSourceIdentityUnavailable]: { status: 409 },
|
|
4414
|
+
[H.eventSourceNotFound]: { status: 404 },
|
|
4415
|
+
[H.eventSourceConflict]: { status: 409 },
|
|
4416
|
+
[H.authenticationRequired]: { status: 401 },
|
|
4417
|
+
[H.authorizationDenied]: { status: 403 },
|
|
4418
|
+
[H.bindingUnresolved]: { status: 409 },
|
|
4419
|
+
[H.connectorActionNotFound]: { status: 404 },
|
|
4420
|
+
[H.connectorUnconfigured]: { status: 503 },
|
|
4421
|
+
[H.connectorUnavailable]: { status: 503 },
|
|
4422
|
+
[H.connectorConsoleUnconfigured]: { status: 503 },
|
|
4423
|
+
[H.engineUnavailable]: { status: 503 },
|
|
4424
|
+
[H.engineUnsupported]: { status: 409 },
|
|
4425
|
+
[H.flowInvalid]: { status: 400 },
|
|
4426
|
+
[H.flowNotFound]: { status: 404 },
|
|
4427
|
+
[H.flowBusy]: { status: 409 },
|
|
4428
|
+
[H.flowConflict]: { status: 409 },
|
|
4429
|
+
[H.flowPresentationConflict]: { status: 412 },
|
|
4430
|
+
[H.flowRevisionConflict]: { status: 412 },
|
|
4431
|
+
[H.liveConflict]: { status: 412 },
|
|
4432
|
+
[H.liveNotFound]: { status: 404 },
|
|
4433
|
+
[H.pageInvalidCursor]: { status: 400 },
|
|
4434
|
+
[H.publicationConflict]: { status: 409 },
|
|
4435
|
+
[H.publicationNotFound]: { status: 404 },
|
|
4436
|
+
[H.publicationUnsupported]: { status: 409 },
|
|
4437
|
+
[H.publishOperationNotFound]: { status: 404 },
|
|
4438
|
+
[H.routeNotFound]: { status: 404 },
|
|
4439
|
+
[H.runConflict]: { status: 409 },
|
|
4440
|
+
[H.runEventsExpired]: { status: 410 },
|
|
4441
|
+
[H.runInvalid]: { status: 400 },
|
|
4442
|
+
[H.runNotFound]: { status: 404 },
|
|
4443
|
+
[H.runNotTerminal]: { status: 409 },
|
|
4444
|
+
[H.runOverloaded]: { status: 429 },
|
|
4445
|
+
[H.runWaitNotFound]: { status: 404 },
|
|
4446
|
+
[H.triggerKeyInvalid]: { status: 409 },
|
|
4447
|
+
[H.triggerKeyNotFound]: { status: 404 },
|
|
4448
|
+
[H.triggerNotFound]: { status: 404 },
|
|
4449
|
+
[H.variableInvalid]: { status: 400 },
|
|
4450
|
+
[H.variableLimitReached]: { status: 409 },
|
|
4451
|
+
[H.variableNotFound]: { status: 404 }
|
|
4452
|
+
}, Ks = class extends Error {
|
|
4453
|
+
constructor(e, t, n) {
|
|
4454
|
+
super(n), this.code = t, this.name = "ApiError", this.status = e;
|
|
4455
|
+
}
|
|
4456
|
+
};
|
|
4457
|
+
//#endregion
|
|
4458
|
+
//#region src/control/common/decoding.ts
|
|
4459
|
+
function U() {
|
|
4460
|
+
throw new Ks(502, "response.invalid", "The Control API returned an invalid response.");
|
|
4461
|
+
}
|
|
4462
|
+
function W(e) {
|
|
4463
|
+
return typeof e != "object" || !e || Array.isArray(e) ? U() : e;
|
|
4464
|
+
}
|
|
4465
|
+
function G(e) {
|
|
4466
|
+
return typeof e == "string" && e.length > 0 ? e : U();
|
|
4467
|
+
}
|
|
4468
|
+
function K(e, t) {
|
|
4469
|
+
let n = Object.keys(e);
|
|
4470
|
+
(n.length != t.length || n.some((e) => !t.includes(e))) && U();
|
|
4471
|
+
}
|
|
4472
|
+
function q(e) {
|
|
4473
|
+
return Number.isSafeInteger(e) ? e : U();
|
|
4474
|
+
}
|
|
4475
|
+
function J(e) {
|
|
4476
|
+
if (e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e)) return e;
|
|
4477
|
+
if (Array.isArray(e)) return e.map(J);
|
|
4478
|
+
let t = W(e);
|
|
4479
|
+
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, J(t)]));
|
|
4480
|
+
}
|
|
4481
|
+
function qs(e) {
|
|
4482
|
+
if (e != null) return G(e);
|
|
4483
|
+
}
|
|
4484
|
+
//#endregion
|
|
4485
|
+
//#region src/control/common/triggerDecoders.ts
|
|
4486
|
+
function Js(e) {
|
|
4487
|
+
let t = W(e), n = t.type;
|
|
4488
|
+
return n != "integration" && n != "poll" ? U() : {
|
|
4489
|
+
description: typeof t.description == "string" ? t.description : U(),
|
|
4490
|
+
displayName: G(t.displayName),
|
|
4491
|
+
key: G(t.key),
|
|
4492
|
+
name: G(t.name),
|
|
4493
|
+
provider: G(t.provider),
|
|
4494
|
+
type: n
|
|
4495
|
+
};
|
|
4496
|
+
}
|
|
4497
|
+
function Ys(e) {
|
|
4498
|
+
let t = W(e), n = Js(t), r = {
|
|
4499
|
+
configSchema: J(t.configSchema),
|
|
4500
|
+
definitionVersion: q(t.definitionVersion),
|
|
4501
|
+
description: n.description,
|
|
4502
|
+
displayName: n.displayName,
|
|
4503
|
+
key: n.key,
|
|
4504
|
+
name: n.name,
|
|
4505
|
+
payloadSchema: J(t.payloadSchema),
|
|
4506
|
+
provider: n.provider
|
|
4507
|
+
};
|
|
4508
|
+
if (n.type == "poll") return {
|
|
4509
|
+
...r,
|
|
4510
|
+
type: "poll"
|
|
4511
|
+
};
|
|
4512
|
+
let i = W(t.endpoint), a = W(i.body);
|
|
4513
|
+
if (!Array.isArray(i.methods) || !Array.isArray(a.formats) || typeof a.allowArray != "boolean" || typeof a.allowEmpty != "boolean") return U();
|
|
4514
|
+
let o = i.methods.map(G), s = a.formats.map(G), c = q(i.successStatus);
|
|
4515
|
+
return o.some((e) => ![
|
|
4516
|
+
"DELETE",
|
|
4517
|
+
"GET",
|
|
4518
|
+
"HEAD",
|
|
4519
|
+
"PATCH",
|
|
4520
|
+
"POST",
|
|
4521
|
+
"PUT"
|
|
4522
|
+
].includes(e)) || s.some((e) => ![
|
|
4523
|
+
"form",
|
|
4524
|
+
"json",
|
|
4525
|
+
"multipart",
|
|
4526
|
+
"text"
|
|
4527
|
+
].includes(e)) || c < 200 || c > 299 ? U() : {
|
|
4528
|
+
...r,
|
|
4529
|
+
endpoint: {
|
|
4530
|
+
body: {
|
|
4531
|
+
allowArray: a.allowArray,
|
|
4532
|
+
allowEmpty: a.allowEmpty,
|
|
4533
|
+
formats: s
|
|
4534
|
+
},
|
|
4535
|
+
methods: o,
|
|
4536
|
+
successStatus: c
|
|
4537
|
+
},
|
|
4538
|
+
type: "integration"
|
|
4539
|
+
};
|
|
4540
|
+
}
|
|
4541
|
+
var Xs = /* @__PURE__ */ new Set([
|
|
4542
|
+
"cron",
|
|
4543
|
+
"integration",
|
|
4544
|
+
"poll",
|
|
4545
|
+
"webhook"
|
|
4546
|
+
]), Zs = /* @__PURE__ */ new Set([
|
|
4547
|
+
"failed",
|
|
4548
|
+
"healthy",
|
|
4549
|
+
"initializing",
|
|
4550
|
+
"needs_reauth",
|
|
4551
|
+
"suspended"
|
|
4552
|
+
]), Qs = /* @__PURE__ */ new Set([
|
|
4553
|
+
"delivery.failed",
|
|
4554
|
+
"health.failed",
|
|
4555
|
+
"health.needs_reauth",
|
|
4556
|
+
"health.recovered",
|
|
4557
|
+
"health.suspended",
|
|
4558
|
+
"operator.paused",
|
|
4559
|
+
"operator.resumed"
|
|
4560
|
+
]);
|
|
4561
|
+
function $s(e) {
|
|
4562
|
+
let t = W(e), n = t.health, r = t.listener == null ? void 0 : W(t.listener);
|
|
4563
|
+
if (r != null && r.health != "healthy" && r.health != "failed" && r.health != "needs_reauth") return U();
|
|
4564
|
+
let i = t.kind, a = t.operatorState, o = q(t.runtimeVersion);
|
|
4565
|
+
return t.version != 1 || typeof n != "string" || !Zs.has(n) || typeof i != "string" || !Xs.has(i) || a != "active" && a != "paused" || o <= 0 ? U() : {
|
|
4566
|
+
...t.currentPublicationId == null ? {} : { currentPublicationId: G(t.currentPublicationId) },
|
|
4567
|
+
...t.currentRevisionId == null ? {} : { currentRevisionId: G(t.currentRevisionId) },
|
|
4568
|
+
...t.endpointUrl == null ? {} : { endpointUrl: G(t.endpointUrl) },
|
|
4569
|
+
...r == null ? {} : { listener: {
|
|
4570
|
+
health: r.health,
|
|
4571
|
+
...r.lastErrorCode == null ? {} : { lastErrorCode: G(r.lastErrorCode) }
|
|
4572
|
+
} },
|
|
4573
|
+
flowId: G(t.flowId),
|
|
4574
|
+
health: n,
|
|
4575
|
+
kind: i,
|
|
4576
|
+
...t.lastErrorCode == null ? {} : { lastErrorCode: G(t.lastErrorCode) },
|
|
4577
|
+
operatorState: a,
|
|
4578
|
+
runtimeVersion: o,
|
|
4579
|
+
triggerNodeId: G(t.triggerNodeId),
|
|
4580
|
+
updatedAt: G(t.updatedAt),
|
|
4581
|
+
version: 1
|
|
4582
|
+
};
|
|
4583
|
+
}
|
|
4584
|
+
function ec(e) {
|
|
4585
|
+
let t = W(e);
|
|
4586
|
+
return t.version == 1 ? {
|
|
4587
|
+
binding: $s(t.binding),
|
|
4588
|
+
version: 1
|
|
4589
|
+
} : U();
|
|
4590
|
+
}
|
|
4591
|
+
function tc(e) {
|
|
4592
|
+
let t = W(e), n = t.kind;
|
|
4593
|
+
if (typeof n != "string" || !Qs.has(n)) return U();
|
|
4594
|
+
let r = qs(t.errorCode), i = qs(t.errorMessage);
|
|
4595
|
+
return i != null && i.length > 512 ? U() : {
|
|
4596
|
+
activityId: G(t.activityId),
|
|
4597
|
+
createdAt: G(t.createdAt),
|
|
4598
|
+
...r == null ? {} : { errorCode: r },
|
|
4599
|
+
...i == null ? {} : { errorMessage: i },
|
|
4600
|
+
kind: n
|
|
4601
|
+
};
|
|
4602
|
+
}
|
|
4603
|
+
function nc(e) {
|
|
4604
|
+
let t = W(e), n = qs(t.nextCursor);
|
|
4605
|
+
return t.version != 1 || !Array.isArray(t.activities) ? U() : {
|
|
4606
|
+
activities: t.activities.map(tc),
|
|
4607
|
+
...n == null ? {} : { nextCursor: n },
|
|
4608
|
+
version: 1
|
|
4609
|
+
};
|
|
4610
|
+
}
|
|
4611
|
+
function rc(e) {
|
|
4612
|
+
let t = W(e), n = q(t.filtered);
|
|
4613
|
+
return t.version != 1 || !Array.isArray(t.events) || typeof t.hasMore != "boolean" || n < 0 ? U() : {
|
|
4614
|
+
events: t.events.map((e) => {
|
|
4615
|
+
let t = W(e);
|
|
4616
|
+
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, J(t)]));
|
|
4617
|
+
}),
|
|
4618
|
+
filtered: n,
|
|
4619
|
+
hasMore: t.hasMore,
|
|
4620
|
+
version: 1
|
|
4621
|
+
};
|
|
4622
|
+
}
|
|
4623
|
+
//#endregion
|
|
4624
|
+
//#region src/control/common/triggerCatalog.ts
|
|
4625
|
+
function ic(e) {
|
|
4626
|
+
let t = W(e);
|
|
4627
|
+
if (K(t, [
|
|
4628
|
+
"version",
|
|
4629
|
+
"locale",
|
|
4630
|
+
"definitions",
|
|
4631
|
+
"display"
|
|
4632
|
+
]), t.version != 1 || !Ws(t.locale) || !Array.isArray(t.definitions)) return U();
|
|
4633
|
+
let n = t.definitions.map(Ys), r = W(t.display), i = new Set(n.map((e) => e.key));
|
|
4634
|
+
if (i.size != n.length || Object.keys(r).length != i.size) return U();
|
|
4635
|
+
let a = Object.fromEntries(n.map(({ key: e }) => {
|
|
4636
|
+
let t = W(r[e]);
|
|
4637
|
+
return K(t, ["displayName", "description"]), [e, {
|
|
4638
|
+
displayName: G(t.displayName),
|
|
4639
|
+
description: typeof t.description == "string" ? t.description : U()
|
|
4640
|
+
}];
|
|
4641
|
+
}));
|
|
4642
|
+
return {
|
|
4643
|
+
version: 1,
|
|
4644
|
+
locale: t.locale,
|
|
4645
|
+
definitions: n,
|
|
4646
|
+
display: a
|
|
4647
|
+
};
|
|
4648
|
+
}
|
|
4649
|
+
//#endregion
|
|
4320
4650
|
//#region src/control/common/resultQuery.ts
|
|
4321
|
-
var
|
|
4651
|
+
var ac = L({
|
|
4322
4652
|
pointer: j().max(4096).default(""),
|
|
4323
4653
|
offset: N().int().nonnegative().default(0),
|
|
4324
4654
|
limit: N().int().min(1).max(100).default(20),
|
|
4325
4655
|
maxBytes: N().int().min(1).max(1048576).default(15e3)
|
|
4326
|
-
}),
|
|
4656
|
+
}), oc = Is(), sc = L({
|
|
4327
4657
|
pointer: j(),
|
|
4328
4658
|
type: B([
|
|
4329
4659
|
"object",
|
|
@@ -4335,47 +4665,47 @@ var Ls = es({
|
|
|
4335
4665
|
]),
|
|
4336
4666
|
length: N().int().nonnegative().optional(),
|
|
4337
4667
|
complete: P(),
|
|
4338
|
-
value:
|
|
4339
|
-
}),
|
|
4668
|
+
value: oc.optional()
|
|
4669
|
+
}), cc = sc.extend({
|
|
4340
4670
|
offset: N().int().nonnegative(),
|
|
4341
4671
|
nextOffset: N().int().positive().optional(),
|
|
4342
|
-
entries:
|
|
4343
|
-
}),
|
|
4672
|
+
entries: F(sc).optional()
|
|
4673
|
+
}), lc = L({
|
|
4344
4674
|
resultId: j().min(1),
|
|
4345
4675
|
callId: j().min(1),
|
|
4346
4676
|
toolId: j().min(1),
|
|
4347
|
-
source: rs("kind", [
|
|
4677
|
+
source: rs("kind", [L({
|
|
4348
4678
|
kind: V("connector"),
|
|
4349
4679
|
action: j().min(1)
|
|
4350
|
-
}),
|
|
4680
|
+
}), L({ kind: V("code") })]),
|
|
4351
4681
|
bytes: N().int().nonnegative(),
|
|
4352
4682
|
digest: j().regex(/^[a-f0-9]{64}$/),
|
|
4353
4683
|
createdAt: j().datetime()
|
|
4354
|
-
}),
|
|
4684
|
+
}), uc = L({
|
|
4355
4685
|
version: V(1),
|
|
4356
4686
|
runId: j(),
|
|
4357
|
-
results:
|
|
4687
|
+
results: F(lc),
|
|
4358
4688
|
nextAfter: j().optional()
|
|
4359
|
-
}),
|
|
4689
|
+
}), dc = L({
|
|
4360
4690
|
version: V(1),
|
|
4361
4691
|
runId: j(),
|
|
4362
|
-
result:
|
|
4363
|
-
page:
|
|
4692
|
+
result: lc,
|
|
4693
|
+
page: cc
|
|
4364
4694
|
});
|
|
4365
|
-
function
|
|
4366
|
-
return
|
|
4695
|
+
function fc(e) {
|
|
4696
|
+
return ac.parse(e);
|
|
4367
4697
|
}
|
|
4368
|
-
function
|
|
4369
|
-
return
|
|
4698
|
+
function pc(e) {
|
|
4699
|
+
return uc.parse(e);
|
|
4370
4700
|
}
|
|
4371
|
-
function
|
|
4372
|
-
return
|
|
4701
|
+
function mc(e) {
|
|
4702
|
+
return dc.parse(e);
|
|
4373
4703
|
}
|
|
4374
|
-
var
|
|
4375
|
-
function
|
|
4376
|
-
return
|
|
4704
|
+
var hc = new TextEncoder();
|
|
4705
|
+
function gc(e) {
|
|
4706
|
+
return hc.encode(JSON.stringify(e)).byteLength;
|
|
4377
4707
|
}
|
|
4378
|
-
function
|
|
4708
|
+
function _c(e, t) {
|
|
4379
4709
|
let n = e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
|
|
4380
4710
|
return {
|
|
4381
4711
|
pointer: t,
|
|
@@ -4385,8 +4715,8 @@ function Ys(e, t) {
|
|
|
4385
4715
|
complete: !1
|
|
4386
4716
|
};
|
|
4387
4717
|
}
|
|
4388
|
-
function
|
|
4389
|
-
let { pointer: n, offset: r, limit: i, maxBytes: a } =
|
|
4718
|
+
function vc(e, t = {}) {
|
|
4719
|
+
let { pointer: n, offset: r, limit: i, maxBytes: a } = fc(t), o = e;
|
|
4390
4720
|
if (n != "") {
|
|
4391
4721
|
if (!n.startsWith("/")) throw Error("Result pointer must be a JSON Pointer.");
|
|
4392
4722
|
for (let e of n.slice(1).split("/")) {
|
|
@@ -4399,19 +4729,19 @@ function Xs(e, t = {}) {
|
|
|
4399
4729
|
} else o = o[t];
|
|
4400
4730
|
}
|
|
4401
4731
|
}
|
|
4402
|
-
let s =
|
|
4732
|
+
let s = _c(o, n), c = {
|
|
4403
4733
|
...s,
|
|
4404
4734
|
complete: !0,
|
|
4405
4735
|
offset: r,
|
|
4406
4736
|
value: o
|
|
4407
4737
|
};
|
|
4408
|
-
if (r == 0 && (t.limit == null || s.length == null || s.length <= i) &&
|
|
4738
|
+
if (r == 0 && (t.limit == null || s.length == null || s.length <= i) && gc(c) <= a) return c;
|
|
4409
4739
|
let l = s;
|
|
4410
4740
|
if (typeof o == "string") {
|
|
4411
4741
|
let e = 0;
|
|
4412
4742
|
for (let t of o) e++;
|
|
4413
4743
|
if (r >= e) throw Error("Result offset is out of range.");
|
|
4414
|
-
let t = a -
|
|
4744
|
+
let t = a - gc({
|
|
4415
4745
|
...l,
|
|
4416
4746
|
length: e,
|
|
4417
4747
|
offset: r,
|
|
@@ -4420,7 +4750,7 @@ function Xs(e, t = {}) {
|
|
|
4420
4750
|
}), n = 0, i = "", s = r, c = 0;
|
|
4421
4751
|
for (let e of o) {
|
|
4422
4752
|
if (c++ < r) continue;
|
|
4423
|
-
let a =
|
|
4753
|
+
let a = gc(e) - 2;
|
|
4424
4754
|
if (n + a > t) break;
|
|
4425
4755
|
i += e, n += a, s++;
|
|
4426
4756
|
}
|
|
@@ -4430,151 +4760,45 @@ function Xs(e, t = {}) {
|
|
|
4430
4760
|
complete: r == 0 && s == e,
|
|
4431
4761
|
length: e,
|
|
4432
4762
|
offset: r,
|
|
4433
|
-
value: i,
|
|
4434
|
-
...s < e ? { nextOffset: s } : {}
|
|
4435
|
-
};
|
|
4436
|
-
}
|
|
4437
|
-
if (typeof o != "object" || !o) throw Error("Result cannot be paged.");
|
|
4438
|
-
let u = Object.keys(o);
|
|
4439
|
-
if (r >= u.length) throw Error("Result offset is out of range.");
|
|
4440
|
-
let d = [];
|
|
4441
|
-
for (let e of u.slice(r, r + i)) {
|
|
4442
|
-
let t = `${n}/${e.replace(/~/g, "~0").replace(/\//g, "~1")}`, i = Array.isArray(o) ? o[Number(e)] : o[e], s = Ys(i, t), c = {
|
|
4443
|
-
...s,
|
|
4444
|
-
complete: !0,
|
|
4445
|
-
value: i
|
|
4446
|
-
}, f = Js({
|
|
4447
|
-
...l,
|
|
4448
|
-
offset: r,
|
|
4449
|
-
entries: [c],
|
|
4450
|
-
nextOffset: u.length
|
|
4451
|
-
}) <= a ? c : s;
|
|
4452
|
-
if (Js({
|
|
4453
|
-
...l,
|
|
4454
|
-
offset: r,
|
|
4455
|
-
entries: [...d, f],
|
|
4456
|
-
nextOffset: u.length
|
|
4457
|
-
}) > a) break;
|
|
4458
|
-
d.push(f);
|
|
4459
|
-
}
|
|
4460
|
-
if (d.length == 0) throw Error("Result property name exceeds the preview limit. Download the full result.");
|
|
4461
|
-
let f = r + d.length;
|
|
4462
|
-
return {
|
|
4463
|
-
...l,
|
|
4464
|
-
offset: r,
|
|
4465
|
-
entries: d,
|
|
4466
|
-
...f < u.length ? { nextOffset: f } : {}
|
|
4467
|
-
};
|
|
4468
|
-
}
|
|
4469
|
-
//#endregion
|
|
4470
|
-
//#region src/control/common/errors.ts
|
|
4471
|
-
var H = {
|
|
4472
|
-
authenticationRequired: "authentication.required",
|
|
4473
|
-
authorizationDenied: "authorization.denied",
|
|
4474
|
-
bindingUnresolved: "binding.unresolved",
|
|
4475
|
-
connectorActionNotFound: "connector.action-not-found",
|
|
4476
|
-
connectorUnconfigured: "connector.unconfigured",
|
|
4477
|
-
connectorUnavailable: "connector.unavailable",
|
|
4478
|
-
engineUnavailable: "engine.unavailable",
|
|
4479
|
-
engineUnsupported: "engine.unsupported",
|
|
4480
|
-
flowInvalid: "flow.invalid",
|
|
4481
|
-
flowNotFound: "flow.not-found",
|
|
4482
|
-
flowBusy: "flow.busy",
|
|
4483
|
-
flowConflict: "flow.conflict",
|
|
4484
|
-
flowPresentationConflict: "flow.presentation-conflict",
|
|
4485
|
-
flowRevisionConflict: "flow.revision-conflict",
|
|
4486
|
-
liveConflict: "live.conflict",
|
|
4487
|
-
liveNotFound: "live.not-found",
|
|
4488
|
-
pageInvalidCursor: "page.invalid-cursor",
|
|
4489
|
-
publicationConflict: "publication.conflict",
|
|
4490
|
-
publicationNotFound: "publication.not-found",
|
|
4491
|
-
publicationUnsupported: "publication.unsupported",
|
|
4492
|
-
publishOperationNotFound: "publication.operation-not-found",
|
|
4493
|
-
routeNotFound: "route.not-found",
|
|
4494
|
-
runConflict: "run.conflict",
|
|
4495
|
-
runEventsExpired: "run.events-expired",
|
|
4496
|
-
runInvalid: "run.invalid",
|
|
4497
|
-
runNotFound: "run.not-found",
|
|
4498
|
-
runNotTerminal: "run.not-terminal",
|
|
4499
|
-
runOverloaded: "run.overloaded",
|
|
4500
|
-
runWaitNotFound: "run.wait-not-found",
|
|
4501
|
-
triggerKeyInvalid: "trigger-key.invalid",
|
|
4502
|
-
triggerKeyNotFound: "trigger-key.not-found",
|
|
4503
|
-
triggerNotFound: "trigger.not-found",
|
|
4504
|
-
variableInvalid: "variable.invalid",
|
|
4505
|
-
variableLimitReached: "variable.limit-reached",
|
|
4506
|
-
variableNotFound: "variable.not-found"
|
|
4507
|
-
}, Zs = {
|
|
4508
|
-
[H.authenticationRequired]: { status: 401 },
|
|
4509
|
-
[H.authorizationDenied]: { status: 403 },
|
|
4510
|
-
[H.bindingUnresolved]: { status: 409 },
|
|
4511
|
-
[H.connectorActionNotFound]: { status: 404 },
|
|
4512
|
-
[H.connectorUnconfigured]: { status: 503 },
|
|
4513
|
-
[H.connectorUnavailable]: { status: 503 },
|
|
4514
|
-
[H.engineUnavailable]: { status: 503 },
|
|
4515
|
-
[H.engineUnsupported]: { status: 409 },
|
|
4516
|
-
[H.flowInvalid]: { status: 400 },
|
|
4517
|
-
[H.flowNotFound]: { status: 404 },
|
|
4518
|
-
[H.flowBusy]: { status: 409 },
|
|
4519
|
-
[H.flowConflict]: { status: 409 },
|
|
4520
|
-
[H.flowPresentationConflict]: { status: 412 },
|
|
4521
|
-
[H.flowRevisionConflict]: { status: 412 },
|
|
4522
|
-
[H.liveConflict]: { status: 412 },
|
|
4523
|
-
[H.liveNotFound]: { status: 404 },
|
|
4524
|
-
[H.pageInvalidCursor]: { status: 400 },
|
|
4525
|
-
[H.publicationConflict]: { status: 409 },
|
|
4526
|
-
[H.publicationNotFound]: { status: 404 },
|
|
4527
|
-
[H.publicationUnsupported]: { status: 409 },
|
|
4528
|
-
[H.publishOperationNotFound]: { status: 404 },
|
|
4529
|
-
[H.routeNotFound]: { status: 404 },
|
|
4530
|
-
[H.runConflict]: { status: 409 },
|
|
4531
|
-
[H.runEventsExpired]: { status: 410 },
|
|
4532
|
-
[H.runInvalid]: { status: 400 },
|
|
4533
|
-
[H.runNotFound]: { status: 404 },
|
|
4534
|
-
[H.runNotTerminal]: { status: 409 },
|
|
4535
|
-
[H.runOverloaded]: { status: 429 },
|
|
4536
|
-
[H.runWaitNotFound]: { status: 404 },
|
|
4537
|
-
[H.triggerKeyInvalid]: { status: 409 },
|
|
4538
|
-
[H.triggerKeyNotFound]: { status: 404 },
|
|
4539
|
-
[H.triggerNotFound]: { status: 404 },
|
|
4540
|
-
[H.variableInvalid]: { status: 400 },
|
|
4541
|
-
[H.variableLimitReached]: { status: 409 },
|
|
4542
|
-
[H.variableNotFound]: { status: 404 }
|
|
4543
|
-
}, Qs = class extends Error {
|
|
4544
|
-
constructor(e, t, n) {
|
|
4545
|
-
super(n), this.code = t, this.name = "ApiError", this.status = e;
|
|
4763
|
+
value: i,
|
|
4764
|
+
...s < e ? { nextOffset: s } : {}
|
|
4765
|
+
};
|
|
4546
4766
|
}
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
}
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4767
|
+
if (typeof o != "object" || !o) throw Error("Result cannot be paged.");
|
|
4768
|
+
let u = Object.keys(o);
|
|
4769
|
+
if (r >= u.length) throw Error("Result offset is out of range.");
|
|
4770
|
+
let d = [];
|
|
4771
|
+
for (let e of u.slice(r, r + i)) {
|
|
4772
|
+
let t = `${n}/${e.replace(/~/g, "~0").replace(/\//g, "~1")}`, i = Array.isArray(o) ? o[Number(e)] : o[e], s = _c(i, t), c = {
|
|
4773
|
+
...s,
|
|
4774
|
+
complete: !0,
|
|
4775
|
+
value: i
|
|
4776
|
+
}, f = gc({
|
|
4777
|
+
...l,
|
|
4778
|
+
offset: r,
|
|
4779
|
+
entries: [c],
|
|
4780
|
+
nextOffset: u.length
|
|
4781
|
+
}) <= a ? c : s;
|
|
4782
|
+
if (gc({
|
|
4783
|
+
...l,
|
|
4784
|
+
offset: r,
|
|
4785
|
+
entries: [...d, f],
|
|
4786
|
+
nextOffset: u.length
|
|
4787
|
+
}) > a) break;
|
|
4788
|
+
d.push(f);
|
|
4789
|
+
}
|
|
4790
|
+
if (d.length == 0) throw Error("Result property name exceeds the preview limit. Download the full result.");
|
|
4791
|
+
let f = r + d.length;
|
|
4792
|
+
return {
|
|
4793
|
+
...l,
|
|
4794
|
+
offset: r,
|
|
4795
|
+
entries: d,
|
|
4796
|
+
...f < u.length ? { nextOffset: f } : {}
|
|
4797
|
+
};
|
|
4574
4798
|
}
|
|
4575
4799
|
//#endregion
|
|
4576
4800
|
//#region src/control/common/checkDecoders.ts
|
|
4577
|
-
function
|
|
4801
|
+
function yc(e) {
|
|
4578
4802
|
let t = W(e), n = t.values == null ? void 0 : W(t.values);
|
|
4579
4803
|
return {
|
|
4580
4804
|
code: G(t.code),
|
|
@@ -4585,11 +4809,11 @@ function ec(e) {
|
|
|
4585
4809
|
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : U()])) }
|
|
4586
4810
|
};
|
|
4587
4811
|
}
|
|
4588
|
-
function
|
|
4812
|
+
function bc(e) {
|
|
4589
4813
|
let t = W(e);
|
|
4590
4814
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? U() : {
|
|
4591
4815
|
closureDigest: G(t.closureDigest),
|
|
4592
|
-
diagnostics: t.diagnostics.map(
|
|
4816
|
+
diagnostics: t.diagnostics.map(yc),
|
|
4593
4817
|
engineContract: G(t.engineContract),
|
|
4594
4818
|
flowId: G(t.flowId),
|
|
4595
4819
|
modelVersion: q(t.modelVersion),
|
|
@@ -4601,19 +4825,23 @@ function tc(e) {
|
|
|
4601
4825
|
}
|
|
4602
4826
|
//#endregion
|
|
4603
4827
|
//#region src/control/common/connectorDecoders.ts
|
|
4604
|
-
function
|
|
4828
|
+
function xc(e) {
|
|
4605
4829
|
let t = W(e);
|
|
4606
|
-
K(t, [
|
|
4830
|
+
if (K(t, [
|
|
4831
|
+
...Object.hasOwn(t, "providerAccountId") ? ["providerAccountId"] : [],
|
|
4607
4832
|
...Object.hasOwn(t, "alias") ? ["alias"] : [],
|
|
4833
|
+
...Object.hasOwn(t, "builtInAccount") ? ["builtInAccount"] : [],
|
|
4608
4834
|
"connectionId",
|
|
4609
4835
|
"displayName",
|
|
4610
4836
|
"isDefault",
|
|
4611
4837
|
"serviceId",
|
|
4612
4838
|
"status"
|
|
4613
|
-
]);
|
|
4839
|
+
]), t.builtInAccount !== void 0 && typeof t.builtInAccount != "boolean") return U();
|
|
4614
4840
|
let n = t.status;
|
|
4615
4841
|
return n != "active" && n != "disconnected" && n != "error" && n != "reauth_required" || typeof t.isDefault != "boolean" ? U() : {
|
|
4842
|
+
...t.providerAccountId === void 0 ? {} : { providerAccountId: G(t.providerAccountId) },
|
|
4616
4843
|
...t.alias === void 0 ? {} : { alias: G(t.alias) },
|
|
4844
|
+
...t.builtInAccount === void 0 ? {} : { builtInAccount: t.builtInAccount },
|
|
4617
4845
|
connectionId: G(t.connectionId),
|
|
4618
4846
|
displayName: G(t.displayName),
|
|
4619
4847
|
isDefault: t.isDefault,
|
|
@@ -4621,7 +4849,7 @@ function nc(e) {
|
|
|
4621
4849
|
status: n
|
|
4622
4850
|
};
|
|
4623
4851
|
}
|
|
4624
|
-
function
|
|
4852
|
+
function Sc(e, t = !1) {
|
|
4625
4853
|
let n = W(e), r = n.description, i = t && Object.hasOwn(n, "value");
|
|
4626
4854
|
return K(n, [
|
|
4627
4855
|
"jsonSchema",
|
|
@@ -4635,20 +4863,20 @@ function rc(e, t = !1) {
|
|
|
4635
4863
|
...i ? { value: J(n.value) } : {}
|
|
4636
4864
|
};
|
|
4637
4865
|
}
|
|
4638
|
-
function
|
|
4639
|
-
return
|
|
4866
|
+
function Cc(e) {
|
|
4867
|
+
return Sc(e, !0);
|
|
4640
4868
|
}
|
|
4641
|
-
function
|
|
4869
|
+
function wc(e, t) {
|
|
4642
4870
|
return Object.fromEntries(Object.entries(W(e)).map(([e, n]) => [e, t(n)]));
|
|
4643
4871
|
}
|
|
4644
|
-
function
|
|
4645
|
-
let t = W(e), n = t.homepageUrl, r = t.icon
|
|
4646
|
-
|
|
4872
|
+
function Tc(e) {
|
|
4873
|
+
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
4874
|
+
return K(t, [
|
|
4647
4875
|
"actionId",
|
|
4876
|
+
...Object.hasOwn(t, "operationType") ? ["operationType"] : [],
|
|
4648
4877
|
...Object.hasOwn(t, "inputSchema") ? ["inputSchema"] : [],
|
|
4649
4878
|
...Object.hasOwn(t, "outputSchema") ? ["outputSchema"] : [],
|
|
4650
4879
|
"authenticated",
|
|
4651
|
-
...i ? ["defaultConnection"] : [],
|
|
4652
4880
|
"description",
|
|
4653
4881
|
...n == null ? [] : ["homepageUrl"],
|
|
4654
4882
|
...r == null ? [] : ["icon"],
|
|
@@ -4657,41 +4885,101 @@ function oc(e) {
|
|
|
4657
4885
|
"outputs",
|
|
4658
4886
|
"serviceId",
|
|
4659
4887
|
"serviceName"
|
|
4660
|
-
]), n != null && typeof n != "string" || r != null && typeof r != "string"
|
|
4661
|
-
let a = {
|
|
4888
|
+
]), n != null && typeof n != "string" || r != null && typeof r != "string" ? U() : {
|
|
4662
4889
|
...t.inputSchema === void 0 ? {} : { inputSchema: J(t.inputSchema) },
|
|
4663
4890
|
...t.outputSchema === void 0 ? {} : { outputSchema: J(t.outputSchema) },
|
|
4664
4891
|
actionId: G(t.actionId),
|
|
4892
|
+
...t.operationType == null ? {} : { operationType: G(t.operationType) },
|
|
4665
4893
|
authenticated: typeof t.authenticated == "boolean" ? t.authenticated : U(),
|
|
4666
|
-
...i ? { defaultConnection: nc(t.defaultConnection) } : {},
|
|
4667
4894
|
description: typeof t.description == "string" ? t.description : U(),
|
|
4668
4895
|
...n == null ? {} : { homepageUrl: n },
|
|
4669
4896
|
...r == null ? {} : { icon: r },
|
|
4670
|
-
inputs:
|
|
4897
|
+
inputs: wc(t.inputs, Cc),
|
|
4671
4898
|
name: G(t.name),
|
|
4672
|
-
outputs:
|
|
4899
|
+
outputs: wc(t.outputs, Sc),
|
|
4673
4900
|
serviceId: G(t.serviceId),
|
|
4674
4901
|
serviceName: G(t.serviceName)
|
|
4675
4902
|
};
|
|
4676
|
-
return a.defaultConnection != null && (a.defaultConnection.serviceId != a.serviceId || a.defaultConnection.status != "active") ? U() : a;
|
|
4677
4903
|
}
|
|
4678
|
-
function
|
|
4904
|
+
function Ec(e) {
|
|
4905
|
+
let { defaultConnection: t, ...n } = W(e), r = Tc(n);
|
|
4906
|
+
if (t == null) return r;
|
|
4907
|
+
let i = xc(t);
|
|
4908
|
+
return i.serviceId != r.serviceId || i.status != "active" ? U() : {
|
|
4909
|
+
...r,
|
|
4910
|
+
defaultConnection: i
|
|
4911
|
+
};
|
|
4912
|
+
}
|
|
4913
|
+
function Dc(e) {
|
|
4679
4914
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
4680
|
-
return K(t, [
|
|
4915
|
+
return t.noSetup !== void 0 && typeof t.noSetup != "boolean" || (K(t, [
|
|
4916
|
+
...Object.hasOwn(t, "noSetup") ? ["noSetup"] : [],
|
|
4681
4917
|
"serviceId",
|
|
4682
4918
|
"serviceName",
|
|
4683
4919
|
...n == null ? [] : ["homepageUrl"],
|
|
4684
4920
|
...r == null ? [] : ["icon"]
|
|
4685
|
-
]), n != null && typeof n != "string" || r != null && typeof r != "string" ? U() : {
|
|
4921
|
+
]), n != null && typeof n != "string" || r != null && typeof r != "string") ? U() : {
|
|
4686
4922
|
...n == null ? {} : { homepageUrl: n },
|
|
4687
4923
|
...r == null ? {} : { icon: r },
|
|
4688
4924
|
serviceId: G(t.serviceId),
|
|
4689
|
-
serviceName: G(t.serviceName)
|
|
4925
|
+
serviceName: G(t.serviceName),
|
|
4926
|
+
...t.noSetup === void 0 ? {} : { noSetup: t.noSetup }
|
|
4927
|
+
};
|
|
4928
|
+
}
|
|
4929
|
+
//#endregion
|
|
4930
|
+
//#region src/control/common/connectorQueries.ts
|
|
4931
|
+
var Oc = (e) => e == null ? "" : `?flowId=${encodeURIComponent(e)}`;
|
|
4932
|
+
function kc(e, t) {
|
|
4933
|
+
let n = new URLSearchParams({
|
|
4934
|
+
...e == null ? {} : { flowId: e },
|
|
4935
|
+
...t == null ? {} : { locale: t }
|
|
4936
|
+
}).toString();
|
|
4937
|
+
return {
|
|
4938
|
+
path: `/v1/connector/providers${n ? `?${n}` : ""}`,
|
|
4939
|
+
decode: (e) => {
|
|
4940
|
+
let t = W(e);
|
|
4941
|
+
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(Dc);
|
|
4942
|
+
}
|
|
4943
|
+
};
|
|
4944
|
+
}
|
|
4945
|
+
function Ac(e, t, n) {
|
|
4946
|
+
let r = new URLSearchParams({
|
|
4947
|
+
...t == null ? {} : { flowId: t },
|
|
4948
|
+
...n == null ? {} : { locale: n }
|
|
4949
|
+
}).toString();
|
|
4950
|
+
return {
|
|
4951
|
+
path: `/v1/connector/actions/${encodeURIComponent(e)}${r ? `?${r}` : ""}`,
|
|
4952
|
+
decode: (e) => {
|
|
4953
|
+
let t = W(e);
|
|
4954
|
+
return K(t, ["action", "version"]), t.version == 1 ? Ec(t.action) : U();
|
|
4955
|
+
}
|
|
4956
|
+
};
|
|
4957
|
+
}
|
|
4958
|
+
function jc(e) {
|
|
4959
|
+
return {
|
|
4960
|
+
path: `/v1/connector/connections${Oc(e)}`,
|
|
4961
|
+
decode: (e) => {
|
|
4962
|
+
let t = W(e);
|
|
4963
|
+
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(xc);
|
|
4964
|
+
}
|
|
4965
|
+
};
|
|
4966
|
+
}
|
|
4967
|
+
function Mc(e, t) {
|
|
4968
|
+
return {
|
|
4969
|
+
path: `/v1/connector/connections/${encodeURIComponent(e)}${Oc(t)}`,
|
|
4970
|
+
decode: (t) => {
|
|
4971
|
+
let n = W(t);
|
|
4972
|
+
return K(n, [
|
|
4973
|
+
"connections",
|
|
4974
|
+
"serviceId",
|
|
4975
|
+
"version"
|
|
4976
|
+
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(xc);
|
|
4977
|
+
}
|
|
4690
4978
|
};
|
|
4691
4979
|
}
|
|
4692
4980
|
//#endregion
|
|
4693
4981
|
//#region src/control/common/flowDecoders.ts
|
|
4694
|
-
function
|
|
4982
|
+
function Nc(e) {
|
|
4695
4983
|
let t = W(e), n = t.status;
|
|
4696
4984
|
if (t.version != 1 || n != "active" && n != "retiring") return U();
|
|
4697
4985
|
let r = t.live == null ? void 0 : W(t.live);
|
|
@@ -4710,18 +4998,18 @@ function cc(e) {
|
|
|
4710
4998
|
version: 1
|
|
4711
4999
|
};
|
|
4712
5000
|
}
|
|
4713
|
-
function
|
|
5001
|
+
function Pc(e) {
|
|
4714
5002
|
let t = W(e);
|
|
4715
5003
|
if (t.version != 1 || !Array.isArray(t.flows)) return U();
|
|
4716
5004
|
let n = t.nextCursor, r = t.total;
|
|
4717
5005
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
4718
5006
|
...n == null ? {} : { nextCursor: n },
|
|
4719
|
-
flows: t.flows.map(
|
|
5007
|
+
flows: t.flows.map(Nc),
|
|
4720
5008
|
...r == null ? {} : { total: r },
|
|
4721
5009
|
version: 1
|
|
4722
5010
|
};
|
|
4723
5011
|
}
|
|
4724
|
-
function
|
|
5012
|
+
function Fc(e) {
|
|
4725
5013
|
let t = W(e);
|
|
4726
5014
|
if (K(t, [
|
|
4727
5015
|
"name",
|
|
@@ -4744,7 +5032,7 @@ function uc(e) {
|
|
|
4744
5032
|
}
|
|
4745
5033
|
//#endregion
|
|
4746
5034
|
//#region src/control/common/publicationDecoders.ts
|
|
4747
|
-
function
|
|
5035
|
+
function Ic(e) {
|
|
4748
5036
|
let t = W(e), n = t.operation, r = t.sourcePublicationId;
|
|
4749
5037
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? U() : {
|
|
4750
5038
|
actorId: G(t.actorId),
|
|
@@ -4761,7 +5049,7 @@ function dc(e) {
|
|
|
4761
5049
|
version: 1
|
|
4762
5050
|
};
|
|
4763
5051
|
}
|
|
4764
|
-
function
|
|
5052
|
+
function Lc(e) {
|
|
4765
5053
|
let t = W(e), n = t.status, r = {
|
|
4766
5054
|
createdAt: G(t.createdAt),
|
|
4767
5055
|
flowId: G(t.flowId),
|
|
@@ -4827,124 +5115,124 @@ function fc(e) {
|
|
|
4827
5115
|
default: return U();
|
|
4828
5116
|
}
|
|
4829
5117
|
}
|
|
4830
|
-
function
|
|
5118
|
+
function Rc(e) {
|
|
4831
5119
|
let t = W(e), n = t.status, r = t.publication;
|
|
4832
5120
|
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() : {
|
|
4833
5121
|
flowId: G(t.flowId),
|
|
4834
5122
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
4835
|
-
publication: r === null ? null :
|
|
5123
|
+
publication: r === null ? null : Ic(r),
|
|
4836
5124
|
revision: q(t.revision),
|
|
4837
5125
|
status: n,
|
|
4838
5126
|
version: 1
|
|
4839
5127
|
};
|
|
4840
5128
|
}
|
|
4841
|
-
function
|
|
5129
|
+
function zc(e) {
|
|
4842
5130
|
let t = W(e), n = t.nextCursor, r = t.total;
|
|
4843
5131
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
4844
5132
|
...n == null ? {} : { nextCursor: n },
|
|
4845
|
-
publications: t.publications.map(
|
|
5133
|
+
publications: t.publications.map(Ic),
|
|
4846
5134
|
...r == null ? {} : { total: r },
|
|
4847
5135
|
version: 1
|
|
4848
5136
|
};
|
|
4849
5137
|
}
|
|
4850
|
-
function
|
|
5138
|
+
function Bc(e, t = 0) {
|
|
4851
5139
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4852
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
5140
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) Bc(n, t + 1);
|
|
4853
5141
|
}
|
|
4854
5142
|
//#endregion
|
|
4855
5143
|
//#region src/flow/common/changeSchema.ts
|
|
4856
|
-
var Y = j(), X = Is(),
|
|
5144
|
+
var Y = j(), X = Is(), Vc = F(Y), Hc = I({
|
|
4857
5145
|
description: Y.optional(),
|
|
4858
5146
|
jsonSchema: X,
|
|
4859
5147
|
nullable: P(),
|
|
4860
5148
|
handle: Y
|
|
4861
|
-
}), Z =
|
|
5149
|
+
}), Z = Hc.extend({ value: X.optional() }), Uc = I({
|
|
4862
5150
|
collapsed: P().optional(),
|
|
4863
5151
|
group: Y
|
|
4864
|
-
}),
|
|
5152
|
+
}), Wc = I({
|
|
4865
5153
|
kind: V("node"),
|
|
4866
5154
|
nodeId: Y,
|
|
4867
5155
|
output: Y
|
|
4868
|
-
}),
|
|
5156
|
+
}), Gc = I({
|
|
4869
5157
|
kind: V("flow"),
|
|
4870
5158
|
input: Y
|
|
4871
|
-
}),
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
5159
|
+
}), Kc = R([
|
|
5160
|
+
Wc,
|
|
5161
|
+
Gc,
|
|
5162
|
+
I({
|
|
4875
5163
|
kind: V("binding"),
|
|
4876
5164
|
bindingId: Y
|
|
4877
5165
|
})
|
|
4878
|
-
]),
|
|
5166
|
+
]), qc = R([I({
|
|
4879
5167
|
kind: V("value"),
|
|
4880
5168
|
value: X
|
|
4881
|
-
}),
|
|
5169
|
+
}), I({
|
|
4882
5170
|
kind: V("sources"),
|
|
4883
|
-
sources:
|
|
4884
|
-
})]),
|
|
4885
|
-
inputs:
|
|
4886
|
-
outputs:
|
|
4887
|
-
},
|
|
5171
|
+
sources: F(Kc)
|
|
5172
|
+
})]), Jc = z(Y, qc), Yc = {
|
|
5173
|
+
inputs: F(R([Z, Uc])),
|
|
5174
|
+
outputs: F(R([Hc, Uc]))
|
|
5175
|
+
}, Xc = I({
|
|
4888
5176
|
kind: V("connector"),
|
|
4889
5177
|
action: Y,
|
|
4890
5178
|
connectionId: Y.optional(),
|
|
4891
|
-
connections: I(
|
|
5179
|
+
connections: F(I({
|
|
4892
5180
|
connectionId: Y,
|
|
4893
5181
|
alias: Y.optional()
|
|
4894
5182
|
}))
|
|
4895
|
-
}),
|
|
4896
|
-
...
|
|
5183
|
+
}), Zc = I({
|
|
5184
|
+
...Yc,
|
|
4897
5185
|
name: Y,
|
|
4898
5186
|
moduleId: Y,
|
|
4899
|
-
capabilities:
|
|
4900
|
-
}),
|
|
5187
|
+
capabilities: F(Xc).optional()
|
|
5188
|
+
}), Qc = R([I({
|
|
4901
5189
|
kind: V("value"),
|
|
4902
5190
|
value: X
|
|
4903
|
-
}),
|
|
5191
|
+
}), I({
|
|
4904
5192
|
kind: V("input"),
|
|
4905
5193
|
input: Y
|
|
4906
|
-
})]),
|
|
4907
|
-
...
|
|
5194
|
+
})]), $c = R([Qc, I({ kind: V("model") })]), el = I({
|
|
5195
|
+
...Yc,
|
|
4908
5196
|
name: Y,
|
|
4909
5197
|
executor: R([
|
|
4910
|
-
|
|
5198
|
+
I({
|
|
4911
5199
|
kind: V("connector"),
|
|
4912
5200
|
action: Y,
|
|
4913
5201
|
connectionId: Y.optional()
|
|
4914
5202
|
}),
|
|
4915
|
-
|
|
5203
|
+
I({
|
|
4916
5204
|
kind: V("llm"),
|
|
4917
5205
|
mode: B(["chat", "json"])
|
|
4918
5206
|
}),
|
|
4919
|
-
|
|
5207
|
+
I({
|
|
4920
5208
|
kind: V("agent"),
|
|
4921
5209
|
code: P().optional(),
|
|
4922
5210
|
model: Y,
|
|
4923
|
-
prompt:
|
|
5211
|
+
prompt: Qc,
|
|
4924
5212
|
system: Y,
|
|
4925
5213
|
maxRounds: N(),
|
|
4926
|
-
tools: I(
|
|
5214
|
+
tools: F(I({
|
|
4927
5215
|
id: Y,
|
|
4928
5216
|
name: Y,
|
|
4929
5217
|
description: Y,
|
|
4930
5218
|
action: Y,
|
|
4931
5219
|
connectionId: Y.optional(),
|
|
4932
5220
|
approval: P(),
|
|
4933
|
-
inputs:
|
|
5221
|
+
inputs: F(Z.extend({ source: $c }))
|
|
4934
5222
|
})),
|
|
4935
|
-
notification:
|
|
5223
|
+
notification: I({
|
|
4936
5224
|
taskId: Y,
|
|
4937
5225
|
messageHandle: Y,
|
|
4938
|
-
inputs: z(Y,
|
|
5226
|
+
inputs: z(Y, Qc)
|
|
4939
5227
|
}).optional()
|
|
4940
5228
|
})
|
|
4941
5229
|
])
|
|
4942
|
-
}),
|
|
5230
|
+
}), tl = {
|
|
4943
5231
|
input: Z,
|
|
4944
|
-
cases: I(
|
|
5232
|
+
cases: F(I({
|
|
4945
5233
|
output: Y,
|
|
4946
5234
|
relation: B(["all", "any"]),
|
|
4947
|
-
expressions: I(
|
|
5235
|
+
expressions: F(I({
|
|
4948
5236
|
input: Y,
|
|
4949
5237
|
operator: B([
|
|
4950
5238
|
"!=",
|
|
@@ -4972,29 +5260,29 @@ var Y = j(), X = Is(), gc = I(Y), _c = L({
|
|
|
4972
5260
|
}))
|
|
4973
5261
|
})),
|
|
4974
5262
|
defaultOutput: Y.optional()
|
|
4975
|
-
},
|
|
5263
|
+
}, nl = {
|
|
4976
5264
|
actions: R([ss([V("continue")]), ss([V("approve"), V("reject")])]),
|
|
4977
5265
|
prompt: Y,
|
|
4978
|
-
notification:
|
|
4979
|
-
inputs:
|
|
5266
|
+
notification: I({
|
|
5267
|
+
inputs: Jc,
|
|
4980
5268
|
messageHandle: Y,
|
|
4981
5269
|
taskId: Y
|
|
4982
5270
|
}).optional()
|
|
4983
|
-
},
|
|
4984
|
-
inputsDef:
|
|
4985
|
-
options:
|
|
4986
|
-
allowedMethods:
|
|
4987
|
-
allowedOrigins:
|
|
5271
|
+
}, rl = {
|
|
5272
|
+
inputsDef: F(Z),
|
|
5273
|
+
options: I({
|
|
5274
|
+
allowedMethods: Vc.optional(),
|
|
5275
|
+
allowedOrigins: Vc.optional(),
|
|
4988
5276
|
noResponseBody: P().optional(),
|
|
4989
5277
|
responseData: Y.optional(),
|
|
4990
5278
|
responseHeaders: z(Y, Y).optional(),
|
|
4991
5279
|
responseStatusCode: N().optional()
|
|
4992
5280
|
}).optional()
|
|
4993
|
-
},
|
|
5281
|
+
}, il = F(R([I({
|
|
4994
5282
|
type: V("cron"),
|
|
4995
5283
|
expression: Y,
|
|
4996
5284
|
timezone: Y
|
|
4997
|
-
}),
|
|
5285
|
+
}), I({
|
|
4998
5286
|
type: V("every"),
|
|
4999
5287
|
unit: B([
|
|
5000
5288
|
"day",
|
|
@@ -5004,7 +5292,7 @@ var Y = j(), X = Is(), gc = I(Y), _c = L({
|
|
|
5004
5292
|
"week"
|
|
5005
5293
|
]),
|
|
5006
5294
|
value: N()
|
|
5007
|
-
})])),
|
|
5295
|
+
})])), al = {
|
|
5008
5296
|
configSchema: X,
|
|
5009
5297
|
definitionVersion: N(),
|
|
5010
5298
|
description: Y,
|
|
@@ -5013,18 +5301,18 @@ var Y = j(), X = Is(), gc = I(Y), _c = L({
|
|
|
5013
5301
|
name: Y,
|
|
5014
5302
|
payloadSchema: X,
|
|
5015
5303
|
provider: Y
|
|
5016
|
-
},
|
|
5017
|
-
body:
|
|
5304
|
+
}, ol = I({
|
|
5305
|
+
body: I({
|
|
5018
5306
|
allowArray: P(),
|
|
5019
5307
|
allowEmpty: P(),
|
|
5020
|
-
formats:
|
|
5308
|
+
formats: F(B([
|
|
5021
5309
|
"form",
|
|
5022
5310
|
"json",
|
|
5023
5311
|
"multipart",
|
|
5024
5312
|
"text"
|
|
5025
5313
|
]))
|
|
5026
5314
|
}),
|
|
5027
|
-
methods:
|
|
5315
|
+
methods: F(B([
|
|
5028
5316
|
"DELETE",
|
|
5029
5317
|
"GET",
|
|
5030
5318
|
"HEAD",
|
|
@@ -5033,132 +5321,132 @@ var Y = j(), X = Is(), gc = I(Y), _c = L({
|
|
|
5033
5321
|
"PUT"
|
|
5034
5322
|
])),
|
|
5035
5323
|
successStatus: N()
|
|
5036
|
-
}),
|
|
5324
|
+
}), sl = {
|
|
5037
5325
|
name: Y,
|
|
5038
5326
|
description: Y.optional(),
|
|
5039
5327
|
icon: Y.optional()
|
|
5040
|
-
},
|
|
5041
|
-
inputs:
|
|
5328
|
+
}, cl = {
|
|
5329
|
+
inputs: Jc,
|
|
5042
5330
|
name: Y.optional(),
|
|
5043
5331
|
description: Y.optional(),
|
|
5044
5332
|
icon: Y.optional(),
|
|
5045
5333
|
timeoutMs: N().optional()
|
|
5046
|
-
},
|
|
5047
|
-
|
|
5048
|
-
...
|
|
5334
|
+
}, ll = R([
|
|
5335
|
+
I({
|
|
5336
|
+
...cl,
|
|
5049
5337
|
kind: V("condition"),
|
|
5050
|
-
...
|
|
5338
|
+
...tl
|
|
5051
5339
|
}),
|
|
5052
|
-
|
|
5053
|
-
...
|
|
5054
|
-
inputs:
|
|
5340
|
+
I({
|
|
5341
|
+
...cl,
|
|
5342
|
+
inputs: Xo().transform(() => ({})).default({}),
|
|
5055
5343
|
kind: V("value"),
|
|
5056
|
-
values:
|
|
5344
|
+
values: F(Z)
|
|
5057
5345
|
}),
|
|
5058
|
-
|
|
5059
|
-
...
|
|
5346
|
+
I({
|
|
5347
|
+
...cl,
|
|
5060
5348
|
kind: V("subflow"),
|
|
5061
5349
|
subflowId: Y
|
|
5062
5350
|
}),
|
|
5063
|
-
|
|
5064
|
-
...
|
|
5351
|
+
I({
|
|
5352
|
+
...cl,
|
|
5065
5353
|
kind: V("task"),
|
|
5066
|
-
task:
|
|
5067
|
-
additionalInputs:
|
|
5354
|
+
task: Zc,
|
|
5355
|
+
additionalInputs: F(Z).optional()
|
|
5068
5356
|
}),
|
|
5069
|
-
|
|
5070
|
-
...
|
|
5357
|
+
I({
|
|
5358
|
+
...cl,
|
|
5071
5359
|
kind: V("task"),
|
|
5072
5360
|
taskId: Y,
|
|
5073
|
-
additionalInputs:
|
|
5361
|
+
additionalInputs: F(Z).optional()
|
|
5074
5362
|
}),
|
|
5075
|
-
|
|
5076
|
-
...
|
|
5363
|
+
I({
|
|
5364
|
+
...cl,
|
|
5077
5365
|
kind: V("wait"),
|
|
5078
5366
|
input: Z,
|
|
5079
|
-
...
|
|
5367
|
+
...nl
|
|
5080
5368
|
}).omit({ timeoutMs: !0 }),
|
|
5081
|
-
|
|
5082
|
-
...
|
|
5369
|
+
I({
|
|
5370
|
+
...sl,
|
|
5083
5371
|
kind: V("manual")
|
|
5084
5372
|
}),
|
|
5085
|
-
|
|
5086
|
-
...
|
|
5373
|
+
I({
|
|
5374
|
+
...sl,
|
|
5087
5375
|
kind: V("webhook"),
|
|
5088
|
-
...
|
|
5376
|
+
...rl
|
|
5089
5377
|
}),
|
|
5090
|
-
|
|
5091
|
-
...
|
|
5378
|
+
I({
|
|
5379
|
+
...sl,
|
|
5092
5380
|
kind: V("cron"),
|
|
5093
|
-
cronTimes:
|
|
5381
|
+
cronTimes: il
|
|
5094
5382
|
}),
|
|
5095
|
-
|
|
5096
|
-
...
|
|
5383
|
+
I({
|
|
5384
|
+
...sl,
|
|
5097
5385
|
kind: V("poll"),
|
|
5098
5386
|
bindingId: Y,
|
|
5099
5387
|
config: z(Y, X),
|
|
5100
|
-
definition:
|
|
5101
|
-
...
|
|
5388
|
+
definition: I({
|
|
5389
|
+
...al,
|
|
5102
5390
|
type: V("poll")
|
|
5103
5391
|
}),
|
|
5104
|
-
pollTimes:
|
|
5392
|
+
pollTimes: il
|
|
5105
5393
|
}),
|
|
5106
|
-
|
|
5107
|
-
...
|
|
5394
|
+
I({
|
|
5395
|
+
...sl,
|
|
5108
5396
|
kind: V("integration"),
|
|
5109
5397
|
bindingId: Y,
|
|
5110
5398
|
config: z(Y, X),
|
|
5111
|
-
definition:
|
|
5112
|
-
...
|
|
5399
|
+
definition: I({
|
|
5400
|
+
...al,
|
|
5113
5401
|
type: V("integration"),
|
|
5114
|
-
endpoint:
|
|
5402
|
+
endpoint: ol
|
|
5115
5403
|
})
|
|
5116
5404
|
})
|
|
5117
|
-
]),
|
|
5405
|
+
]), ul = R([I({ kind: V("flow") }), I({
|
|
5118
5406
|
kind: V("subflow"),
|
|
5119
5407
|
id: Y
|
|
5120
|
-
})]),
|
|
5408
|
+
})]), dl = I({
|
|
5121
5409
|
source: Y,
|
|
5122
5410
|
target: Y,
|
|
5123
5411
|
sourceHandle: Y.optional()
|
|
5124
5412
|
}), Q = {
|
|
5125
5413
|
nodeId: Y,
|
|
5126
|
-
target:
|
|
5127
|
-
},
|
|
5414
|
+
target: ul
|
|
5415
|
+
}, fl = I({
|
|
5128
5416
|
name: Y,
|
|
5129
|
-
inputs:
|
|
5130
|
-
outputs:
|
|
5131
|
-
}),
|
|
5132
|
-
nodes: z(Y,
|
|
5133
|
-
edges:
|
|
5134
|
-
}),
|
|
5417
|
+
inputs: F(Z),
|
|
5418
|
+
outputs: F(Hc.extend({ sources: F(R([Wc, Gc])) }))
|
|
5419
|
+
}), pl = I({
|
|
5420
|
+
nodes: z(Y, ll),
|
|
5421
|
+
edges: F(dl).default([])
|
|
5422
|
+
}), ml = I({
|
|
5135
5423
|
kind: B(["connection", "variable"]),
|
|
5136
5424
|
target: Y
|
|
5137
|
-
}),
|
|
5425
|
+
}), hl = I({
|
|
5138
5426
|
name: Y,
|
|
5139
|
-
imports:
|
|
5427
|
+
imports: Vc,
|
|
5140
5428
|
source: Y
|
|
5141
|
-
}),
|
|
5142
|
-
bindings: z(Y,
|
|
5143
|
-
graph:
|
|
5144
|
-
subflows: z(Y,
|
|
5145
|
-
tasks: z(Y,
|
|
5146
|
-
}),
|
|
5429
|
+
}), gl = I({
|
|
5430
|
+
bindings: z(Y, ml),
|
|
5431
|
+
graph: pl,
|
|
5432
|
+
subflows: z(Y, fl.extend({ graph: pl })),
|
|
5433
|
+
tasks: z(Y, el)
|
|
5434
|
+
}), _l = I({
|
|
5147
5435
|
modelVersion: V(1),
|
|
5148
|
-
document:
|
|
5149
|
-
modules: z(Y,
|
|
5436
|
+
document: gl,
|
|
5437
|
+
modules: z(Y, hl)
|
|
5150
5438
|
});
|
|
5151
|
-
|
|
5439
|
+
_l.extend({
|
|
5152
5440
|
kind: V("open-flow-flow-revision"),
|
|
5153
5441
|
version: V(1)
|
|
5154
5442
|
});
|
|
5155
|
-
function
|
|
5156
|
-
return
|
|
5443
|
+
function vl(e) {
|
|
5444
|
+
return Bc(e), _l.parse(e);
|
|
5157
5445
|
}
|
|
5158
|
-
var
|
|
5446
|
+
var yl = {
|
|
5159
5447
|
"binding.create": {
|
|
5160
5448
|
bindingId: Y,
|
|
5161
|
-
binding:
|
|
5449
|
+
binding: ml
|
|
5162
5450
|
},
|
|
5163
5451
|
"binding.delete": { bindingId: Y },
|
|
5164
5452
|
"binding.target.set": {
|
|
@@ -5167,19 +5455,19 @@ var Jc = {
|
|
|
5167
5455
|
value: Y
|
|
5168
5456
|
},
|
|
5169
5457
|
"graph.edge.connect": {
|
|
5170
|
-
target:
|
|
5171
|
-
edge:
|
|
5458
|
+
target: ul,
|
|
5459
|
+
edge: dl
|
|
5172
5460
|
},
|
|
5173
5461
|
"graph.edge.disconnect": {
|
|
5174
|
-
target:
|
|
5175
|
-
edge:
|
|
5462
|
+
target: ul,
|
|
5463
|
+
edge: dl
|
|
5176
5464
|
},
|
|
5177
5465
|
"graph.node.create": {
|
|
5178
5466
|
...Q,
|
|
5179
|
-
node:
|
|
5467
|
+
node: ll
|
|
5180
5468
|
},
|
|
5181
5469
|
"graph.node.delete": Q,
|
|
5182
|
-
"graph.node.field.set": R([
|
|
5470
|
+
"graph.node.field.set": R([I({
|
|
5183
5471
|
...Q,
|
|
5184
5472
|
kind: V("graph.node.field.set"),
|
|
5185
5473
|
field: B([
|
|
@@ -5189,7 +5477,7 @@ var Jc = {
|
|
|
5189
5477
|
]),
|
|
5190
5478
|
before: Y.optional(),
|
|
5191
5479
|
value: Y.optional()
|
|
5192
|
-
}),
|
|
5480
|
+
}), I({
|
|
5193
5481
|
...Q,
|
|
5194
5482
|
kind: V("graph.node.field.set"),
|
|
5195
5483
|
field: V("timeoutMs"),
|
|
@@ -5199,40 +5487,40 @@ var Jc = {
|
|
|
5199
5487
|
"graph.node.input.set": {
|
|
5200
5488
|
...Q,
|
|
5201
5489
|
handle: Y,
|
|
5202
|
-
before:
|
|
5203
|
-
value:
|
|
5490
|
+
before: qc.optional(),
|
|
5491
|
+
value: qc.optional()
|
|
5204
5492
|
},
|
|
5205
5493
|
"graph.node.additional-inputs.set": {
|
|
5206
5494
|
...Q,
|
|
5207
|
-
before:
|
|
5208
|
-
value:
|
|
5495
|
+
before: F(Z).optional(),
|
|
5496
|
+
value: F(Z).optional()
|
|
5209
5497
|
},
|
|
5210
5498
|
"graph.node.condition.set": {
|
|
5211
5499
|
...Q,
|
|
5212
|
-
before:
|
|
5213
|
-
value:
|
|
5500
|
+
before: I(tl),
|
|
5501
|
+
value: I(tl)
|
|
5214
5502
|
},
|
|
5215
5503
|
"graph.node.values.set": {
|
|
5216
5504
|
...Q,
|
|
5217
|
-
before:
|
|
5218
|
-
value:
|
|
5505
|
+
before: F(Z),
|
|
5506
|
+
value: F(Z)
|
|
5219
5507
|
},
|
|
5220
5508
|
"graph.node.wait.set": {
|
|
5221
5509
|
...Q,
|
|
5222
|
-
target:
|
|
5223
|
-
before:
|
|
5224
|
-
value:
|
|
5510
|
+
target: I({ kind: V("flow") }),
|
|
5511
|
+
before: I(nl),
|
|
5512
|
+
value: I(nl)
|
|
5225
5513
|
},
|
|
5226
5514
|
"graph.node.webhook.set": {
|
|
5227
5515
|
...Q,
|
|
5228
|
-
target:
|
|
5229
|
-
before:
|
|
5230
|
-
value:
|
|
5516
|
+
target: I({ kind: V("flow") }),
|
|
5517
|
+
before: I(rl),
|
|
5518
|
+
value: I(rl)
|
|
5231
5519
|
},
|
|
5232
5520
|
"graph.node.task.ports.set": {
|
|
5233
5521
|
...Q,
|
|
5234
|
-
before:
|
|
5235
|
-
value:
|
|
5522
|
+
before: I(Yc),
|
|
5523
|
+
value: I(Yc)
|
|
5236
5524
|
},
|
|
5237
5525
|
"graph.node.task.name.set": {
|
|
5238
5526
|
...Q,
|
|
@@ -5241,8 +5529,8 @@ var Jc = {
|
|
|
5241
5529
|
},
|
|
5242
5530
|
"graph.node.task.capabilities.set": {
|
|
5243
5531
|
...Q,
|
|
5244
|
-
before:
|
|
5245
|
-
value:
|
|
5532
|
+
before: F(Xc).optional(),
|
|
5533
|
+
value: F(Xc).optional()
|
|
5246
5534
|
},
|
|
5247
5535
|
"graph.trigger.config.set": {
|
|
5248
5536
|
nodeId: Y,
|
|
@@ -5252,12 +5540,12 @@ var Jc = {
|
|
|
5252
5540
|
},
|
|
5253
5541
|
"graph.trigger.schedule.set": {
|
|
5254
5542
|
nodeId: Y,
|
|
5255
|
-
before:
|
|
5256
|
-
value:
|
|
5543
|
+
before: il,
|
|
5544
|
+
value: il
|
|
5257
5545
|
},
|
|
5258
5546
|
"module.create": {
|
|
5259
5547
|
moduleId: Y,
|
|
5260
|
-
module:
|
|
5548
|
+
module: hl
|
|
5261
5549
|
},
|
|
5262
5550
|
"module.delete": { moduleId: Y },
|
|
5263
5551
|
"module.rename": {
|
|
@@ -5267,24 +5555,24 @@ var Jc = {
|
|
|
5267
5555
|
},
|
|
5268
5556
|
"module.source.replace": {
|
|
5269
5557
|
moduleId: Y,
|
|
5270
|
-
beforeImports:
|
|
5558
|
+
beforeImports: Vc,
|
|
5271
5559
|
beforeSource: Y,
|
|
5272
|
-
imports:
|
|
5560
|
+
imports: Vc,
|
|
5273
5561
|
source: Y
|
|
5274
5562
|
},
|
|
5275
5563
|
"subflow.create": {
|
|
5276
5564
|
subflowId: Y,
|
|
5277
|
-
subflow:
|
|
5565
|
+
subflow: fl.extend({ graph: pl })
|
|
5278
5566
|
},
|
|
5279
5567
|
"subflow.definition.set": {
|
|
5280
5568
|
subflowId: Y,
|
|
5281
|
-
before:
|
|
5282
|
-
definition:
|
|
5569
|
+
before: fl,
|
|
5570
|
+
definition: fl
|
|
5283
5571
|
},
|
|
5284
5572
|
"subflow.delete": { subflowId: Y },
|
|
5285
5573
|
"task.create": {
|
|
5286
5574
|
taskId: Y,
|
|
5287
|
-
task:
|
|
5575
|
+
task: el
|
|
5288
5576
|
},
|
|
5289
5577
|
"task.delete": { taskId: Y },
|
|
5290
5578
|
"task.connector.connection.set": {
|
|
@@ -5294,8 +5582,8 @@ var Jc = {
|
|
|
5294
5582
|
},
|
|
5295
5583
|
"task.agent.set": {
|
|
5296
5584
|
taskId: Y,
|
|
5297
|
-
before:
|
|
5298
|
-
value:
|
|
5585
|
+
before: el,
|
|
5586
|
+
value: el
|
|
5299
5587
|
},
|
|
5300
5588
|
"task.llm.mode.set": {
|
|
5301
5589
|
taskId: Y,
|
|
@@ -5308,74 +5596,74 @@ var Jc = {
|
|
|
5308
5596
|
value: Y
|
|
5309
5597
|
}
|
|
5310
5598
|
};
|
|
5311
|
-
|
|
5599
|
+
F(R([...new Map(Object.entries(yl).map(([e, t]) => [e, t instanceof A ? t : I({
|
|
5312
5600
|
kind: V(e),
|
|
5313
5601
|
...t
|
|
5314
5602
|
})])).values()])).min(1), new TextEncoder();
|
|
5315
|
-
var
|
|
5316
|
-
jsonSchema:
|
|
5603
|
+
var bl = z(j(), Xo()), xl = I({
|
|
5604
|
+
jsonSchema: Xo(),
|
|
5317
5605
|
nullable: P(),
|
|
5318
|
-
value:
|
|
5606
|
+
value: Xo().optional(),
|
|
5319
5607
|
description: j().optional()
|
|
5320
|
-
}).strict(),
|
|
5608
|
+
}).strict(), Sl = z(j(), xl), Cl = R([I({
|
|
5321
5609
|
kind: V("value"),
|
|
5322
|
-
value:
|
|
5323
|
-
}).strict(),
|
|
5610
|
+
value: Xo()
|
|
5611
|
+
}).strict(), I({
|
|
5324
5612
|
kind: V("sources"),
|
|
5325
|
-
sources: I(
|
|
5613
|
+
sources: F(I({
|
|
5326
5614
|
kind: V("node"),
|
|
5327
5615
|
nodeId: j(),
|
|
5328
5616
|
output: j()
|
|
5329
5617
|
}).strict())
|
|
5330
|
-
}).strict()]),
|
|
5618
|
+
}).strict()]), wl = {
|
|
5331
5619
|
name: j().optional(),
|
|
5332
5620
|
description: j().optional(),
|
|
5333
5621
|
icon: j().optional()
|
|
5334
|
-
},
|
|
5335
|
-
|
|
5336
|
-
|
|
5622
|
+
}, Tl = R([
|
|
5623
|
+
I({
|
|
5624
|
+
...wl,
|
|
5337
5625
|
kind: V("cron"),
|
|
5338
|
-
cronTimes:
|
|
5626
|
+
cronTimes: F(Xo())
|
|
5339
5627
|
}).strict(),
|
|
5340
|
-
|
|
5341
|
-
|
|
5628
|
+
I({
|
|
5629
|
+
...wl,
|
|
5342
5630
|
kind: V("manual")
|
|
5343
5631
|
}).strict(),
|
|
5344
|
-
|
|
5345
|
-
|
|
5632
|
+
I({
|
|
5633
|
+
...wl,
|
|
5346
5634
|
kind: V("task"),
|
|
5347
5635
|
concurrency: V(1).optional(),
|
|
5348
|
-
inputs: z(j(),
|
|
5349
|
-
task:
|
|
5636
|
+
inputs: z(j(), Cl),
|
|
5637
|
+
task: I({
|
|
5350
5638
|
name: j(),
|
|
5351
5639
|
moduleId: j(),
|
|
5352
|
-
inputs:
|
|
5353
|
-
outputs: z(j(),
|
|
5640
|
+
inputs: Sl,
|
|
5641
|
+
outputs: z(j(), xl.omit({ value: !0 }))
|
|
5354
5642
|
}).strict()
|
|
5355
5643
|
}).strict()
|
|
5356
5644
|
]);
|
|
5357
|
-
|
|
5645
|
+
I({
|
|
5358
5646
|
name: j(),
|
|
5359
|
-
graph:
|
|
5360
|
-
}).strict(),
|
|
5647
|
+
graph: I({ nodes: z(j(), Tl) }).strict()
|
|
5648
|
+
}).strict(), I({
|
|
5361
5649
|
kind: V("open-flow-project-revision"),
|
|
5362
5650
|
version: V(1),
|
|
5363
5651
|
modelVersion: V(1),
|
|
5364
|
-
modules: z(j(),
|
|
5652
|
+
modules: z(j(), I({
|
|
5365
5653
|
name: j(),
|
|
5366
5654
|
source: j(),
|
|
5367
|
-
imports:
|
|
5655
|
+
imports: F(j())
|
|
5368
5656
|
}).strict()),
|
|
5369
|
-
document:
|
|
5370
|
-
bindings:
|
|
5371
|
-
flows:
|
|
5372
|
-
subflows:
|
|
5373
|
-
tasks:
|
|
5657
|
+
document: I({
|
|
5658
|
+
bindings: bl,
|
|
5659
|
+
flows: bl,
|
|
5660
|
+
subflows: bl,
|
|
5661
|
+
tasks: bl
|
|
5374
5662
|
}).strict()
|
|
5375
5663
|
}).strict();
|
|
5376
5664
|
//#endregion
|
|
5377
5665
|
//#region src/control/common/revisionDecoders.ts
|
|
5378
|
-
function
|
|
5666
|
+
function El(e) {
|
|
5379
5667
|
let t = W(e), n = t.parentRevisionId;
|
|
5380
5668
|
return t.version != 1 || n !== null && typeof n != "string" ? U() : {
|
|
5381
5669
|
actorId: G(t.actorId),
|
|
@@ -5388,18 +5676,18 @@ function tl(e) {
|
|
|
5388
5676
|
version: 1
|
|
5389
5677
|
};
|
|
5390
5678
|
}
|
|
5391
|
-
function
|
|
5679
|
+
function Dl(e) {
|
|
5392
5680
|
let t = W(e);
|
|
5393
5681
|
try {
|
|
5394
5682
|
return {
|
|
5395
|
-
...
|
|
5396
|
-
content:
|
|
5683
|
+
...El(t),
|
|
5684
|
+
content: vl(t.content)
|
|
5397
5685
|
};
|
|
5398
5686
|
} catch {
|
|
5399
5687
|
return U();
|
|
5400
5688
|
}
|
|
5401
5689
|
}
|
|
5402
|
-
function
|
|
5690
|
+
function Ol(e) {
|
|
5403
5691
|
let t = W(e);
|
|
5404
5692
|
return K(t, [
|
|
5405
5693
|
"revision",
|
|
@@ -5413,24 +5701,24 @@ function rl(e) {
|
|
|
5413
5701
|
version: 1
|
|
5414
5702
|
};
|
|
5415
5703
|
}
|
|
5416
|
-
function
|
|
5704
|
+
function kl(e) {
|
|
5417
5705
|
let t = W(e);
|
|
5418
5706
|
return t.version == 1 ? {
|
|
5419
|
-
revision:
|
|
5707
|
+
revision: El(t.revision),
|
|
5420
5708
|
version: 1
|
|
5421
5709
|
} : U();
|
|
5422
5710
|
}
|
|
5423
|
-
function
|
|
5711
|
+
function Al(e) {
|
|
5424
5712
|
let t = W(e);
|
|
5425
5713
|
return t.version != 1 || t.kind != "snapshot" ? U() : {
|
|
5426
|
-
draft:
|
|
5714
|
+
draft: Dl(t.draft),
|
|
5427
5715
|
kind: "snapshot",
|
|
5428
5716
|
version: 1
|
|
5429
5717
|
};
|
|
5430
5718
|
}
|
|
5431
5719
|
//#endregion
|
|
5432
5720
|
//#region src/control/common/runDecoders.ts
|
|
5433
|
-
var
|
|
5721
|
+
var jl = /* @__PURE__ */ new Set([
|
|
5434
5722
|
"canceled",
|
|
5435
5723
|
"completed",
|
|
5436
5724
|
"failed",
|
|
@@ -5440,10 +5728,10 @@ var ol = /* @__PURE__ */ new Set([
|
|
|
5440
5728
|
"starting",
|
|
5441
5729
|
"waiting"
|
|
5442
5730
|
]);
|
|
5443
|
-
function
|
|
5444
|
-
return typeof e == "string" &&
|
|
5731
|
+
function Ml(e) {
|
|
5732
|
+
return typeof e == "string" && jl.has(e) ? e : U();
|
|
5445
5733
|
}
|
|
5446
|
-
function
|
|
5734
|
+
function Nl(e) {
|
|
5447
5735
|
let t = W(e), n = t.source, r = t.startedAt, i = t.finishedAt;
|
|
5448
5736
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || i != null && typeof i != "string" ? U() : {
|
|
5449
5737
|
createdAt: G(t.createdAt),
|
|
@@ -5453,11 +5741,11 @@ function cl(e) {
|
|
|
5453
5741
|
runId: G(t.runId),
|
|
5454
5742
|
source: n,
|
|
5455
5743
|
...r == null ? {} : { startedAt: r },
|
|
5456
|
-
status:
|
|
5744
|
+
status: Ml(t.status),
|
|
5457
5745
|
version: 1
|
|
5458
5746
|
};
|
|
5459
5747
|
}
|
|
5460
|
-
function
|
|
5748
|
+
function Pl(e) {
|
|
5461
5749
|
let t = W(e);
|
|
5462
5750
|
K(t, [
|
|
5463
5751
|
"actions",
|
|
@@ -5477,12 +5765,12 @@ function ll(e) {
|
|
|
5477
5765
|
waitingSince: G(t.waitingSince)
|
|
5478
5766
|
};
|
|
5479
5767
|
}
|
|
5480
|
-
function
|
|
5481
|
-
let t = W(e), n =
|
|
5768
|
+
function Fl(e) {
|
|
5769
|
+
let t = W(e), n = Nl(t), r = t.eventsExpiresAt;
|
|
5482
5770
|
if (r != null && typeof r != "string" || n.status != "waiting" && t.waiting !== void 0) return U();
|
|
5483
5771
|
let i = n.status == "waiting" ? {
|
|
5484
5772
|
status: "waiting",
|
|
5485
|
-
waiting:
|
|
5773
|
+
waiting: Pl(t.waiting)
|
|
5486
5774
|
} : { status: n.status }, a = {
|
|
5487
5775
|
...n,
|
|
5488
5776
|
closureDigest: G(t.closureDigest),
|
|
@@ -5512,17 +5800,17 @@ function ul(e) {
|
|
|
5512
5800
|
};
|
|
5513
5801
|
}
|
|
5514
5802
|
}
|
|
5515
|
-
function
|
|
5803
|
+
function Il(e) {
|
|
5516
5804
|
let t = W(e), n = t.nextCursor;
|
|
5517
5805
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? U() : {
|
|
5518
5806
|
flowId: G(t.flowId),
|
|
5519
5807
|
...n == null ? {} : { nextCursor: n },
|
|
5520
|
-
runs: t.runs.map(
|
|
5808
|
+
runs: t.runs.map(Nl),
|
|
5521
5809
|
version: 1
|
|
5522
5810
|
};
|
|
5523
5811
|
}
|
|
5524
|
-
function
|
|
5525
|
-
let t = W(e), n =
|
|
5812
|
+
function Ll(e) {
|
|
5813
|
+
let t = W(e), n = Ml(t.status);
|
|
5526
5814
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" || n == "waiting" ? U() : {
|
|
5527
5815
|
cancelAccepted: t.cancelAccepted,
|
|
5528
5816
|
runId: G(t.runId),
|
|
@@ -5530,7 +5818,7 @@ function fl(e) {
|
|
|
5530
5818
|
version: 1
|
|
5531
5819
|
};
|
|
5532
5820
|
}
|
|
5533
|
-
function
|
|
5821
|
+
function Rl(e) {
|
|
5534
5822
|
let t = W(e);
|
|
5535
5823
|
K(t, [
|
|
5536
5824
|
"action",
|
|
@@ -5547,12 +5835,12 @@ function pl(e) {
|
|
|
5547
5835
|
resolutionAccepted: t.resolutionAccepted,
|
|
5548
5836
|
resolvedAt: r,
|
|
5549
5837
|
runId: G(t.runId),
|
|
5550
|
-
status:
|
|
5838
|
+
status: Ml(t.status),
|
|
5551
5839
|
version: 1,
|
|
5552
5840
|
waitId: G(t.waitId)
|
|
5553
5841
|
};
|
|
5554
5842
|
}
|
|
5555
|
-
function
|
|
5843
|
+
function zl(e) {
|
|
5556
5844
|
let t = W(e), n = t.status;
|
|
5557
5845
|
if (t.version != 1) return U();
|
|
5558
5846
|
let r = {
|
|
@@ -5594,147 +5882,8 @@ function ml(e) {
|
|
|
5594
5882
|
return U();
|
|
5595
5883
|
}
|
|
5596
5884
|
//#endregion
|
|
5597
|
-
//#region src/control/common/triggerDecoders.ts
|
|
5598
|
-
function hl(e) {
|
|
5599
|
-
let t = W(e), n = t.type;
|
|
5600
|
-
return n != "integration" && n != "poll" ? U() : {
|
|
5601
|
-
description: typeof t.description == "string" ? t.description : U(),
|
|
5602
|
-
displayName: G(t.displayName),
|
|
5603
|
-
key: G(t.key),
|
|
5604
|
-
name: G(t.name),
|
|
5605
|
-
provider: G(t.provider),
|
|
5606
|
-
type: n
|
|
5607
|
-
};
|
|
5608
|
-
}
|
|
5609
|
-
function gl(e) {
|
|
5610
|
-
let t = W(e), n = hl(t), r = {
|
|
5611
|
-
configSchema: J(t.configSchema),
|
|
5612
|
-
definitionVersion: q(t.definitionVersion),
|
|
5613
|
-
description: n.description,
|
|
5614
|
-
displayName: n.displayName,
|
|
5615
|
-
key: n.key,
|
|
5616
|
-
name: n.name,
|
|
5617
|
-
payloadSchema: J(t.payloadSchema),
|
|
5618
|
-
provider: n.provider
|
|
5619
|
-
};
|
|
5620
|
-
if (n.type == "poll") return {
|
|
5621
|
-
...r,
|
|
5622
|
-
type: "poll"
|
|
5623
|
-
};
|
|
5624
|
-
let i = W(t.endpoint), a = W(i.body);
|
|
5625
|
-
if (!Array.isArray(i.methods) || !Array.isArray(a.formats) || typeof a.allowArray != "boolean" || typeof a.allowEmpty != "boolean") return U();
|
|
5626
|
-
let o = i.methods.map(G), s = a.formats.map(G), c = q(i.successStatus);
|
|
5627
|
-
return o.some((e) => ![
|
|
5628
|
-
"DELETE",
|
|
5629
|
-
"GET",
|
|
5630
|
-
"HEAD",
|
|
5631
|
-
"PATCH",
|
|
5632
|
-
"POST",
|
|
5633
|
-
"PUT"
|
|
5634
|
-
].includes(e)) || s.some((e) => ![
|
|
5635
|
-
"form",
|
|
5636
|
-
"json",
|
|
5637
|
-
"multipart",
|
|
5638
|
-
"text"
|
|
5639
|
-
].includes(e)) || c < 200 || c > 299 ? U() : {
|
|
5640
|
-
...r,
|
|
5641
|
-
endpoint: {
|
|
5642
|
-
body: {
|
|
5643
|
-
allowArray: a.allowArray,
|
|
5644
|
-
allowEmpty: a.allowEmpty,
|
|
5645
|
-
formats: s
|
|
5646
|
-
},
|
|
5647
|
-
methods: o,
|
|
5648
|
-
successStatus: c
|
|
5649
|
-
},
|
|
5650
|
-
type: "integration"
|
|
5651
|
-
};
|
|
5652
|
-
}
|
|
5653
|
-
var _l = /* @__PURE__ */ new Set([
|
|
5654
|
-
"cron",
|
|
5655
|
-
"integration",
|
|
5656
|
-
"poll",
|
|
5657
|
-
"webhook"
|
|
5658
|
-
]), vl = /* @__PURE__ */ new Set([
|
|
5659
|
-
"failed",
|
|
5660
|
-
"healthy",
|
|
5661
|
-
"initializing",
|
|
5662
|
-
"needs_reauth",
|
|
5663
|
-
"suspended"
|
|
5664
|
-
]), yl = /* @__PURE__ */ new Set([
|
|
5665
|
-
"delivery.failed",
|
|
5666
|
-
"health.failed",
|
|
5667
|
-
"health.needs_reauth",
|
|
5668
|
-
"health.recovered",
|
|
5669
|
-
"health.suspended",
|
|
5670
|
-
"operator.paused",
|
|
5671
|
-
"operator.resumed"
|
|
5672
|
-
]);
|
|
5673
|
-
function bl(e) {
|
|
5674
|
-
let t = W(e), n = t.health, r = t.listener == null ? void 0 : W(t.listener);
|
|
5675
|
-
if (r != null && r.health != "healthy" && r.health != "failed" && r.health != "needs_reauth") return U();
|
|
5676
|
-
let i = t.kind, a = t.operatorState, o = q(t.runtimeVersion);
|
|
5677
|
-
return t.version != 1 || typeof n != "string" || !vl.has(n) || typeof i != "string" || !_l.has(i) || a != "active" && a != "paused" || o <= 0 ? U() : {
|
|
5678
|
-
...t.currentPublicationId == null ? {} : { currentPublicationId: G(t.currentPublicationId) },
|
|
5679
|
-
...t.currentRevisionId == null ? {} : { currentRevisionId: G(t.currentRevisionId) },
|
|
5680
|
-
...t.endpointUrl == null ? {} : { endpointUrl: G(t.endpointUrl) },
|
|
5681
|
-
...r == null ? {} : { listener: {
|
|
5682
|
-
health: r.health,
|
|
5683
|
-
...r.lastErrorCode == null ? {} : { lastErrorCode: G(r.lastErrorCode) }
|
|
5684
|
-
} },
|
|
5685
|
-
flowId: G(t.flowId),
|
|
5686
|
-
health: n,
|
|
5687
|
-
kind: i,
|
|
5688
|
-
...t.lastErrorCode == null ? {} : { lastErrorCode: G(t.lastErrorCode) },
|
|
5689
|
-
operatorState: a,
|
|
5690
|
-
runtimeVersion: o,
|
|
5691
|
-
triggerNodeId: G(t.triggerNodeId),
|
|
5692
|
-
updatedAt: G(t.updatedAt),
|
|
5693
|
-
version: 1
|
|
5694
|
-
};
|
|
5695
|
-
}
|
|
5696
|
-
function xl(e) {
|
|
5697
|
-
let t = W(e);
|
|
5698
|
-
return t.version == 1 ? {
|
|
5699
|
-
binding: bl(t.binding),
|
|
5700
|
-
version: 1
|
|
5701
|
-
} : U();
|
|
5702
|
-
}
|
|
5703
|
-
function Sl(e) {
|
|
5704
|
-
let t = W(e), n = t.kind;
|
|
5705
|
-
if (typeof n != "string" || !yl.has(n)) return U();
|
|
5706
|
-
let r = $s(t.errorCode), i = $s(t.errorMessage);
|
|
5707
|
-
return i != null && i.length > 512 ? U() : {
|
|
5708
|
-
activityId: G(t.activityId),
|
|
5709
|
-
createdAt: G(t.createdAt),
|
|
5710
|
-
...r == null ? {} : { errorCode: r },
|
|
5711
|
-
...i == null ? {} : { errorMessage: i },
|
|
5712
|
-
kind: n
|
|
5713
|
-
};
|
|
5714
|
-
}
|
|
5715
|
-
function Cl(e) {
|
|
5716
|
-
let t = W(e), n = $s(t.nextCursor);
|
|
5717
|
-
return t.version != 1 || !Array.isArray(t.activities) ? U() : {
|
|
5718
|
-
activities: t.activities.map(Sl),
|
|
5719
|
-
...n == null ? {} : { nextCursor: n },
|
|
5720
|
-
version: 1
|
|
5721
|
-
};
|
|
5722
|
-
}
|
|
5723
|
-
function wl(e) {
|
|
5724
|
-
let t = W(e), n = q(t.filtered);
|
|
5725
|
-
return t.version != 1 || !Array.isArray(t.events) || typeof t.hasMore != "boolean" || n < 0 ? U() : {
|
|
5726
|
-
events: t.events.map((e) => {
|
|
5727
|
-
let t = W(e);
|
|
5728
|
-
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, J(t)]));
|
|
5729
|
-
}),
|
|
5730
|
-
filtered: n,
|
|
5731
|
-
hasMore: t.hasMore,
|
|
5732
|
-
version: 1
|
|
5733
|
-
};
|
|
5734
|
-
}
|
|
5735
|
-
//#endregion
|
|
5736
5885
|
//#region src/control/common/random.ts
|
|
5737
|
-
function
|
|
5886
|
+
function Bl() {
|
|
5738
5887
|
let e = globalThis.crypto;
|
|
5739
5888
|
if (e != null) {
|
|
5740
5889
|
try {
|
|
@@ -5751,7 +5900,7 @@ function Tl() {
|
|
|
5751
5900
|
}
|
|
5752
5901
|
//#endregion
|
|
5753
5902
|
//#region src/control/common/api.ts
|
|
5754
|
-
function
|
|
5903
|
+
function Vl(e) {
|
|
5755
5904
|
let t = W(e), n = q(t.sequence);
|
|
5756
5905
|
if (n < 0) return U();
|
|
5757
5906
|
let r = {
|
|
@@ -5779,7 +5928,7 @@ function El(e) {
|
|
|
5779
5928
|
payload: {
|
|
5780
5929
|
flowId: G(i.flowId),
|
|
5781
5930
|
scopeId: G(i.scopeId),
|
|
5782
|
-
progress:
|
|
5931
|
+
progress: Hl(i.progress)
|
|
5783
5932
|
}
|
|
5784
5933
|
};
|
|
5785
5934
|
case "run.waiting": return {
|
|
@@ -5882,7 +6031,7 @@ function El(e) {
|
|
|
5882
6031
|
kind: a,
|
|
5883
6032
|
payload: {
|
|
5884
6033
|
...e,
|
|
5885
|
-
progress:
|
|
6034
|
+
progress: Hl(i.progress)
|
|
5886
6035
|
}
|
|
5887
6036
|
};
|
|
5888
6037
|
case "node.artifact": {
|
|
@@ -5908,14 +6057,14 @@ function El(e) {
|
|
|
5908
6057
|
default: return U();
|
|
5909
6058
|
}
|
|
5910
6059
|
}
|
|
5911
|
-
function
|
|
6060
|
+
function Hl(e) {
|
|
5912
6061
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : U();
|
|
5913
6062
|
}
|
|
5914
|
-
function
|
|
6063
|
+
function Ul(e) {
|
|
5915
6064
|
let t = W(e), n = t.eventsExpiresAt, r = q(t.nextAfter);
|
|
5916
6065
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? U() : {
|
|
5917
6066
|
done: t.done,
|
|
5918
|
-
events: t.events.map(
|
|
6067
|
+
events: t.events.map(Vl),
|
|
5919
6068
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
5920
6069
|
historyComplete: t.historyComplete,
|
|
5921
6070
|
nextAfter: r,
|
|
@@ -5924,10 +6073,10 @@ function Ol(e) {
|
|
|
5924
6073
|
};
|
|
5925
6074
|
}
|
|
5926
6075
|
var $ = encodeURIComponent;
|
|
5927
|
-
function
|
|
5928
|
-
return `${e}-${
|
|
6076
|
+
function Wl(e) {
|
|
6077
|
+
return `${e}-${Bl()}`;
|
|
5929
6078
|
}
|
|
5930
|
-
var
|
|
6079
|
+
var Gl = class {
|
|
5931
6080
|
constructor(e) {
|
|
5932
6081
|
this.requestControl = e;
|
|
5933
6082
|
}
|
|
@@ -5935,20 +6084,48 @@ var Al = class {
|
|
|
5935
6084
|
let t = new URLSearchParams();
|
|
5936
6085
|
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));
|
|
5937
6086
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
5938
|
-
return
|
|
6087
|
+
return Pc(await this.request(`/v1/flows${n}`));
|
|
6088
|
+
}
|
|
6089
|
+
async listEventSources(e, t) {
|
|
6090
|
+
return Hs(await this.request("/v1/event-sources" + (e == null ? "" : `?flowId=${$(e)}`), { signal: t }));
|
|
6091
|
+
}
|
|
6092
|
+
async listEventSourceConnections(e, t) {
|
|
6093
|
+
let n = W(await this.request(`/v1/event-sources/connections${e == null ? "" : `?teamId=${$(e)}`}`, { signal: t }));
|
|
6094
|
+
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(xc);
|
|
6095
|
+
}
|
|
6096
|
+
async createEventSource(e) {
|
|
6097
|
+
return Vs(await this.request("/v1/event-sources", {
|
|
6098
|
+
method: "POST",
|
|
6099
|
+
body: JSON.stringify(e)
|
|
6100
|
+
}));
|
|
6101
|
+
}
|
|
6102
|
+
async updateEventSource(e, t) {
|
|
6103
|
+
return Vs(await this.request(`/v1/event-sources/${$(e)}`, {
|
|
6104
|
+
method: "PUT",
|
|
6105
|
+
body: JSON.stringify(t)
|
|
6106
|
+
}));
|
|
6107
|
+
}
|
|
6108
|
+
async deleteEventSource(e, t) {
|
|
6109
|
+
await this.request(`/v1/event-sources/${$(e)}`, {
|
|
6110
|
+
method: "DELETE",
|
|
6111
|
+
body: JSON.stringify({
|
|
6112
|
+
version: 1,
|
|
6113
|
+
expectedRevision: t
|
|
6114
|
+
})
|
|
6115
|
+
});
|
|
5939
6116
|
}
|
|
5940
6117
|
async listVariables() {
|
|
5941
6118
|
let e = W(await this.request("/v1/variables"));
|
|
5942
6119
|
return K(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? U() : {
|
|
5943
|
-
variables: e.variables.map(
|
|
6120
|
+
variables: e.variables.map(Fc),
|
|
5944
6121
|
version: 1
|
|
5945
6122
|
};
|
|
5946
6123
|
}
|
|
5947
6124
|
async getVariable(e) {
|
|
5948
|
-
return
|
|
6125
|
+
return Fc(await this.request(`/v1/variables/${$(e)}`));
|
|
5949
6126
|
}
|
|
5950
6127
|
async putVariable(e, t) {
|
|
5951
|
-
return
|
|
6128
|
+
return Fc(await this.request(`/v1/variables/${$(e)}`, {
|
|
5952
6129
|
body: JSON.stringify({ value: t }),
|
|
5953
6130
|
method: "PUT"
|
|
5954
6131
|
}));
|
|
@@ -5957,8 +6134,8 @@ var Al = class {
|
|
|
5957
6134
|
let t = W(await this.request(`/v1/variables/${$(e)}`, { method: "DELETE" }));
|
|
5958
6135
|
if (K(t, ["version"]), t.version != 1) return U();
|
|
5959
6136
|
}
|
|
5960
|
-
async createFlow(e, t = `flow-${
|
|
5961
|
-
return
|
|
6137
|
+
async createFlow(e, t = `flow-${Bl()}`) {
|
|
6138
|
+
return Nc(await this.request("/v1/flows", {
|
|
5962
6139
|
body: JSON.stringify({
|
|
5963
6140
|
name: e,
|
|
5964
6141
|
version: 1
|
|
@@ -5968,10 +6145,10 @@ var Al = class {
|
|
|
5968
6145
|
}));
|
|
5969
6146
|
}
|
|
5970
6147
|
async getFlow(e) {
|
|
5971
|
-
return
|
|
6148
|
+
return Nc(await this.request(`/v1/flows/${$(e)}`));
|
|
5972
6149
|
}
|
|
5973
6150
|
async renameFlow(e, t) {
|
|
5974
|
-
return
|
|
6151
|
+
return Nc(await this.request(`/v1/flows/${$(e)}`, {
|
|
5975
6152
|
body: JSON.stringify({
|
|
5976
6153
|
name: t,
|
|
5977
6154
|
version: 1
|
|
@@ -5980,47 +6157,78 @@ var Al = class {
|
|
|
5980
6157
|
}));
|
|
5981
6158
|
}
|
|
5982
6159
|
async deleteFlow(e) {
|
|
5983
|
-
return
|
|
6160
|
+
return Nc(await this.request(`/v1/flows/${$(e)}`, { method: "DELETE" }));
|
|
5984
6161
|
}
|
|
5985
|
-
async listTriggerKeys(e) {
|
|
5986
|
-
let
|
|
5987
|
-
return
|
|
6162
|
+
async listTriggerKeys(e, t) {
|
|
6163
|
+
let n = W(await this.request(`/v1/trigger-keys${t == null ? "" : `?locale=${encodeURIComponent(t)}`}`, { signal: e }));
|
|
6164
|
+
return n.version != 1 || !Array.isArray(n.keys) ? U() : n.keys.map(Js);
|
|
5988
6165
|
}
|
|
5989
6166
|
async listTriggerDefinitions(e) {
|
|
5990
6167
|
let t = W(await this.request("/v1/trigger-keys/catalog", { signal: e }));
|
|
5991
|
-
return t.version != 1 || !Array.isArray(t.definitions) ? U() : t.definitions.map(
|
|
6168
|
+
return t.version != 1 || !Array.isArray(t.definitions) ? U() : t.definitions.map(Ys);
|
|
6169
|
+
}
|
|
6170
|
+
async readCatalog(e, t, n) {
|
|
6171
|
+
let r = new Headers();
|
|
6172
|
+
t && r.set("if-none-match", t);
|
|
6173
|
+
let i = await this.response(e.path, {
|
|
6174
|
+
headers: r,
|
|
6175
|
+
signal: n
|
|
6176
|
+
}, !0), a = i.headers.get("etag")?.trim() || null;
|
|
6177
|
+
return i.status == 304 ? {
|
|
6178
|
+
modified: !1,
|
|
6179
|
+
etag: a
|
|
6180
|
+
} : {
|
|
6181
|
+
modified: !0,
|
|
6182
|
+
data: e.decode(await i.json()),
|
|
6183
|
+
etag: a
|
|
6184
|
+
};
|
|
6185
|
+
}
|
|
6186
|
+
async getTriggerCatalog(e, t, n) {
|
|
6187
|
+
let r = new Headers();
|
|
6188
|
+
t?.etag && r.set("if-none-match", t.etag);
|
|
6189
|
+
let i = await this.response(`/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`, {
|
|
6190
|
+
headers: r,
|
|
6191
|
+
signal: n
|
|
6192
|
+
}, !0);
|
|
6193
|
+
return i.status == 304 ? t == null ? U() : {
|
|
6194
|
+
...t,
|
|
6195
|
+
etag: i.headers.get("etag")?.trim() || t.etag
|
|
6196
|
+
} : {
|
|
6197
|
+
data: ic(await i.json()),
|
|
6198
|
+
etag: i.headers.get("etag")?.trim() || null
|
|
6199
|
+
};
|
|
5992
6200
|
}
|
|
5993
6201
|
async getTriggerKey(e, t) {
|
|
5994
6202
|
let n = W(await this.request(`/v1/trigger-keys/${$(e)}`, { signal: t }));
|
|
5995
|
-
return n.version == 1 ?
|
|
6203
|
+
return n.version == 1 ? Ys(n.definition) : U();
|
|
5996
6204
|
}
|
|
5997
6205
|
async listFlowTriggerBindings(e, t) {
|
|
5998
6206
|
let n = W(await this.request(`/v1/flows/${$(e)}/triggers`, { signal: t }));
|
|
5999
|
-
return n.version != 1 || G(n.flowId) != e || !Array.isArray(n.bindings) ? U() : n.bindings.map(
|
|
6207
|
+
return n.version != 1 || G(n.flowId) != e || !Array.isArray(n.bindings) ? U() : n.bindings.map($s);
|
|
6000
6208
|
}
|
|
6001
6209
|
async getFlowTriggerBinding(e, t) {
|
|
6002
|
-
return
|
|
6210
|
+
return ec(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}`));
|
|
6003
6211
|
}
|
|
6004
6212
|
async listFlowTriggerActivities(e, t, n = {}) {
|
|
6005
6213
|
let r = new URLSearchParams();
|
|
6006
6214
|
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
6007
6215
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6008
|
-
return
|
|
6216
|
+
return nc(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}/activities${i}`));
|
|
6009
6217
|
}
|
|
6010
6218
|
async pauseFlowTrigger(e, t) {
|
|
6011
|
-
return
|
|
6219
|
+
return $s(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}/pause`, {
|
|
6012
6220
|
body: JSON.stringify({ version: 1 }),
|
|
6013
6221
|
method: "POST"
|
|
6014
6222
|
}));
|
|
6015
6223
|
}
|
|
6016
6224
|
async resumeFlowTrigger(e, t) {
|
|
6017
|
-
return
|
|
6225
|
+
return $s(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}/resume`, {
|
|
6018
6226
|
body: JSON.stringify({ version: 1 }),
|
|
6019
6227
|
method: "POST"
|
|
6020
6228
|
}));
|
|
6021
6229
|
}
|
|
6022
6230
|
async testFlowPollTrigger(e, t) {
|
|
6023
|
-
return
|
|
6231
|
+
return rc(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}/test`, {
|
|
6024
6232
|
body: JSON.stringify({ version: 1 }),
|
|
6025
6233
|
method: "POST"
|
|
6026
6234
|
}));
|
|
@@ -6035,69 +6243,93 @@ var Al = class {
|
|
|
6035
6243
|
"version"
|
|
6036
6244
|
]), t.version != 1) return U();
|
|
6037
6245
|
let n = {
|
|
6038
|
-
flow:
|
|
6039
|
-
draft:
|
|
6040
|
-
live:
|
|
6041
|
-
presentation:
|
|
6246
|
+
flow: Nc(t.flow),
|
|
6247
|
+
draft: Dl(t.draft),
|
|
6248
|
+
live: Rc(t.live),
|
|
6249
|
+
presentation: Ol(t.presentation),
|
|
6042
6250
|
version: 1
|
|
6043
6251
|
};
|
|
6044
6252
|
return n.flow.flowId != e || n.draft.flowId != e || n.live.flowId != e || n.flow.draftRevisionId != n.draft.revisionId ? U() : n;
|
|
6045
6253
|
}
|
|
6046
6254
|
async getPresentation(e) {
|
|
6047
|
-
return
|
|
6255
|
+
return Ol(await this.request(`/v1/flows/${$(e)}/presentation`));
|
|
6048
6256
|
}
|
|
6049
6257
|
async getDraft(e) {
|
|
6050
|
-
return
|
|
6258
|
+
return Dl(await this.request(`/v1/flows/${$(e)}/draft`));
|
|
6051
6259
|
}
|
|
6052
6260
|
async syncDraft(e) {
|
|
6053
|
-
return
|
|
6261
|
+
return Al(await this.request(`/v1/flows/${$(e)}/draft/sync`));
|
|
6054
6262
|
}
|
|
6055
6263
|
async getRevision(e, t) {
|
|
6056
|
-
return
|
|
6264
|
+
return Dl(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}`));
|
|
6265
|
+
}
|
|
6266
|
+
async listTriggerConfigOptions(e, t, n, r) {
|
|
6267
|
+
let i = W(await this.request(`/v1/flows/${$(e)}/triggers/${$(t)}/options/${$(n)}`, { signal: r }));
|
|
6268
|
+
return K(i, ["options", "version"]), i.version != 1 || !Array.isArray(i.options) || i.options.length > 1e3 ? U() : i.options.map((e) => {
|
|
6269
|
+
let t = W(e);
|
|
6270
|
+
K(t, [
|
|
6271
|
+
"value",
|
|
6272
|
+
"label",
|
|
6273
|
+
...t.color == null ? [] : ["color"]
|
|
6274
|
+
]);
|
|
6275
|
+
let n = t.color == null ? void 0 : G(t.color);
|
|
6276
|
+
return n != null && !/^#[0-9a-fA-F]{6}$/.test(n) ? U() : n == null ? {
|
|
6277
|
+
value: G(t.value),
|
|
6278
|
+
label: G(t.label)
|
|
6279
|
+
} : {
|
|
6280
|
+
value: G(t.value),
|
|
6281
|
+
label: G(t.label),
|
|
6282
|
+
color: n
|
|
6283
|
+
};
|
|
6284
|
+
});
|
|
6057
6285
|
}
|
|
6058
|
-
async listConnectorProviders(e, t) {
|
|
6059
|
-
let
|
|
6060
|
-
return
|
|
6286
|
+
async listConnectorProviders(e, t, n) {
|
|
6287
|
+
let r = kc(t, n);
|
|
6288
|
+
return this.connectorRequest(r.path, "providers", e, r.decode);
|
|
6061
6289
|
}
|
|
6062
|
-
async listConnectorActions(e, t, n) {
|
|
6290
|
+
async listConnectorActions(e, t, n, r) {
|
|
6063
6291
|
return await this.connectorActions({
|
|
6292
|
+
...r == null ? {} : { locale: r },
|
|
6064
6293
|
...n == null ? {} : { flowId: n },
|
|
6065
6294
|
...e == null ? {} : { service: e }
|
|
6066
6295
|
}, t);
|
|
6067
6296
|
}
|
|
6068
|
-
async searchConnectorActions(e, t, n) {
|
|
6297
|
+
async searchConnectorActions(e, t, n, r) {
|
|
6069
6298
|
return await this.connectorActions({
|
|
6299
|
+
...r == null ? {} : { locale: r },
|
|
6070
6300
|
...n == null ? {} : { flowId: n },
|
|
6071
6301
|
q: e.trim()
|
|
6072
6302
|
}, t);
|
|
6073
6303
|
}
|
|
6074
|
-
async getConnectorAction(e, t, n) {
|
|
6075
|
-
let
|
|
6076
|
-
return
|
|
6304
|
+
async getConnectorAction(e, t, n, r, i = !1) {
|
|
6305
|
+
let a = Ac(e, n, r);
|
|
6306
|
+
return this.connectorRequest(a.path, "actions", t, a.decode, i);
|
|
6077
6307
|
}
|
|
6078
|
-
async
|
|
6079
|
-
let r =
|
|
6080
|
-
return
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6308
|
+
async listAllConnectorConnections(e, t, n = !1) {
|
|
6309
|
+
let r = jc(t);
|
|
6310
|
+
return this.connectorRequest(r.path, "connections", e, r.decode, n);
|
|
6311
|
+
}
|
|
6312
|
+
async listConnectorConnections(e, t, n, r = !1) {
|
|
6313
|
+
let i = Mc(e, n);
|
|
6314
|
+
return this.connectorRequest(i.path, "connections", t, i.decode, r);
|
|
6085
6315
|
}
|
|
6086
|
-
async createConnectorConnectionPage(e, t) {
|
|
6087
|
-
let
|
|
6316
|
+
async createConnectorConnectionPage(e, t, n) {
|
|
6317
|
+
let r = new URLSearchParams();
|
|
6318
|
+
t != null && r.set("flowId", t), n != null && r.set("teamId", n);
|
|
6319
|
+
let i = W(await this.request(`/v1/connector/connections/${$(e)}/page${r.size == 0 ? "" : `?${r}`}`, {
|
|
6088
6320
|
body: JSON.stringify({ version: 1 }),
|
|
6089
6321
|
method: "POST"
|
|
6090
6322
|
}));
|
|
6091
|
-
if (K(
|
|
6323
|
+
if (K(i, ["url", "version"]), i.version != 1) return U();
|
|
6092
6324
|
try {
|
|
6093
|
-
let e = new URL(G(
|
|
6325
|
+
let e = new URL(G(i.url));
|
|
6094
6326
|
return e.protocol != "http:" && e.protocol != "https:" ? U() : e.href;
|
|
6095
6327
|
} catch {
|
|
6096
6328
|
return U();
|
|
6097
6329
|
}
|
|
6098
6330
|
}
|
|
6099
|
-
async changeDraft(e, t, n, r =
|
|
6100
|
-
return
|
|
6331
|
+
async changeDraft(e, t, n, r = Wl("change")) {
|
|
6332
|
+
return kl(await this.request(`/v1/flows/${$(e)}/draft/changes`, {
|
|
6101
6333
|
body: JSON.stringify({
|
|
6102
6334
|
expectedRevisionId: t,
|
|
6103
6335
|
operations: n,
|
|
@@ -6108,7 +6340,7 @@ var Al = class {
|
|
|
6108
6340
|
}));
|
|
6109
6341
|
}
|
|
6110
6342
|
async checkFlow(e, t) {
|
|
6111
|
-
return
|
|
6343
|
+
return bc(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}/check`, {
|
|
6112
6344
|
body: JSON.stringify({
|
|
6113
6345
|
engineContract: "open-flow-engine/v2",
|
|
6114
6346
|
version: 1
|
|
@@ -6117,42 +6349,42 @@ var Al = class {
|
|
|
6117
6349
|
}));
|
|
6118
6350
|
}
|
|
6119
6351
|
async getLive(e, t) {
|
|
6120
|
-
return
|
|
6352
|
+
return Rc(await this.request(`/v1/flows/${$(e)}/live`, { signal: t }));
|
|
6121
6353
|
}
|
|
6122
6354
|
async listPublications(e, t = {}, n) {
|
|
6123
6355
|
let r = new URLSearchParams();
|
|
6124
6356
|
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));
|
|
6125
6357
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6126
|
-
return
|
|
6358
|
+
return zc(await this.request(`/v1/flows/${$(e)}/publications${i}`, { signal: n }));
|
|
6127
6359
|
}
|
|
6128
6360
|
async createDraftRun(e, t, n) {
|
|
6129
|
-
let r =
|
|
6361
|
+
let r = Fl(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}/runs`, {
|
|
6130
6362
|
body: JSON.stringify({
|
|
6131
6363
|
engineContract: "open-flow-engine/v2",
|
|
6132
6364
|
inputs: n.inputs ?? {},
|
|
6133
6365
|
trigger: n.trigger,
|
|
6134
6366
|
version: 1
|
|
6135
6367
|
}),
|
|
6136
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
6368
|
+
headers: { "idempotency-key": n.idempotencyKey ?? Wl("run") },
|
|
6137
6369
|
method: "POST"
|
|
6138
6370
|
}));
|
|
6139
6371
|
return r.source == "draft" ? r : U();
|
|
6140
6372
|
}
|
|
6141
6373
|
async createLiveRun(e, t) {
|
|
6142
|
-
let n =
|
|
6374
|
+
let n = Fl(await this.request("/v1/runs", {
|
|
6143
6375
|
body: JSON.stringify({
|
|
6144
6376
|
inputs: t.inputs ?? {},
|
|
6145
6377
|
trigger: t.trigger,
|
|
6146
6378
|
publicationId: e,
|
|
6147
6379
|
version: 1
|
|
6148
6380
|
}),
|
|
6149
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
6381
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Wl("run") },
|
|
6150
6382
|
method: "POST"
|
|
6151
6383
|
}));
|
|
6152
6384
|
return n.source == "live" ? n : U();
|
|
6153
6385
|
}
|
|
6154
6386
|
async setFlowEnabled(e, t, n) {
|
|
6155
|
-
return
|
|
6387
|
+
return Nc(await this.request(`/v1/flows/${$(e)}/enabled`, {
|
|
6156
6388
|
method: "PUT",
|
|
6157
6389
|
body: JSON.stringify({
|
|
6158
6390
|
enabled: n,
|
|
@@ -6162,65 +6394,65 @@ var Al = class {
|
|
|
6162
6394
|
}));
|
|
6163
6395
|
}
|
|
6164
6396
|
async publishFlow(e, t, n, r = {}) {
|
|
6165
|
-
return
|
|
6397
|
+
return Lc(await this.request(`/v1/flows/${$(e)}/revisions/${$(t)}/publications`, {
|
|
6166
6398
|
body: JSON.stringify({
|
|
6167
6399
|
engineContract: "open-flow-engine/v2",
|
|
6168
6400
|
expectedLivePublicationId: n,
|
|
6169
6401
|
version: 1
|
|
6170
6402
|
}),
|
|
6171
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6403
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Wl("publication") },
|
|
6172
6404
|
method: "POST"
|
|
6173
6405
|
}));
|
|
6174
6406
|
}
|
|
6175
6407
|
async getPublishOperation(e, t, n) {
|
|
6176
|
-
return
|
|
6408
|
+
return Lc(await this.request(`/v1/flows/${$(e)}/publish-operations/${$(t)}`, { signal: n }));
|
|
6177
6409
|
}
|
|
6178
6410
|
async rollbackFlow(e, t, n, r = {}) {
|
|
6179
|
-
return
|
|
6411
|
+
return Ic(await this.request(`/v1/flows/${$(e)}/publications/${$(t)}/rollback`, {
|
|
6180
6412
|
body: JSON.stringify({
|
|
6181
6413
|
expectedLivePublicationId: n,
|
|
6182
6414
|
version: 1
|
|
6183
6415
|
}),
|
|
6184
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6416
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Wl("publication") },
|
|
6185
6417
|
method: "POST"
|
|
6186
6418
|
}));
|
|
6187
6419
|
}
|
|
6188
6420
|
async getRun(e, t) {
|
|
6189
|
-
return
|
|
6421
|
+
return Fl(await this.request(`/v1/runs/${$(e)}`, { signal: t }));
|
|
6190
6422
|
}
|
|
6191
6423
|
async listRuns(e, t = {}) {
|
|
6192
6424
|
let n = new URLSearchParams();
|
|
6193
6425
|
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);
|
|
6194
6426
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
6195
|
-
return
|
|
6427
|
+
return Il(await this.request(`/v1/flows/${$(e)}/runs${r}`));
|
|
6196
6428
|
}
|
|
6197
6429
|
async getRunEvents(e, t = {}, n) {
|
|
6198
6430
|
let r = new URLSearchParams();
|
|
6199
6431
|
t.after != null && r.set("after", String(t.after)), t.limit != null && r.set("limit", String(t.limit));
|
|
6200
6432
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6201
|
-
return
|
|
6433
|
+
return Ul(await this.request(`/v1/runs/${$(e)}/events${i}`, { signal: n }));
|
|
6202
6434
|
}
|
|
6203
6435
|
async listRunResults(e, t, n) {
|
|
6204
|
-
return
|
|
6436
|
+
return pc(await this.request(`/v1/runs/${$(e)}/results${t == null ? "" : `?after=${encodeURIComponent(t)}`}`, { signal: n }));
|
|
6205
6437
|
}
|
|
6206
6438
|
async readRunResult(e, t, n = {}, r) {
|
|
6207
6439
|
let i = new URLSearchParams(Object.entries(n).map(([e, t]) => [e, String(t)]));
|
|
6208
|
-
return
|
|
6440
|
+
return mc(await this.request(`/v1/runs/${$(e)}/results/${$(t)}?${i}`, { signal: r }));
|
|
6209
6441
|
}
|
|
6210
6442
|
async downloadRunResult(e, t, n) {
|
|
6211
6443
|
return (await this.response(`/v1/runs/${$(e)}/results/${$(t)}/content`, { signal: n })).blob();
|
|
6212
6444
|
}
|
|
6213
6445
|
async getRunResult(e, t) {
|
|
6214
|
-
return
|
|
6446
|
+
return zl(await this.request(`/v1/runs/${$(e)}/result`, { signal: t }));
|
|
6215
6447
|
}
|
|
6216
6448
|
async cancelRun(e) {
|
|
6217
|
-
return
|
|
6449
|
+
return Ll(await this.request(`/v1/runs/${$(e)}/cancel`, {
|
|
6218
6450
|
body: JSON.stringify({ version: 1 }),
|
|
6219
6451
|
method: "POST"
|
|
6220
6452
|
}));
|
|
6221
6453
|
}
|
|
6222
6454
|
async resolveRunWait(e, t, n) {
|
|
6223
|
-
return
|
|
6455
|
+
return Rl(await this.request(`/v1/runs/${$(e)}/waits/${$(t)}/resolve`, {
|
|
6224
6456
|
body: JSON.stringify({
|
|
6225
6457
|
action: n,
|
|
6226
6458
|
version: 1
|
|
@@ -6229,27 +6461,33 @@ var Al = class {
|
|
|
6229
6461
|
}));
|
|
6230
6462
|
}
|
|
6231
6463
|
async connectorActions(e, t) {
|
|
6232
|
-
let n = Object.entries(e).map(([e, t]) => `${$(e)}=${$(t)}`).join("&"), r = n == "" ? "" : `?${n}
|
|
6233
|
-
return
|
|
6464
|
+
let n = Object.entries(e).map(([e, t]) => `${$(e)}=${$(t)}`).join("&"), r = n == "" ? "" : `?${n}`;
|
|
6465
|
+
return this.connectorRequest(`/v1/connector/actions${r}`, "actions", t, (e) => {
|
|
6466
|
+
let t = W(e);
|
|
6467
|
+
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(Ec);
|
|
6468
|
+
});
|
|
6469
|
+
}
|
|
6470
|
+
async connectorRequest(e, t, n, r, i = !1) {
|
|
6471
|
+
return r(await this.request(e, { signal: n }));
|
|
6234
6472
|
}
|
|
6235
|
-
async response(e, t) {
|
|
6236
|
-
let
|
|
6237
|
-
t.body != null &&
|
|
6238
|
-
let
|
|
6473
|
+
async response(e, t, n = !1) {
|
|
6474
|
+
let r = new Headers(t.headers);
|
|
6475
|
+
t.body != null && r.set("content-type", "application/json");
|
|
6476
|
+
let i = await this.requestControl(e, {
|
|
6239
6477
|
...t,
|
|
6240
|
-
headers:
|
|
6478
|
+
headers: r
|
|
6241
6479
|
});
|
|
6242
|
-
if (!
|
|
6480
|
+
if (!i.ok && !(n && i.status == 304)) {
|
|
6243
6481
|
let e;
|
|
6244
6482
|
try {
|
|
6245
|
-
e = await
|
|
6483
|
+
e = await i.json();
|
|
6246
6484
|
} catch {
|
|
6247
6485
|
return U();
|
|
6248
6486
|
}
|
|
6249
6487
|
let t = W(e).error, n = t == null ? void 0 : W(t);
|
|
6250
|
-
throw new
|
|
6488
|
+
throw new Ks(i.status, typeof n?.code == "string" ? n.code : "request.failed", typeof n?.message == "string" ? n.message : `Request failed with status ${i.status}.`);
|
|
6251
6489
|
}
|
|
6252
|
-
return
|
|
6490
|
+
return i;
|
|
6253
6491
|
}
|
|
6254
6492
|
async request(e, t = {}) {
|
|
6255
6493
|
let n = await this.response(e, t);
|
|
@@ -6261,4 +6499,4 @@ var Al = class {
|
|
|
6261
6499
|
}
|
|
6262
6500
|
};
|
|
6263
6501
|
//#endregion
|
|
6264
|
-
export {
|
|
6502
|
+
export { Ks as ApiError, Gl as ControlClient, H as controlErrorCode, Gs as controlErrorMetadata, Vs as decodeEventSource, Hs as decodeEventSources, pc as decodeResultList, mc as decodeResultRead, Vl as decodeRunEvent, ic as decodeTriggerCatalog, fc as parseResultQuery, vc as readResult };
|