@oomol-lab/open-flow 0.1.0-beta.25 → 0.1.0-beta.27
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-DNgEsFmG.js → createResourceDialog-BwI2JmPE.js} +1 -1
- package/dist/browser/flow-change.d.ts +14 -0
- package/dist/browser/flow-change.js +38 -17
- package/dist/browser/{flowChanges-CfvUDu1U.js → flowChanges-DhEjA0n5.js} +2210 -2302
- package/dist/browser/{flowWorkspace-BsMrs6KT.js → flowWorkspace-zcweMsLS.js} +31856 -31817
- package/dist/browser/{inputValues-BXC9GGGa.js → inputValues-C5ExCCf0.js} +1 -1
- package/dist/browser/{switch-Db5aHXHa.js → switch-CyZ96-UF.js} +835 -512
- package/dist/browser/theme.css +22 -0
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +340 -340
- package/dist/browser/{workbenchSelect-CXeaZhuN.js → workbenchSelect-BUu7CjUA.js} +127 -104
- package/dist/common/control-api-conformance.js +1 -1
- package/dist/common/control-api.d.ts +2 -0
- package/dist/common/control-api.js +1780 -1750
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-graph.d.ts +25 -3
- package/dist/common/flow-schema.d.ts +11 -1
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +1460 -1374
- package/dist/common/mcp.js +285 -256
- package/dist/common/runtime-contract.d.ts +2 -0
- package/dist/common/runtime-contract.js +96 -32
- package/dist/common/scheduler.js +98 -128
- package/package.json +1 -1
package/dist/common/mcp.js
CHANGED
|
@@ -4913,7 +4913,30 @@ j(P([...new Map(Object.entries(Bc).map(([e, t]) => [e, t instanceof E ? t : M({
|
|
|
4913
4913
|
kind: L(e),
|
|
4914
4914
|
...t
|
|
4915
4915
|
})])).values()])).min(1);
|
|
4916
|
-
|
|
4916
|
+
//#endregion
|
|
4917
|
+
//#region src/flow/common/change.ts
|
|
4918
|
+
var Vc = /* @__PURE__ */ new Set([
|
|
4919
|
+
"const",
|
|
4920
|
+
"enum",
|
|
4921
|
+
"exclusiveMaximum",
|
|
4922
|
+
"exclusiveMinimum",
|
|
4923
|
+
"maximum",
|
|
4924
|
+
"maxItems",
|
|
4925
|
+
"maxLength",
|
|
4926
|
+
"maxProperties",
|
|
4927
|
+
"minimum",
|
|
4928
|
+
"minItems",
|
|
4929
|
+
"minLength",
|
|
4930
|
+
"minProperties",
|
|
4931
|
+
"multipleOf",
|
|
4932
|
+
"pattern",
|
|
4933
|
+
"required",
|
|
4934
|
+
"type"
|
|
4935
|
+
]);
|
|
4936
|
+
function Hc(e) {
|
|
4937
|
+
return Vc.has(e);
|
|
4938
|
+
}
|
|
4939
|
+
function Uc(e) {
|
|
4917
4940
|
let t = e.trim();
|
|
4918
4941
|
if (t.length == 0) return "empty";
|
|
4919
4942
|
if (t.length > 80) return "tooLong";
|
|
@@ -4925,23 +4948,23 @@ function Vc(e) {
|
|
|
4925
4948
|
}
|
|
4926
4949
|
//#endregion
|
|
4927
4950
|
//#region src/control/common/resultQuery.ts
|
|
4928
|
-
var
|
|
4951
|
+
var Wc = N({
|
|
4929
4952
|
pointer: D().max(4096).default(""),
|
|
4930
4953
|
offset: k().int().nonnegative().default(0),
|
|
4931
4954
|
limit: k().int().min(1).max(100).default(20),
|
|
4932
4955
|
maxBytes: k().int().min(1).max(1048576).default(15e3)
|
|
4933
|
-
}),
|
|
4956
|
+
}), Gc = D().min(1).max(256), Kc = D().regex(/^[a-z][a-z0-9_.]{0,127}$/), qc = D().trim().min(1).max(128), Jc = N({
|
|
4934
4957
|
version: L(1),
|
|
4935
|
-
sourceId:
|
|
4958
|
+
sourceId: Gc,
|
|
4936
4959
|
revision: fs().positive(),
|
|
4937
|
-
name:
|
|
4960
|
+
name: qc,
|
|
4938
4961
|
provider: I(["feishu", "feishu_app_bot"]),
|
|
4939
|
-
appId:
|
|
4940
|
-
tenantKey:
|
|
4941
|
-
connectionId:
|
|
4942
|
-
teamId:
|
|
4962
|
+
appId: Gc,
|
|
4963
|
+
tenantKey: Gc,
|
|
4964
|
+
connectionId: Gc,
|
|
4965
|
+
teamId: Gc.nullable(),
|
|
4943
4966
|
enabled: A(),
|
|
4944
|
-
eventTypes: j(
|
|
4967
|
+
eventTypes: j(Kc),
|
|
4945
4968
|
manageSubscriptions: A(),
|
|
4946
4969
|
verificationTokenConfigured: A(),
|
|
4947
4970
|
encryptKeyConfigured: A(),
|
|
@@ -4950,22 +4973,22 @@ var Hc = N({
|
|
|
4950
4973
|
lastReceivedAt: D().nullable(),
|
|
4951
4974
|
updatedAt: D(),
|
|
4952
4975
|
consumers: j(N({
|
|
4953
|
-
flowId:
|
|
4976
|
+
flowId: Gc,
|
|
4954
4977
|
flowName: D(),
|
|
4955
|
-
triggerNodeId:
|
|
4978
|
+
triggerNodeId: Gc
|
|
4956
4979
|
}))
|
|
4957
4980
|
});
|
|
4958
|
-
function
|
|
4959
|
-
return
|
|
4981
|
+
function Yc(e) {
|
|
4982
|
+
return Jc.parse(e);
|
|
4960
4983
|
}
|
|
4961
|
-
function
|
|
4984
|
+
function Xc(e) {
|
|
4962
4985
|
return N({
|
|
4963
4986
|
version: L(1),
|
|
4964
|
-
sources: j(
|
|
4965
|
-
teamId:
|
|
4987
|
+
sources: j(Jc),
|
|
4988
|
+
teamId: Gc.nullable().optional()
|
|
4966
4989
|
}).parse(e);
|
|
4967
4990
|
}
|
|
4968
|
-
var
|
|
4991
|
+
var Zc = new Map([
|
|
4969
4992
|
"en",
|
|
4970
4993
|
"zh-CN",
|
|
4971
4994
|
"zh-TW",
|
|
@@ -4974,8 +4997,8 @@ var Yc = new Map([
|
|
|
4974
4997
|
"ru",
|
|
4975
4998
|
"fr"
|
|
4976
4999
|
].map((e) => [e.toLowerCase(), e]));
|
|
4977
|
-
function
|
|
4978
|
-
return typeof e == "string" &&
|
|
5000
|
+
function Qc(e) {
|
|
5001
|
+
return typeof e == "string" && Zc.get(e.toLowerCase()) == e;
|
|
4979
5002
|
}
|
|
4980
5003
|
//#endregion
|
|
4981
5004
|
//#region src/control/common/errors.ts
|
|
@@ -5022,7 +5045,7 @@ var H = {
|
|
|
5022
5045
|
variableNotFound: "variable.not-found"
|
|
5023
5046
|
};
|
|
5024
5047
|
H.eventSourceInvalid, H.eventSourceIdentityUnavailable, H.eventSourceNotFound, H.eventSourceConflict, H.authenticationRequired, H.authorizationDenied, H.bindingUnresolved, H.connectorActionNotFound, H.connectorUnconfigured, H.connectorUnavailable, H.connectorConsoleUnconfigured, H.engineUnavailable, H.engineUnsupported, H.flowInvalid, H.flowNotFound, H.flowBusy, H.flowConflict, H.flowPresentationConflict, H.flowRevisionConflict, H.liveConflict, H.liveNotFound, H.pageInvalidCursor, H.publicationConflict, H.publicationNotFound, H.publicationUnsupported, H.publishOperationNotFound, H.routeNotFound, H.runConflict, H.runEventsExpired, H.runInvalid, H.runNotFound, H.runNotTerminal, H.runOverloaded, H.runWaitNotFound, H.triggerKeyInvalid, H.triggerKeyNotFound, H.triggerNotFound, H.variableInvalid, H.variableLimitReached, H.variableNotFound;
|
|
5025
|
-
var
|
|
5048
|
+
var $c = class extends Error {
|
|
5026
5049
|
constructor(e, t, n) {
|
|
5027
5050
|
super(n), this.code = t, this.name = "ApiError", this.status = e;
|
|
5028
5051
|
}
|
|
@@ -5030,7 +5053,7 @@ var Zc = class extends Error {
|
|
|
5030
5053
|
//#endregion
|
|
5031
5054
|
//#region src/control/common/decoding.ts
|
|
5032
5055
|
function U() {
|
|
5033
|
-
throw new
|
|
5056
|
+
throw new $c(502, "response.invalid", "The Control API returned an invalid response.");
|
|
5034
5057
|
}
|
|
5035
5058
|
function W(e) {
|
|
5036
5059
|
return typeof e != "object" || !e || Array.isArray(e) ? U() : e;
|
|
@@ -5051,12 +5074,12 @@ function J(e) {
|
|
|
5051
5074
|
let t = W(e);
|
|
5052
5075
|
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, J(t)]));
|
|
5053
5076
|
}
|
|
5054
|
-
function
|
|
5077
|
+
function el(e) {
|
|
5055
5078
|
if (e != null) return G(e);
|
|
5056
5079
|
}
|
|
5057
5080
|
//#endregion
|
|
5058
5081
|
//#region src/control/common/triggerDecoders.ts
|
|
5059
|
-
function
|
|
5082
|
+
function tl(e) {
|
|
5060
5083
|
let t = W(e), n = t.type;
|
|
5061
5084
|
return n != "integration" && n != "poll" ? U() : {
|
|
5062
5085
|
description: typeof t.description == "string" ? t.description : U(),
|
|
@@ -5067,8 +5090,8 @@ function $c(e) {
|
|
|
5067
5090
|
type: n
|
|
5068
5091
|
};
|
|
5069
5092
|
}
|
|
5070
|
-
function
|
|
5071
|
-
let t = W(e), n =
|
|
5093
|
+
function nl(e) {
|
|
5094
|
+
let t = W(e), n = tl(t), r = {
|
|
5072
5095
|
configSchema: J(t.configSchema),
|
|
5073
5096
|
definitionVersion: q(t.definitionVersion),
|
|
5074
5097
|
description: n.description,
|
|
@@ -5111,18 +5134,18 @@ function el(e) {
|
|
|
5111
5134
|
type: "integration"
|
|
5112
5135
|
};
|
|
5113
5136
|
}
|
|
5114
|
-
var
|
|
5137
|
+
var rl = /* @__PURE__ */ new Set([
|
|
5115
5138
|
"cron",
|
|
5116
5139
|
"integration",
|
|
5117
5140
|
"poll",
|
|
5118
5141
|
"webhook"
|
|
5119
|
-
]),
|
|
5142
|
+
]), il = /* @__PURE__ */ new Set([
|
|
5120
5143
|
"failed",
|
|
5121
5144
|
"healthy",
|
|
5122
5145
|
"initializing",
|
|
5123
5146
|
"needs_reauth",
|
|
5124
5147
|
"suspended"
|
|
5125
|
-
]),
|
|
5148
|
+
]), al = /* @__PURE__ */ new Set([
|
|
5126
5149
|
"delivery.failed",
|
|
5127
5150
|
"health.failed",
|
|
5128
5151
|
"health.needs_reauth",
|
|
@@ -5131,11 +5154,11 @@ var tl = /* @__PURE__ */ new Set([
|
|
|
5131
5154
|
"operator.paused",
|
|
5132
5155
|
"operator.resumed"
|
|
5133
5156
|
]);
|
|
5134
|
-
function
|
|
5157
|
+
function ol(e) {
|
|
5135
5158
|
let t = W(e), n = t.health, r = t.listener == null ? void 0 : W(t.listener);
|
|
5136
5159
|
if (r != null && r.health != "healthy" && r.health != "failed" && r.health != "needs_reauth") return U();
|
|
5137
5160
|
let i = t.kind, a = t.operatorState, o = q(t.runtimeVersion);
|
|
5138
|
-
return t.version != 1 || typeof n != "string" || !
|
|
5161
|
+
return t.version != 1 || typeof n != "string" || !il.has(n) || typeof i != "string" || !rl.has(i) || a != "active" && a != "paused" || o <= 0 ? U() : {
|
|
5139
5162
|
...t.currentPublicationId == null ? {} : { currentPublicationId: G(t.currentPublicationId) },
|
|
5140
5163
|
...t.currentRevisionId == null ? {} : { currentRevisionId: G(t.currentRevisionId) },
|
|
5141
5164
|
...t.endpointUrl == null ? {} : { endpointUrl: G(t.endpointUrl) },
|
|
@@ -5154,17 +5177,17 @@ function il(e) {
|
|
|
5154
5177
|
version: 1
|
|
5155
5178
|
};
|
|
5156
5179
|
}
|
|
5157
|
-
function
|
|
5180
|
+
function sl(e) {
|
|
5158
5181
|
let t = W(e);
|
|
5159
5182
|
return t.version == 1 ? {
|
|
5160
|
-
binding:
|
|
5183
|
+
binding: ol(t.binding),
|
|
5161
5184
|
version: 1
|
|
5162
5185
|
} : U();
|
|
5163
5186
|
}
|
|
5164
|
-
function
|
|
5187
|
+
function cl(e) {
|
|
5165
5188
|
let t = W(e), n = t.kind;
|
|
5166
|
-
if (typeof n != "string" || !
|
|
5167
|
-
let r =
|
|
5189
|
+
if (typeof n != "string" || !al.has(n)) return U();
|
|
5190
|
+
let r = el(t.errorCode), i = el(t.errorMessage);
|
|
5168
5191
|
return i != null && i.length > 512 ? U() : {
|
|
5169
5192
|
activityId: G(t.activityId),
|
|
5170
5193
|
createdAt: G(t.createdAt),
|
|
@@ -5173,15 +5196,15 @@ function ol(e) {
|
|
|
5173
5196
|
kind: n
|
|
5174
5197
|
};
|
|
5175
5198
|
}
|
|
5176
|
-
function
|
|
5177
|
-
let t = W(e), n =
|
|
5199
|
+
function ll(e) {
|
|
5200
|
+
let t = W(e), n = el(t.nextCursor);
|
|
5178
5201
|
return t.version != 1 || !Array.isArray(t.activities) ? U() : {
|
|
5179
|
-
activities: t.activities.map(
|
|
5202
|
+
activities: t.activities.map(cl),
|
|
5180
5203
|
...n == null ? {} : { nextCursor: n },
|
|
5181
5204
|
version: 1
|
|
5182
5205
|
};
|
|
5183
5206
|
}
|
|
5184
|
-
function
|
|
5207
|
+
function ul(e) {
|
|
5185
5208
|
let t = W(e), n = q(t.filtered);
|
|
5186
5209
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.hasMore != "boolean" || n < 0 ? U() : {
|
|
5187
5210
|
events: t.events.map((e) => {
|
|
@@ -5195,15 +5218,15 @@ function cl(e) {
|
|
|
5195
5218
|
}
|
|
5196
5219
|
//#endregion
|
|
5197
5220
|
//#region src/control/common/triggerCatalog.ts
|
|
5198
|
-
function
|
|
5221
|
+
function dl(e) {
|
|
5199
5222
|
let t = W(e);
|
|
5200
5223
|
if (K(t, [
|
|
5201
5224
|
"version",
|
|
5202
5225
|
"locale",
|
|
5203
5226
|
"definitions",
|
|
5204
5227
|
"display"
|
|
5205
|
-
]), t.version != 1 || !
|
|
5206
|
-
let n = t.definitions.map(
|
|
5228
|
+
]), t.version != 1 || !Qc(t.locale) || !Array.isArray(t.definitions)) return U();
|
|
5229
|
+
let n = t.definitions.map(nl), r = W(t.display), i = new Set(n.map((e) => e.key));
|
|
5207
5230
|
if (i.size != n.length || Object.keys(r).length != i.size) return U();
|
|
5208
5231
|
let a = Object.fromEntries(n.map(({ key: e }) => {
|
|
5209
5232
|
let t = W(r[e]);
|
|
@@ -5221,7 +5244,7 @@ function ll(e) {
|
|
|
5221
5244
|
}
|
|
5222
5245
|
//#endregion
|
|
5223
5246
|
//#region src/control/common/results.ts
|
|
5224
|
-
var
|
|
5247
|
+
var fl = rc(), pl = N({
|
|
5225
5248
|
pointer: D(),
|
|
5226
5249
|
type: I([
|
|
5227
5250
|
"object",
|
|
@@ -5233,12 +5256,12 @@ var ul = rc(), dl = N({
|
|
|
5233
5256
|
]),
|
|
5234
5257
|
length: k().int().nonnegative().optional(),
|
|
5235
5258
|
complete: A(),
|
|
5236
|
-
value:
|
|
5237
|
-
}),
|
|
5259
|
+
value: fl.optional()
|
|
5260
|
+
}), ml = pl.extend({
|
|
5238
5261
|
offset: k().int().nonnegative(),
|
|
5239
5262
|
nextOffset: k().int().positive().optional(),
|
|
5240
|
-
entries: j(
|
|
5241
|
-
}),
|
|
5263
|
+
entries: j(pl).optional()
|
|
5264
|
+
}), hl = N({
|
|
5242
5265
|
resultId: D().min(1),
|
|
5243
5266
|
callId: D().min(1),
|
|
5244
5267
|
toolId: D().min(1),
|
|
@@ -5249,42 +5272,59 @@ var ul = rc(), dl = N({
|
|
|
5249
5272
|
bytes: k().int().nonnegative(),
|
|
5250
5273
|
digest: D().regex(/^[a-f0-9]{64}$/),
|
|
5251
5274
|
createdAt: D().datetime()
|
|
5252
|
-
}),
|
|
5275
|
+
}), gl = N({
|
|
5253
5276
|
version: L(1),
|
|
5254
5277
|
runId: D(),
|
|
5255
|
-
results: j(
|
|
5278
|
+
results: j(hl),
|
|
5256
5279
|
nextAfter: D().optional()
|
|
5257
|
-
}),
|
|
5280
|
+
}), _l = N({
|
|
5258
5281
|
version: L(1),
|
|
5259
5282
|
runId: D(),
|
|
5260
|
-
result:
|
|
5261
|
-
page:
|
|
5283
|
+
result: hl,
|
|
5284
|
+
page: ml
|
|
5262
5285
|
});
|
|
5263
|
-
function
|
|
5264
|
-
return
|
|
5286
|
+
function vl(e) {
|
|
5287
|
+
return gl.parse(e);
|
|
5265
5288
|
}
|
|
5266
|
-
function
|
|
5267
|
-
return
|
|
5289
|
+
function yl(e) {
|
|
5290
|
+
return _l.parse(e);
|
|
5268
5291
|
}
|
|
5269
5292
|
new TextEncoder();
|
|
5270
5293
|
//#endregion
|
|
5271
5294
|
//#region src/control/common/checkDecoders.ts
|
|
5272
|
-
function
|
|
5295
|
+
function bl(e) {
|
|
5296
|
+
return Array.isArray(e) ? e.map((e) => typeof e == "string" || Number.isSafeInteger(e) ? e : U()) : U();
|
|
5297
|
+
}
|
|
5298
|
+
function xl(e) {
|
|
5299
|
+
let t = W(e), n = G(t.kind);
|
|
5300
|
+
return n == "artifact" || n == "binary" || n == "nullable" ? { kind: n } : n == "schema" ? {
|
|
5301
|
+
kind: n,
|
|
5302
|
+
path: t.path == null ? void 0 : bl(t.path)
|
|
5303
|
+
} : n != "keyword" || typeof t.keyword != "string" || !Hc(t.keyword) ? U() : {
|
|
5304
|
+
kind: n,
|
|
5305
|
+
keyword: t.keyword,
|
|
5306
|
+
path: bl(t.path),
|
|
5307
|
+
source: t.source === void 0 ? void 0 : J(t.source),
|
|
5308
|
+
target: t.target === void 0 ? void 0 : J(t.target)
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5311
|
+
function Sl(e) {
|
|
5273
5312
|
let t = W(e), n = t.values == null ? void 0 : W(t.values);
|
|
5274
5313
|
return {
|
|
5275
5314
|
code: G(t.code),
|
|
5276
5315
|
column: q(t.column),
|
|
5277
5316
|
line: q(t.line),
|
|
5278
5317
|
message: G(t.message),
|
|
5318
|
+
mismatch: t.mismatch == null ? void 0 : xl(t.mismatch),
|
|
5279
5319
|
path: typeof t.path == "string" ? t.path : U(),
|
|
5280
5320
|
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : U()])) }
|
|
5281
5321
|
};
|
|
5282
5322
|
}
|
|
5283
|
-
function
|
|
5323
|
+
function Cl(e) {
|
|
5284
5324
|
let t = W(e);
|
|
5285
5325
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? U() : {
|
|
5286
5326
|
closureDigest: G(t.closureDigest),
|
|
5287
|
-
diagnostics: t.diagnostics.map(
|
|
5327
|
+
diagnostics: t.diagnostics.map(Sl),
|
|
5288
5328
|
engineContract: G(t.engineContract),
|
|
5289
5329
|
flowId: G(t.flowId),
|
|
5290
5330
|
modelVersion: q(t.modelVersion),
|
|
@@ -5296,7 +5336,7 @@ function yl(e) {
|
|
|
5296
5336
|
}
|
|
5297
5337
|
//#endregion
|
|
5298
5338
|
//#region src/control/common/connectorDecoders.ts
|
|
5299
|
-
function
|
|
5339
|
+
function wl(e) {
|
|
5300
5340
|
let t = W(e);
|
|
5301
5341
|
if (K(t, [
|
|
5302
5342
|
...Object.hasOwn(t, "providerAccountId") ? ["providerAccountId"] : [],
|
|
@@ -5320,7 +5360,7 @@ function bl(e) {
|
|
|
5320
5360
|
status: n
|
|
5321
5361
|
};
|
|
5322
5362
|
}
|
|
5323
|
-
function
|
|
5363
|
+
function Tl(e, t = !1) {
|
|
5324
5364
|
let n = W(e), r = n.description, i = t && Object.hasOwn(n, "value");
|
|
5325
5365
|
return K(n, [
|
|
5326
5366
|
"jsonSchema",
|
|
@@ -5334,13 +5374,13 @@ function xl(e, t = !1) {
|
|
|
5334
5374
|
...i ? { value: J(n.value) } : {}
|
|
5335
5375
|
};
|
|
5336
5376
|
}
|
|
5337
|
-
function
|
|
5338
|
-
return
|
|
5377
|
+
function El(e) {
|
|
5378
|
+
return Tl(e, !0);
|
|
5339
5379
|
}
|
|
5340
|
-
function
|
|
5380
|
+
function Dl(e, t) {
|
|
5341
5381
|
return Object.fromEntries(Object.entries(W(e)).map(([e, n]) => [e, t(n)]));
|
|
5342
5382
|
}
|
|
5343
|
-
function
|
|
5383
|
+
function Ol(e) {
|
|
5344
5384
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
5345
5385
|
return K(t, [
|
|
5346
5386
|
"actionId",
|
|
@@ -5365,23 +5405,23 @@ function wl(e) {
|
|
|
5365
5405
|
description: typeof t.description == "string" ? t.description : U(),
|
|
5366
5406
|
...n == null ? {} : { homepageUrl: n },
|
|
5367
5407
|
...r == null ? {} : { icon: r },
|
|
5368
|
-
inputs:
|
|
5408
|
+
inputs: Dl(t.inputs, El),
|
|
5369
5409
|
name: G(t.name),
|
|
5370
|
-
outputs:
|
|
5410
|
+
outputs: Dl(t.outputs, Tl),
|
|
5371
5411
|
serviceId: G(t.serviceId),
|
|
5372
5412
|
serviceName: G(t.serviceName)
|
|
5373
5413
|
};
|
|
5374
5414
|
}
|
|
5375
|
-
function
|
|
5376
|
-
let { defaultConnection: t, ...n } = W(e), r =
|
|
5415
|
+
function kl(e) {
|
|
5416
|
+
let { defaultConnection: t, ...n } = W(e), r = Ol(n);
|
|
5377
5417
|
if (t == null) return r;
|
|
5378
|
-
let i =
|
|
5418
|
+
let i = wl(t);
|
|
5379
5419
|
return i.serviceId != r.serviceId || i.status != "active" ? U() : {
|
|
5380
5420
|
...r,
|
|
5381
5421
|
defaultConnection: i
|
|
5382
5422
|
};
|
|
5383
5423
|
}
|
|
5384
|
-
function
|
|
5424
|
+
function Al(e) {
|
|
5385
5425
|
let t = W(e), n = t.homepageUrl, r = t.icon;
|
|
5386
5426
|
return t.noSetup !== void 0 && typeof t.noSetup != "boolean" || (K(t, [
|
|
5387
5427
|
...Object.hasOwn(t, "noSetup") ? ["noSetup"] : [],
|
|
@@ -5399,8 +5439,8 @@ function El(e) {
|
|
|
5399
5439
|
}
|
|
5400
5440
|
//#endregion
|
|
5401
5441
|
//#region src/control/common/connectorQueries.ts
|
|
5402
|
-
var
|
|
5403
|
-
function
|
|
5442
|
+
var jl = (e) => e == null ? "" : `?flowId=${encodeURIComponent(e)}`;
|
|
5443
|
+
function Ml(e, t) {
|
|
5404
5444
|
let n = new URLSearchParams({
|
|
5405
5445
|
...e == null ? {} : { flowId: e },
|
|
5406
5446
|
...t == null ? {} : { locale: t }
|
|
@@ -5409,11 +5449,11 @@ function Ol(e, t) {
|
|
|
5409
5449
|
path: `/v1/connector/providers${n ? `?${n}` : ""}`,
|
|
5410
5450
|
decode: (e) => {
|
|
5411
5451
|
let t = W(e);
|
|
5412
|
-
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(
|
|
5452
|
+
return K(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? U() : t.providers.map(Al);
|
|
5413
5453
|
}
|
|
5414
5454
|
};
|
|
5415
5455
|
}
|
|
5416
|
-
function
|
|
5456
|
+
function Nl(e, t, n) {
|
|
5417
5457
|
let r = new URLSearchParams({
|
|
5418
5458
|
...t == null ? {} : { flowId: t },
|
|
5419
5459
|
...n == null ? {} : { locale: n }
|
|
@@ -5422,35 +5462,35 @@ function kl(e, t, n) {
|
|
|
5422
5462
|
path: `/v1/connector/actions/${encodeURIComponent(e)}${r ? `?${r}` : ""}`,
|
|
5423
5463
|
decode: (e) => {
|
|
5424
5464
|
let t = W(e);
|
|
5425
|
-
return K(t, ["action", "version"]), t.version == 1 ?
|
|
5465
|
+
return K(t, ["action", "version"]), t.version == 1 ? kl(t.action) : U();
|
|
5426
5466
|
}
|
|
5427
5467
|
};
|
|
5428
5468
|
}
|
|
5429
|
-
function
|
|
5469
|
+
function Pl(e) {
|
|
5430
5470
|
return {
|
|
5431
|
-
path: `/v1/connector/connections${
|
|
5471
|
+
path: `/v1/connector/connections${jl(e)}`,
|
|
5432
5472
|
decode: (e) => {
|
|
5433
5473
|
let t = W(e);
|
|
5434
|
-
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(
|
|
5474
|
+
return K(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? U() : t.connections.map(wl);
|
|
5435
5475
|
}
|
|
5436
5476
|
};
|
|
5437
5477
|
}
|
|
5438
|
-
function
|
|
5478
|
+
function Fl(e, t) {
|
|
5439
5479
|
return {
|
|
5440
|
-
path: `/v1/connector/connections/${encodeURIComponent(e)}${
|
|
5480
|
+
path: `/v1/connector/connections/${encodeURIComponent(e)}${jl(t)}`,
|
|
5441
5481
|
decode: (t) => {
|
|
5442
5482
|
let n = W(t);
|
|
5443
5483
|
return K(n, [
|
|
5444
5484
|
"connections",
|
|
5445
5485
|
"serviceId",
|
|
5446
5486
|
"version"
|
|
5447
|
-
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(
|
|
5487
|
+
]), n.version != 1 || G(n.serviceId) != e || !Array.isArray(n.connections) ? U() : n.connections.map(wl);
|
|
5448
5488
|
}
|
|
5449
5489
|
};
|
|
5450
5490
|
}
|
|
5451
5491
|
//#endregion
|
|
5452
5492
|
//#region src/control/common/flowDecoders.ts
|
|
5453
|
-
function
|
|
5493
|
+
function Il(e) {
|
|
5454
5494
|
let t = W(e), n = t.status;
|
|
5455
5495
|
if (t.version != 1 || n != "active" && n != "retiring") return U();
|
|
5456
5496
|
let r = t.live == null ? void 0 : W(t.live);
|
|
@@ -5469,18 +5509,18 @@ function Ml(e) {
|
|
|
5469
5509
|
version: 1
|
|
5470
5510
|
};
|
|
5471
5511
|
}
|
|
5472
|
-
function
|
|
5512
|
+
function Ll(e) {
|
|
5473
5513
|
let t = W(e);
|
|
5474
5514
|
if (t.version != 1 || !Array.isArray(t.flows)) return U();
|
|
5475
5515
|
let n = t.nextCursor, r = t.total;
|
|
5476
5516
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
5477
5517
|
...n == null ? {} : { nextCursor: n },
|
|
5478
|
-
flows: t.flows.map(
|
|
5518
|
+
flows: t.flows.map(Il),
|
|
5479
5519
|
...r == null ? {} : { total: r },
|
|
5480
5520
|
version: 1
|
|
5481
5521
|
};
|
|
5482
5522
|
}
|
|
5483
|
-
function
|
|
5523
|
+
function Rl(e) {
|
|
5484
5524
|
let t = W(e);
|
|
5485
5525
|
if (K(t, [
|
|
5486
5526
|
"name",
|
|
@@ -5503,7 +5543,7 @@ function Pl(e) {
|
|
|
5503
5543
|
}
|
|
5504
5544
|
//#endregion
|
|
5505
5545
|
//#region src/control/common/publicationDecoders.ts
|
|
5506
|
-
function
|
|
5546
|
+
function zl(e) {
|
|
5507
5547
|
let t = W(e), n = t.operation, r = t.sourcePublicationId;
|
|
5508
5548
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? U() : {
|
|
5509
5549
|
actorId: G(t.actorId),
|
|
@@ -5520,7 +5560,7 @@ function Fl(e) {
|
|
|
5520
5560
|
version: 1
|
|
5521
5561
|
};
|
|
5522
5562
|
}
|
|
5523
|
-
function
|
|
5563
|
+
function Bl(e) {
|
|
5524
5564
|
let t = W(e), n = t.status, r = {
|
|
5525
5565
|
createdAt: G(t.createdAt),
|
|
5526
5566
|
flowId: G(t.flowId),
|
|
@@ -5586,33 +5626,33 @@ function Il(e) {
|
|
|
5586
5626
|
default: return U();
|
|
5587
5627
|
}
|
|
5588
5628
|
}
|
|
5589
|
-
function
|
|
5629
|
+
function Vl(e) {
|
|
5590
5630
|
let t = W(e), n = t.status, r = t.publication;
|
|
5591
5631
|
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() : {
|
|
5592
5632
|
flowId: G(t.flowId),
|
|
5593
5633
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
5594
|
-
publication: r === null ? null :
|
|
5634
|
+
publication: r === null ? null : zl(r),
|
|
5595
5635
|
revision: q(t.revision),
|
|
5596
5636
|
status: n,
|
|
5597
5637
|
version: 1
|
|
5598
5638
|
};
|
|
5599
5639
|
}
|
|
5600
|
-
function
|
|
5640
|
+
function Hl(e) {
|
|
5601
5641
|
let t = W(e), n = t.nextCursor, r = t.total;
|
|
5602
5642
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? U() : {
|
|
5603
5643
|
...n == null ? {} : { nextCursor: n },
|
|
5604
|
-
publications: t.publications.map(
|
|
5644
|
+
publications: t.publications.map(zl),
|
|
5605
5645
|
...r == null ? {} : { total: r },
|
|
5606
5646
|
version: 1
|
|
5607
5647
|
};
|
|
5608
5648
|
}
|
|
5609
5649
|
new TextEncoder();
|
|
5610
|
-
var
|
|
5650
|
+
var Ul = F(D(), _s()), Wl = M({
|
|
5611
5651
|
jsonSchema: _s(),
|
|
5612
5652
|
nullable: A(),
|
|
5613
5653
|
value: _s().optional(),
|
|
5614
5654
|
description: D().optional()
|
|
5615
|
-
}).strict(),
|
|
5655
|
+
}).strict(), Gl = F(D(), Wl), Kl = P([M({
|
|
5616
5656
|
kind: L("value"),
|
|
5617
5657
|
value: _s()
|
|
5618
5658
|
}).strict(), M({
|
|
@@ -5622,36 +5662,36 @@ var zl = F(D(), _s()), Bl = M({
|
|
|
5622
5662
|
nodeId: D(),
|
|
5623
5663
|
output: D()
|
|
5624
5664
|
}).strict())
|
|
5625
|
-
}).strict()]),
|
|
5665
|
+
}).strict()]), ql = {
|
|
5626
5666
|
name: D().optional(),
|
|
5627
5667
|
description: D().optional(),
|
|
5628
5668
|
icon: D().optional()
|
|
5629
|
-
},
|
|
5669
|
+
}, Jl = P([
|
|
5630
5670
|
M({
|
|
5631
|
-
...
|
|
5671
|
+
...ql,
|
|
5632
5672
|
kind: L("cron"),
|
|
5633
5673
|
cronTimes: j(_s())
|
|
5634
5674
|
}).strict(),
|
|
5635
5675
|
M({
|
|
5636
|
-
...
|
|
5676
|
+
...ql,
|
|
5637
5677
|
kind: L("manual")
|
|
5638
5678
|
}).strict(),
|
|
5639
5679
|
M({
|
|
5640
|
-
...
|
|
5680
|
+
...ql,
|
|
5641
5681
|
kind: L("task"),
|
|
5642
5682
|
concurrency: L(1).optional(),
|
|
5643
|
-
inputs: F(D(),
|
|
5683
|
+
inputs: F(D(), Kl),
|
|
5644
5684
|
task: M({
|
|
5645
5685
|
name: D(),
|
|
5646
5686
|
moduleId: D(),
|
|
5647
|
-
inputs:
|
|
5648
|
-
outputs: F(D(),
|
|
5687
|
+
inputs: Gl,
|
|
5688
|
+
outputs: F(D(), Wl.omit({ value: !0 }))
|
|
5649
5689
|
}).strict()
|
|
5650
5690
|
}).strict()
|
|
5651
5691
|
]);
|
|
5652
5692
|
M({
|
|
5653
5693
|
name: D(),
|
|
5654
|
-
graph: M({ nodes: F(D(),
|
|
5694
|
+
graph: M({ nodes: F(D(), Jl) }).strict()
|
|
5655
5695
|
}).strict(), M({
|
|
5656
5696
|
kind: L("open-flow-project-revision"),
|
|
5657
5697
|
version: L(1),
|
|
@@ -5662,15 +5702,15 @@ M({
|
|
|
5662
5702
|
imports: j(D())
|
|
5663
5703
|
}).strict()),
|
|
5664
5704
|
document: M({
|
|
5665
|
-
bindings:
|
|
5666
|
-
flows:
|
|
5667
|
-
subflows:
|
|
5668
|
-
tasks:
|
|
5705
|
+
bindings: Ul,
|
|
5706
|
+
flows: Ul,
|
|
5707
|
+
subflows: Ul,
|
|
5708
|
+
tasks: Ul
|
|
5669
5709
|
}).strict()
|
|
5670
5710
|
}).strict();
|
|
5671
5711
|
//#endregion
|
|
5672
5712
|
//#region src/control/common/revisionDecoders.ts
|
|
5673
|
-
function
|
|
5713
|
+
function Yl(e) {
|
|
5674
5714
|
let t = W(e), n = t.parentRevisionId;
|
|
5675
5715
|
return t.version != 1 || n !== null && typeof n != "string" ? U() : {
|
|
5676
5716
|
actorId: G(t.actorId),
|
|
@@ -5683,53 +5723,48 @@ function Gl(e) {
|
|
|
5683
5723
|
version: 1
|
|
5684
5724
|
};
|
|
5685
5725
|
}
|
|
5686
|
-
function
|
|
5726
|
+
function Xl(e) {
|
|
5687
5727
|
let t = W(e);
|
|
5688
5728
|
try {
|
|
5689
5729
|
return {
|
|
5690
|
-
...
|
|
5730
|
+
...Yl(t),
|
|
5691
5731
|
content: zc(t.content)
|
|
5692
5732
|
};
|
|
5693
5733
|
} catch {
|
|
5694
5734
|
return U();
|
|
5695
5735
|
}
|
|
5696
5736
|
}
|
|
5697
|
-
function
|
|
5737
|
+
function Zl(e) {
|
|
5698
5738
|
let t = W(e);
|
|
5699
|
-
return
|
|
5700
|
-
"revision",
|
|
5701
|
-
"updatedAt",
|
|
5702
|
-
"value",
|
|
5703
|
-
"version"
|
|
5704
|
-
]), t.version != 1 || q(t.revision) < 1 ? U() : {
|
|
5739
|
+
return t.version != 1 || q(t.revision) < 1 ? U() : {
|
|
5705
5740
|
revision: q(t.revision),
|
|
5706
5741
|
updatedAt: G(t.updatedAt),
|
|
5707
5742
|
value: Object.fromEntries(Object.entries(W(t.value)).map(([e, t]) => [e, J(t)])),
|
|
5708
5743
|
version: 1
|
|
5709
5744
|
};
|
|
5710
5745
|
}
|
|
5711
|
-
function
|
|
5746
|
+
function Ql(e) {
|
|
5712
5747
|
let t = W(e);
|
|
5713
5748
|
return t.version == 1 ? {
|
|
5714
|
-
revision:
|
|
5749
|
+
revision: Yl(t.revision),
|
|
5715
5750
|
version: 1
|
|
5716
5751
|
} : U();
|
|
5717
5752
|
}
|
|
5718
|
-
function
|
|
5753
|
+
function $l(e) {
|
|
5719
5754
|
let t = W(e);
|
|
5720
5755
|
return t.version != 1 || t.kind != "snapshot" ? U() : {
|
|
5721
|
-
draft:
|
|
5756
|
+
draft: Xl(t.draft),
|
|
5722
5757
|
kind: "snapshot",
|
|
5723
5758
|
version: 1
|
|
5724
5759
|
};
|
|
5725
5760
|
}
|
|
5726
5761
|
//#endregion
|
|
5727
5762
|
//#region src/control/common/runDecoders.ts
|
|
5728
|
-
var
|
|
5729
|
-
function
|
|
5730
|
-
return typeof e == "string" &&
|
|
5763
|
+
var eu = new Set(oc);
|
|
5764
|
+
function tu(e) {
|
|
5765
|
+
return typeof e == "string" && eu.has(e) ? e : U();
|
|
5731
5766
|
}
|
|
5732
|
-
function
|
|
5767
|
+
function nu(e) {
|
|
5733
5768
|
let t = W(e), n = t.source, r = t.startedAt, i = t.finishedAt;
|
|
5734
5769
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || i != null && typeof i != "string" ? U() : {
|
|
5735
5770
|
createdAt: G(t.createdAt),
|
|
@@ -5739,11 +5774,11 @@ function Ql(e) {
|
|
|
5739
5774
|
runId: G(t.runId),
|
|
5740
5775
|
source: n,
|
|
5741
5776
|
...r == null ? {} : { startedAt: r },
|
|
5742
|
-
status:
|
|
5777
|
+
status: tu(t.status),
|
|
5743
5778
|
version: 1
|
|
5744
5779
|
};
|
|
5745
5780
|
}
|
|
5746
|
-
function
|
|
5781
|
+
function ru(e) {
|
|
5747
5782
|
let t = W(e);
|
|
5748
5783
|
K(t, [
|
|
5749
5784
|
"actions",
|
|
@@ -5763,10 +5798,10 @@ function $l(e) {
|
|
|
5763
5798
|
waitingSince: G(t.waitingSince)
|
|
5764
5799
|
};
|
|
5765
5800
|
}
|
|
5766
|
-
function
|
|
5767
|
-
let t = W(e), n =
|
|
5801
|
+
function iu(e) {
|
|
5802
|
+
let t = W(e), n = nu(t), r = t.eventsExpiresAt;
|
|
5768
5803
|
if (r != null && typeof r != "string" || t.waiting !== void 0 || !Array.isArray(t.waits)) return U();
|
|
5769
|
-
let i = t.waits.map(
|
|
5804
|
+
let i = t.waits.map(ru);
|
|
5770
5805
|
if (new Set(i.map((e) => e.waitId)).size != i.length || n.status == "waiting" && i.length == 0 || [
|
|
5771
5806
|
"completed",
|
|
5772
5807
|
"failed",
|
|
@@ -5805,17 +5840,17 @@ function eu(e) {
|
|
|
5805
5840
|
};
|
|
5806
5841
|
}
|
|
5807
5842
|
}
|
|
5808
|
-
function
|
|
5843
|
+
function au(e) {
|
|
5809
5844
|
let t = W(e), n = t.nextCursor;
|
|
5810
5845
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? U() : {
|
|
5811
5846
|
flowId: G(t.flowId),
|
|
5812
5847
|
...n == null ? {} : { nextCursor: n },
|
|
5813
|
-
runs: t.runs.map(
|
|
5848
|
+
runs: t.runs.map(nu),
|
|
5814
5849
|
version: 1
|
|
5815
5850
|
};
|
|
5816
5851
|
}
|
|
5817
|
-
function
|
|
5818
|
-
let t = W(e), n =
|
|
5852
|
+
function ou(e) {
|
|
5853
|
+
let t = W(e), n = tu(t.status);
|
|
5819
5854
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" || n == "waiting" ? U() : {
|
|
5820
5855
|
cancelAccepted: t.cancelAccepted,
|
|
5821
5856
|
runId: G(t.runId),
|
|
@@ -5823,7 +5858,7 @@ function nu(e) {
|
|
|
5823
5858
|
version: 1
|
|
5824
5859
|
};
|
|
5825
5860
|
}
|
|
5826
|
-
function
|
|
5861
|
+
function su(e) {
|
|
5827
5862
|
let t = W(e);
|
|
5828
5863
|
K(t, [
|
|
5829
5864
|
"action",
|
|
@@ -5840,12 +5875,12 @@ function ru(e) {
|
|
|
5840
5875
|
resolutionAccepted: t.resolutionAccepted,
|
|
5841
5876
|
resolvedAt: r,
|
|
5842
5877
|
runId: G(t.runId),
|
|
5843
|
-
status:
|
|
5878
|
+
status: tu(t.status),
|
|
5844
5879
|
version: 1,
|
|
5845
5880
|
waitId: G(t.waitId)
|
|
5846
5881
|
};
|
|
5847
5882
|
}
|
|
5848
|
-
function
|
|
5883
|
+
function cu(e) {
|
|
5849
5884
|
let t = W(e), n = t.status;
|
|
5850
5885
|
if (t.version != 1) return U();
|
|
5851
5886
|
let r = {
|
|
@@ -5888,7 +5923,7 @@ function iu(e) {
|
|
|
5888
5923
|
}
|
|
5889
5924
|
//#endregion
|
|
5890
5925
|
//#region src/control/common/random.ts
|
|
5891
|
-
function
|
|
5926
|
+
function lu() {
|
|
5892
5927
|
let e = globalThis.crypto;
|
|
5893
5928
|
if (e != null) {
|
|
5894
5929
|
try {
|
|
@@ -5905,7 +5940,7 @@ function au() {
|
|
|
5905
5940
|
}
|
|
5906
5941
|
//#endregion
|
|
5907
5942
|
//#region src/control/common/api.ts
|
|
5908
|
-
function
|
|
5943
|
+
function uu(e) {
|
|
5909
5944
|
let t = W(e), n = q(t.sequence);
|
|
5910
5945
|
if (n < 0) return U();
|
|
5911
5946
|
let r = {
|
|
@@ -5933,7 +5968,7 @@ function ou(e) {
|
|
|
5933
5968
|
payload: {
|
|
5934
5969
|
flowId: G(i.flowId),
|
|
5935
5970
|
scopeId: G(i.scopeId),
|
|
5936
|
-
progress:
|
|
5971
|
+
progress: du(i.progress)
|
|
5937
5972
|
}
|
|
5938
5973
|
};
|
|
5939
5974
|
case "run.waiting": return Array.isArray(i.waitIds) ? {
|
|
@@ -6041,7 +6076,7 @@ function ou(e) {
|
|
|
6041
6076
|
kind: a,
|
|
6042
6077
|
payload: {
|
|
6043
6078
|
...e,
|
|
6044
|
-
progress:
|
|
6079
|
+
progress: du(i.progress)
|
|
6045
6080
|
}
|
|
6046
6081
|
};
|
|
6047
6082
|
case "node.artifact": {
|
|
@@ -6067,14 +6102,14 @@ function ou(e) {
|
|
|
6067
6102
|
default: return U();
|
|
6068
6103
|
}
|
|
6069
6104
|
}
|
|
6070
|
-
function
|
|
6105
|
+
function du(e) {
|
|
6071
6106
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : U();
|
|
6072
6107
|
}
|
|
6073
|
-
function
|
|
6108
|
+
function fu(e) {
|
|
6074
6109
|
let t = W(e), n = t.eventsExpiresAt, r = q(t.nextAfter);
|
|
6075
6110
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? U() : {
|
|
6076
6111
|
done: t.done,
|
|
6077
|
-
events: t.events.map(
|
|
6112
|
+
events: t.events.map(uu),
|
|
6078
6113
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
6079
6114
|
historyComplete: t.historyComplete,
|
|
6080
6115
|
nextAfter: r,
|
|
@@ -6083,10 +6118,10 @@ function cu(e) {
|
|
|
6083
6118
|
};
|
|
6084
6119
|
}
|
|
6085
6120
|
var Y = encodeURIComponent;
|
|
6086
|
-
function
|
|
6087
|
-
return `${e}-${
|
|
6121
|
+
function pu(e) {
|
|
6122
|
+
return `${e}-${lu()}`;
|
|
6088
6123
|
}
|
|
6089
|
-
var
|
|
6124
|
+
var mu = class {
|
|
6090
6125
|
constructor(e) {
|
|
6091
6126
|
this.requestControl = e;
|
|
6092
6127
|
}
|
|
@@ -6094,23 +6129,23 @@ var uu = class {
|
|
|
6094
6129
|
let t = new URLSearchParams();
|
|
6095
6130
|
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));
|
|
6096
6131
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
6097
|
-
return
|
|
6132
|
+
return Ll(await this.request(`/v1/flows${n}`));
|
|
6098
6133
|
}
|
|
6099
6134
|
async listEventSources(e, t) {
|
|
6100
|
-
return
|
|
6135
|
+
return Xc(await this.request("/v1/event-sources" + (e == null ? "" : `?flowId=${Y(e)}`), { signal: t }));
|
|
6101
6136
|
}
|
|
6102
6137
|
async listEventSourceConnections(e, t) {
|
|
6103
6138
|
let n = W(await this.request(`/v1/event-sources/connections${e == null ? "" : `?teamId=${Y(e)}`}`, { signal: t }));
|
|
6104
|
-
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(
|
|
6139
|
+
return K(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? U() : n.connections.map(wl);
|
|
6105
6140
|
}
|
|
6106
6141
|
async createEventSource(e) {
|
|
6107
|
-
return
|
|
6142
|
+
return Yc(await this.request("/v1/event-sources", {
|
|
6108
6143
|
method: "POST",
|
|
6109
6144
|
body: JSON.stringify(e)
|
|
6110
6145
|
}));
|
|
6111
6146
|
}
|
|
6112
6147
|
async updateEventSource(e, t) {
|
|
6113
|
-
return
|
|
6148
|
+
return Yc(await this.request(`/v1/event-sources/${Y(e)}`, {
|
|
6114
6149
|
method: "PUT",
|
|
6115
6150
|
body: JSON.stringify(t)
|
|
6116
6151
|
}));
|
|
@@ -6127,15 +6162,15 @@ var uu = class {
|
|
|
6127
6162
|
async listVariables() {
|
|
6128
6163
|
let e = W(await this.request("/v1/variables"));
|
|
6129
6164
|
return K(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? U() : {
|
|
6130
|
-
variables: e.variables.map(
|
|
6165
|
+
variables: e.variables.map(Rl),
|
|
6131
6166
|
version: 1
|
|
6132
6167
|
};
|
|
6133
6168
|
}
|
|
6134
6169
|
async getVariable(e) {
|
|
6135
|
-
return
|
|
6170
|
+
return Rl(await this.request(`/v1/variables/${Y(e)}`));
|
|
6136
6171
|
}
|
|
6137
6172
|
async putVariable(e, t) {
|
|
6138
|
-
return
|
|
6173
|
+
return Rl(await this.request(`/v1/variables/${Y(e)}`, {
|
|
6139
6174
|
body: JSON.stringify({ value: t }),
|
|
6140
6175
|
method: "PUT"
|
|
6141
6176
|
}));
|
|
@@ -6144,8 +6179,8 @@ var uu = class {
|
|
|
6144
6179
|
let t = W(await this.request(`/v1/variables/${Y(e)}`, { method: "DELETE" }));
|
|
6145
6180
|
if (K(t, ["version"]), t.version != 1) return U();
|
|
6146
6181
|
}
|
|
6147
|
-
async createFlow(e, t = `flow-${
|
|
6148
|
-
return
|
|
6182
|
+
async createFlow(e, t = `flow-${lu()}`) {
|
|
6183
|
+
return Il(await this.request("/v1/flows", {
|
|
6149
6184
|
body: JSON.stringify({
|
|
6150
6185
|
name: e,
|
|
6151
6186
|
version: 1
|
|
@@ -6155,10 +6190,10 @@ var uu = class {
|
|
|
6155
6190
|
}));
|
|
6156
6191
|
}
|
|
6157
6192
|
async getFlow(e) {
|
|
6158
|
-
return
|
|
6193
|
+
return Il(await this.request(`/v1/flows/${Y(e)}`));
|
|
6159
6194
|
}
|
|
6160
6195
|
async renameFlow(e, t) {
|
|
6161
|
-
return
|
|
6196
|
+
return Il(await this.request(`/v1/flows/${Y(e)}`, {
|
|
6162
6197
|
body: JSON.stringify({
|
|
6163
6198
|
name: t,
|
|
6164
6199
|
version: 1
|
|
@@ -6167,15 +6202,15 @@ var uu = class {
|
|
|
6167
6202
|
}));
|
|
6168
6203
|
}
|
|
6169
6204
|
async deleteFlow(e) {
|
|
6170
|
-
return
|
|
6205
|
+
return Il(await this.request(`/v1/flows/${Y(e)}`, { method: "DELETE" }));
|
|
6171
6206
|
}
|
|
6172
6207
|
async listTriggerKeys(e, t) {
|
|
6173
6208
|
let n = W(await this.request(`/v1/trigger-keys${t == null ? "" : `?locale=${encodeURIComponent(t)}`}`, { signal: e }));
|
|
6174
|
-
return n.version != 1 || !Array.isArray(n.keys) ? U() : n.keys.map(
|
|
6209
|
+
return n.version != 1 || !Array.isArray(n.keys) ? U() : n.keys.map(tl);
|
|
6175
6210
|
}
|
|
6176
6211
|
async listTriggerDefinitions(e) {
|
|
6177
6212
|
let t = W(await this.request("/v1/trigger-keys/catalog", { signal: e }));
|
|
6178
|
-
return t.version != 1 || !Array.isArray(t.definitions) ? U() : t.definitions.map(
|
|
6213
|
+
return t.version != 1 || !Array.isArray(t.definitions) ? U() : t.definitions.map(nl);
|
|
6179
6214
|
}
|
|
6180
6215
|
async readCatalog(e, t, n) {
|
|
6181
6216
|
let r = new Headers();
|
|
@@ -6204,74 +6239,68 @@ var uu = class {
|
|
|
6204
6239
|
...t,
|
|
6205
6240
|
etag: i.headers.get("etag")?.trim() || t.etag
|
|
6206
6241
|
} : {
|
|
6207
|
-
data:
|
|
6242
|
+
data: dl(await i.json()),
|
|
6208
6243
|
etag: i.headers.get("etag")?.trim() || null
|
|
6209
6244
|
};
|
|
6210
6245
|
}
|
|
6211
6246
|
async getTriggerKey(e, t) {
|
|
6212
6247
|
let n = W(await this.request(`/v1/trigger-keys/${Y(e)}`, { signal: t }));
|
|
6213
|
-
return n.version == 1 ?
|
|
6248
|
+
return n.version == 1 ? nl(n.definition) : U();
|
|
6214
6249
|
}
|
|
6215
6250
|
async listFlowTriggerBindings(e, t) {
|
|
6216
6251
|
let n = W(await this.request(`/v1/flows/${Y(e)}/triggers`, { signal: t }));
|
|
6217
|
-
return n.version != 1 || G(n.flowId) != e || !Array.isArray(n.bindings) ? U() : n.bindings.map(
|
|
6252
|
+
return n.version != 1 || G(n.flowId) != e || !Array.isArray(n.bindings) ? U() : n.bindings.map(ol);
|
|
6218
6253
|
}
|
|
6219
6254
|
async getFlowTriggerBinding(e, t) {
|
|
6220
|
-
return
|
|
6255
|
+
return sl(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}`));
|
|
6221
6256
|
}
|
|
6222
6257
|
async listFlowTriggerActivities(e, t, n = {}) {
|
|
6223
6258
|
let r = new URLSearchParams();
|
|
6224
6259
|
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
6225
6260
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6226
|
-
return
|
|
6261
|
+
return ll(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/activities${i}`));
|
|
6227
6262
|
}
|
|
6228
6263
|
async pauseFlowTrigger(e, t) {
|
|
6229
|
-
return
|
|
6264
|
+
return ol(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/pause`, {
|
|
6230
6265
|
body: JSON.stringify({ version: 1 }),
|
|
6231
6266
|
method: "POST"
|
|
6232
6267
|
}));
|
|
6233
6268
|
}
|
|
6234
6269
|
async resumeFlowTrigger(e, t) {
|
|
6235
|
-
return
|
|
6270
|
+
return ol(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/resume`, {
|
|
6236
6271
|
body: JSON.stringify({ version: 1 }),
|
|
6237
6272
|
method: "POST"
|
|
6238
6273
|
}));
|
|
6239
6274
|
}
|
|
6240
6275
|
async testFlowPollTrigger(e, t) {
|
|
6241
|
-
return
|
|
6276
|
+
return ul(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/test`, {
|
|
6242
6277
|
body: JSON.stringify({ version: 1 }),
|
|
6243
6278
|
method: "POST"
|
|
6244
6279
|
}));
|
|
6245
6280
|
}
|
|
6246
6281
|
async getEditor(e) {
|
|
6247
6282
|
let t = W(await this.request(`/v1/flows/${Y(e)}/editor`));
|
|
6248
|
-
if (
|
|
6249
|
-
"flow",
|
|
6250
|
-
"draft",
|
|
6251
|
-
"live",
|
|
6252
|
-
"presentation",
|
|
6253
|
-
"version"
|
|
6254
|
-
]), t.version != 1) return U();
|
|
6283
|
+
if (t.version != 1) return U();
|
|
6255
6284
|
let n = {
|
|
6256
|
-
flow:
|
|
6257
|
-
draft:
|
|
6258
|
-
live:
|
|
6259
|
-
presentation:
|
|
6285
|
+
flow: Il(t.flow),
|
|
6286
|
+
draft: Xl(t.draft),
|
|
6287
|
+
live: Vl(t.live),
|
|
6288
|
+
presentation: Zl(t.presentation),
|
|
6260
6289
|
version: 1
|
|
6261
6290
|
};
|
|
6262
6291
|
return n.flow.flowId != e || n.draft.flowId != e || n.live.flowId != e || n.flow.draftRevisionId != n.draft.revisionId ? U() : n;
|
|
6263
6292
|
}
|
|
6264
6293
|
async getPresentation(e) {
|
|
6265
|
-
return
|
|
6294
|
+
return Zl(await this.request(`/v1/flows/${Y(e)}/presentation`));
|
|
6266
6295
|
}
|
|
6267
6296
|
async getDraft(e) {
|
|
6268
|
-
return
|
|
6297
|
+
return Xl(await this.request(`/v1/flows/${Y(e)}/draft`));
|
|
6269
6298
|
}
|
|
6270
6299
|
async syncDraft(e) {
|
|
6271
|
-
return
|
|
6300
|
+
return $l(await this.request(`/v1/flows/${Y(e)}/draft/sync`));
|
|
6272
6301
|
}
|
|
6273
6302
|
async getRevision(e, t) {
|
|
6274
|
-
return
|
|
6303
|
+
return Xl(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}`));
|
|
6275
6304
|
}
|
|
6276
6305
|
async listTriggerConfigOptions(e, t, n, r) {
|
|
6277
6306
|
let i = W(await this.request(`/v1/flows/${Y(e)}/triggers/${Y(t)}/options/${Y(n)}`, { signal: r }));
|
|
@@ -6294,7 +6323,7 @@ var uu = class {
|
|
|
6294
6323
|
});
|
|
6295
6324
|
}
|
|
6296
6325
|
async listConnectorProviders(e, t, n) {
|
|
6297
|
-
let r =
|
|
6326
|
+
let r = Ml(t, n);
|
|
6298
6327
|
return this.connectorRequest(r.path, "providers", e, r.decode);
|
|
6299
6328
|
}
|
|
6300
6329
|
async listConnectorActions(e, t, n, r) {
|
|
@@ -6312,15 +6341,15 @@ var uu = class {
|
|
|
6312
6341
|
}, t);
|
|
6313
6342
|
}
|
|
6314
6343
|
async getConnectorAction(e, t, n, r, i = !1) {
|
|
6315
|
-
let a =
|
|
6344
|
+
let a = Nl(e, n, r);
|
|
6316
6345
|
return this.connectorRequest(a.path, "actions", t, a.decode, i);
|
|
6317
6346
|
}
|
|
6318
6347
|
async listAllConnectorConnections(e, t, n = !1) {
|
|
6319
|
-
let r =
|
|
6348
|
+
let r = Pl(t);
|
|
6320
6349
|
return this.connectorRequest(r.path, "connections", e, r.decode, n);
|
|
6321
6350
|
}
|
|
6322
6351
|
async listConnectorConnections(e, t, n, r = !1) {
|
|
6323
|
-
let i =
|
|
6352
|
+
let i = Fl(e, n);
|
|
6324
6353
|
return this.connectorRequest(i.path, "connections", t, i.decode, r);
|
|
6325
6354
|
}
|
|
6326
6355
|
async createConnectorConnectionPage(e, t, n) {
|
|
@@ -6338,8 +6367,8 @@ var uu = class {
|
|
|
6338
6367
|
return U();
|
|
6339
6368
|
}
|
|
6340
6369
|
}
|
|
6341
|
-
async changeDraft(e, t, n, r =
|
|
6342
|
-
return
|
|
6370
|
+
async changeDraft(e, t, n, r = pu("change")) {
|
|
6371
|
+
return Ql(await this.request(`/v1/flows/${Y(e)}/draft/changes`, {
|
|
6343
6372
|
body: JSON.stringify({
|
|
6344
6373
|
expectedRevisionId: t,
|
|
6345
6374
|
operations: n,
|
|
@@ -6350,51 +6379,51 @@ var uu = class {
|
|
|
6350
6379
|
}));
|
|
6351
6380
|
}
|
|
6352
6381
|
async checkFlow(e, t) {
|
|
6353
|
-
return
|
|
6382
|
+
return Cl(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}/check`, {
|
|
6354
6383
|
body: JSON.stringify({
|
|
6355
|
-
engineContract: "open-flow-engine/
|
|
6384
|
+
engineContract: "open-flow-engine/v4",
|
|
6356
6385
|
version: 1
|
|
6357
6386
|
}),
|
|
6358
6387
|
method: "POST"
|
|
6359
6388
|
}));
|
|
6360
6389
|
}
|
|
6361
6390
|
async getLive(e, t) {
|
|
6362
|
-
return
|
|
6391
|
+
return Vl(await this.request(`/v1/flows/${Y(e)}/live`, { signal: t }));
|
|
6363
6392
|
}
|
|
6364
6393
|
async listPublications(e, t = {}, n) {
|
|
6365
6394
|
let r = new URLSearchParams();
|
|
6366
6395
|
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));
|
|
6367
6396
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6368
|
-
return
|
|
6397
|
+
return Hl(await this.request(`/v1/flows/${Y(e)}/publications${i}`, { signal: n }));
|
|
6369
6398
|
}
|
|
6370
6399
|
async createDraftRun(e, t, n) {
|
|
6371
|
-
let r =
|
|
6400
|
+
let r = iu(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}/runs`, {
|
|
6372
6401
|
body: JSON.stringify({
|
|
6373
|
-
engineContract: "open-flow-engine/
|
|
6402
|
+
engineContract: "open-flow-engine/v4",
|
|
6374
6403
|
inputs: n.inputs ?? {},
|
|
6375
6404
|
trigger: n.trigger,
|
|
6376
6405
|
version: 1
|
|
6377
6406
|
}),
|
|
6378
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
6407
|
+
headers: { "idempotency-key": n.idempotencyKey ?? pu("run") },
|
|
6379
6408
|
method: "POST"
|
|
6380
6409
|
}));
|
|
6381
6410
|
return r.source == "draft" ? r : U();
|
|
6382
6411
|
}
|
|
6383
6412
|
async createLiveRun(e, t) {
|
|
6384
|
-
let n =
|
|
6413
|
+
let n = iu(await this.request("/v1/runs", {
|
|
6385
6414
|
body: JSON.stringify({
|
|
6386
6415
|
inputs: t.inputs ?? {},
|
|
6387
6416
|
trigger: t.trigger,
|
|
6388
6417
|
publicationId: e,
|
|
6389
6418
|
version: 1
|
|
6390
6419
|
}),
|
|
6391
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
6420
|
+
headers: { "idempotency-key": t.idempotencyKey ?? pu("run") },
|
|
6392
6421
|
method: "POST"
|
|
6393
6422
|
}));
|
|
6394
6423
|
return n.source == "live" ? n : U();
|
|
6395
6424
|
}
|
|
6396
6425
|
async setFlowEnabled(e, t, n) {
|
|
6397
|
-
return
|
|
6426
|
+
return Il(await this.request(`/v1/flows/${Y(e)}/enabled`, {
|
|
6398
6427
|
method: "PUT",
|
|
6399
6428
|
body: JSON.stringify({
|
|
6400
6429
|
enabled: n,
|
|
@@ -6404,65 +6433,65 @@ var uu = class {
|
|
|
6404
6433
|
}));
|
|
6405
6434
|
}
|
|
6406
6435
|
async publishFlow(e, t, n, r = {}) {
|
|
6407
|
-
return
|
|
6436
|
+
return Bl(await this.request(`/v1/flows/${Y(e)}/revisions/${Y(t)}/publications`, {
|
|
6408
6437
|
body: JSON.stringify({
|
|
6409
|
-
engineContract: "open-flow-engine/
|
|
6438
|
+
engineContract: "open-flow-engine/v4",
|
|
6410
6439
|
expectedLivePublicationId: n,
|
|
6411
6440
|
version: 1
|
|
6412
6441
|
}),
|
|
6413
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6442
|
+
headers: { "idempotency-key": r.idempotencyKey ?? pu("publication") },
|
|
6414
6443
|
method: "POST"
|
|
6415
6444
|
}));
|
|
6416
6445
|
}
|
|
6417
6446
|
async getPublishOperation(e, t, n) {
|
|
6418
|
-
return
|
|
6447
|
+
return Bl(await this.request(`/v1/flows/${Y(e)}/publish-operations/${Y(t)}`, { signal: n }));
|
|
6419
6448
|
}
|
|
6420
6449
|
async rollbackFlow(e, t, n, r = {}) {
|
|
6421
|
-
return
|
|
6450
|
+
return zl(await this.request(`/v1/flows/${Y(e)}/publications/${Y(t)}/rollback`, {
|
|
6422
6451
|
body: JSON.stringify({
|
|
6423
6452
|
expectedLivePublicationId: n,
|
|
6424
6453
|
version: 1
|
|
6425
6454
|
}),
|
|
6426
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
6455
|
+
headers: { "idempotency-key": r.idempotencyKey ?? pu("publication") },
|
|
6427
6456
|
method: "POST"
|
|
6428
6457
|
}));
|
|
6429
6458
|
}
|
|
6430
6459
|
async getRun(e, t) {
|
|
6431
|
-
return
|
|
6460
|
+
return iu(await this.request(`/v1/runs/${Y(e)}`, { signal: t }));
|
|
6432
6461
|
}
|
|
6433
6462
|
async listRuns(e, t = {}) {
|
|
6434
6463
|
let n = new URLSearchParams();
|
|
6435
6464
|
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status), t.pendingWait != null && n.set("pendingWait", String(t.pendingWait));
|
|
6436
6465
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
6437
|
-
return
|
|
6466
|
+
return au(await this.request(`/v1/flows/${Y(e)}/runs${r}`));
|
|
6438
6467
|
}
|
|
6439
6468
|
async getRunEvents(e, t = {}, n) {
|
|
6440
6469
|
let r = new URLSearchParams();
|
|
6441
6470
|
t.after != null && r.set("after", String(t.after)), t.limit != null && r.set("limit", String(t.limit));
|
|
6442
6471
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
6443
|
-
return
|
|
6472
|
+
return fu(await this.request(`/v1/runs/${Y(e)}/events${i}`, { signal: n }));
|
|
6444
6473
|
}
|
|
6445
6474
|
async listRunResults(e, t, n) {
|
|
6446
|
-
return
|
|
6475
|
+
return vl(await this.request(`/v1/runs/${Y(e)}/results${t == null ? "" : `?after=${encodeURIComponent(t)}`}`, { signal: n }));
|
|
6447
6476
|
}
|
|
6448
6477
|
async readRunResult(e, t, n = {}, r) {
|
|
6449
6478
|
let i = new URLSearchParams(Object.entries(n).map(([e, t]) => [e, String(t)]));
|
|
6450
|
-
return
|
|
6479
|
+
return yl(await this.request(`/v1/runs/${Y(e)}/results/${Y(t)}?${i}`, { signal: r }));
|
|
6451
6480
|
}
|
|
6452
6481
|
async downloadRunResult(e, t, n) {
|
|
6453
6482
|
return (await this.response(`/v1/runs/${Y(e)}/results/${Y(t)}/content`, { signal: n })).blob();
|
|
6454
6483
|
}
|
|
6455
6484
|
async getRunResult(e, t) {
|
|
6456
|
-
return
|
|
6485
|
+
return cu(await this.request(`/v1/runs/${Y(e)}/result`, { signal: t }));
|
|
6457
6486
|
}
|
|
6458
6487
|
async cancelRun(e) {
|
|
6459
|
-
return
|
|
6488
|
+
return ou(await this.request(`/v1/runs/${Y(e)}/cancel`, {
|
|
6460
6489
|
body: JSON.stringify({ version: 1 }),
|
|
6461
6490
|
method: "POST"
|
|
6462
6491
|
}));
|
|
6463
6492
|
}
|
|
6464
6493
|
async resolveRunWait(e, t, n) {
|
|
6465
|
-
return
|
|
6494
|
+
return su(await this.request(`/v1/runs/${Y(e)}/waits/${Y(t)}/resolve`, {
|
|
6466
6495
|
body: JSON.stringify({
|
|
6467
6496
|
action: n,
|
|
6468
6497
|
version: 1
|
|
@@ -6474,7 +6503,7 @@ var uu = class {
|
|
|
6474
6503
|
let n = Object.entries(e).map(([e, t]) => `${Y(e)}=${Y(t)}`).join("&"), r = n == "" ? "" : `?${n}`;
|
|
6475
6504
|
return this.connectorRequest(`/v1/connector/actions${r}`, "actions", t, (e) => {
|
|
6476
6505
|
let t = W(e);
|
|
6477
|
-
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(
|
|
6506
|
+
return K(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? U() : t.actions.map(kl);
|
|
6478
6507
|
});
|
|
6479
6508
|
}
|
|
6480
6509
|
async connectorRequest(e, t, n, r, i = !1) {
|
|
@@ -6495,7 +6524,7 @@ var uu = class {
|
|
|
6495
6524
|
return U();
|
|
6496
6525
|
}
|
|
6497
6526
|
let t = W(e).error, n = t == null ? void 0 : W(t);
|
|
6498
|
-
throw new
|
|
6527
|
+
throw new $c(i.status, typeof n?.code == "string" ? n.code : "request.failed", typeof n?.message == "string" ? n.message : `Request failed with status ${i.status}.`);
|
|
6499
6528
|
}
|
|
6500
6529
|
return i;
|
|
6501
6530
|
}
|
|
@@ -6513,13 +6542,13 @@ var uu = class {
|
|
|
6513
6542
|
function X(e, t) {
|
|
6514
6543
|
if (!e) throw Error(t);
|
|
6515
6544
|
}
|
|
6516
|
-
async function
|
|
6545
|
+
async function hu(e, t, n) {
|
|
6517
6546
|
let r = await e.request(new Request(new URL("/v1/mcp", e.origin), {
|
|
6518
6547
|
method: "POST",
|
|
6519
6548
|
headers: {
|
|
6520
6549
|
"content-type": "application/json",
|
|
6521
6550
|
accept: "application/json, text/event-stream",
|
|
6522
|
-
"mcp-protocol-version":
|
|
6551
|
+
"mcp-protocol-version": _u,
|
|
6523
6552
|
"mcp-method": t,
|
|
6524
6553
|
...t == "tools/call" ? { "mcp-name": String(n?.name) } : {}
|
|
6525
6554
|
},
|
|
@@ -6530,7 +6559,7 @@ async function du(e, t, n) {
|
|
|
6530
6559
|
params: {
|
|
6531
6560
|
...n,
|
|
6532
6561
|
_meta: {
|
|
6533
|
-
"io.modelcontextprotocol/protocolVersion":
|
|
6562
|
+
"io.modelcontextprotocol/protocolVersion": _u,
|
|
6534
6563
|
"io.modelcontextprotocol/clientCapabilities": {}
|
|
6535
6564
|
}
|
|
6536
6565
|
}
|
|
@@ -6540,13 +6569,13 @@ async function du(e, t, n) {
|
|
|
6540
6569
|
let i = await r.text(), a = r.headers.get("content-type")?.includes("text/event-stream") ? JSON.parse(i.split("\n").findLast((e) => e.startsWith("data:"))?.slice(5) ?? "null") : JSON.parse(i);
|
|
6541
6570
|
return X(a != null && a.error == null, `MCP ${t} failed: ${JSON.stringify(a)}.`), a.result;
|
|
6542
6571
|
}
|
|
6543
|
-
var
|
|
6572
|
+
var gu = [
|
|
6544
6573
|
{
|
|
6545
6574
|
name: "publishes the public MCP catalog, input schemas and annotations",
|
|
6546
6575
|
async verify(e) {
|
|
6547
|
-
let t = await
|
|
6548
|
-
X(Array.isArray(t.tools), "MCP tools must be an array."), X(t.tools.length == Object.keys(
|
|
6549
|
-
for (let [e, n] of Object.entries(
|
|
6576
|
+
let t = await hu(e, "tools/list");
|
|
6577
|
+
X(Array.isArray(t.tools), "MCP tools must be an array."), X(t.tools.length == Object.keys(Cu).length, "MCP tool count differs from the public contract.");
|
|
6578
|
+
for (let [e, n] of Object.entries(Cu)) {
|
|
6550
6579
|
let r = t.tools.find((t) => t.name == e);
|
|
6551
6580
|
X(r != null, `Missing MCP tool ${e}.`), X(r.description == n.description, `${e} description differs.`), X(ac(r.annotations, n.annotations), `${e} annotations differ.`);
|
|
6552
6581
|
let { $schema: i, ...a } = n.inputSchema["~standard"].jsonSchema.input(), { $schema: o, ...s } = r.inputSchema;
|
|
@@ -6557,7 +6586,7 @@ var fu = [
|
|
|
6557
6586
|
{
|
|
6558
6587
|
name: "shares Run pagination, status filters and cancellation between MCP and REST",
|
|
6559
6588
|
async verify(e) {
|
|
6560
|
-
let t = new
|
|
6589
|
+
let t = new mu((t, n) => e.request(new Request(new URL(t, e.origin), n))), n = await t.createFlow("MCP Run listing"), r = await t.changeDraft(n.flowId, n.draftRevisionId, [{
|
|
6561
6590
|
kind: "graph.node.create",
|
|
6562
6591
|
target: { kind: "flow" },
|
|
6563
6592
|
nodeId: "start",
|
|
@@ -6575,7 +6604,7 @@ var fu = [
|
|
|
6575
6604
|
}
|
|
6576
6605
|
}, a = [];
|
|
6577
6606
|
for (let t = 0; t < 2; t++) {
|
|
6578
|
-
let t = (await
|
|
6607
|
+
let t = (await hu(e, "tools/call", {
|
|
6579
6608
|
name: "flow_run",
|
|
6580
6609
|
arguments: {
|
|
6581
6610
|
...i,
|
|
@@ -6584,7 +6613,7 @@ var fu = [
|
|
|
6584
6613
|
})).structuredContent;
|
|
6585
6614
|
X(typeof t.runId == "string", "MCP must return an accepted Run ID."), a.push(t.runId);
|
|
6586
6615
|
}
|
|
6587
|
-
let o = (await
|
|
6616
|
+
let o = (await hu(e, "tools/call", {
|
|
6588
6617
|
name: "run_list",
|
|
6589
6618
|
arguments: {
|
|
6590
6619
|
flowId: n.flowId,
|
|
@@ -6598,24 +6627,24 @@ var fu = [
|
|
|
6598
6627
|
});
|
|
6599
6628
|
X(s.runs.length == 1 && s.runs[0]?.runId != o.runs[0]?.runId, "REST must continue the MCP Run cursor without duplicates.");
|
|
6600
6629
|
let c = await t.listRuns(n.flowId, { limit: 1 });
|
|
6601
|
-
X(ac((await
|
|
6630
|
+
X(ac((await hu(e, "tools/call", {
|
|
6602
6631
|
name: "run_list",
|
|
6603
6632
|
arguments: {
|
|
6604
6633
|
flowId: n.flowId,
|
|
6605
6634
|
cursor: c.nextCursor,
|
|
6606
6635
|
limit: 1
|
|
6607
6636
|
}
|
|
6608
|
-
})).structuredContent, s), "MCP must continue the REST Run cursor."), await
|
|
6637
|
+
})).structuredContent, s), "MCP must continue the REST Run cursor."), await hu(e, "tools/call", {
|
|
6609
6638
|
name: "run_cancel",
|
|
6610
6639
|
arguments: { runId: a[0] }
|
|
6611
|
-
}), X(ac((await
|
|
6640
|
+
}), X(ac((await hu(e, "tools/call", {
|
|
6612
6641
|
name: "run_list",
|
|
6613
6642
|
arguments: {
|
|
6614
6643
|
flowId: n.flowId,
|
|
6615
6644
|
status: "canceled"
|
|
6616
6645
|
}
|
|
6617
6646
|
})).structuredContent, await t.listRuns(n.flowId, { status: "canceled" })), "MCP and REST status filters differ.");
|
|
6618
|
-
let l = await
|
|
6647
|
+
let l = await hu(e, "tools/call", {
|
|
6619
6648
|
name: "run_list",
|
|
6620
6649
|
arguments: {
|
|
6621
6650
|
flowId: (await t.createFlow("Other Run scope")).flowId,
|
|
@@ -6631,7 +6660,7 @@ var fu = [
|
|
|
6631
6660
|
let t = {
|
|
6632
6661
|
name: "MCP conformance",
|
|
6633
6662
|
idempotencyKey: crypto.randomUUID()
|
|
6634
|
-
}, n = () =>
|
|
6663
|
+
}, n = () => hu(e, "tools/call", {
|
|
6635
6664
|
name: "flow_create",
|
|
6636
6665
|
arguments: t
|
|
6637
6666
|
}), r = await n();
|
|
@@ -6640,7 +6669,7 @@ var fu = [
|
|
|
6640
6669
|
X(typeof i.flowId == "string", "MCP did not return a Flow ID."), X(ac((await n()).structuredContent, i), "MCP mutation replay changed identity.");
|
|
6641
6670
|
let a = await e.request(new Request(new URL(`/v1/flows/${encodeURIComponent(i.flowId)}/draft`, e.origin)));
|
|
6642
6671
|
X(a.ok, "REST cannot read the Flow created through MCP."), X((await a.json()).revisionId == i.draftRevisionId, "MCP and REST disagree on the Draft head.");
|
|
6643
|
-
let o = await
|
|
6672
|
+
let o = await hu(e, "tools/call", {
|
|
6644
6673
|
name: "flow_create",
|
|
6645
6674
|
arguments: {
|
|
6646
6675
|
...t,
|
|
@@ -6650,7 +6679,7 @@ var fu = [
|
|
|
6650
6679
|
X(o.isError == 1, "MCP must reject a changed idempotent replay."), X(o.structuredContent.error.code == "flow.conflict", "MCP must preserve the Control error code.");
|
|
6651
6680
|
}
|
|
6652
6681
|
}
|
|
6653
|
-
],
|
|
6682
|
+
], _u = "2026-07-28", vu = rc(), Z = D().min(1), yu = Z.max(256).describe("Stable identity for this mutation. Retry with the same key and identical arguments, even after a lost response."), bu = fs().min(1).max(100).default(50), Q = Z.describe("Exact Flow ID returned by flow_list or flow_create."), xu = Z.describe("Exact Run ID returned by flow_run or run_list."), Su = "Use flow_list and flow_get to inspect a Flow. Use flow_schema to learn atomic edit operations, then flow_apply with the observed expectedRevisionId and a stable idempotencyKey. Use flow_check before flow_run. Select an explicit Trigger node ID and fixed revision or publication. A new Flow has no Trigger until you add one. Use flow_publish to publish a fixed Revision, then poll flow_publish_status until succeeded or failed. Use flow_set_enabled to enable or disable the observed Live publication. flow_run returns an accepted Run, not its final result. Find Runs with run_list, poll run_get and use run_result after terminal. Resolve a waiting Run only with an explicit run_resolve_wait action allowed by run_get. Use run_results and run_result_read to inspect stored Agent tool results; these are separate from the terminal Run result. Retry flow_create, flow_apply, flow_publish and flow_run only with identical arguments and the same idempotencyKey; a new key can execute the Flow again. Other mutations use the same resource identity and arguments when retrying. Cancel a Run explicitly with run_cancel. Use nextCursor and nextAfter to read subsequent pages. Connector-backed deployments may require a Team; inspect connector_teams before creating a Flow.";
|
|
6654
6683
|
function $(e, t, n) {
|
|
6655
6684
|
return {
|
|
6656
6685
|
description: e,
|
|
@@ -6677,23 +6706,23 @@ function $(e, t, n) {
|
|
|
6677
6706
|
} }
|
|
6678
6707
|
};
|
|
6679
6708
|
}
|
|
6680
|
-
var
|
|
6709
|
+
var Cu = {
|
|
6681
6710
|
flow_list: $("List Flows in this deployment. Continue with nextCursor; cursors are compatible with the Control API.", N({
|
|
6682
6711
|
cursor: Z.optional(),
|
|
6683
|
-
limit:
|
|
6712
|
+
limit: bu
|
|
6684
6713
|
}), !0),
|
|
6685
6714
|
flow_get: $("Read Flow metadata, the full Draft and current Live publication. Use draft.revisionId as the base of an edit.", N({ flowId: Q }), !0),
|
|
6686
6715
|
flow_schema: $("Get the JSON Schema for atomic change operations, optionally one operation kind. Node titles must be non-empty and unique within a graph.", N({ kind: Z.optional() }), !0),
|
|
6687
6716
|
flow_create: $("Create an empty Flow. If this deployment uses OOMOL Connector, choose a teamId from connector_teams. Keep the key and arguments stable when retrying.", N({
|
|
6688
|
-
name: Z.refine((e) => e == e.trim() &&
|
|
6689
|
-
idempotencyKey:
|
|
6717
|
+
name: Z.refine((e) => e == e.trim() && Uc(e) == null, "Flow name is invalid."),
|
|
6718
|
+
idempotencyKey: yu,
|
|
6690
6719
|
teamId: Z.optional()
|
|
6691
6720
|
}), !1),
|
|
6692
6721
|
flow_apply: $("Apply ordered atomic changes. Read flow_schema first. A stale expectedRevisionId is a conflict; reread the Draft before deciding on a new edit.", N({
|
|
6693
6722
|
flowId: Q,
|
|
6694
6723
|
expectedRevisionId: Z,
|
|
6695
|
-
idempotencyKey:
|
|
6696
|
-
operations: j(
|
|
6724
|
+
idempotencyKey: yu,
|
|
6725
|
+
operations: j(vu).min(1).describe("Change operations defined by flow_schema. Explicit IDs and before values refer to the base Revision.")
|
|
6697
6726
|
}), !1),
|
|
6698
6727
|
flow_check: $("Validate a fixed Revision and return diagnostics. Get its revisionId from flow_get or flow_apply.", N({
|
|
6699
6728
|
flowId: Q,
|
|
@@ -6703,7 +6732,7 @@ var yu = {
|
|
|
6703
6732
|
flowId: Q,
|
|
6704
6733
|
revisionId: Z,
|
|
6705
6734
|
expectedLivePublicationId: Z.nullable(),
|
|
6706
|
-
idempotencyKey:
|
|
6735
|
+
idempotencyKey: yu
|
|
6707
6736
|
}), !1),
|
|
6708
6737
|
flow_publish_status: $("Read a publish operation. Only succeeded confirms publication; failed includes the failure details. Keep polling while pending.", N({
|
|
6709
6738
|
flowId: Q,
|
|
@@ -6721,35 +6750,35 @@ var yu = {
|
|
|
6721
6750
|
publicationId: Z.optional(),
|
|
6722
6751
|
trigger: N({
|
|
6723
6752
|
nodeId: Z,
|
|
6724
|
-
payload:
|
|
6753
|
+
payload: vu
|
|
6725
6754
|
}),
|
|
6726
|
-
inputs: F(D(), F(D(),
|
|
6727
|
-
idempotencyKey:
|
|
6755
|
+
inputs: F(D(), F(D(), vu)).default({}),
|
|
6756
|
+
idempotencyKey: yu
|
|
6728
6757
|
}), !1),
|
|
6729
6758
|
run_list: $("List Runs for a Flow, optionally filtered by status. Continue with nextCursor; cursors are compatible with the Control API.", N({
|
|
6730
6759
|
flowId: Q,
|
|
6731
6760
|
pendingWait: A().optional(),
|
|
6732
6761
|
status: I(oc).optional(),
|
|
6733
6762
|
cursor: Z.optional(),
|
|
6734
|
-
limit:
|
|
6763
|
+
limit: bu
|
|
6735
6764
|
}), !0),
|
|
6736
|
-
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", N({ runId:
|
|
6765
|
+
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", N({ runId: xu }), !0),
|
|
6737
6766
|
run_events: $("Read one page of Run events. Continue with nextAfter. Events can expire independently of the terminal result.", N({
|
|
6738
|
-
runId:
|
|
6767
|
+
runId: xu,
|
|
6739
6768
|
after: fs().min(0).default(0),
|
|
6740
|
-
limit:
|
|
6769
|
+
limit: bu
|
|
6741
6770
|
}), !0),
|
|
6742
|
-
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", N({ runId:
|
|
6771
|
+
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", N({ runId: xu }), !0),
|
|
6743
6772
|
run_results: $("List stored Agent tool result metadata for a Run, including Connector and code results. Continue with nextAfter as after. Use run_result_read to inspect content.", N({
|
|
6744
|
-
runId:
|
|
6773
|
+
runId: xu,
|
|
6745
6774
|
after: Z.optional()
|
|
6746
6775
|
}), !0),
|
|
6747
|
-
run_result_read: $("Read a bounded page of a stored Agent tool result. Select a JSON Pointer with pointer and continue with nextOffset as offset at the same pointer. A complete value contains all data at that pointer.",
|
|
6748
|
-
runId:
|
|
6776
|
+
run_result_read: $("Read a bounded page of a stored Agent tool result. Select a JSON Pointer with pointer and continue with nextOffset as offset at the same pointer. A complete value contains all data at that pointer.", Wc.extend({
|
|
6777
|
+
runId: xu,
|
|
6749
6778
|
resultId: Z
|
|
6750
6779
|
}), !0),
|
|
6751
6780
|
run_resolve_wait: $("Explicitly resolve the waitId observed in run_get with one of its allowed actions. The first decision wins; inspect resolutionAccepted and action. Resume the same Run and poll run_get; do not create a replacement Run.", N({
|
|
6752
|
-
runId:
|
|
6781
|
+
runId: xu,
|
|
6753
6782
|
waitId: Z,
|
|
6754
6783
|
action: I([
|
|
6755
6784
|
"approve",
|
|
@@ -6757,7 +6786,7 @@ var yu = {
|
|
|
6757
6786
|
"reject"
|
|
6758
6787
|
])
|
|
6759
6788
|
}), !1),
|
|
6760
|
-
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", N({ runId:
|
|
6789
|
+
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", N({ runId: xu }), !1),
|
|
6761
6790
|
connector_teams: $("List OOMOL Teams available for Flow creation. An unconfigured or custom Connector may not provide Teams.", N({}), !0),
|
|
6762
6791
|
connector_list: $("List Connector providers available in the Flow scope.", N({ flowId: Q.optional() }), !0),
|
|
6763
6792
|
connector_search: $("Search Connector actions in the Flow scope.", N({
|
|
@@ -6776,4 +6805,4 @@ var yu = {
|
|
|
6776
6805
|
trigger_get: $("Read a provider Trigger definition before creating its node.", N({ key: Z }), !0)
|
|
6777
6806
|
};
|
|
6778
6807
|
//#endregion
|
|
6779
|
-
export {
|
|
6808
|
+
export { gu as mcpConformanceCases, Su as mcpInstructions, _u as mcpProtocolVersion, Cu as mcpTools };
|