@oomol-lab/open-flow 0.1.0-beta.40 → 0.1.0-beta.41
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/README.md +9 -0
- package/dist/browser/{createResourceDialog-BOrW62JW.js → createResourceDialog-DmJk4LsF.js} +28 -29
- package/dist/browser/dist-BhV15xlT.js +300 -0
- package/dist/browser/flow-authoring-node.d.ts +4 -1
- package/dist/browser/flow-authoring.js +7 -10
- package/dist/browser/flow-change.d.ts +3 -15
- package/dist/browser/flow-change.js +1 -2
- package/dist/browser/{editorComponent-0skblWYk.js → flowChanges-Rb1Nz-ph.js} +34187 -15646
- package/dist/browser/{flowRunInputEditorStore-Bgb5vSeS.js → flowRunInputEditorStore-rVbwoTfN.js} +1 -1
- package/dist/browser/{flowWorkspace-DJzQVVtZ.js → flowWorkspace-B04ZIbVq.js} +38861 -39243
- package/dist/browser/licenses.md +16 -0
- package/dist/browser/{markdownContent-D2oHGWc6.js → markdownContent-DP6aYNZN.js} +17 -17
- package/dist/browser/markdownContent-DPkwZqaL.js +44588 -0
- package/dist/browser/preview.css +2 -0
- package/dist/browser/preview.css.d.ts +1 -0
- package/dist/browser/preview.d.ts +15 -0
- package/dist/browser/preview.js +88010 -0
- package/dist/browser/theme.css +7 -1
- package/dist/browser/{typeScriptSession-v9Pb3G6d.js → typeScriptSession-By_yez_b.js} +1 -1
- package/dist/browser/ui.css +1 -1
- package/dist/browser/ui.js +3903 -1421
- package/dist/browser/workbench-contract.d.ts +21 -12
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +3 -1
- package/dist/browser/workbench.js +1174 -1848
- package/dist/browser/workbenchSelect-Bq6KHpKx.js +16033 -0
- package/dist/common/control-api-conformance.js +2606 -2540
- package/dist/common/control-api.d.ts +18 -10
- package/dist/common/control-api.js +2428 -2381
- package/dist/common/control-requests.js +4 -8
- package/dist/common/flow-encoding.js +1 -2
- package/dist/common/flow-graph.d.ts +1 -1
- package/dist/common/flow-promptTemplate.d.ts +4 -0
- package/dist/common/flow-schema.d.ts +1 -0
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +2780 -2770
- package/dist/common/integration-trigger.js +724 -721
- package/dist/common/mcp.js +789 -739
- package/dist/common/poll-trigger.js +40 -37
- package/dist/common/provider-triggers.js +611 -608
- package/dist/common/providerIconSprite.d.ts +25 -0
- package/dist/common/runtime-contract.js +2 -1
- package/dist/common/scheduler.d.ts +2 -0
- package/dist/common/scheduler.js +1585 -1549
- package/dist/common/webhook-trigger.js +1 -2
- package/dist/index.d.ts +19 -0
- package/package.json +9 -1
- package/dist/browser/flowChanges-3o9Vs_1I.js +0 -10137
- package/dist/browser/inputValues-DkDT6u0o.js +0 -43
- package/dist/browser/lite-BA96NG4M.js +0 -8549
- package/dist/browser/workbenchSelect-B5zXyaaX.js +0 -6423
package/dist/common/mcp.js
CHANGED
|
@@ -4620,8 +4620,7 @@ var qc = E(k([D({
|
|
|
4620
4620
|
kind: j("agent"),
|
|
4621
4621
|
code: T().optional(),
|
|
4622
4622
|
model: M,
|
|
4623
|
-
prompt:
|
|
4624
|
-
system: M,
|
|
4623
|
+
prompt: M,
|
|
4625
4624
|
maxRounds: w(),
|
|
4626
4625
|
tools: E(D({
|
|
4627
4626
|
id: M,
|
|
@@ -5063,7 +5062,42 @@ var Il = O({
|
|
|
5063
5062
|
offset: w().int().nonnegative().default(0),
|
|
5064
5063
|
limit: w().int().min(1).max(100).default(20),
|
|
5065
5064
|
maxBytes: w().int().min(1).max(1048576).default(15e3)
|
|
5066
|
-
})
|
|
5065
|
+
});
|
|
5066
|
+
//#endregion
|
|
5067
|
+
//#region src/control/common/providerIconSprite.ts
|
|
5068
|
+
function Ll(e, t) {
|
|
5069
|
+
if (!e || typeof e != "object" || !t || typeof t != "object") return {};
|
|
5070
|
+
let n = e, r = t;
|
|
5071
|
+
if (typeof n.version != "string" || ![
|
|
5072
|
+
n.pixelRatio,
|
|
5073
|
+
n.iconSize,
|
|
5074
|
+
n.width,
|
|
5075
|
+
n.height
|
|
5076
|
+
].every((e) => Number.isInteger(e) && e > 0) || ![
|
|
5077
|
+
n.bleed,
|
|
5078
|
+
r.x,
|
|
5079
|
+
r.y
|
|
5080
|
+
].every((e) => Number.isInteger(e) && e >= 0) || r.x + n.iconSize > n.width || r.y + n.iconSize > n.height) return {};
|
|
5081
|
+
try {
|
|
5082
|
+
for (let e of [n.lightUrl, n.darkUrl]) if (typeof e != "string" || ![
|
|
5083
|
+
"https:",
|
|
5084
|
+
"http:",
|
|
5085
|
+
"data:"
|
|
5086
|
+
].includes(new URL(e).protocol)) return {};
|
|
5087
|
+
} catch {
|
|
5088
|
+
return {};
|
|
5089
|
+
}
|
|
5090
|
+
return {
|
|
5091
|
+
iconSprite: n,
|
|
5092
|
+
iconSpritePosition: {
|
|
5093
|
+
x: r.x,
|
|
5094
|
+
y: r.y
|
|
5095
|
+
}
|
|
5096
|
+
};
|
|
5097
|
+
}
|
|
5098
|
+
//#endregion
|
|
5099
|
+
//#region src/control/common/errors.ts
|
|
5100
|
+
var N = {
|
|
5067
5101
|
authenticationRequired: "authentication.required",
|
|
5068
5102
|
authorizationDenied: "authorization.denied",
|
|
5069
5103
|
bindingUnresolved: "binding.unresolved",
|
|
@@ -5112,7 +5146,7 @@ var Il = O({
|
|
|
5112
5146
|
variableNotFound: "variable.not-found"
|
|
5113
5147
|
};
|
|
5114
5148
|
N.eventSourceInvalid, N.eventSourceIdentityUnavailable, N.eventSourceNotFound, N.eventSourceConflict, N.authenticationRequired, N.authorizationDenied, N.bindingUnresolved, N.connectorActionNotFound, N.connectorAccessConflict, N.connectorAccessInvalid, N.connectorAccessRequired, N.connectorAccessUnsupported, N.connectorUnconfigured, N.connectorUnavailable, N.connectorConsoleUnconfigured, N.engineUnavailable, N.engineUnsupported, N.flowInvalid, N.flowRepairRequired, N.flowUpgradeRequired, N.flowNotFound, N.flowBusy, N.flowConflict, N.flowPresentationConflict, N.flowRevisionConflict, N.liveConflict, N.liveNotFound, N.pageInvalidCursor, N.publicationConflict, N.publicationNotFound, N.publicationUnsupported, N.publishOperationNotFound, N.routeNotFound, N.runConflict, N.runEventsExpired, N.runInvalid, N.runNotFound, N.runNotTerminal, N.runOverloaded, N.runWaitNotFound, N.triggerKeyInvalid, N.triggerKeyNotFound, N.triggerNotFound, N.variableInvalid, N.variableLimitReached, N.variableNotFound;
|
|
5115
|
-
var
|
|
5149
|
+
var Rl = class extends Error {
|
|
5116
5150
|
constructor(e, t, n) {
|
|
5117
5151
|
super(n), this.code = t, this.name = "ApiError", this.status = e;
|
|
5118
5152
|
}
|
|
@@ -5120,7 +5154,7 @@ var Ll = class extends Error {
|
|
|
5120
5154
|
//#endregion
|
|
5121
5155
|
//#region src/control/common/decoding.ts
|
|
5122
5156
|
function P() {
|
|
5123
|
-
throw new
|
|
5157
|
+
throw new Rl(502, "response.invalid", "The Control API returned an invalid response.");
|
|
5124
5158
|
}
|
|
5125
5159
|
function F(e) {
|
|
5126
5160
|
return typeof e != "object" || !e || Array.isArray(e) ? P() : e;
|
|
@@ -5135,28 +5169,28 @@ function L(e, t) {
|
|
|
5135
5169
|
function R(e) {
|
|
5136
5170
|
return Number.isSafeInteger(e) ? e : P();
|
|
5137
5171
|
}
|
|
5138
|
-
function
|
|
5172
|
+
function zl(e) {
|
|
5139
5173
|
if (e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e)) return e;
|
|
5140
|
-
if (Array.isArray(e)) return e.map(
|
|
5174
|
+
if (Array.isArray(e)) return e.map(zl);
|
|
5141
5175
|
let t = F(e);
|
|
5142
|
-
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e,
|
|
5176
|
+
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, zl(t)]));
|
|
5143
5177
|
}
|
|
5144
|
-
function
|
|
5178
|
+
function Bl(e) {
|
|
5145
5179
|
if (e != null) return I(e);
|
|
5146
5180
|
}
|
|
5147
5181
|
new TextEncoder();
|
|
5148
5182
|
//#endregion
|
|
5149
5183
|
//#region src/control/common/providerAccess.ts
|
|
5150
|
-
var
|
|
5184
|
+
var Vl = lc("kind", [O({ kind: j("admin-delegation") }), O({
|
|
5151
5185
|
kind: j("policy"),
|
|
5152
5186
|
ruleId: S().min(1).nullable()
|
|
5153
5187
|
})]);
|
|
5154
|
-
function
|
|
5155
|
-
return
|
|
5188
|
+
function Hl(e) {
|
|
5189
|
+
return Vl.parse(e);
|
|
5156
5190
|
}
|
|
5157
5191
|
//#endregion
|
|
5158
5192
|
//#region src/control/common/connectorDecoders.ts
|
|
5159
|
-
function
|
|
5193
|
+
function Ul(e) {
|
|
5160
5194
|
let t = F(e);
|
|
5161
5195
|
if (L(t, [
|
|
5162
5196
|
"actionIds",
|
|
@@ -5172,8 +5206,8 @@ function Hl(e) {
|
|
|
5172
5206
|
proxy: t.proxy
|
|
5173
5207
|
};
|
|
5174
5208
|
}
|
|
5175
|
-
function
|
|
5176
|
-
let n = F(e), r = n.policyRevision, i = n.status, a = n.isDefault, o = Object.hasOwn(n, "displayName") && !Object.hasOwn(n, "connectionDisplayName"), s = t && Object.hasOwn(n, "permissions") ?
|
|
5209
|
+
function Wl(e, t) {
|
|
5210
|
+
let n = F(e), r = n.policyRevision, i = n.status, a = n.isDefault, o = Object.hasOwn(n, "displayName") && !Object.hasOwn(n, "connectionDisplayName"), s = t && Object.hasOwn(n, "permissions") ? Ul(n.permissions) : void 0, c = n.permissionGroupName;
|
|
5177
5211
|
if (L(n, [
|
|
5178
5212
|
"accessBindingId",
|
|
5179
5213
|
"connectionId",
|
|
@@ -5188,7 +5222,7 @@ function Ul(e, t) {
|
|
|
5188
5222
|
]), r != null && typeof r != "string" || t && a !== void 0 && typeof a != "boolean" || c != null && typeof c != "string" || !t && i != "active" && i != "forbidden" && i != "invalid" && i != "missing") return P();
|
|
5189
5223
|
let l;
|
|
5190
5224
|
try {
|
|
5191
|
-
l =
|
|
5225
|
+
l = Hl(n.source);
|
|
5192
5226
|
} catch {
|
|
5193
5227
|
return P();
|
|
5194
5228
|
}
|
|
@@ -5205,10 +5239,10 @@ function Ul(e, t) {
|
|
|
5205
5239
|
...t ? {} : { status: i }
|
|
5206
5240
|
};
|
|
5207
5241
|
}
|
|
5208
|
-
function
|
|
5242
|
+
function Gl(e) {
|
|
5209
5243
|
return e != "implicit" && e != "selectable" ? P() : e;
|
|
5210
5244
|
}
|
|
5211
|
-
function
|
|
5245
|
+
function Kl(e) {
|
|
5212
5246
|
let t = F(e);
|
|
5213
5247
|
L(t, [
|
|
5214
5248
|
"accessRevision",
|
|
@@ -5227,9 +5261,9 @@ function Gl(e) {
|
|
|
5227
5261
|
if (i < 0) return P();
|
|
5228
5262
|
let a = [];
|
|
5229
5263
|
for (let e of t.bindings) try {
|
|
5230
|
-
a.push(
|
|
5264
|
+
a.push(Wl(e, !1));
|
|
5231
5265
|
} catch (t) {
|
|
5232
|
-
if (!(t instanceof
|
|
5266
|
+
if (!(t instanceof Rl) || t.code != "response.invalid") throw t;
|
|
5233
5267
|
typeof e == "object" && e && !Array.isArray(e) && typeof e.accessBindingId == "string" && e.accessBindingId.length > 0 && typeof e.providerId == "string" && e.providerId.length > 0 ? a.push({
|
|
5234
5268
|
accessBindingId: e.accessBindingId,
|
|
5235
5269
|
providerId: e.providerId,
|
|
@@ -5245,12 +5279,12 @@ function Gl(e) {
|
|
|
5245
5279
|
...i == 0 ? {} : { discardedBindingCount: i },
|
|
5246
5280
|
...r == null ? {} : { providerIds: r },
|
|
5247
5281
|
bindings: a,
|
|
5248
|
-
mode:
|
|
5282
|
+
mode: Gl(t.mode),
|
|
5249
5283
|
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
5250
5284
|
version: 1
|
|
5251
5285
|
} : P();
|
|
5252
5286
|
}
|
|
5253
|
-
function
|
|
5287
|
+
function ql(e) {
|
|
5254
5288
|
if (!Array.isArray(e)) return P();
|
|
5255
5289
|
let t = e.map((e) => {
|
|
5256
5290
|
let t = F(e);
|
|
@@ -5264,7 +5298,7 @@ function Kl(e) {
|
|
|
5264
5298
|
]);
|
|
5265
5299
|
let n;
|
|
5266
5300
|
try {
|
|
5267
|
-
n =
|
|
5301
|
+
n = Hl(t.source);
|
|
5268
5302
|
} catch {
|
|
5269
5303
|
return P();
|
|
5270
5304
|
}
|
|
@@ -5279,7 +5313,7 @@ function Kl(e) {
|
|
|
5279
5313
|
});
|
|
5280
5314
|
return new Set(t.map((e) => e.accessBindingId)).size == t.length ? t : P();
|
|
5281
5315
|
}
|
|
5282
|
-
function
|
|
5316
|
+
function Jl(e) {
|
|
5283
5317
|
let t = F(e);
|
|
5284
5318
|
if (L(t, [
|
|
5285
5319
|
"mode",
|
|
@@ -5288,7 +5322,7 @@ function ql(e) {
|
|
|
5288
5322
|
"selectedBindings",
|
|
5289
5323
|
"version"
|
|
5290
5324
|
]), t.version != 2) return P();
|
|
5291
|
-
let n =
|
|
5325
|
+
let n = Gl(t.mode), r = ql(t.sharedBindings), i = ql(t.selectedBindings);
|
|
5292
5326
|
return n == "implicit" && (r.length > 0 || i.length > 0) ? P() : {
|
|
5293
5327
|
mode: n,
|
|
5294
5328
|
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
@@ -5297,7 +5331,7 @@ function ql(e) {
|
|
|
5297
5331
|
version: 2
|
|
5298
5332
|
};
|
|
5299
5333
|
}
|
|
5300
|
-
function
|
|
5334
|
+
function Yl(e, t) {
|
|
5301
5335
|
let n = F(e);
|
|
5302
5336
|
if (L(n, [
|
|
5303
5337
|
"candidates",
|
|
@@ -5305,21 +5339,21 @@ function Jl(e, t) {
|
|
|
5305
5339
|
"providerId",
|
|
5306
5340
|
"version"
|
|
5307
5341
|
]), n.version != 1 || I(n.providerId) != t || !Array.isArray(n.candidates)) return P();
|
|
5308
|
-
let r = n.candidates.map((e) =>
|
|
5342
|
+
let r = n.candidates.map((e) => Wl(e, !0));
|
|
5309
5343
|
return r.some((e) => e.providerId != t) || new Set(r.map((e) => e.accessBindingId)).size != r.length ? P() : {
|
|
5310
5344
|
candidates: r,
|
|
5311
|
-
mode:
|
|
5345
|
+
mode: Gl(n.mode),
|
|
5312
5346
|
providerId: t,
|
|
5313
5347
|
version: 1
|
|
5314
5348
|
};
|
|
5315
5349
|
}
|
|
5316
|
-
function
|
|
5350
|
+
function Xl(e, t) {
|
|
5317
5351
|
let n = F(e);
|
|
5318
5352
|
if (L(n, ["results", "version"]), n.version != 1 || !Array.isArray(n.results)) return P();
|
|
5319
5353
|
let r = new Set(t), i = n.results.map((e) => {
|
|
5320
5354
|
let t = F(e), n = I(t.providerId);
|
|
5321
5355
|
if (!r.delete(n)) return P();
|
|
5322
|
-
if (!Object.hasOwn(t, "error")) return
|
|
5356
|
+
if (!Object.hasOwn(t, "error")) return Yl(t, n);
|
|
5323
5357
|
L(t, ["providerId", "error"]);
|
|
5324
5358
|
let i = F(t.error);
|
|
5325
5359
|
return L(i, ["code", "message"]), {
|
|
@@ -5335,7 +5369,7 @@ function Yl(e, t) {
|
|
|
5335
5369
|
version: 1
|
|
5336
5370
|
} : P();
|
|
5337
5371
|
}
|
|
5338
|
-
function
|
|
5372
|
+
function Zl(e) {
|
|
5339
5373
|
let t = F(e);
|
|
5340
5374
|
if (L(t, [
|
|
5341
5375
|
...Object.hasOwn(t, "providerAccountId") ? ["providerAccountId"] : [],
|
|
@@ -5359,7 +5393,7 @@ function Xl(e) {
|
|
|
5359
5393
|
status: n
|
|
5360
5394
|
};
|
|
5361
5395
|
}
|
|
5362
|
-
function
|
|
5396
|
+
function Ql(e, t = !1) {
|
|
5363
5397
|
let n = F(e), r = n.description, i = t && Object.hasOwn(n, "value");
|
|
5364
5398
|
return L(n, [
|
|
5365
5399
|
"jsonSchema",
|
|
@@ -5368,18 +5402,18 @@ function Zl(e, t = !1) {
|
|
|
5368
5402
|
...i ? ["value"] : []
|
|
5369
5403
|
]), r != null && typeof r != "string" || typeof n.nullable != "boolean" ? P() : {
|
|
5370
5404
|
...r == null ? {} : { description: r },
|
|
5371
|
-
jsonSchema:
|
|
5405
|
+
jsonSchema: zl(n.jsonSchema),
|
|
5372
5406
|
nullable: n.nullable,
|
|
5373
|
-
...i ? { value:
|
|
5407
|
+
...i ? { value: zl(n.value) } : {}
|
|
5374
5408
|
};
|
|
5375
5409
|
}
|
|
5376
|
-
function
|
|
5377
|
-
return
|
|
5410
|
+
function $l(e) {
|
|
5411
|
+
return Ql(e, !0);
|
|
5378
5412
|
}
|
|
5379
|
-
function
|
|
5413
|
+
function eu(e, t) {
|
|
5380
5414
|
return Object.fromEntries(Object.entries(F(e)).map(([e, n]) => [e, t(n)]));
|
|
5381
5415
|
}
|
|
5382
|
-
function
|
|
5416
|
+
function tu(e) {
|
|
5383
5417
|
let t = F(e), n = t.homepageUrl, r = t.icon;
|
|
5384
5418
|
return L(t, [
|
|
5385
5419
|
"actionId",
|
|
@@ -5390,47 +5424,53 @@ function eu(e) {
|
|
|
5390
5424
|
"description",
|
|
5391
5425
|
...n == null ? [] : ["homepageUrl"],
|
|
5392
5426
|
...r == null ? [] : ["icon"],
|
|
5427
|
+
..."iconSprite" in t ? ["iconSprite"] : [],
|
|
5428
|
+
..."iconSpritePosition" in t ? ["iconSpritePosition"] : [],
|
|
5393
5429
|
"inputs",
|
|
5394
5430
|
"name",
|
|
5395
5431
|
"outputs",
|
|
5396
5432
|
"serviceId",
|
|
5397
5433
|
"serviceName"
|
|
5398
5434
|
]), n != null && typeof n != "string" || r != null && typeof r != "string" ? P() : {
|
|
5399
|
-
...t.inputSchema === void 0 ? {} : { inputSchema:
|
|
5400
|
-
...t.outputSchema === void 0 ? {} : { outputSchema:
|
|
5435
|
+
...t.inputSchema === void 0 ? {} : { inputSchema: zl(t.inputSchema) },
|
|
5436
|
+
...t.outputSchema === void 0 ? {} : { outputSchema: zl(t.outputSchema) },
|
|
5401
5437
|
actionId: I(t.actionId),
|
|
5402
5438
|
...t.operationType == null ? {} : { operationType: I(t.operationType) },
|
|
5403
5439
|
authenticated: typeof t.authenticated == "boolean" ? t.authenticated : P(),
|
|
5404
5440
|
description: typeof t.description == "string" ? t.description : P(),
|
|
5405
5441
|
...n == null ? {} : { homepageUrl: n },
|
|
5406
5442
|
...r == null ? {} : { icon: r },
|
|
5407
|
-
|
|
5443
|
+
...Ll(t.iconSprite, t.iconSpritePosition),
|
|
5444
|
+
inputs: eu(t.inputs, $l),
|
|
5408
5445
|
name: I(t.name),
|
|
5409
|
-
outputs:
|
|
5446
|
+
outputs: eu(t.outputs, Ql),
|
|
5410
5447
|
serviceId: I(t.serviceId),
|
|
5411
5448
|
serviceName: I(t.serviceName)
|
|
5412
5449
|
};
|
|
5413
5450
|
}
|
|
5414
|
-
function
|
|
5415
|
-
let { defaultConnection: t, ...n } = F(e), r =
|
|
5451
|
+
function nu(e) {
|
|
5452
|
+
let { defaultConnection: t, ...n } = F(e), r = tu(n);
|
|
5416
5453
|
if (t == null) return r;
|
|
5417
|
-
let i =
|
|
5454
|
+
let i = Zl(t);
|
|
5418
5455
|
return i.serviceId != r.serviceId || i.status != "active" ? P() : {
|
|
5419
5456
|
...r,
|
|
5420
5457
|
defaultConnection: i
|
|
5421
5458
|
};
|
|
5422
5459
|
}
|
|
5423
|
-
function
|
|
5460
|
+
function ru(e) {
|
|
5424
5461
|
let t = F(e), n = t.homepageUrl, r = t.icon;
|
|
5425
5462
|
return t.noSetup !== void 0 && typeof t.noSetup != "boolean" || (L(t, [
|
|
5426
5463
|
...Object.hasOwn(t, "noSetup") ? ["noSetup"] : [],
|
|
5427
5464
|
"serviceId",
|
|
5428
5465
|
"serviceName",
|
|
5429
5466
|
...n == null ? [] : ["homepageUrl"],
|
|
5430
|
-
...r == null ? [] : ["icon"]
|
|
5467
|
+
...r == null ? [] : ["icon"],
|
|
5468
|
+
..."iconSprite" in t ? ["iconSprite"] : [],
|
|
5469
|
+
..."iconSpritePosition" in t ? ["iconSpritePosition"] : []
|
|
5431
5470
|
]), n != null && typeof n != "string" || r != null && typeof r != "string") ? P() : {
|
|
5432
5471
|
...n == null ? {} : { homepageUrl: n },
|
|
5433
5472
|
...r == null ? {} : { icon: r },
|
|
5473
|
+
...Ll(t.iconSprite, t.iconSpritePosition),
|
|
5434
5474
|
serviceId: I(t.serviceId),
|
|
5435
5475
|
serviceName: I(t.serviceName),
|
|
5436
5476
|
...t.noSetup === void 0 ? {} : { noSetup: t.noSetup }
|
|
@@ -5438,45 +5478,45 @@ function nu(e) {
|
|
|
5438
5478
|
}
|
|
5439
5479
|
//#endregion
|
|
5440
5480
|
//#region src/json-schema-subset/utils.ts
|
|
5441
|
-
var
|
|
5442
|
-
function
|
|
5443
|
-
let e =
|
|
5444
|
-
return
|
|
5481
|
+
var iu = 0;
|
|
5482
|
+
function au() {
|
|
5483
|
+
let e = iu;
|
|
5484
|
+
return iu += 1, e;
|
|
5445
5485
|
}
|
|
5446
|
-
function
|
|
5486
|
+
function ou(e) {
|
|
5447
5487
|
if (typeof e == "object" && e && !Object.isFrozen(e)) {
|
|
5448
|
-
for (let t of Object.getOwnPropertyNames(e))
|
|
5488
|
+
for (let t of Object.getOwnPropertyNames(e)) ou(Reflect.get(e, t));
|
|
5449
5489
|
Object.freeze(e);
|
|
5450
5490
|
}
|
|
5451
5491
|
return e;
|
|
5452
5492
|
}
|
|
5453
|
-
function
|
|
5493
|
+
function su(e, t) {
|
|
5454
5494
|
let n = {};
|
|
5455
5495
|
for (let r of t) r in e && (n[r] = e[r]);
|
|
5456
5496
|
return n;
|
|
5457
5497
|
}
|
|
5458
|
-
function
|
|
5498
|
+
function cu(e) {
|
|
5459
5499
|
if (typeof e != "object" || !e) return e;
|
|
5460
5500
|
if (Array.isArray(e)) {
|
|
5461
5501
|
let t = [];
|
|
5462
|
-
for (let [n, r] of e.entries()) t[n] =
|
|
5502
|
+
for (let [n, r] of e.entries()) t[n] = cu(r);
|
|
5463
5503
|
return t;
|
|
5464
5504
|
}
|
|
5465
5505
|
{
|
|
5466
5506
|
let t = {};
|
|
5467
|
-
for (let n in e) t[n] =
|
|
5507
|
+
for (let n in e) t[n] = cu(e[n]);
|
|
5468
5508
|
return t;
|
|
5469
5509
|
}
|
|
5470
5510
|
}
|
|
5471
|
-
function
|
|
5511
|
+
function lu(e, t) {
|
|
5472
5512
|
if (e === t) return !0;
|
|
5473
5513
|
if (typeof e != "object" || !e || typeof e != typeof t) return !1;
|
|
5474
5514
|
if (Array.isArray(e)) {
|
|
5475
5515
|
if (!Array.isArray(t) || e.length !== t.length) return !1;
|
|
5476
|
-
for (let [n, r] of e.entries()) if (!
|
|
5516
|
+
for (let [n, r] of e.entries()) if (!lu(r, t[n])) return !1;
|
|
5477
5517
|
} else {
|
|
5478
5518
|
if (Array.isArray(t)) return !1;
|
|
5479
|
-
for (let n in e) if (!(n in t) || !
|
|
5519
|
+
for (let n in e) if (!(n in t) || !lu(e[n], t[n])) return !1;
|
|
5480
5520
|
for (let n in t) if (!(n in e)) return !1;
|
|
5481
5521
|
}
|
|
5482
5522
|
return !0;
|
|
@@ -5489,48 +5529,48 @@ var z = Object.freeze({
|
|
|
5489
5529
|
ContainedBy: 2,
|
|
5490
5530
|
Rejection: 3,
|
|
5491
5531
|
Intersection: 4
|
|
5492
|
-
}), B =
|
|
5532
|
+
}), B = _u(z.Equals), V = _u(z.Containing), H = _u(z.ContainedBy), U = _u(z.Rejection), W = _u(z.Intersection), uu = ou([
|
|
5493
5533
|
[z.Equals, B],
|
|
5494
5534
|
[z.Containing, V],
|
|
5495
5535
|
[z.ContainedBy, H],
|
|
5496
5536
|
[z.Rejection, U],
|
|
5497
5537
|
[z.Intersection, W]
|
|
5498
|
-
]),
|
|
5538
|
+
]), du = (() => {
|
|
5499
5539
|
let e = 0;
|
|
5500
|
-
for (let [t, n] of
|
|
5540
|
+
for (let [t, n] of uu) e |= n;
|
|
5501
5541
|
return e;
|
|
5502
5542
|
})();
|
|
5503
|
-
function
|
|
5543
|
+
function fu(e) {
|
|
5504
5544
|
return !!(e & B);
|
|
5505
5545
|
}
|
|
5506
|
-
function
|
|
5546
|
+
function pu(e) {
|
|
5507
5547
|
return !!(e & V);
|
|
5508
5548
|
}
|
|
5509
|
-
function
|
|
5549
|
+
function mu(e) {
|
|
5510
5550
|
return !!(e & H);
|
|
5511
5551
|
}
|
|
5512
|
-
function
|
|
5552
|
+
function hu(e) {
|
|
5513
5553
|
return !!(e & U);
|
|
5514
5554
|
}
|
|
5515
|
-
function
|
|
5555
|
+
function gu(e) {
|
|
5516
5556
|
return !!(e & W);
|
|
5517
5557
|
}
|
|
5518
|
-
function
|
|
5558
|
+
function _u(e) {
|
|
5519
5559
|
return 1 << e;
|
|
5520
5560
|
}
|
|
5521
5561
|
//#endregion
|
|
5522
5562
|
//#region src/json-schema-subset/expression/combination.ts
|
|
5523
|
-
function
|
|
5524
|
-
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r :
|
|
5563
|
+
function vu(e) {
|
|
5564
|
+
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : yu(t, r, e), n += 1, t) };
|
|
5525
5565
|
return Object.defineProperties(r, {
|
|
5526
5566
|
result: { get: () => t },
|
|
5527
5567
|
count: { get: () => n }
|
|
5528
5568
|
}), r;
|
|
5529
5569
|
}
|
|
5530
|
-
function
|
|
5570
|
+
function yu(e, t, n) {
|
|
5531
5571
|
let r = 0;
|
|
5532
|
-
for (let [i, a] of
|
|
5533
|
-
for (let [e, a] of
|
|
5572
|
+
for (let [i, a] of uu) if (a & e) {
|
|
5573
|
+
for (let [e, a] of uu) if (a & t && (r |= n(i, e), r === du)) return r;
|
|
5534
5574
|
}
|
|
5535
5575
|
return r;
|
|
5536
5576
|
}
|
|
@@ -5544,59 +5584,59 @@ var G = Object.freeze({
|
|
|
5544
5584
|
Not: 4,
|
|
5545
5585
|
Swap: 5
|
|
5546
5586
|
});
|
|
5547
|
-
function
|
|
5587
|
+
function bu(e, t) {
|
|
5548
5588
|
switch (e) {
|
|
5549
5589
|
case G.Save: return t[0];
|
|
5550
|
-
case G.OneOf: return
|
|
5590
|
+
case G.OneOf: return Su(t);
|
|
5551
5591
|
case G.AllOf:
|
|
5552
|
-
case G.AnyOf: return
|
|
5592
|
+
case G.AnyOf: return Cu(e, t);
|
|
5553
5593
|
case G.Not:
|
|
5554
|
-
case G.Swap: return
|
|
5594
|
+
case G.Swap: return wu(e, t[0]);
|
|
5555
5595
|
}
|
|
5556
5596
|
}
|
|
5557
|
-
function bu(e) {
|
|
5558
|
-
return Cu(G.Swap, e);
|
|
5559
|
-
}
|
|
5560
5597
|
function xu(e) {
|
|
5598
|
+
return wu(G.Swap, e);
|
|
5599
|
+
}
|
|
5600
|
+
function Su(e) {
|
|
5561
5601
|
if (e.length === 1) return e[0];
|
|
5562
|
-
let t =
|
|
5602
|
+
let t = Cu(G.AnyOf, e), n = [];
|
|
5563
5603
|
for (let t = 0; t < e.length; ++t) for (let r = t + 1; r < e.length; ++r) {
|
|
5564
|
-
let i = e[t], a = e[r], o =
|
|
5604
|
+
let i = e[t], a = e[r], o = Cu(G.AllOf, [i, a]);
|
|
5565
5605
|
n.push(o);
|
|
5566
5606
|
}
|
|
5567
|
-
let r =
|
|
5568
|
-
return
|
|
5607
|
+
let r = Cu(G.AnyOf, n), i = wu(G.Not, r);
|
|
5608
|
+
return Cu(G.AllOf, [t, i]);
|
|
5569
5609
|
}
|
|
5570
|
-
function
|
|
5610
|
+
function Cu(e, t) {
|
|
5571
5611
|
if (t.length < 0) throw Error("invalid expressions: empty array");
|
|
5572
5612
|
let n;
|
|
5573
5613
|
switch (e) {
|
|
5574
5614
|
case G.AllOf:
|
|
5575
|
-
n =
|
|
5615
|
+
n = vu(Tu);
|
|
5576
5616
|
break;
|
|
5577
5617
|
case G.AnyOf:
|
|
5578
|
-
n =
|
|
5618
|
+
n = vu(Eu);
|
|
5579
5619
|
break;
|
|
5580
5620
|
default: throw Error(`invalid operator ${e}`);
|
|
5581
5621
|
}
|
|
5582
5622
|
for (let e of t) n.push(e);
|
|
5583
5623
|
return n.result;
|
|
5584
5624
|
}
|
|
5585
|
-
function
|
|
5625
|
+
function wu(e, t) {
|
|
5586
5626
|
let n, r = 0;
|
|
5587
5627
|
switch (e) {
|
|
5588
5628
|
case G.Not:
|
|
5589
|
-
n =
|
|
5629
|
+
n = Du;
|
|
5590
5630
|
break;
|
|
5591
5631
|
case G.Swap:
|
|
5592
|
-
n =
|
|
5632
|
+
n = Ou;
|
|
5593
5633
|
break;
|
|
5594
5634
|
default: throw Error(`invalid operator ${e}`);
|
|
5595
5635
|
}
|
|
5596
|
-
for (let [e, i] of
|
|
5636
|
+
for (let [e, i] of uu) i & t && (r |= n(e));
|
|
5597
5637
|
return r;
|
|
5598
5638
|
}
|
|
5599
|
-
function
|
|
5639
|
+
function Tu(e, t) {
|
|
5600
5640
|
let n = 0;
|
|
5601
5641
|
switch (e) {
|
|
5602
5642
|
case z.Equals:
|
|
@@ -5685,7 +5725,7 @@ function wu(e, t) {
|
|
|
5685
5725
|
}
|
|
5686
5726
|
return n;
|
|
5687
5727
|
}
|
|
5688
|
-
function
|
|
5728
|
+
function Eu(e, t) {
|
|
5689
5729
|
let n = 0;
|
|
5690
5730
|
switch (e) {
|
|
5691
5731
|
case z.Equals:
|
|
@@ -5774,7 +5814,7 @@ function Tu(e, t) {
|
|
|
5774
5814
|
}
|
|
5775
5815
|
return n;
|
|
5776
5816
|
}
|
|
5777
|
-
function
|
|
5817
|
+
function Du(e) {
|
|
5778
5818
|
let t = 0;
|
|
5779
5819
|
switch (e) {
|
|
5780
5820
|
case z.Equals:
|
|
@@ -5793,7 +5833,7 @@ function Eu(e) {
|
|
|
5793
5833
|
}
|
|
5794
5834
|
return t;
|
|
5795
5835
|
}
|
|
5796
|
-
function
|
|
5836
|
+
function Ou(e) {
|
|
5797
5837
|
let t = 0;
|
|
5798
5838
|
switch (e) {
|
|
5799
5839
|
case z.Equals:
|
|
@@ -5814,13 +5854,13 @@ function Du(e) {
|
|
|
5814
5854
|
}
|
|
5815
5855
|
//#endregion
|
|
5816
5856
|
//#region src/json-schema-subset/expression/types.ts
|
|
5817
|
-
var
|
|
5857
|
+
var ku = Object.freeze({
|
|
5818
5858
|
Leaf: 0,
|
|
5819
5859
|
Not: 1,
|
|
5820
5860
|
AllOf: 2,
|
|
5821
5861
|
AnyOf: 3,
|
|
5822
5862
|
OneOf: 4
|
|
5823
|
-
}),
|
|
5863
|
+
}), Au = (e) => (t, n) => {
|
|
5824
5864
|
let r = {
|
|
5825
5865
|
parent: null,
|
|
5826
5866
|
swapped: !1,
|
|
@@ -5848,7 +5888,7 @@ var Ou = Object.freeze({
|
|
|
5848
5888
|
let n = B, [r, o] = t.expressions;
|
|
5849
5889
|
if (!e.equals(r, o)) {
|
|
5850
5890
|
let a = e.describe(r);
|
|
5851
|
-
if (a.kind !==
|
|
5891
|
+
if (a.kind !== ku.Leaf) {
|
|
5852
5892
|
let [e, n] = s(a, !1);
|
|
5853
5893
|
t.expressions = null, t.calculation = e;
|
|
5854
5894
|
for (let [e, r] of n.entries()) i.push({
|
|
@@ -5863,7 +5903,7 @@ var Ou = Object.freeze({
|
|
|
5863
5903
|
return;
|
|
5864
5904
|
}
|
|
5865
5905
|
let c = e.describe(o);
|
|
5866
|
-
if (c.kind !==
|
|
5906
|
+
if (c.kind !== ku.Leaf) {
|
|
5867
5907
|
let [e, n] = s(c, !0);
|
|
5868
5908
|
t.expressions = null, t.calculation = e;
|
|
5869
5909
|
for (let [e, a] of n.entries()) i.push({
|
|
@@ -5889,16 +5929,16 @@ var Ou = Object.freeze({
|
|
|
5889
5929
|
function s(e, t) {
|
|
5890
5930
|
let n = G.Save, r;
|
|
5891
5931
|
switch (e.kind) {
|
|
5892
|
-
case
|
|
5932
|
+
case ku.Not:
|
|
5893
5933
|
n = G.Not, r = [e.expression];
|
|
5894
5934
|
break;
|
|
5895
|
-
case
|
|
5935
|
+
case ku.AllOf:
|
|
5896
5936
|
n = G.AllOf, r = [...e.expressions];
|
|
5897
5937
|
break;
|
|
5898
|
-
case
|
|
5938
|
+
case ku.AnyOf:
|
|
5899
5939
|
n = G.AnyOf, r = [...e.expressions];
|
|
5900
5940
|
break;
|
|
5901
|
-
case
|
|
5941
|
+
case ku.OneOf:
|
|
5902
5942
|
n = G.OneOf, r = [...e.expressions];
|
|
5903
5943
|
break;
|
|
5904
5944
|
default: throw Error(`invalid kind ${e.kind}`);
|
|
@@ -5911,8 +5951,8 @@ var Ou = Object.freeze({
|
|
|
5911
5951
|
}, r];
|
|
5912
5952
|
}
|
|
5913
5953
|
function c(e) {
|
|
5914
|
-
let t = e.calculation, n = e.parent, r =
|
|
5915
|
-
if (r === 0 && (r = H), t.willSwap && (r =
|
|
5954
|
+
let t = e.calculation, n = e.parent, r = bu(t.operator, t.results);
|
|
5955
|
+
if (r === 0 && (r = H), t.willSwap && (r = xu(r)), n) {
|
|
5916
5956
|
let e = n.node.calculation, t = e.results;
|
|
5917
5957
|
t[n.index] = r, e.count += 1, e.count >= t.length && a.push(n.node);
|
|
5918
5958
|
}
|
|
@@ -5920,79 +5960,79 @@ var Ou = Object.freeze({
|
|
|
5920
5960
|
let l = r.calculation.results[0];
|
|
5921
5961
|
if (l === 0) throw Error("cannot find result of root");
|
|
5922
5962
|
return l;
|
|
5923
|
-
},
|
|
5963
|
+
}, ju = class extends Error {
|
|
5924
5964
|
constructor(e = []) {
|
|
5925
|
-
super(
|
|
5965
|
+
super(Pu(e)), this.name = "SchemaError", this.items = e;
|
|
5926
5966
|
}
|
|
5927
|
-
},
|
|
5967
|
+
}, Mu = Object.freeze({
|
|
5928
5968
|
Compiled: 0,
|
|
5929
5969
|
External: 1
|
|
5930
5970
|
});
|
|
5931
|
-
function
|
|
5971
|
+
function Nu(e) {
|
|
5932
5972
|
switch (e.kind) {
|
|
5933
|
-
case
|
|
5973
|
+
case Mu.Compiled: {
|
|
5934
5974
|
let { message: t, path: n } = e;
|
|
5935
5975
|
return `${t} (at ${n.length > 0 ? n.join(".") : "$root"})`;
|
|
5936
5976
|
}
|
|
5937
|
-
case
|
|
5977
|
+
case Mu.External: return String(e.error);
|
|
5938
5978
|
}
|
|
5939
5979
|
}
|
|
5940
|
-
function
|
|
5980
|
+
function Pu(e) {
|
|
5941
5981
|
switch (e.length) {
|
|
5942
5982
|
case 0: return "without any items";
|
|
5943
|
-
case 1: return
|
|
5944
|
-
default: return `${
|
|
5983
|
+
case 1: return Nu(e[0]);
|
|
5984
|
+
default: return `${Nu(e[0])} ... omit the rest ${e.length - 1} items`;
|
|
5945
5985
|
}
|
|
5946
5986
|
}
|
|
5947
5987
|
//#endregion
|
|
5948
5988
|
//#region src/json-schema-subset/compiler/common.ts
|
|
5949
|
-
var
|
|
5950
|
-
function Fu(e) {
|
|
5951
|
-
return Pu.has(e);
|
|
5952
|
-
}
|
|
5989
|
+
var Fu = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
|
|
5953
5990
|
function Iu(e) {
|
|
5954
|
-
|
|
5991
|
+
return Fu.has(e);
|
|
5992
|
+
}
|
|
5993
|
+
function Lu(e) {
|
|
5994
|
+
for (let t in e) if (Iu(t)) return !1;
|
|
5955
5995
|
return !0;
|
|
5956
5996
|
}
|
|
5957
|
-
function
|
|
5997
|
+
function Ru(e, ...t) {
|
|
5958
5998
|
return {
|
|
5959
5999
|
...e,
|
|
5960
6000
|
path: [...e.path, ...t]
|
|
5961
6001
|
};
|
|
5962
6002
|
}
|
|
5963
|
-
function
|
|
6003
|
+
function zu(e) {
|
|
5964
6004
|
if (typeof e == "boolean") throw Error("JSONSchema7Definition cannot be boolean");
|
|
5965
6005
|
return e;
|
|
5966
6006
|
}
|
|
5967
|
-
function
|
|
5968
|
-
t.push(
|
|
6007
|
+
function Bu({ path: e, errors: t }, n, ...r) {
|
|
6008
|
+
t.push(Vu(e, r, n));
|
|
5969
6009
|
}
|
|
5970
6010
|
function K({ path: e, warns: t }, n, ...r) {
|
|
5971
|
-
t.push(
|
|
6011
|
+
t.push(Vu(e, r, n));
|
|
5972
6012
|
}
|
|
5973
|
-
function
|
|
6013
|
+
function Vu(e, t, n) {
|
|
5974
6014
|
return {
|
|
5975
|
-
kind:
|
|
6015
|
+
kind: Mu.Compiled,
|
|
5976
6016
|
message: n,
|
|
5977
6017
|
path: [...e, ...t]
|
|
5978
6018
|
};
|
|
5979
6019
|
}
|
|
5980
6020
|
//#endregion
|
|
5981
6021
|
//#region src/json-schema-subset/compiler/utils.ts
|
|
5982
|
-
function
|
|
6022
|
+
function Hu(e) {
|
|
5983
6023
|
for (let t in e) {
|
|
5984
6024
|
let n = e[t];
|
|
5985
|
-
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] :
|
|
6025
|
+
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : Uu(n) && delete e[t]);
|
|
5986
6026
|
}
|
|
5987
6027
|
return e;
|
|
5988
6028
|
}
|
|
5989
|
-
function
|
|
6029
|
+
function Uu(e) {
|
|
5990
6030
|
for (let t in e) return !1;
|
|
5991
6031
|
return !0;
|
|
5992
6032
|
}
|
|
5993
6033
|
//#endregion
|
|
5994
6034
|
//#region src/json-schema-subset/compiler/wrapper.ts
|
|
5995
|
-
var
|
|
6035
|
+
var Wu = Symbol("compiledId"), Gu = Symbol("compiledKind"), Ku = Symbol("compiledPath"), qu = Symbol("validatorLoader"), q = Object.freeze({
|
|
5996
6036
|
Extends: 0,
|
|
5997
6037
|
Never: 1,
|
|
5998
6038
|
Any: 2,
|
|
@@ -6005,62 +6045,62 @@ var Uu = Symbol("compiledId"), Wu = Symbol("compiledKind"), Gu = Symbol("compile
|
|
|
6005
6045
|
Not: 9,
|
|
6006
6046
|
Combination: 10,
|
|
6007
6047
|
EnumOrConst: 11
|
|
6008
|
-
}),
|
|
6048
|
+
}), Ju = ou(nd(q.Any, au(), {}, () => () => !0)), Yu = ou(nd(q.Never, au(), {
|
|
6009
6049
|
type: "string",
|
|
6010
6050
|
maxLength: 0,
|
|
6011
6051
|
minLength: 1
|
|
6012
6052
|
}, () => () => !1));
|
|
6013
|
-
function Yu(e) {
|
|
6014
|
-
return typeof e != "object" || !e ? !1 : Uu in e;
|
|
6015
|
-
}
|
|
6016
6053
|
function Xu(e) {
|
|
6017
|
-
return typeof e != "object" || !e ? !1 :
|
|
6018
|
-
}
|
|
6019
|
-
function J(e) {
|
|
6020
|
-
return Xu(e) ? e[Wu] : q.Extends;
|
|
6054
|
+
return typeof e != "object" || !e ? !1 : Wu in e;
|
|
6021
6055
|
}
|
|
6022
6056
|
function Zu(e) {
|
|
6023
|
-
return
|
|
6057
|
+
return typeof e != "object" || !e ? !1 : Wu in e && Gu in e;
|
|
6058
|
+
}
|
|
6059
|
+
function J(e) {
|
|
6060
|
+
return Zu(e) ? e[Gu] : q.Extends;
|
|
6024
6061
|
}
|
|
6025
6062
|
function Qu(e) {
|
|
6026
|
-
return Xu(e) ? e[
|
|
6063
|
+
return Zu(e) || Xu(e) ? e[Wu] : e.id;
|
|
6027
6064
|
}
|
|
6028
6065
|
function $u(e) {
|
|
6029
|
-
return
|
|
6030
|
-
|
|
6066
|
+
return Zu(e) ? e[Ku] : void 0;
|
|
6067
|
+
}
|
|
6068
|
+
function ed(e) {
|
|
6069
|
+
return typeof e != "object" || !e || Object.defineProperty(e, Wu, {
|
|
6070
|
+
value: au(),
|
|
6031
6071
|
configurable: !1,
|
|
6032
6072
|
writable: !1,
|
|
6033
6073
|
enumerable: !1
|
|
6034
6074
|
}), e;
|
|
6035
6075
|
}
|
|
6036
6076
|
function Y(e, t, n, r = []) {
|
|
6037
|
-
return
|
|
6077
|
+
return nd(e, au(), t, n && (() => n.compile(t)), r);
|
|
6038
6078
|
}
|
|
6039
|
-
function
|
|
6040
|
-
return
|
|
6079
|
+
function td(e) {
|
|
6080
|
+
return nd(q.Never, au(), { ...e }, e[qu], e[Ku]);
|
|
6041
6081
|
}
|
|
6042
|
-
function
|
|
6082
|
+
function nd(e, t, n, r, i = []) {
|
|
6043
6083
|
let a = null;
|
|
6044
6084
|
return Object.defineProperties(n, {
|
|
6045
|
-
[
|
|
6085
|
+
[Gu]: {
|
|
6046
6086
|
value: e,
|
|
6047
6087
|
configurable: !1,
|
|
6048
6088
|
writable: !1,
|
|
6049
6089
|
enumerable: !1
|
|
6050
6090
|
},
|
|
6051
|
-
[
|
|
6091
|
+
[Wu]: {
|
|
6052
6092
|
value: t,
|
|
6053
6093
|
configurable: !1,
|
|
6054
6094
|
writable: !1,
|
|
6055
6095
|
enumerable: !1
|
|
6056
6096
|
},
|
|
6057
|
-
[
|
|
6097
|
+
[Ku]: {
|
|
6058
6098
|
value: i,
|
|
6059
6099
|
configurable: !1,
|
|
6060
6100
|
writable: !1,
|
|
6061
6101
|
enumerable: !1
|
|
6062
6102
|
},
|
|
6063
|
-
[
|
|
6103
|
+
[qu]: {
|
|
6064
6104
|
value: r,
|
|
6065
6105
|
configurable: !1,
|
|
6066
6106
|
writable: !1,
|
|
@@ -6077,16 +6117,16 @@ function td(e, t, n, r, i = []) {
|
|
|
6077
6117
|
}
|
|
6078
6118
|
//#endregion
|
|
6079
6119
|
//#region src/json-schema-subset/compiler/array.ts
|
|
6080
|
-
function
|
|
6081
|
-
let n =
|
|
6082
|
-
if (Array.isArray(n) ? s =
|
|
6120
|
+
function rd(e, t) {
|
|
6121
|
+
let n = id(e, t), r = ad(e, "maxItems", t), i = ad(e, "minItems", t), a = od(e, t), o = t.uniqueItems, s;
|
|
6122
|
+
if (Array.isArray(n) ? s = sd(e, t) : t.additionalItems && K(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
|
|
6083
6123
|
let c = !1, l = !1;
|
|
6084
6124
|
if (Array.isArray(n)) {
|
|
6085
|
-
r !== void 0 && r <= n.length && (n = n.splice(r), s =
|
|
6125
|
+
r !== void 0 && r <= n.length && (n = n.splice(r), s = cd(s, e.delegate));
|
|
6086
6126
|
let t = n.findIndex((e) => J(e) === q.Never);
|
|
6087
|
-
t !== -1 && (n = n.splice(t), s =
|
|
6127
|
+
t !== -1 && (n = n.splice(t), s = cd(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (K(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && J(s) === q.Never && (c = !0);
|
|
6088
6128
|
} else J(n) === q.Never && (c = !0);
|
|
6089
|
-
return r !== void 0 && i !== void 0 && r < i && (l || K(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Y(c ? q.Never : q.Array,
|
|
6129
|
+
return r !== void 0 && i !== void 0 && r < i && (l || K(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Y(c ? q.Never : q.Array, Hu({
|
|
6090
6130
|
type: "array",
|
|
6091
6131
|
items: n,
|
|
6092
6132
|
contains: a,
|
|
@@ -6096,12 +6136,12 @@ function nd(e, t) {
|
|
|
6096
6136
|
additionalItems: s
|
|
6097
6137
|
}), e.delegate, e.path);
|
|
6098
6138
|
}
|
|
6099
|
-
function
|
|
6139
|
+
function id(e, { items: t }) {
|
|
6100
6140
|
if (!t) return Y(q.Any, {}, e.delegate, e.path);
|
|
6101
6141
|
if (Array.isArray(t)) {
|
|
6102
6142
|
let n = [], r = !1;
|
|
6103
6143
|
for (let [i, a] of t.entries()) {
|
|
6104
|
-
let t =
|
|
6144
|
+
let t = Hd(Ru(e, "items", i), zu(a));
|
|
6105
6145
|
if (!t) {
|
|
6106
6146
|
r = !0;
|
|
6107
6147
|
continue;
|
|
@@ -6110,9 +6150,9 @@ function rd(e, { items: t }) {
|
|
|
6110
6150
|
}
|
|
6111
6151
|
return r ? null : n;
|
|
6112
6152
|
}
|
|
6113
|
-
return
|
|
6153
|
+
return Hd(Ru(e, "items"), zu(t));
|
|
6114
6154
|
}
|
|
6115
|
-
function
|
|
6155
|
+
function ad(e, t, n) {
|
|
6116
6156
|
let r = n[t];
|
|
6117
6157
|
if (r !== void 0) {
|
|
6118
6158
|
if (Number.isNaN(r)) {
|
|
@@ -6126,35 +6166,35 @@ function id(e, t, n) {
|
|
|
6126
6166
|
return r;
|
|
6127
6167
|
}
|
|
6128
6168
|
}
|
|
6129
|
-
function
|
|
6130
|
-
return t ?
|
|
6169
|
+
function od(e, { contains: t }) {
|
|
6170
|
+
return t ? Hd(Ru(e, "contains"), zu(t)) : Y(q.Any, {}, e.delegate, e.path);
|
|
6131
6171
|
}
|
|
6132
|
-
function
|
|
6172
|
+
function sd(e, { additionalItems: t }) {
|
|
6133
6173
|
switch (typeof t) {
|
|
6134
6174
|
case "boolean": return t ? Y(q.Any, {}, e.delegate, e.path) : !1;
|
|
6135
|
-
case "object": return
|
|
6175
|
+
case "object": return Hd(Ru(e, "additionalItems"), t);
|
|
6136
6176
|
default: return Y(q.Any, {}, e.delegate, e.path);
|
|
6137
6177
|
}
|
|
6138
6178
|
}
|
|
6139
|
-
function
|
|
6179
|
+
function cd(e, t) {
|
|
6140
6180
|
return e === void 0 ? Y(q.Never, {
|
|
6141
6181
|
type: "string",
|
|
6142
6182
|
maxLength: 0,
|
|
6143
6183
|
minLength: 1
|
|
6144
|
-
}, t) :
|
|
6184
|
+
}, t) : Zu(e) ? J(e) === q.Never ? e : td(e) : e;
|
|
6145
6185
|
}
|
|
6146
6186
|
//#endregion
|
|
6147
6187
|
//#region src/json-schema-subset/compiler/combination.ts
|
|
6148
|
-
var
|
|
6188
|
+
var ld = Object.freeze([
|
|
6149
6189
|
"allOf",
|
|
6150
6190
|
"anyOf",
|
|
6151
6191
|
"oneOf"
|
|
6152
6192
|
]);
|
|
6153
|
-
function
|
|
6154
|
-
if (n.length === 0) return
|
|
6193
|
+
function ud(e, t, n, r) {
|
|
6194
|
+
if (n.length === 0) return Bu(e, "disable empty list", t), null;
|
|
6155
6195
|
let i = [];
|
|
6156
6196
|
for (let [r, a] of n.entries()) {
|
|
6157
|
-
let n =
|
|
6197
|
+
let n = Hd(Ru(e, t, r), zu(a));
|
|
6158
6198
|
n && i.push(n);
|
|
6159
6199
|
}
|
|
6160
6200
|
if (i.length < n.length) return null;
|
|
@@ -6168,7 +6208,7 @@ function ld(e, t, n, r) {
|
|
|
6168
6208
|
let s = q.Combination;
|
|
6169
6209
|
switch (t) {
|
|
6170
6210
|
case "allOf":
|
|
6171
|
-
o > 0 ? s = q.Never : a === i.length ? s = q.Any :
|
|
6211
|
+
o > 0 ? s = q.Never : a === i.length ? s = q.Any : dd(i) || (s = q.Never);
|
|
6172
6212
|
break;
|
|
6173
6213
|
case "anyOf":
|
|
6174
6214
|
a > 0 ? s = q.Any : o === i.length && (s = q.Never);
|
|
@@ -6177,7 +6217,7 @@ function ld(e, t, n, r) {
|
|
|
6177
6217
|
}
|
|
6178
6218
|
return Y(s, { [t]: i }, r, e.path);
|
|
6179
6219
|
}
|
|
6180
|
-
function
|
|
6220
|
+
function dd(e) {
|
|
6181
6221
|
let t = null;
|
|
6182
6222
|
for (let n of e) {
|
|
6183
6223
|
let e = J(n);
|
|
@@ -6192,35 +6232,35 @@ function ud(e) {
|
|
|
6192
6232
|
}
|
|
6193
6233
|
//#endregion
|
|
6194
6234
|
//#region src/json-schema-subset/checker/validator.ts
|
|
6195
|
-
var
|
|
6235
|
+
var fd = Object.freeze({
|
|
6196
6236
|
Valid: 0,
|
|
6197
6237
|
Invalid: 1,
|
|
6198
6238
|
Unknown: 2
|
|
6199
6239
|
});
|
|
6200
|
-
function
|
|
6240
|
+
function pd(e, t) {
|
|
6201
6241
|
let n = e.isValid;
|
|
6202
|
-
return n ? n(t) === !0 ?
|
|
6242
|
+
return n ? n(t) === !0 ? fd.Valid : fd.Invalid : fd.Unknown;
|
|
6203
6243
|
}
|
|
6204
6244
|
//#endregion
|
|
6205
6245
|
//#region src/json-schema-subset/compiler/enumAndConst.ts
|
|
6206
|
-
function
|
|
6246
|
+
function md(e, t, n, r) {
|
|
6207
6247
|
let i, a = !1;
|
|
6208
6248
|
if (t) {
|
|
6209
|
-
if (t.length === 0) return
|
|
6249
|
+
if (t.length === 0) return Bu(e, "disable empty list", "enum"), null;
|
|
6210
6250
|
i = [];
|
|
6211
|
-
for (let [n, a] of t.entries()) switch (
|
|
6212
|
-
case
|
|
6213
|
-
i.push(
|
|
6251
|
+
for (let [n, a] of t.entries()) switch (pd(r, a)) {
|
|
6252
|
+
case fd.Valid:
|
|
6253
|
+
i.push(ed(a));
|
|
6214
6254
|
break;
|
|
6215
|
-
case
|
|
6255
|
+
case fd.Invalid: K(e, "cannot pass JSON schema of currently schema object", "enum", n);
|
|
6216
6256
|
}
|
|
6217
6257
|
i.length === 0 && K(e, "all of elements from list is rejected by currently schema object", "enum");
|
|
6218
6258
|
}
|
|
6219
|
-
if (n &&
|
|
6259
|
+
if (n && pd(r, n) === fd.Invalid && (a = !0), i) {
|
|
6220
6260
|
if (i.length === 0) a = !0;
|
|
6221
6261
|
else if (n) {
|
|
6222
6262
|
let e = !1;
|
|
6223
|
-
for (let t of i) if (
|
|
6263
|
+
for (let t of i) if (lu(t, n)) {
|
|
6224
6264
|
e = !0;
|
|
6225
6265
|
break;
|
|
6226
6266
|
}
|
|
@@ -6228,11 +6268,11 @@ function pd(e, t, n, r) {
|
|
|
6228
6268
|
}
|
|
6229
6269
|
}
|
|
6230
6270
|
let o = a ? q.Never : q.EnumOrConst, s = {};
|
|
6231
|
-
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const =
|
|
6271
|
+
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = ed(cu(n))), Y(o, s, e.delegate, e.path);
|
|
6232
6272
|
}
|
|
6233
6273
|
//#endregion
|
|
6234
6274
|
//#region src/json-schema-subset/compiler/object.ts
|
|
6235
|
-
var
|
|
6275
|
+
var hd = /* @__PURE__ */ new Set([
|
|
6236
6276
|
"type",
|
|
6237
6277
|
"maxProperties",
|
|
6238
6278
|
"minProperties",
|
|
@@ -6243,27 +6283,27 @@ var md = /* @__PURE__ */ new Set([
|
|
|
6243
6283
|
"dependencies",
|
|
6244
6284
|
"propertyNames"
|
|
6245
6285
|
]);
|
|
6246
|
-
function
|
|
6247
|
-
let n = Object.keys(t).filter((e) => !
|
|
6286
|
+
function gd(e, t) {
|
|
6287
|
+
let n = Object.keys(t).filter((e) => !hd.has(e) && Iu(e));
|
|
6248
6288
|
n.length > 0 && K(e, `type="object" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6249
|
-
let r =
|
|
6289
|
+
let r = _d(e, "maxProperties", t), i = _d(e, "minProperties", t), a = vd(e, t), o = yd(e, t), s = bd(e, t), c = Sd(e, t);
|
|
6250
6290
|
if (!a || !o || !s || !c) return null;
|
|
6251
|
-
let l =
|
|
6291
|
+
let l = xd(e, o, s, t);
|
|
6252
6292
|
if (!l) return null;
|
|
6253
|
-
let u =
|
|
6254
|
-
return Y(
|
|
6293
|
+
let u = wd(e, Cd(a, o, s, l), c, t);
|
|
6294
|
+
return Y(Td(e, a, l, u, r, i) ? q.Never : q.Object, Hu({
|
|
6255
6295
|
type: "object",
|
|
6256
6296
|
required: u,
|
|
6257
6297
|
properties: l,
|
|
6258
6298
|
minProperties: i,
|
|
6259
6299
|
maxProperties: r,
|
|
6260
6300
|
additionalProperties: a,
|
|
6261
|
-
patternProperties:
|
|
6262
|
-
dependencies:
|
|
6301
|
+
patternProperties: Ad(o),
|
|
6302
|
+
dependencies: jd(c, t),
|
|
6263
6303
|
propertyNames: s
|
|
6264
6304
|
}), e.delegate, e.path);
|
|
6265
6305
|
}
|
|
6266
|
-
function
|
|
6306
|
+
function _d(e, t, n) {
|
|
6267
6307
|
let r = n[t];
|
|
6268
6308
|
if (r !== void 0) {
|
|
6269
6309
|
if (Number.isNaN(r)) {
|
|
@@ -6277,22 +6317,22 @@ function gd(e, t, n) {
|
|
|
6277
6317
|
return r;
|
|
6278
6318
|
}
|
|
6279
6319
|
}
|
|
6280
|
-
function
|
|
6320
|
+
function vd(e, { additionalProperties: t }) {
|
|
6281
6321
|
return t === !1 ? Y(q.Never, {
|
|
6282
6322
|
type: "string",
|
|
6283
6323
|
maxLength: 0,
|
|
6284
6324
|
minLength: 1
|
|
6285
|
-
}, e.delegate, e.path) : typeof t == "object" ?
|
|
6325
|
+
}, e.delegate, e.path) : typeof t == "object" ? Hd(Ru(e, "additionalProperties"), zu(t)) : Y(q.Any, {}, e.delegate, e.path);
|
|
6286
6326
|
}
|
|
6287
|
-
function
|
|
6327
|
+
function yd(e, { patternProperties: t }) {
|
|
6288
6328
|
let n = !1, r = {};
|
|
6289
6329
|
for (let i in t) {
|
|
6290
|
-
let a =
|
|
6330
|
+
let a = kd(i);
|
|
6291
6331
|
if (a instanceof Error) {
|
|
6292
6332
|
K(e, `property name invalid. ${i}`, "patternProperties", i);
|
|
6293
6333
|
continue;
|
|
6294
6334
|
}
|
|
6295
|
-
let o =
|
|
6335
|
+
let o = zu(t[i]), s = Hd(Ru(e, "patternProperties", i), o);
|
|
6296
6336
|
if (!s) {
|
|
6297
6337
|
n = !0;
|
|
6298
6338
|
continue;
|
|
@@ -6301,29 +6341,29 @@ function vd(e, { patternProperties: t }) {
|
|
|
6301
6341
|
}
|
|
6302
6342
|
return n ? null : r;
|
|
6303
6343
|
}
|
|
6304
|
-
function
|
|
6344
|
+
function bd(e, { propertyNames: t }) {
|
|
6305
6345
|
if (!t) return Y(q.Any, {}, e.delegate, e.path);
|
|
6306
|
-
t =
|
|
6307
|
-
let n =
|
|
6346
|
+
t = zu(t);
|
|
6347
|
+
let n = Hd(Ru(e, "propertyNames"), t);
|
|
6308
6348
|
if (!n) return null;
|
|
6309
6349
|
let r = J(n);
|
|
6310
|
-
return r !== q.String && r !== q.Any ?
|
|
6350
|
+
return r !== q.String && r !== q.Any ? td(n) : n;
|
|
6311
6351
|
}
|
|
6312
|
-
function
|
|
6352
|
+
function xd(e, t, n, { properties: r }) {
|
|
6313
6353
|
let i = !1;
|
|
6314
6354
|
if (!r) return {};
|
|
6315
6355
|
let a = {};
|
|
6316
6356
|
for (let o in r) {
|
|
6317
|
-
if (
|
|
6357
|
+
if (pd(n, o) === fd.Invalid) {
|
|
6318
6358
|
K(e, `key ${JSON.stringify(o)} cannot pass JSON schema from propertyNames`, "properties");
|
|
6319
6359
|
continue;
|
|
6320
6360
|
}
|
|
6321
|
-
let s =
|
|
6361
|
+
let s = Od(t, o);
|
|
6322
6362
|
if (s && J(s) === q.Never) {
|
|
6323
6363
|
K(e, `key ${JSON.stringify(o)} matches a pattern that has a impossible(never) schema`, "properties");
|
|
6324
6364
|
continue;
|
|
6325
6365
|
}
|
|
6326
|
-
let c =
|
|
6366
|
+
let c = zu(r[o]), l = Hd(Ru(e, "properties", o), c);
|
|
6327
6367
|
if (!l) {
|
|
6328
6368
|
i = !0;
|
|
6329
6369
|
continue;
|
|
@@ -6332,40 +6372,40 @@ function bd(e, t, n, { properties: r }) {
|
|
|
6332
6372
|
}
|
|
6333
6373
|
return i ? null : a;
|
|
6334
6374
|
}
|
|
6335
|
-
function
|
|
6375
|
+
function Sd(e, { dependencies: t }) {
|
|
6336
6376
|
if (!t) return [{}, {}];
|
|
6337
6377
|
let n = {}, r = {};
|
|
6338
6378
|
for (let i in t) {
|
|
6339
|
-
let a =
|
|
6379
|
+
let a = zu(t[i]);
|
|
6340
6380
|
if (Array.isArray(a)) {
|
|
6341
|
-
let { keys: t, duplicated: r } =
|
|
6381
|
+
let { keys: t, duplicated: r } = Dd(a);
|
|
6342
6382
|
r && K(e, `found duplicated property names: ${r.join(", ")}`, "dependencies", i), n[i] = t;
|
|
6343
6383
|
} else {
|
|
6344
|
-
let t =
|
|
6384
|
+
let t = Hd(Ru(e, "dependencies", i), a);
|
|
6345
6385
|
if (t) {
|
|
6346
6386
|
let e = J(t);
|
|
6347
|
-
r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ?
|
|
6387
|
+
r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ? Yu : td(t);
|
|
6348
6388
|
}
|
|
6349
6389
|
}
|
|
6350
6390
|
}
|
|
6351
6391
|
return [n, r];
|
|
6352
6392
|
}
|
|
6353
|
-
function
|
|
6393
|
+
function Cd(e, t, n, r) {
|
|
6354
6394
|
return (i) => {
|
|
6355
|
-
if (
|
|
6356
|
-
let a =
|
|
6395
|
+
if (pd(n, i) === fd.Invalid) return !0;
|
|
6396
|
+
let a = Od(t, i);
|
|
6357
6397
|
return !!(a && J(a) === q.Never || J(r[i] ?? e) === q.Never);
|
|
6358
6398
|
};
|
|
6359
6399
|
}
|
|
6360
|
-
function
|
|
6400
|
+
function wd(e, t, n, { required: r }) {
|
|
6361
6401
|
if (!r) return [];
|
|
6362
|
-
let i =
|
|
6402
|
+
let i = Dd(r);
|
|
6363
6403
|
i.duplicated && K(e, `found duplicated required keys: ${i.duplicated.join(", ")}`, "required");
|
|
6364
6404
|
let a = [], o = [];
|
|
6365
|
-
for (let e of i.keys)
|
|
6405
|
+
for (let e of i.keys) Ed(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
|
|
6366
6406
|
return o.length > 0 && K(e, `key ${o.map((e) => JSON.stringify(e)).join(", ")} will ban by another condition`, "required"), a;
|
|
6367
6407
|
}
|
|
6368
|
-
function
|
|
6408
|
+
function Td(e, t, n, r, i, a) {
|
|
6369
6409
|
if (i !== void 0 && a !== void 0 && i < a) return K(e, `maxProperties(${i}) is less than minProperties(${a})`), !0;
|
|
6370
6410
|
if (i !== void 0 && r.length > i) return K(e, `length(${r.length}) of required is greater than maxProperties(${i})`), !0;
|
|
6371
6411
|
if (a !== void 0 && r.length < a) return K(e, `length(${r.length}) of required is less than minProperties(${a})`), !0;
|
|
@@ -6376,7 +6416,7 @@ function wd(e, t, n, r, i, a) {
|
|
|
6376
6416
|
}
|
|
6377
6417
|
return !0;
|
|
6378
6418
|
}
|
|
6379
|
-
function
|
|
6419
|
+
function Ed([e, t], n) {
|
|
6380
6420
|
let r = [n], i = new Set(r);
|
|
6381
6421
|
for (; r.length > 0;) {
|
|
6382
6422
|
let n = r.pop(), i = t[n], o = e[n];
|
|
@@ -6387,7 +6427,7 @@ function Td([e, t], n) {
|
|
|
6387
6427
|
}
|
|
6388
6428
|
return [...i];
|
|
6389
6429
|
}
|
|
6390
|
-
function
|
|
6430
|
+
function Dd(e) {
|
|
6391
6431
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
6392
6432
|
for (let r of e) t.has(r) ? n.add(r) : t.add(r);
|
|
6393
6433
|
return n.size === 0 ? {
|
|
@@ -6398,14 +6438,14 @@ function Ed(e) {
|
|
|
6398
6438
|
duplicated: [...n]
|
|
6399
6439
|
};
|
|
6400
6440
|
}
|
|
6401
|
-
function
|
|
6441
|
+
function Od(e, t) {
|
|
6402
6442
|
for (let n in e) {
|
|
6403
6443
|
let [r, i] = e[n];
|
|
6404
6444
|
if (i.test(t)) return r;
|
|
6405
6445
|
}
|
|
6406
6446
|
return null;
|
|
6407
6447
|
}
|
|
6408
|
-
function
|
|
6448
|
+
function kd(e) {
|
|
6409
6449
|
try {
|
|
6410
6450
|
return new RegExp(e, "i");
|
|
6411
6451
|
} catch (e) {
|
|
@@ -6413,12 +6453,12 @@ function Od(e) {
|
|
|
6413
6453
|
throw e;
|
|
6414
6454
|
}
|
|
6415
6455
|
}
|
|
6416
|
-
function
|
|
6456
|
+
function Ad(e) {
|
|
6417
6457
|
let t = {};
|
|
6418
6458
|
for (let n in e) t[n] = e[n][0];
|
|
6419
6459
|
return t;
|
|
6420
6460
|
}
|
|
6421
|
-
function
|
|
6461
|
+
function jd([e, t], { dependencies: n }) {
|
|
6422
6462
|
let r = {};
|
|
6423
6463
|
for (let i in n) {
|
|
6424
6464
|
let n = e[i], a = t[i];
|
|
@@ -6428,39 +6468,39 @@ function Ad([e, t], { dependencies: n }) {
|
|
|
6428
6468
|
}
|
|
6429
6469
|
//#endregion
|
|
6430
6470
|
//#region src/json-schema-subset/compiler/primitive.ts
|
|
6431
|
-
var
|
|
6471
|
+
var Md = /* @__PURE__ */ new Set([
|
|
6432
6472
|
"type",
|
|
6433
6473
|
"multipleOf",
|
|
6434
6474
|
"maximum",
|
|
6435
6475
|
"exclusiveMaximum",
|
|
6436
6476
|
"minimum",
|
|
6437
6477
|
"exclusiveMinimum"
|
|
6438
|
-
]),
|
|
6478
|
+
]), Nd = /* @__PURE__ */ new Set([
|
|
6439
6479
|
"type",
|
|
6440
6480
|
"format",
|
|
6441
6481
|
"maxLength",
|
|
6442
6482
|
"minLength",
|
|
6443
6483
|
"pattern"
|
|
6444
6484
|
]);
|
|
6445
|
-
function
|
|
6485
|
+
function Pd(e, t) {
|
|
6446
6486
|
let { type: n } = t;
|
|
6447
6487
|
switch (n) {
|
|
6448
6488
|
case "number":
|
|
6449
|
-
case "integer": return
|
|
6450
|
-
case "string": return
|
|
6489
|
+
case "integer": return Fd(e, t);
|
|
6490
|
+
case "string": return Ld(e, t);
|
|
6451
6491
|
case "boolean":
|
|
6452
6492
|
case "null": {
|
|
6453
|
-
let r = Object.keys(t).filter((e) =>
|
|
6493
|
+
let r = Object.keys(t).filter((e) => Iu(e) && e !== "type");
|
|
6454
6494
|
return r.length > 0 && K(e, `key "type" will exclude other keys: ${r.toSorted().join(", ")}`), Y(n === "null" ? q.Null : q.Boolean, { type: n }, e.delegate, e.path);
|
|
6455
6495
|
}
|
|
6456
|
-
default: return
|
|
6496
|
+
default: return Bu(e, `invalid type ${JSON.stringify(n)}`), null;
|
|
6457
6497
|
}
|
|
6458
6498
|
}
|
|
6459
|
-
function
|
|
6460
|
-
let n = Object.keys(t).filter((e) => !
|
|
6499
|
+
function Fd(e, t) {
|
|
6500
|
+
let n = Object.keys(t).filter((e) => !Md.has(e) && Iu(e));
|
|
6461
6501
|
n.length > 0 && K(e, `type=${JSON.stringify(t.type)} will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6462
|
-
let r =
|
|
6463
|
-
for (let t of
|
|
6502
|
+
let r = su(t, Md);
|
|
6503
|
+
for (let t of Md) {
|
|
6464
6504
|
let n = r[t];
|
|
6465
6505
|
t !== "type" && n !== void 0 && Number.isNaN(n) && (K(e, "found NaN", t), delete r[t]);
|
|
6466
6506
|
}
|
|
@@ -6469,38 +6509,38 @@ function Pd(e, t) {
|
|
|
6469
6509
|
let { multipleOf: c } = r;
|
|
6470
6510
|
c === 0 && (delete r.multipleOf, r.type = "number", K(e, "cannot be 0", "multipleOf"));
|
|
6471
6511
|
let l = q.Numeric;
|
|
6472
|
-
return
|
|
6512
|
+
return Id(r) || (l = q.Never), Y(l, r, e.delegate, e.path);
|
|
6473
6513
|
}
|
|
6474
|
-
function
|
|
6514
|
+
function Id(e) {
|
|
6475
6515
|
let { maximum: t, exclusiveMaximum: n, minimum: r, exclusiveMinimum: i } = e;
|
|
6476
6516
|
return t !== void 0 && r !== void 0 ? t >= r : n !== void 0 && r !== void 0 ? n > r : t !== void 0 && i !== void 0 ? t > i : n !== void 0 && i !== void 0 ? n > i : !0;
|
|
6477
6517
|
}
|
|
6478
|
-
function
|
|
6479
|
-
let n = Object.keys(t).filter((e) => !
|
|
6518
|
+
function Ld(e, t) {
|
|
6519
|
+
let n = Object.keys(t).filter((e) => !Nd.has(e) && Iu(e));
|
|
6480
6520
|
n.length > 0 && K(e, `type="string" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6481
|
-
let r =
|
|
6482
|
-
|
|
6521
|
+
let r = su(t, Nd);
|
|
6522
|
+
Rd(e, r, "maxLength"), Rd(e, r, "minLength");
|
|
6483
6523
|
let i = r.maxLength, a = r.minLength, o = q.String;
|
|
6484
6524
|
return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = q.Never), Y(o, r, e.delegate, e.path);
|
|
6485
6525
|
}
|
|
6486
|
-
function
|
|
6526
|
+
function Rd(e, t, n) {
|
|
6487
6527
|
let r = t[n];
|
|
6488
6528
|
r !== void 0 && Number.isNaN(r) && (K(e, "found NaN", n), delete t[n]);
|
|
6489
6529
|
}
|
|
6490
6530
|
//#endregion
|
|
6491
6531
|
//#region src/json-schema-subset/compiler/compiler.ts
|
|
6492
|
-
var
|
|
6493
|
-
function
|
|
6494
|
-
if (
|
|
6532
|
+
var zd = Object.freeze([]);
|
|
6533
|
+
function Bd(e, t, n, r) {
|
|
6534
|
+
if (Zu(e) || t.isExtendsSchema(e)) return {
|
|
6495
6535
|
schema: e,
|
|
6496
|
-
warns:
|
|
6536
|
+
warns: zd
|
|
6497
6537
|
};
|
|
6498
6538
|
if (r) {
|
|
6499
6539
|
let t = r.isSchema(e);
|
|
6500
6540
|
if (typeof t == "object") {
|
|
6501
6541
|
let e = [];
|
|
6502
6542
|
for (let n of t) e.push({
|
|
6503
|
-
kind:
|
|
6543
|
+
kind: Mu.External,
|
|
6504
6544
|
error: n
|
|
6505
6545
|
});
|
|
6506
6546
|
if (e.length > 0) return e;
|
|
@@ -6513,19 +6553,19 @@ function zd(e, t, n, r) {
|
|
|
6513
6553
|
path: [],
|
|
6514
6554
|
errors: [],
|
|
6515
6555
|
warns: []
|
|
6516
|
-
}, a =
|
|
6517
|
-
if (a)
|
|
6518
|
-
else return
|
|
6556
|
+
}, a = Hd(i, e);
|
|
6557
|
+
if (a) Vd(i.errors.length === 0, "found errors (it should be empty)");
|
|
6558
|
+
else return Vd(i.errors.length > 0, "cannot found any errors"), i.errors;
|
|
6519
6559
|
return {
|
|
6520
6560
|
schema: a,
|
|
6521
6561
|
warns: i.warns
|
|
6522
6562
|
};
|
|
6523
6563
|
}
|
|
6524
|
-
function
|
|
6564
|
+
function Vd(e, t) {
|
|
6525
6565
|
if (!e) throw Error(t);
|
|
6526
6566
|
}
|
|
6527
|
-
function
|
|
6528
|
-
if (e.extends.isExtendsSchema(t) ||
|
|
6567
|
+
function Hd(e, t) {
|
|
6568
|
+
if (e.extends.isExtendsSchema(t) || Zu(t)) return t;
|
|
6529
6569
|
let n = e.extends.tryCompiledExtendsSchema(t, e.payload);
|
|
6530
6570
|
if (n) return n;
|
|
6531
6571
|
let r = t, i = !1, { enum: a, const: o } = t;
|
|
@@ -6533,23 +6573,23 @@ function Vd(e, t) {
|
|
|
6533
6573
|
let { enum: e, const: n, ...a } = t;
|
|
6534
6574
|
r = a, i = !0;
|
|
6535
6575
|
}
|
|
6536
|
-
let s =
|
|
6537
|
-
return s && i && (s =
|
|
6576
|
+
let s = Ud(e, r);
|
|
6577
|
+
return s && i && (s = md(e, a, o, s)), s || null;
|
|
6538
6578
|
}
|
|
6539
|
-
function
|
|
6540
|
-
for (let n of
|
|
6579
|
+
function Ud(e, t) {
|
|
6580
|
+
for (let n of ld) {
|
|
6541
6581
|
let r = t[n];
|
|
6542
6582
|
if (r) {
|
|
6543
|
-
let i = Object.keys(t).filter((e) =>
|
|
6544
|
-
return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`),
|
|
6583
|
+
let i = Object.keys(t).filter((e) => Iu(e) && e !== n);
|
|
6584
|
+
return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), ud(e, n, r) || null;
|
|
6545
6585
|
}
|
|
6546
6586
|
}
|
|
6547
6587
|
{
|
|
6548
|
-
let n =
|
|
6588
|
+
let n = zu(t.not);
|
|
6549
6589
|
if (n) {
|
|
6550
|
-
let r = Object.keys(t).filter((e) =>
|
|
6590
|
+
let r = Object.keys(t).filter((e) => Iu(e) && e !== "not");
|
|
6551
6591
|
r.length > 0 && K(e, `key "not" will exclude other keys: ${r.toSorted().join(", ")}`);
|
|
6552
|
-
let i =
|
|
6592
|
+
let i = Hd(Ru(e, "not"), n);
|
|
6553
6593
|
if (!i) return null;
|
|
6554
6594
|
let a = q.Not;
|
|
6555
6595
|
switch (J(i)) {
|
|
@@ -6565,26 +6605,26 @@ function Hd(e, t) {
|
|
|
6565
6605
|
let { type: n } = t;
|
|
6566
6606
|
if (Array.isArray(n)) {
|
|
6567
6607
|
let { type: r, ...i } = t;
|
|
6568
|
-
return
|
|
6608
|
+
return ud(e, "anyOf", n.map((e) => ({
|
|
6569
6609
|
...i,
|
|
6570
6610
|
type: e
|
|
6571
6611
|
})));
|
|
6572
6612
|
}
|
|
6573
6613
|
switch (n) {
|
|
6574
|
-
case "object": return
|
|
6575
|
-
case "array": return
|
|
6576
|
-
default: return
|
|
6614
|
+
case "object": return gd(e, t);
|
|
6615
|
+
case "array": return rd(e, t);
|
|
6616
|
+
default: return Pd(e, t);
|
|
6577
6617
|
}
|
|
6578
6618
|
}
|
|
6579
|
-
return
|
|
6619
|
+
return Lu(t) ? Y(q.Any, {}, e.delegate, e.path) : (Bu(e, "unrecognized"), null);
|
|
6580
6620
|
}
|
|
6581
6621
|
//#endregion
|
|
6582
6622
|
//#region src/json-schema-subset/checker/tools/mark.ts
|
|
6583
|
-
var
|
|
6623
|
+
var Wd = class {
|
|
6584
6624
|
constructor(e) {
|
|
6585
6625
|
let t = Object.freeze(e.toSorted());
|
|
6586
6626
|
if (t.length > 32) throw Error(`cannot define ${t.length} keys which is greater than 32`);
|
|
6587
|
-
this.keys = t, this.clazz = class extends
|
|
6627
|
+
this.keys = t, this.clazz = class extends Gd {
|
|
6588
6628
|
constructor(e) {
|
|
6589
6629
|
super(t, e);
|
|
6590
6630
|
}
|
|
@@ -6608,7 +6648,7 @@ var Ud = class {
|
|
|
6608
6648
|
else if (e) for (let [n, r] of this.keys.entries()) e[r] && (t |= 1 << n);
|
|
6609
6649
|
return new this.clazz(t);
|
|
6610
6650
|
}
|
|
6611
|
-
},
|
|
6651
|
+
}, Gd = class {
|
|
6612
6652
|
constructor(e, t) {
|
|
6613
6653
|
this.keys = e, this.int32 = t;
|
|
6614
6654
|
}
|
|
@@ -6623,21 +6663,21 @@ var Ud = class {
|
|
|
6623
6663
|
};
|
|
6624
6664
|
//#endregion
|
|
6625
6665
|
//#region src/json-schema-subset/checker/tools/quantum.ts
|
|
6626
|
-
function
|
|
6627
|
-
return new
|
|
6666
|
+
function Kd(e) {
|
|
6667
|
+
return new qd(e);
|
|
6628
6668
|
}
|
|
6629
|
-
var
|
|
6669
|
+
var qd = class {
|
|
6630
6670
|
constructor(e) {
|
|
6631
|
-
this.description = new
|
|
6671
|
+
this.description = new Wd(e);
|
|
6632
6672
|
}
|
|
6633
6673
|
get keys() {
|
|
6634
6674
|
return this.description.keys;
|
|
6635
6675
|
}
|
|
6636
6676
|
variable(e) {
|
|
6637
6677
|
let t;
|
|
6638
|
-
return e && (t = this.description.toBundle(e).toInt32()), new
|
|
6678
|
+
return e && (t = this.description.toBundle(e).toInt32()), new Jd(this.description, t);
|
|
6639
6679
|
}
|
|
6640
|
-
},
|
|
6680
|
+
}, Jd = class {
|
|
6641
6681
|
constructor(e, t) {
|
|
6642
6682
|
this.values = /* @__PURE__ */ new Set(), this.description = e, t !== void 0 && this.values.add(t);
|
|
6643
6683
|
}
|
|
@@ -6658,7 +6698,7 @@ var Kd = class {
|
|
|
6658
6698
|
}
|
|
6659
6699
|
push(e, t) {
|
|
6660
6700
|
let n = /* @__PURE__ */ new Set();
|
|
6661
|
-
for (let r of this.values) for (let [i, a] of
|
|
6701
|
+
for (let r of this.values) for (let [i, a] of uu) if (e & a) {
|
|
6662
6702
|
let e = this.description.toBundle(r);
|
|
6663
6703
|
t(i, e), n.add(e.toInt32());
|
|
6664
6704
|
}
|
|
@@ -6675,11 +6715,11 @@ var Kd = class {
|
|
|
6675
6715
|
};
|
|
6676
6716
|
//#endregion
|
|
6677
6717
|
//#region src/json-schema-subset/checker/tools/range.ts
|
|
6678
|
-
function
|
|
6718
|
+
function Yd(e, t) {
|
|
6679
6719
|
let [n] = e, [r] = t;
|
|
6680
|
-
return n.num < r.num ?
|
|
6720
|
+
return n.num < r.num ? Xd(e, t) : n.num > r.num ? Zd(e, t) : Qd(e, t);
|
|
6681
6721
|
}
|
|
6682
|
-
function
|
|
6722
|
+
function Xd(e, t) {
|
|
6683
6723
|
let [n, r] = e, [i, a] = t;
|
|
6684
6724
|
if (r.num <= i.num) {
|
|
6685
6725
|
let n = r.exclusive, a = i.exclusive;
|
|
@@ -6704,11 +6744,11 @@ function Yd(e, t) {
|
|
|
6704
6744
|
let t;
|
|
6705
6745
|
return e && (t = {
|
|
6706
6746
|
fromLeft: !1,
|
|
6707
|
-
range: [
|
|
6747
|
+
range: [$d(r), a]
|
|
6708
6748
|
}), {
|
|
6709
6749
|
left: {
|
|
6710
6750
|
fromLeft: !0,
|
|
6711
|
-
range: [n,
|
|
6751
|
+
range: [n, $d(i)]
|
|
6712
6752
|
},
|
|
6713
6753
|
center: [i, r],
|
|
6714
6754
|
right: t
|
|
@@ -6718,16 +6758,16 @@ function Yd(e, t) {
|
|
|
6718
6758
|
return {
|
|
6719
6759
|
left: {
|
|
6720
6760
|
fromLeft: !0,
|
|
6721
|
-
range: [n,
|
|
6761
|
+
range: [n, $d(i)]
|
|
6722
6762
|
},
|
|
6723
6763
|
center: [i, a],
|
|
6724
6764
|
right: {
|
|
6725
6765
|
fromLeft: !0,
|
|
6726
|
-
range: [
|
|
6766
|
+
range: [$d(a), r]
|
|
6727
6767
|
}
|
|
6728
6768
|
};
|
|
6729
6769
|
}
|
|
6730
|
-
function
|
|
6770
|
+
function Zd(e, t) {
|
|
6731
6771
|
let [n, r] = e, [i, a] = t;
|
|
6732
6772
|
if (n.num >= a.num) {
|
|
6733
6773
|
let r = a.exclusive, i = n.exclusive;
|
|
@@ -6752,11 +6792,11 @@ function Xd(e, t) {
|
|
|
6752
6792
|
let t;
|
|
6753
6793
|
return e && (t = {
|
|
6754
6794
|
fromLeft: !0,
|
|
6755
|
-
range: [
|
|
6795
|
+
range: [$d(a), r]
|
|
6756
6796
|
}), {
|
|
6757
6797
|
left: {
|
|
6758
6798
|
fromLeft: !1,
|
|
6759
|
-
range: [i,
|
|
6799
|
+
range: [i, $d(n)]
|
|
6760
6800
|
},
|
|
6761
6801
|
center: [n, a],
|
|
6762
6802
|
right: t
|
|
@@ -6766,23 +6806,23 @@ function Xd(e, t) {
|
|
|
6766
6806
|
return {
|
|
6767
6807
|
left: {
|
|
6768
6808
|
fromLeft: !1,
|
|
6769
|
-
range: [i,
|
|
6809
|
+
range: [i, $d(n)]
|
|
6770
6810
|
},
|
|
6771
6811
|
center: [n, r],
|
|
6772
6812
|
right: {
|
|
6773
6813
|
fromLeft: !1,
|
|
6774
|
-
range: [
|
|
6814
|
+
range: [$d(r), a]
|
|
6775
6815
|
}
|
|
6776
6816
|
};
|
|
6777
6817
|
}
|
|
6778
|
-
function
|
|
6818
|
+
function Qd(e, t) {
|
|
6779
6819
|
let [n, r] = e, [i, a] = t, o = n.exclusive, s = i.exclusive, c, l = n;
|
|
6780
6820
|
if (!o && s ? (l = i, c = {
|
|
6781
6821
|
fromLeft: !0,
|
|
6782
|
-
range: [n,
|
|
6822
|
+
range: [n, $d(i)]
|
|
6783
6823
|
}) : o && !s && (c = {
|
|
6784
6824
|
fromLeft: !1,
|
|
6785
|
-
range: [i,
|
|
6825
|
+
range: [i, $d(n)]
|
|
6786
6826
|
}), r.num <= a.num) {
|
|
6787
6827
|
let e = !0, t = !1;
|
|
6788
6828
|
if (r.num === a.num) {
|
|
@@ -6793,7 +6833,7 @@ function Zd(e, t) {
|
|
|
6793
6833
|
let t;
|
|
6794
6834
|
return e && (t = {
|
|
6795
6835
|
fromLeft: !1,
|
|
6796
|
-
range: [
|
|
6836
|
+
range: [$d(r), a]
|
|
6797
6837
|
}), {
|
|
6798
6838
|
left: c,
|
|
6799
6839
|
center: [l, r],
|
|
@@ -6806,11 +6846,11 @@ function Zd(e, t) {
|
|
|
6806
6846
|
center: [l, a],
|
|
6807
6847
|
right: {
|
|
6808
6848
|
fromLeft: !0,
|
|
6809
|
-
range: [
|
|
6849
|
+
range: [$d(a), r]
|
|
6810
6850
|
}
|
|
6811
6851
|
};
|
|
6812
6852
|
}
|
|
6813
|
-
function
|
|
6853
|
+
function $d(e) {
|
|
6814
6854
|
return {
|
|
6815
6855
|
num: e.num,
|
|
6816
6856
|
exclusive: !e.exclusive
|
|
@@ -6818,8 +6858,8 @@ function Qd(e) {
|
|
|
6818
6858
|
}
|
|
6819
6859
|
//#endregion
|
|
6820
6860
|
//#region src/json-schema-subset/checker/range.ts
|
|
6821
|
-
var
|
|
6822
|
-
let { left: a, center: o, right: s } =
|
|
6861
|
+
var ef = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
6862
|
+
let { left: a, center: o, right: s } = Yd([{
|
|
6823
6863
|
num: t,
|
|
6824
6864
|
exclusive: !1
|
|
6825
6865
|
}, {
|
|
@@ -6849,24 +6889,24 @@ var $d = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
|
6849
6889
|
intersection: u
|
|
6850
6890
|
};
|
|
6851
6891
|
};
|
|
6852
|
-
function
|
|
6892
|
+
function tf({ left: e, right: t, intersection: n }) {
|
|
6853
6893
|
if (!n) return z.Rejection;
|
|
6854
6894
|
let r = !1, i = !1;
|
|
6855
6895
|
return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ? z.Intersection : r ? z.Containing : i ? z.ContainedBy : z.Equals;
|
|
6856
6896
|
}
|
|
6857
6897
|
//#endregion
|
|
6858
6898
|
//#region src/json-schema-subset/checker/array.ts
|
|
6859
|
-
var
|
|
6899
|
+
var nf = ef(0), rf = Kd([
|
|
6860
6900
|
"hasCommon",
|
|
6861
6901
|
"hasExtra1",
|
|
6862
6902
|
"hasExtra2",
|
|
6863
6903
|
"hasRejection",
|
|
6864
6904
|
"hasCommonBroken"
|
|
6865
6905
|
]);
|
|
6866
|
-
function
|
|
6867
|
-
let r =
|
|
6906
|
+
function af({ calculate: e }, t, n) {
|
|
6907
|
+
let r = nf(t.minItems, t.maxItems, n.minItems, n.maxItems), i = tf(r);
|
|
6868
6908
|
if (i === z.Rejection) return U;
|
|
6869
|
-
let [a, o] =
|
|
6909
|
+
let [a, o] = of(t), [s, c] = of(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = rf.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
|
|
6870
6910
|
for (let t = 0; t < u; t++) {
|
|
6871
6911
|
let n = e(a[t] ?? o, s[t] ?? c);
|
|
6872
6912
|
d.push(n, (e, n) => {
|
|
@@ -6906,69 +6946,69 @@ function rf({ calculate: e }, t, n) {
|
|
|
6906
6946
|
}
|
|
6907
6947
|
return p;
|
|
6908
6948
|
}
|
|
6909
|
-
function
|
|
6910
|
-
return Array.isArray(e) ? [e, t ??
|
|
6949
|
+
function of({ items: e, additionalItems: t }) {
|
|
6950
|
+
return Array.isArray(e) ? [e, t ?? Ju] : [[], e ?? Ju];
|
|
6911
6951
|
}
|
|
6912
6952
|
//#endregion
|
|
6913
6953
|
//#region src/json-schema-subset/checker/cache.ts
|
|
6914
|
-
function
|
|
6954
|
+
function sf(e) {
|
|
6915
6955
|
let t = /* @__PURE__ */ new Map();
|
|
6916
6956
|
return (n, r) => {
|
|
6917
|
-
let i =
|
|
6918
|
-
return i ===
|
|
6957
|
+
let i = Xu(n);
|
|
6958
|
+
return i === Xu(r) ? i ? lf(t, n, r, e) : n === r : !1;
|
|
6919
6959
|
};
|
|
6920
6960
|
}
|
|
6921
|
-
function
|
|
6961
|
+
function cf(e) {
|
|
6922
6962
|
let t = /* @__PURE__ */ new Map();
|
|
6923
|
-
return (n, r) =>
|
|
6963
|
+
return (n, r) => lf(t, n, r, e);
|
|
6924
6964
|
}
|
|
6925
|
-
function
|
|
6926
|
-
let i = `${
|
|
6965
|
+
function lf(e, t, n, r) {
|
|
6966
|
+
let i = `${Qu(t)}/${Qu(n)}`, a = e.get(i);
|
|
6927
6967
|
return a === void 0 && e.set(i, a = r(t, n)), a;
|
|
6928
6968
|
}
|
|
6929
6969
|
//#endregion
|
|
6930
6970
|
//#region src/json-schema-subset/checker/enumAndConst.ts
|
|
6931
|
-
function
|
|
6932
|
-
let r =
|
|
6933
|
-
for (let t of r) if (
|
|
6934
|
-
for (let t of i) if (
|
|
6971
|
+
function uf(e, t, n) {
|
|
6972
|
+
let r = ff(t), i = ff(n), a = !1, o = !1, s = !1;
|
|
6973
|
+
for (let t of r) if (pf(e, i, t) ? s = !0 : a = !0, a && s) break;
|
|
6974
|
+
for (let t of i) if (pf(e, r, t) ? s = !0 : o = !0, o && s) break;
|
|
6935
6975
|
return s ? a && o ? W : a ? V : o ? H : B : U;
|
|
6936
6976
|
}
|
|
6937
|
-
function
|
|
6977
|
+
function df(e, t) {
|
|
6938
6978
|
let n = !1, r = !1;
|
|
6939
|
-
for (let i of
|
|
6940
|
-
switch (
|
|
6941
|
-
case
|
|
6979
|
+
for (let i of ff(e)) {
|
|
6980
|
+
switch (pd(t, i)) {
|
|
6981
|
+
case fd.Valid:
|
|
6942
6982
|
n = !0;
|
|
6943
6983
|
break;
|
|
6944
|
-
case
|
|
6984
|
+
case fd.Invalid:
|
|
6945
6985
|
r = !0;
|
|
6946
6986
|
break;
|
|
6947
|
-
case
|
|
6987
|
+
case fd.Unknown: return du;
|
|
6948
6988
|
}
|
|
6949
6989
|
if (n && r) break;
|
|
6950
6990
|
}
|
|
6951
6991
|
return n && r ? W : n ? B | H : r ? U : J(t) === q.Never ? B : H;
|
|
6952
6992
|
}
|
|
6953
|
-
function
|
|
6993
|
+
function ff({ const: e, enum: t }) {
|
|
6954
6994
|
if (e !== void 0) return [e];
|
|
6955
6995
|
if (t) return t;
|
|
6956
6996
|
throw Error("invalid branch");
|
|
6957
6997
|
}
|
|
6958
|
-
function
|
|
6998
|
+
function pf({ isEquals: e }, t, n) {
|
|
6959
6999
|
for (let r of t) if (e(r, n)) return !0;
|
|
6960
7000
|
return !1;
|
|
6961
7001
|
}
|
|
6962
7002
|
//#endregion
|
|
6963
7003
|
//#region src/json-schema-subset/checker/equals.ts
|
|
6964
|
-
function
|
|
7004
|
+
function mf(e) {
|
|
6965
7005
|
function t(t, n) {
|
|
6966
7006
|
let i = e.isExtendsSchema(t), a = e.isExtendsSchema(n);
|
|
6967
7007
|
return i || a ? e.equals(t, n) : r(t, n);
|
|
6968
7008
|
}
|
|
6969
7009
|
let n = /* @__PURE__ */ new Map();
|
|
6970
7010
|
function r(e, t) {
|
|
6971
|
-
let r =
|
|
7011
|
+
let r = Qu(e), a = Qu(t);
|
|
6972
7012
|
if (r === a) return !0;
|
|
6973
7013
|
let o = `${r}/${a}`, s = n.get(o);
|
|
6974
7014
|
return s === void 0 && (s = i(e, t), n.set(o, s)), s;
|
|
@@ -6985,25 +7025,25 @@ function pf(e) {
|
|
|
6985
7025
|
return !0;
|
|
6986
7026
|
}
|
|
6987
7027
|
function a(e, t) {
|
|
6988
|
-
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 :
|
|
7028
|
+
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : Zu(e) && Zu(t) ? r(e, t) : i(e, t);
|
|
6989
7029
|
}
|
|
6990
7030
|
return t;
|
|
6991
7031
|
}
|
|
6992
7032
|
//#endregion
|
|
6993
7033
|
//#region src/json-schema-subset/checker/numeric/integerNormalizer.ts
|
|
6994
|
-
function
|
|
6995
|
-
let t =
|
|
7034
|
+
function hf(e) {
|
|
7035
|
+
let t = Sf(e), n = e.multipleOf ?? 1, r = _f(t, n);
|
|
6996
7036
|
return r ? {
|
|
6997
7037
|
multipleOf: n,
|
|
6998
7038
|
range: r
|
|
6999
7039
|
} : null;
|
|
7000
7040
|
}
|
|
7001
|
-
function
|
|
7041
|
+
function gf([e, t]) {
|
|
7002
7042
|
return !(e.num !== t.num || e.exclusive || t.exclusive);
|
|
7003
7043
|
}
|
|
7004
|
-
function
|
|
7044
|
+
function _f(e, t) {
|
|
7005
7045
|
if (!e) return;
|
|
7006
|
-
let [n, r] = e, i =
|
|
7046
|
+
let [n, r] = e, i = vf(n.num, t), a = yf(r.num, t);
|
|
7007
7047
|
if (i === n.num && n.exclusive && (i += t), a === r.num && r.exclusive && (a -= t), !(i > a) && (i !== a || i !== Infinity && i !== -Infinity)) return [{
|
|
7008
7048
|
num: i,
|
|
7009
7049
|
exclusive: !1
|
|
@@ -7012,29 +7052,29 @@ function gf(e, t) {
|
|
|
7012
7052
|
exclusive: !1
|
|
7013
7053
|
}];
|
|
7014
7054
|
}
|
|
7015
|
-
function
|
|
7055
|
+
function vf(e, t) {
|
|
7016
7056
|
return Math.ceil(e / t) * t;
|
|
7017
7057
|
}
|
|
7018
|
-
function
|
|
7058
|
+
function yf(e, t) {
|
|
7019
7059
|
return Math.floor(e / t) * t;
|
|
7020
7060
|
}
|
|
7021
7061
|
//#endregion
|
|
7022
7062
|
//#region src/json-schema-subset/checker/numeric/float.ts
|
|
7023
|
-
function
|
|
7024
|
-
let { left: n, right: r, center: i } =
|
|
7063
|
+
function bf(e, t) {
|
|
7064
|
+
let { left: n, right: r, center: i } = Yd(Sf(e), Sf(t));
|
|
7025
7065
|
if (!i) return U;
|
|
7026
7066
|
let a = !1, o = !1;
|
|
7027
7067
|
return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ? W : a ? V : o ? H : B;
|
|
7028
7068
|
}
|
|
7029
|
-
function
|
|
7030
|
-
let n =
|
|
7069
|
+
function xf(e, t) {
|
|
7070
|
+
let n = Sf(e), r = hf(t);
|
|
7031
7071
|
if (!r) return V;
|
|
7032
|
-
let i =
|
|
7072
|
+
let i = Yd(n, r.range), a = _f(i.center, r.multipleOf), o = Cf(i.left, r.multipleOf), s = Cf(i.right, r.multipleOf);
|
|
7033
7073
|
if (!i.center) return U;
|
|
7034
7074
|
let c = !1, l = !1;
|
|
7035
|
-
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !
|
|
7075
|
+
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !gf(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? W : c ? V : l ? H : B;
|
|
7036
7076
|
}
|
|
7037
|
-
function
|
|
7077
|
+
function Sf(e) {
|
|
7038
7078
|
let t, n;
|
|
7039
7079
|
return t = e.exclusiveMinimum === void 0 ? e.minimum === void 0 ? {
|
|
7040
7080
|
num: -Infinity,
|
|
@@ -7056,84 +7096,84 @@ function xf(e) {
|
|
|
7056
7096
|
exclusive: !0
|
|
7057
7097
|
}, [t, n];
|
|
7058
7098
|
}
|
|
7059
|
-
function
|
|
7060
|
-
if (e && !e.fromLeft) return
|
|
7099
|
+
function Cf(e, t) {
|
|
7100
|
+
if (e && !e.fromLeft) return _f(e.range, t);
|
|
7061
7101
|
}
|
|
7062
7102
|
//#endregion
|
|
7063
7103
|
//#region src/json-schema-subset/checker/numeric/integer.ts
|
|
7064
|
-
function
|
|
7065
|
-
let n =
|
|
7104
|
+
function wf(e, t) {
|
|
7105
|
+
let n = hf(e), r = hf(t);
|
|
7066
7106
|
if (!n && !r) return B;
|
|
7067
7107
|
if (!n) return H;
|
|
7068
7108
|
if (!r) return V;
|
|
7069
|
-
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c =
|
|
7070
|
-
if (c.center && (u =
|
|
7109
|
+
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = Yd(i, o), l, u = 0;
|
|
7110
|
+
if (c.center && (u = Ef(a, s), l = _f(c.center, u)), !l) return U;
|
|
7071
7111
|
let d = !1, f = !1, { left: p, right: ee } = c;
|
|
7072
|
-
return p &&
|
|
7112
|
+
return p && _f(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), ee && _f(ee.range, ee.fromLeft ? a : s) && (ee.fromLeft ? d = !0 : f = !0), d ||= Tf(n, l, u), f ||= Tf(r, l, u), d && f ? W : d ? V : f ? H : B;
|
|
7073
7113
|
}
|
|
7074
|
-
function
|
|
7075
|
-
let i =
|
|
7076
|
-
if (
|
|
7077
|
-
let a =
|
|
7114
|
+
function Tf({ range: e, multipleOf: t }, n, r) {
|
|
7115
|
+
let i = Yd(e, n);
|
|
7116
|
+
if (_f(i.left?.range, t) || _f(i.right?.range, t)) return !0;
|
|
7117
|
+
let a = _f(i.center, t);
|
|
7078
7118
|
if (!a) return !1;
|
|
7079
|
-
let o =
|
|
7080
|
-
return
|
|
7081
|
-
}
|
|
7082
|
-
function Tf(e, t) {
|
|
7083
|
-
return e * t / Ef(e, t);
|
|
7119
|
+
let o = Of(n);
|
|
7120
|
+
return Of(a) > o || o !== 1 && t < r;
|
|
7084
7121
|
}
|
|
7085
7122
|
function Ef(e, t) {
|
|
7086
|
-
return e
|
|
7123
|
+
return e * t / Df(e, t);
|
|
7087
7124
|
}
|
|
7088
|
-
function Df(e) {
|
|
7125
|
+
function Df(e, t) {
|
|
7126
|
+
return e === 0 ? t : Df(t % e, e);
|
|
7127
|
+
}
|
|
7128
|
+
function Of(e) {
|
|
7089
7129
|
if (!e) return 0;
|
|
7090
7130
|
let [t, n] = e;
|
|
7091
7131
|
return n.num - t.num + 1;
|
|
7092
7132
|
}
|
|
7093
7133
|
//#endregion
|
|
7094
7134
|
//#region src/json-schema-subset/checker/numeric/checker.ts
|
|
7095
|
-
function
|
|
7096
|
-
if (
|
|
7097
|
-
let n =
|
|
7098
|
-
return n && r ?
|
|
7135
|
+
function kf(e, t) {
|
|
7136
|
+
if (Af(e) || Af(t)) return du;
|
|
7137
|
+
let n = jf(e), r = jf(t);
|
|
7138
|
+
return n && r ? bf(e, t) : n ? xf(e, t) : r ? xu(xf(t, e)) : wf(e, t);
|
|
7099
7139
|
}
|
|
7100
|
-
function
|
|
7140
|
+
function Af(e) {
|
|
7101
7141
|
let { multipleOf: t } = e;
|
|
7102
7142
|
return t === void 0 ? !1 : !Number.isInteger(t) || t < 0;
|
|
7103
7143
|
}
|
|
7104
|
-
function
|
|
7144
|
+
function jf(e) {
|
|
7105
7145
|
let { multipleOf: t } = e;
|
|
7106
7146
|
return !(t !== void 0 && Number.isInteger(t) || e.type === "integer");
|
|
7107
7147
|
}
|
|
7108
7148
|
//#endregion
|
|
7109
7149
|
//#region src/json-schema-subset/checker/object.ts
|
|
7110
|
-
var
|
|
7150
|
+
var Mf = ef(0), Nf = Kd([
|
|
7111
7151
|
"hasCommonInRequired",
|
|
7112
7152
|
"hasCommonOutRequired",
|
|
7113
7153
|
"hasExtra1",
|
|
7114
7154
|
"hasExtra2",
|
|
7115
7155
|
"hasRejection"
|
|
7116
7156
|
]);
|
|
7117
|
-
function
|
|
7118
|
-
if (
|
|
7119
|
-
let r =
|
|
7157
|
+
function Pf(e, t, n) {
|
|
7158
|
+
if (Ff(t, n)) return U;
|
|
7159
|
+
let r = If(t, n);
|
|
7120
7160
|
if (!r) return U;
|
|
7121
|
-
let i =
|
|
7161
|
+
let i = Hf(t), a = Hf(n), o = (t) => {
|
|
7122
7162
|
let n = i(t), r = a(t);
|
|
7123
|
-
return
|
|
7124
|
-
}, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u =
|
|
7125
|
-
for (let e of [...s].toSorted()) u.push(o(e),
|
|
7126
|
-
for (let e of [...c].toSorted()) u.push(o(e),
|
|
7127
|
-
for (let e of [...l].toSorted()) u.push(o(e),
|
|
7163
|
+
return Uf(n, r) ? e.calculate(n, r) : 0;
|
|
7164
|
+
}, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = Nf.variable({});
|
|
7165
|
+
for (let e of [...s].toSorted()) u.push(o(e), Rf);
|
|
7166
|
+
for (let e of [...c].toSorted()) u.push(o(e), zf);
|
|
7167
|
+
for (let e of [...l].toSorted()) u.push(o(e), Bf);
|
|
7128
7168
|
let { hasOptional1: d, hasOptional2: f } = r;
|
|
7129
7169
|
if (d || f) {
|
|
7130
|
-
let r =
|
|
7131
|
-
for (let e of [...
|
|
7170
|
+
let r = Vf(d, f);
|
|
7171
|
+
for (let e of [...Lf(t, n)].toSorted()) {
|
|
7132
7172
|
let t = o(e);
|
|
7133
7173
|
t !== 0 && u.push(t, r);
|
|
7134
7174
|
}
|
|
7135
|
-
let i = t.additionalProperties ??
|
|
7136
|
-
if (
|
|
7175
|
+
let i = t.additionalProperties ?? Ju, a = n.additionalProperties ?? Ju;
|
|
7176
|
+
if (Uf(i, a)) {
|
|
7137
7177
|
let t = e.calculate(i, a);
|
|
7138
7178
|
u.push(t, r);
|
|
7139
7179
|
}
|
|
@@ -7145,10 +7185,10 @@ function Nf(e, t, n) {
|
|
|
7145
7185
|
for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) ee |= !n && p > 0 || !r && p === 0 || i ? U : e && t ? W : e ? V : t ? H : B;
|
|
7146
7186
|
return ee;
|
|
7147
7187
|
}
|
|
7148
|
-
function Pf(e, t) {
|
|
7149
|
-
return ef(jf(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === z.Rejection;
|
|
7150
|
-
}
|
|
7151
7188
|
function Ff(e, t) {
|
|
7189
|
+
return tf(Mf(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === z.Rejection;
|
|
7190
|
+
}
|
|
7191
|
+
function If(e, t) {
|
|
7152
7192
|
let n = new Set(e.required), r = new Set(t.required), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = n.size, s = r.size;
|
|
7153
7193
|
for (let e of n) r.has(e) && i.add(e), a.add(e);
|
|
7154
7194
|
for (let e of r) n.has(e) && i.add(e), a.add(e);
|
|
@@ -7164,7 +7204,7 @@ function Ff(e, t) {
|
|
|
7164
7204
|
hasOptional2: u > s
|
|
7165
7205
|
};
|
|
7166
7206
|
}
|
|
7167
|
-
function
|
|
7207
|
+
function Lf(e, t) {
|
|
7168
7208
|
let n = new Set(e.required), r = e.properties, i = t.properties, a = e.required, o = t.required;
|
|
7169
7209
|
if (r) for (let e in r) n.add(e);
|
|
7170
7210
|
if (i) for (let e in i) n.add(e);
|
|
@@ -7172,7 +7212,7 @@ function If(e, t) {
|
|
|
7172
7212
|
if (o) for (let e of o) n.delete(e);
|
|
7173
7213
|
return n;
|
|
7174
7214
|
}
|
|
7175
|
-
var
|
|
7215
|
+
var Rf = (e, t) => {
|
|
7176
7216
|
switch (e) {
|
|
7177
7217
|
case z.Equals:
|
|
7178
7218
|
t.hasCommonInRequired = !0;
|
|
@@ -7188,7 +7228,7 @@ var Lf = (e, t) => {
|
|
|
7188
7228
|
break;
|
|
7189
7229
|
case z.Rejection: t.hasRejection = !0;
|
|
7190
7230
|
}
|
|
7191
|
-
},
|
|
7231
|
+
}, zf = (e, t) => {
|
|
7192
7232
|
switch (e) {
|
|
7193
7233
|
case z.Equals:
|
|
7194
7234
|
case z.ContainedBy:
|
|
@@ -7200,7 +7240,7 @@ var Lf = (e, t) => {
|
|
|
7200
7240
|
break;
|
|
7201
7241
|
case z.Rejection: t.hasRejection = !0;
|
|
7202
7242
|
}
|
|
7203
|
-
},
|
|
7243
|
+
}, Bf = (e, t) => {
|
|
7204
7244
|
switch (e) {
|
|
7205
7245
|
case z.Equals:
|
|
7206
7246
|
case z.Containing:
|
|
@@ -7212,7 +7252,7 @@ var Lf = (e, t) => {
|
|
|
7212
7252
|
break;
|
|
7213
7253
|
case z.Rejection: t.hasRejection = !0;
|
|
7214
7254
|
}
|
|
7215
|
-
},
|
|
7255
|
+
}, Vf = (e, t) => (n, r) => {
|
|
7216
7256
|
if (r.hasRejection) return;
|
|
7217
7257
|
let i = !1, a = !1, o = !1;
|
|
7218
7258
|
switch (n) {
|
|
@@ -7232,7 +7272,7 @@ var Lf = (e, t) => {
|
|
|
7232
7272
|
}
|
|
7233
7273
|
e && i && (r.hasExtra1 = !0), t && a && (r.hasExtra2 = !0), e && t && o && (r.hasCommonOutRequired = !0);
|
|
7234
7274
|
};
|
|
7235
|
-
function
|
|
7275
|
+
function Hf(e) {
|
|
7236
7276
|
let t = e.properties, n = e.propertyNames, r = e.additionalProperties, i = [];
|
|
7237
7277
|
if (e.patternProperties) for (let t in e.patternProperties) {
|
|
7238
7278
|
let n = e.patternProperties[t], r = new RegExp(t, "i");
|
|
@@ -7242,41 +7282,41 @@ function Vf(e) {
|
|
|
7242
7282
|
});
|
|
7243
7283
|
}
|
|
7244
7284
|
return (e) => {
|
|
7245
|
-
if (n &&
|
|
7285
|
+
if (n && pd(n, e) === fd.Invalid) return Yu;
|
|
7246
7286
|
for (let { pattern: t, schema: n } of i) if (t.test(e)) return n;
|
|
7247
|
-
return ((t && t[e]) ?? r) ||
|
|
7287
|
+
return ((t && t[e]) ?? r) || Ju;
|
|
7248
7288
|
};
|
|
7249
7289
|
}
|
|
7250
|
-
function
|
|
7290
|
+
function Uf(e, t) {
|
|
7251
7291
|
let n = J(e), r = J(t);
|
|
7252
7292
|
return n !== q.Never || r !== q.Never;
|
|
7253
7293
|
}
|
|
7254
7294
|
//#endregion
|
|
7255
7295
|
//#region src/json-schema-subset/checker/string.ts
|
|
7256
|
-
var
|
|
7257
|
-
function
|
|
7296
|
+
var Wf = ef(0);
|
|
7297
|
+
function Gf(e, t) {
|
|
7258
7298
|
if (t.format && !e.format) return V;
|
|
7259
|
-
if (e.format && t.format && e.format !== t.format) return
|
|
7260
|
-
let n =
|
|
7299
|
+
if (e.format && t.format && e.format !== t.format) return du;
|
|
7300
|
+
let n = tf(Wf(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
|
|
7261
7301
|
switch (n) {
|
|
7262
7302
|
case z.Rejection: return U;
|
|
7263
|
-
case z.Containing: return r ?
|
|
7264
|
-
case z.ContainedBy: return i ?
|
|
7265
|
-
case z.Equals: return r && i ? e.pattern === t.pattern ? B :
|
|
7266
|
-
case z.Intersection: return r && i ?
|
|
7303
|
+
case z.Containing: return r ? du : V;
|
|
7304
|
+
case z.ContainedBy: return i ? du : H;
|
|
7305
|
+
case z.Equals: return r && i ? e.pattern === t.pattern ? B : du : r ? B | H : i ? B | V : B;
|
|
7306
|
+
case z.Intersection: return r && i ? du : r ? W | U | H : i ? W | U | V : W;
|
|
7267
7307
|
}
|
|
7268
7308
|
}
|
|
7269
7309
|
//#endregion
|
|
7270
7310
|
//#region src/json-schema-subset/checker/checker.ts
|
|
7271
|
-
function
|
|
7272
|
-
let r = {}, i = [], a =
|
|
7273
|
-
r.isEquals =
|
|
7311
|
+
function Kf(e, t, n) {
|
|
7312
|
+
let r = {}, i = [], a = cf(Jf(e, r)), o = qf(), s = mf(e);
|
|
7313
|
+
r.isEquals = sf(lu), r.calculate = Au({
|
|
7274
7314
|
describe: o,
|
|
7275
7315
|
equals: s,
|
|
7276
7316
|
calculate: a,
|
|
7277
7317
|
observeCalculation: (e, t, n, r) => {
|
|
7278
|
-
if (!
|
|
7279
|
-
let a = r ?
|
|
7318
|
+
if (!Xf(r ? xu(n) : n)) return;
|
|
7319
|
+
let a = r ? Zf(t, e) : Zf(e, t);
|
|
7280
7320
|
a && i.push(a);
|
|
7281
7321
|
}
|
|
7282
7322
|
}), Object.freeze(r);
|
|
@@ -7286,34 +7326,34 @@ function Gf(e, t, n) {
|
|
|
7286
7326
|
expression: c
|
|
7287
7327
|
};
|
|
7288
7328
|
}
|
|
7289
|
-
var
|
|
7329
|
+
var qf = () => (e) => {
|
|
7290
7330
|
let t;
|
|
7291
7331
|
switch (J(e)) {
|
|
7292
7332
|
case q.Not:
|
|
7293
7333
|
t = {
|
|
7294
|
-
kind:
|
|
7334
|
+
kind: ku.Not,
|
|
7295
7335
|
expression: e.not
|
|
7296
7336
|
};
|
|
7297
7337
|
break;
|
|
7298
7338
|
case q.Combination:
|
|
7299
7339
|
if ("allOf" in e) t = {
|
|
7300
|
-
kind:
|
|
7301
|
-
expressions:
|
|
7340
|
+
kind: ku.AllOf,
|
|
7341
|
+
expressions: Yf(e.allOf, q.Any)
|
|
7302
7342
|
};
|
|
7303
7343
|
else if ("anyOf" in e) t = {
|
|
7304
|
-
kind:
|
|
7305
|
-
expressions:
|
|
7344
|
+
kind: ku.AnyOf,
|
|
7345
|
+
expressions: Yf(e.anyOf, q.Never)
|
|
7306
7346
|
};
|
|
7307
7347
|
else if ("oneOf" in e) t = {
|
|
7308
|
-
kind:
|
|
7309
|
-
expressions:
|
|
7348
|
+
kind: ku.OneOf,
|
|
7349
|
+
expressions: Yf(e.oneOf, q.Never)
|
|
7310
7350
|
};
|
|
7311
7351
|
else throw Error(`invalid combination JSON Schema: ${JSON.stringify(e)}`);
|
|
7312
7352
|
break;
|
|
7313
|
-
default: t = { kind:
|
|
7353
|
+
default: t = { kind: ku.Leaf };
|
|
7314
7354
|
}
|
|
7315
7355
|
return t;
|
|
7316
|
-
},
|
|
7356
|
+
}, Jf = (e, t) => (n, r) => {
|
|
7317
7357
|
let i = J(n), a = J(r);
|
|
7318
7358
|
if (i === q.Extends || a === q.Extends) return e.calculate(n, r);
|
|
7319
7359
|
switch (i) {
|
|
@@ -7324,28 +7364,28 @@ var Kf = () => (e) => {
|
|
|
7324
7364
|
case q.Any: return H;
|
|
7325
7365
|
case q.Never: return V;
|
|
7326
7366
|
}
|
|
7327
|
-
if (i === q.EnumOrConst && a === q.EnumOrConst) return
|
|
7328
|
-
if (i === q.EnumOrConst) return
|
|
7329
|
-
if (a === q.EnumOrConst) return
|
|
7367
|
+
if (i === q.EnumOrConst && a === q.EnumOrConst) return uf(t, n, r);
|
|
7368
|
+
if (i === q.EnumOrConst) return df(n, r);
|
|
7369
|
+
if (a === q.EnumOrConst) return xu(df(r, n));
|
|
7330
7370
|
if (i !== a) return U;
|
|
7331
7371
|
switch (i) {
|
|
7332
7372
|
case q.Null: return B;
|
|
7333
|
-
case q.Numeric: return
|
|
7334
|
-
case q.String: return
|
|
7373
|
+
case q.Numeric: return kf(n, r);
|
|
7374
|
+
case q.String: return Gf(n, r);
|
|
7335
7375
|
case q.Boolean: return B;
|
|
7336
|
-
case q.Object: return
|
|
7337
|
-
case q.Array: return
|
|
7376
|
+
case q.Object: return Pf(t, n, r);
|
|
7377
|
+
case q.Array: return af(t, n, r);
|
|
7338
7378
|
default: throw Error(`invalid kind ${i}`);
|
|
7339
7379
|
}
|
|
7340
7380
|
};
|
|
7341
|
-
function
|
|
7381
|
+
function Yf(e, t) {
|
|
7342
7382
|
return e.filter((e) => J(e) !== t);
|
|
7343
7383
|
}
|
|
7344
|
-
function
|
|
7345
|
-
return !
|
|
7384
|
+
function Xf(e) {
|
|
7385
|
+
return !fu(e) && !mu(e) && (pu(e) || gu(e) || hu(e));
|
|
7346
7386
|
}
|
|
7347
|
-
function
|
|
7348
|
-
let n =
|
|
7387
|
+
function Zf(e, t) {
|
|
7388
|
+
let n = $u(t);
|
|
7349
7389
|
if (!n) return;
|
|
7350
7390
|
let r = J(e), i = J(t);
|
|
7351
7391
|
if (r !== i) return [...n, "type"];
|
|
@@ -7380,12 +7420,12 @@ function Xf(e, t) {
|
|
|
7380
7420
|
}
|
|
7381
7421
|
//#endregion
|
|
7382
7422
|
//#region src/json-schema-subset/extends/extendsContext.ts
|
|
7383
|
-
var
|
|
7423
|
+
var Qf = class e {
|
|
7384
7424
|
constructor(e = []) {
|
|
7385
7425
|
this.extendsSchemaClasses = Object.freeze([...e]);
|
|
7386
7426
|
}
|
|
7387
7427
|
tryCompiledExtendsSchema(e, t) {
|
|
7388
|
-
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(
|
|
7428
|
+
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(au(), e, t);
|
|
7389
7429
|
return null;
|
|
7390
7430
|
}
|
|
7391
7431
|
isExtendsSchema(e) {
|
|
@@ -7395,7 +7435,7 @@ var Zf = class e {
|
|
|
7395
7435
|
calculate(t, n) {
|
|
7396
7436
|
let r = !(t instanceof this.findMatchedClass(t, n)), i = 0, a;
|
|
7397
7437
|
a = r ? n.compare(t) : t.compare(n);
|
|
7398
|
-
for (let t of a) r && (t = e.swap(t)), i |=
|
|
7438
|
+
for (let t of a) r && (t = e.swap(t)), i |= _u(t);
|
|
7399
7439
|
return i;
|
|
7400
7440
|
}
|
|
7401
7441
|
equals(e, t) {
|
|
@@ -7415,35 +7455,35 @@ var Zf = class e {
|
|
|
7415
7455
|
};
|
|
7416
7456
|
//#endregion
|
|
7417
7457
|
//#region src/json-schema-subset/preprocessing.ts
|
|
7418
|
-
function
|
|
7458
|
+
function $f(e, t, n = !1) {
|
|
7419
7459
|
let r = t(e);
|
|
7420
7460
|
if (Array.isArray(r)) {
|
|
7421
7461
|
let e = [];
|
|
7422
|
-
throw
|
|
7462
|
+
throw tp(e, r, "$"), new ju(e);
|
|
7423
7463
|
}
|
|
7424
7464
|
let { schema: i, warns: a } = r;
|
|
7425
7465
|
if (n && a.length > 0) {
|
|
7426
7466
|
console.warn(`found ${a.length} warns after compile schema`);
|
|
7427
|
-
for (let e of a) console.warn(
|
|
7467
|
+
for (let e of a) console.warn(Nu(e));
|
|
7428
7468
|
}
|
|
7429
7469
|
return i;
|
|
7430
7470
|
}
|
|
7431
|
-
function
|
|
7471
|
+
function ep(e, t, n, r = !1) {
|
|
7432
7472
|
let i = n(e), a = n(t);
|
|
7433
7473
|
if (Array.isArray(i) || Array.isArray(a)) {
|
|
7434
7474
|
let e = [];
|
|
7435
|
-
throw Array.isArray(i) &&
|
|
7475
|
+
throw Array.isArray(i) && tp(e, i, "$1"), Array.isArray(a) && tp(e, a, "$2"), new ju(e);
|
|
7436
7476
|
}
|
|
7437
7477
|
let { schema: o, warns: s } = i, { schema: c, warns: l } = a;
|
|
7438
7478
|
if (r) {
|
|
7439
7479
|
s.length > 0 && console.warn(`found ${s.length} warns after compile superSchema`);
|
|
7440
|
-
for (let e of s) console.warn(
|
|
7480
|
+
for (let e of s) console.warn(Nu(e));
|
|
7441
7481
|
l.length > 0 && console.warn(`found ${l.length} warns after compile subSchema`);
|
|
7442
|
-
for (let e of l) console.warn(
|
|
7482
|
+
for (let e of l) console.warn(Nu(e));
|
|
7443
7483
|
}
|
|
7444
7484
|
return [o, c];
|
|
7445
7485
|
}
|
|
7446
|
-
function
|
|
7486
|
+
function tp(e, t, n) {
|
|
7447
7487
|
for (let r of t) {
|
|
7448
7488
|
let t = {
|
|
7449
7489
|
...r,
|
|
@@ -7454,60 +7494,60 @@ function ep(e, t, n) {
|
|
|
7454
7494
|
}
|
|
7455
7495
|
//#endregion
|
|
7456
7496
|
//#region src/json-schema-subset/global.ts
|
|
7457
|
-
var
|
|
7497
|
+
var np = Object.freeze({
|
|
7458
7498
|
True: 0,
|
|
7459
7499
|
False: 1,
|
|
7460
7500
|
Unknown: 2
|
|
7461
7501
|
});
|
|
7462
|
-
function
|
|
7463
|
-
let n = new
|
|
7502
|
+
function rp({ extendsSchemaClasses: e, delegate: t } = {}) {
|
|
7503
|
+
let n = new Qf(e);
|
|
7464
7504
|
return Object.freeze({
|
|
7465
|
-
compile: (e, r, i) =>
|
|
7505
|
+
compile: (e, r, i) => $f(e, (e) => Bd(e, n, r, t), i),
|
|
7466
7506
|
isSubset: (e, r, i = !1) => {
|
|
7467
|
-
let [a, o] =
|
|
7468
|
-
return l && !u ? { result:
|
|
7507
|
+
let [a, o] = ep(e, r, (e) => Bd(e, n, void 0, t), i), { errorPath: s, expression: c } = Kf(n, a, o), l = fu(c) || mu(c), u = pu(c) || gu(c) || hu(c);
|
|
7508
|
+
return l && !u ? { result: np.True } : !l && u ? {
|
|
7469
7509
|
errorPath: s,
|
|
7470
|
-
result:
|
|
7471
|
-
} : { result:
|
|
7510
|
+
result: np.False
|
|
7511
|
+
} : { result: np.Unknown };
|
|
7472
7512
|
}
|
|
7473
7513
|
});
|
|
7474
7514
|
}
|
|
7475
7515
|
//#endregion
|
|
7476
7516
|
//#region ../../node_modules/.bun/@wopjs+cast@0.1.16/node_modules/@wopjs/cast/dist/index.mjs
|
|
7477
|
-
var
|
|
7517
|
+
var ip = (e) => typeof e == "string", ap = Array.isArray, op = (e) => typeof e == "object" && !!e, sp = (e) => op(e) && !ap(e), cp = (e) => sp(e) ? e : void 0;
|
|
7478
7518
|
//#endregion
|
|
7479
7519
|
//#region src/manifest/common/schemaComparer.ts
|
|
7480
|
-
function cp(e) {
|
|
7481
|
-
return sp(e)?.type === "string";
|
|
7482
|
-
}
|
|
7483
7520
|
function lp(e) {
|
|
7484
|
-
|
|
7485
|
-
if (t == null || n == null || t.packageId != null && !rp(t.packageId) || n.message != null && !rp(n.message)) throw TypeError("Invalid schema comparison context.");
|
|
7521
|
+
return cp(e)?.type === "string";
|
|
7486
7522
|
}
|
|
7487
7523
|
function up(e) {
|
|
7488
|
-
|
|
7524
|
+
let t = cp(e), n = cp(t?.error);
|
|
7525
|
+
if (t == null || n == null || t.packageId != null && !ip(t.packageId) || n.message != null && !ip(n.message)) throw TypeError("Invalid schema comparison context.");
|
|
7526
|
+
}
|
|
7527
|
+
function dp(e) {
|
|
7528
|
+
return e == null ? { error: {} } : (up(e), e);
|
|
7489
7529
|
}
|
|
7490
|
-
var
|
|
7530
|
+
var fp = class e {
|
|
7491
7531
|
static setError(t, n, r) {
|
|
7492
7532
|
t instanceof e ? t.context.error.message = r : n instanceof e && (n.context.error.message = r);
|
|
7493
7533
|
}
|
|
7494
7534
|
constructor(e, t, n) {
|
|
7495
|
-
this.id = e, this.value = t, this.context =
|
|
7535
|
+
this.id = e, this.value = t, this.context = dp(n);
|
|
7496
7536
|
}
|
|
7497
7537
|
compare(e) {
|
|
7498
|
-
return
|
|
7538
|
+
return Zu(e) && J(e) === q.Any ? [z.ContainedBy] : this.compareImpl(e);
|
|
7499
7539
|
}
|
|
7500
|
-
},
|
|
7540
|
+
}, pp = class e extends fp {
|
|
7501
7541
|
static isMatch(e) {
|
|
7502
|
-
let t =
|
|
7503
|
-
return Array.isArray(t) && t.every((e) =>
|
|
7542
|
+
let t = cp(e)?.enum;
|
|
7543
|
+
return Array.isArray(t) && t.every((e) => ip(e));
|
|
7504
7544
|
}
|
|
7505
7545
|
constructor(t, n, r) {
|
|
7506
7546
|
if (!e.isMatch(n)) throw TypeError("Invalid single-select schema.");
|
|
7507
7547
|
super(t, n, r);
|
|
7508
7548
|
}
|
|
7509
7549
|
compareImpl(t) {
|
|
7510
|
-
if (
|
|
7550
|
+
if (lp(t)) return [z.ContainedBy];
|
|
7511
7551
|
if (t instanceof e) {
|
|
7512
7552
|
let e = new Set(this.value.enum), n = z.Equals;
|
|
7513
7553
|
for (let r of t.value.enum) e.has(r) || (n = z.ContainedBy), e.delete(r);
|
|
@@ -7526,56 +7566,56 @@ var dp = class e {
|
|
|
7526
7566
|
}
|
|
7527
7567
|
return !1;
|
|
7528
7568
|
}
|
|
7529
|
-
},
|
|
7569
|
+
}, mp = class e extends fp {
|
|
7530
7570
|
static isMatch(e) {
|
|
7531
|
-
return
|
|
7571
|
+
return cp(e)?.contentMediaType === "oomol/bin";
|
|
7532
7572
|
}
|
|
7533
7573
|
constructor(t, n, r) {
|
|
7534
7574
|
if (!e.isMatch(n)) throw TypeError("Invalid binary schema.");
|
|
7535
7575
|
super(t, n, r);
|
|
7536
7576
|
}
|
|
7537
7577
|
compareImpl(t) {
|
|
7538
|
-
return t instanceof e ? [z.Equals] : (
|
|
7578
|
+
return t instanceof e ? [z.Equals] : (fp.setError(this, t, "edgeError.binDiffType"), [z.Rejection]);
|
|
7539
7579
|
}
|
|
7540
7580
|
equals(t) {
|
|
7541
7581
|
return t instanceof e;
|
|
7542
7582
|
}
|
|
7543
|
-
},
|
|
7583
|
+
}, hp = class e extends fp {
|
|
7544
7584
|
static isMatch(e) {
|
|
7545
|
-
return
|
|
7585
|
+
return cp(e)?.contentMediaType === "oomol/artifact";
|
|
7546
7586
|
}
|
|
7547
7587
|
constructor(t, n, r) {
|
|
7548
7588
|
if (!e.isMatch(n)) throw TypeError("Invalid Artifact schema.");
|
|
7549
7589
|
super(t, n, r);
|
|
7550
7590
|
}
|
|
7551
7591
|
compareImpl(t) {
|
|
7552
|
-
return t instanceof e ? [z.Equals] : (
|
|
7592
|
+
return t instanceof e ? [z.Equals] : (fp.setError(this, t, "edgeError.artifactDiffType"), [z.Rejection]);
|
|
7553
7593
|
}
|
|
7554
7594
|
equals(t) {
|
|
7555
7595
|
return t instanceof e;
|
|
7556
7596
|
}
|
|
7557
7597
|
};
|
|
7558
|
-
function
|
|
7559
|
-
return
|
|
7560
|
-
fp,
|
|
7598
|
+
function gp() {
|
|
7599
|
+
return rp({ extendsSchemaClasses: [
|
|
7561
7600
|
pp,
|
|
7562
|
-
mp
|
|
7601
|
+
mp,
|
|
7602
|
+
hp
|
|
7563
7603
|
] });
|
|
7564
7604
|
}
|
|
7565
|
-
|
|
7605
|
+
gp();
|
|
7566
7606
|
//#endregion
|
|
7567
7607
|
//#region src/control/common/eventSources.ts
|
|
7568
|
-
var
|
|
7608
|
+
var _p = S().min(1).max(256), vp = S().regex(/^[a-z][a-z0-9_.]{0,127}$/), yp = S().trim().min(1).max(128), bp = O({
|
|
7569
7609
|
version: j(1),
|
|
7570
|
-
sourceId:
|
|
7610
|
+
sourceId: _p,
|
|
7571
7611
|
revision: Zs().positive(),
|
|
7572
|
-
name:
|
|
7612
|
+
name: yp,
|
|
7573
7613
|
provider: mc(["feishu", "feishu_app_bot"]),
|
|
7574
|
-
appId:
|
|
7575
|
-
connectionId:
|
|
7576
|
-
teamId:
|
|
7614
|
+
appId: _p,
|
|
7615
|
+
connectionId: _p,
|
|
7616
|
+
teamId: _p.nullable(),
|
|
7577
7617
|
enabled: T(),
|
|
7578
|
-
eventTypes: E(
|
|
7618
|
+
eventTypes: E(vp),
|
|
7579
7619
|
manageSubscriptions: T(),
|
|
7580
7620
|
verificationTokenConfigured: T(),
|
|
7581
7621
|
encryptKeyConfigured: T(),
|
|
@@ -7584,22 +7624,22 @@ var gp = S().min(1).max(256), _p = S().regex(/^[a-z][a-z0-9_.]{0,127}$/), vp = S
|
|
|
7584
7624
|
lastReceivedAt: S().nullable(),
|
|
7585
7625
|
updatedAt: S(),
|
|
7586
7626
|
consumers: E(O({
|
|
7587
|
-
flowId:
|
|
7627
|
+
flowId: _p,
|
|
7588
7628
|
flowName: S(),
|
|
7589
|
-
triggerNodeId:
|
|
7629
|
+
triggerNodeId: _p
|
|
7590
7630
|
}))
|
|
7591
7631
|
});
|
|
7592
|
-
function bp(e) {
|
|
7593
|
-
return yp.parse(e);
|
|
7594
|
-
}
|
|
7595
7632
|
function xp(e) {
|
|
7633
|
+
return bp.parse(e);
|
|
7634
|
+
}
|
|
7635
|
+
function Sp(e) {
|
|
7596
7636
|
return O({
|
|
7597
7637
|
version: j(1),
|
|
7598
|
-
sources: E(
|
|
7599
|
-
teamId:
|
|
7638
|
+
sources: E(bp),
|
|
7639
|
+
teamId: _p.nullable().optional()
|
|
7600
7640
|
}).parse(e);
|
|
7601
7641
|
}
|
|
7602
|
-
var
|
|
7642
|
+
var Cp = new Map([
|
|
7603
7643
|
"en",
|
|
7604
7644
|
"zh-CN",
|
|
7605
7645
|
"zh-TW",
|
|
@@ -7608,12 +7648,12 @@ var Sp = new Map([
|
|
|
7608
7648
|
"ru",
|
|
7609
7649
|
"fr"
|
|
7610
7650
|
].map((e) => [e.toLowerCase(), e]));
|
|
7611
|
-
function
|
|
7612
|
-
return typeof e == "string" &&
|
|
7651
|
+
function wp(e) {
|
|
7652
|
+
return typeof e == "string" && Cp.get(e.toLowerCase()) == e;
|
|
7613
7653
|
}
|
|
7614
7654
|
//#endregion
|
|
7615
7655
|
//#region src/trigger/common/configSchema.ts
|
|
7616
|
-
var
|
|
7656
|
+
var Tp = E(k([O({
|
|
7617
7657
|
handle: S().min(1),
|
|
7618
7658
|
description: S().optional(),
|
|
7619
7659
|
jsonSchema: Vc(),
|
|
@@ -7625,7 +7665,7 @@ var wp = E(k([O({
|
|
|
7625
7665
|
})]));
|
|
7626
7666
|
//#endregion
|
|
7627
7667
|
//#region src/control/common/triggerDecoders.ts
|
|
7628
|
-
function
|
|
7668
|
+
function Ep(e) {
|
|
7629
7669
|
let t = F(e), n = t.type;
|
|
7630
7670
|
return n != "integration" && n != "poll" ? P() : {
|
|
7631
7671
|
description: typeof t.description == "string" ? t.description : P(),
|
|
@@ -7636,9 +7676,9 @@ function Tp(e) {
|
|
|
7636
7676
|
type: n
|
|
7637
7677
|
};
|
|
7638
7678
|
}
|
|
7639
|
-
function
|
|
7640
|
-
let t = F(e), n =
|
|
7641
|
-
configInputs:
|
|
7679
|
+
function Dp(e) {
|
|
7680
|
+
let t = F(e), n = Ep(t), r = {
|
|
7681
|
+
configInputs: Tp.parse(t.configInputs),
|
|
7642
7682
|
definitionVersion: t.definitionVersion === 2 ? 2 : P(),
|
|
7643
7683
|
description: n.description,
|
|
7644
7684
|
displayName: n.displayName,
|
|
@@ -7648,7 +7688,7 @@ function Ep(e) {
|
|
|
7648
7688
|
let t = F(e);
|
|
7649
7689
|
return Object.assign({
|
|
7650
7690
|
handle: I(t.handle),
|
|
7651
|
-
jsonSchema:
|
|
7691
|
+
jsonSchema: zl(t.jsonSchema),
|
|
7652
7692
|
nullable: typeof t.nullable == "boolean" ? t.nullable : P()
|
|
7653
7693
|
}, t.description == null ? {} : { description: I(t.description) });
|
|
7654
7694
|
}),
|
|
@@ -7687,18 +7727,18 @@ function Ep(e) {
|
|
|
7687
7727
|
type: "integration"
|
|
7688
7728
|
};
|
|
7689
7729
|
}
|
|
7690
|
-
var
|
|
7730
|
+
var Op = /* @__PURE__ */ new Set([
|
|
7691
7731
|
"cron",
|
|
7692
7732
|
"integration",
|
|
7693
7733
|
"poll",
|
|
7694
7734
|
"webhook"
|
|
7695
|
-
]),
|
|
7735
|
+
]), kp = /* @__PURE__ */ new Set([
|
|
7696
7736
|
"failed",
|
|
7697
7737
|
"healthy",
|
|
7698
7738
|
"initializing",
|
|
7699
7739
|
"needs_reauth",
|
|
7700
7740
|
"suspended"
|
|
7701
|
-
]),
|
|
7741
|
+
]), Ap = /* @__PURE__ */ new Set([
|
|
7702
7742
|
"delivery.failed",
|
|
7703
7743
|
"health.failed",
|
|
7704
7744
|
"health.needs_reauth",
|
|
@@ -7707,11 +7747,11 @@ var Dp = /* @__PURE__ */ new Set([
|
|
|
7707
7747
|
"operator.paused",
|
|
7708
7748
|
"operator.resumed"
|
|
7709
7749
|
]);
|
|
7710
|
-
function
|
|
7750
|
+
function jp(e) {
|
|
7711
7751
|
let t = F(e), n = t.health, r = t.listener == null ? void 0 : F(t.listener);
|
|
7712
7752
|
if (r != null && r.health != "healthy" && r.health != "failed" && r.health != "needs_reauth") return P();
|
|
7713
7753
|
let i = t.kind, a = t.operatorState, o = R(t.runtimeVersion);
|
|
7714
|
-
return t.version != 1 || typeof n != "string" || !
|
|
7754
|
+
return t.version != 1 || typeof n != "string" || !kp.has(n) || typeof i != "string" || !Op.has(i) || a != "active" && a != "paused" || o <= 0 ? P() : {
|
|
7715
7755
|
...t.currentPublicationId == null ? {} : { currentPublicationId: I(t.currentPublicationId) },
|
|
7716
7756
|
...t.currentRevisionId == null ? {} : { currentRevisionId: I(t.currentRevisionId) },
|
|
7717
7757
|
...t.endpointUrl == null ? {} : { endpointUrl: I(t.endpointUrl) },
|
|
@@ -7730,17 +7770,17 @@ function Ap(e) {
|
|
|
7730
7770
|
version: 1
|
|
7731
7771
|
};
|
|
7732
7772
|
}
|
|
7733
|
-
function
|
|
7773
|
+
function Mp(e) {
|
|
7734
7774
|
let t = F(e);
|
|
7735
7775
|
return t.version == 1 ? {
|
|
7736
|
-
binding:
|
|
7776
|
+
binding: jp(t.binding),
|
|
7737
7777
|
version: 1
|
|
7738
7778
|
} : P();
|
|
7739
7779
|
}
|
|
7740
|
-
function
|
|
7780
|
+
function Np(e) {
|
|
7741
7781
|
let t = F(e), n = t.kind;
|
|
7742
|
-
if (typeof n != "string" || !
|
|
7743
|
-
let r =
|
|
7782
|
+
if (typeof n != "string" || !Ap.has(n)) return P();
|
|
7783
|
+
let r = Bl(t.errorCode), i = Bl(t.errorMessage);
|
|
7744
7784
|
return i != null && i.length > 512 ? P() : {
|
|
7745
7785
|
activityId: I(t.activityId),
|
|
7746
7786
|
createdAt: I(t.createdAt),
|
|
@@ -7749,20 +7789,20 @@ function Mp(e) {
|
|
|
7749
7789
|
kind: n
|
|
7750
7790
|
};
|
|
7751
7791
|
}
|
|
7752
|
-
function
|
|
7753
|
-
let t = F(e), n =
|
|
7792
|
+
function Pp(e) {
|
|
7793
|
+
let t = F(e), n = Bl(t.nextCursor);
|
|
7754
7794
|
return t.version != 1 || !Array.isArray(t.activities) ? P() : {
|
|
7755
|
-
activities: t.activities.map(
|
|
7795
|
+
activities: t.activities.map(Np),
|
|
7756
7796
|
...n == null ? {} : { nextCursor: n },
|
|
7757
7797
|
version: 1
|
|
7758
7798
|
};
|
|
7759
7799
|
}
|
|
7760
|
-
function
|
|
7800
|
+
function Fp(e) {
|
|
7761
7801
|
let t = F(e), n = R(t.filtered);
|
|
7762
7802
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.hasMore != "boolean" || n < 0 ? P() : {
|
|
7763
7803
|
events: t.events.map((e) => {
|
|
7764
7804
|
let t = F(e);
|
|
7765
|
-
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e,
|
|
7805
|
+
return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, zl(t)]));
|
|
7766
7806
|
}),
|
|
7767
7807
|
filtered: n,
|
|
7768
7808
|
hasMore: t.hasMore,
|
|
@@ -7771,15 +7811,15 @@ function Pp(e) {
|
|
|
7771
7811
|
}
|
|
7772
7812
|
//#endregion
|
|
7773
7813
|
//#region src/control/common/triggerCatalog.ts
|
|
7774
|
-
function
|
|
7814
|
+
function Ip(e) {
|
|
7775
7815
|
let t = F(e);
|
|
7776
7816
|
if (L(t, [
|
|
7777
7817
|
"version",
|
|
7778
7818
|
"locale",
|
|
7779
7819
|
"definitions",
|
|
7780
7820
|
"display"
|
|
7781
|
-
]), t.version != 3 || !
|
|
7782
|
-
let n = t.definitions.map(
|
|
7821
|
+
]), t.version != 3 || !wp(t.locale) || !Array.isArray(t.definitions)) return P();
|
|
7822
|
+
let n = t.definitions.map(Dp), r = F(t.display), i = new Set(n.map((e) => e.key));
|
|
7783
7823
|
if (i.size != n.length || Object.keys(r).length != i.size) return P();
|
|
7784
7824
|
let a = Object.fromEntries(n.map((e) => {
|
|
7785
7825
|
let { key: t } = e, n = F(r[t]);
|
|
@@ -7790,11 +7830,11 @@ function Fp(e) {
|
|
|
7790
7830
|
"description",
|
|
7791
7831
|
"outputs"
|
|
7792
7832
|
]), [t, {
|
|
7793
|
-
configInputs:
|
|
7794
|
-
configInputLabels:
|
|
7833
|
+
configInputs: Lp(n.configInputs, e.configInputs.flatMap((e) => "handle" in e ? [e.handle] : [])),
|
|
7834
|
+
configInputLabels: Rp(n.configInputLabels, e.configInputs.flatMap((e) => "handle" in e ? [e.handle] : [])),
|
|
7795
7835
|
displayName: I(n.displayName),
|
|
7796
7836
|
description: I(n.description),
|
|
7797
|
-
outputs:
|
|
7837
|
+
outputs: Lp(n.outputs, e.outputs.map((e) => e.handle))
|
|
7798
7838
|
}];
|
|
7799
7839
|
}));
|
|
7800
7840
|
return {
|
|
@@ -7804,11 +7844,11 @@ function Fp(e) {
|
|
|
7804
7844
|
display: a
|
|
7805
7845
|
};
|
|
7806
7846
|
}
|
|
7807
|
-
function
|
|
7847
|
+
function Lp(e, t) {
|
|
7808
7848
|
let n = F(e);
|
|
7809
7849
|
return L(n, t), Object.fromEntries(Object.entries(n).map(([e, t]) => [e, I(t)]));
|
|
7810
7850
|
}
|
|
7811
|
-
function
|
|
7851
|
+
function Rp(e, t) {
|
|
7812
7852
|
let n = F(e);
|
|
7813
7853
|
return Object.keys(n).some((e) => !t.includes(e)) ? P() : Object.fromEntries(Object.entries(n).map(([e, t]) => {
|
|
7814
7854
|
let n = I(t);
|
|
@@ -7817,7 +7857,7 @@ function Lp(e, t) {
|
|
|
7817
7857
|
}
|
|
7818
7858
|
//#endregion
|
|
7819
7859
|
//#region src/control/common/results.ts
|
|
7820
|
-
var
|
|
7860
|
+
var zp = Vc(), Bp = O({
|
|
7821
7861
|
pointer: S(),
|
|
7822
7862
|
type: mc([
|
|
7823
7863
|
"object",
|
|
@@ -7829,12 +7869,12 @@ var Rp = Vc(), zp = O({
|
|
|
7829
7869
|
]),
|
|
7830
7870
|
length: w().int().nonnegative().optional(),
|
|
7831
7871
|
complete: T(),
|
|
7832
|
-
value:
|
|
7833
|
-
}),
|
|
7872
|
+
value: zp.optional()
|
|
7873
|
+
}), Vp = Bp.extend({
|
|
7834
7874
|
offset: w().int().nonnegative(),
|
|
7835
7875
|
nextOffset: w().int().positive().optional(),
|
|
7836
|
-
entries: E(
|
|
7837
|
-
}),
|
|
7876
|
+
entries: E(Bp).optional()
|
|
7877
|
+
}), Hp = O({
|
|
7838
7878
|
resultId: S().min(1),
|
|
7839
7879
|
callId: S().min(1),
|
|
7840
7880
|
toolId: S().min(1),
|
|
@@ -7845,43 +7885,43 @@ var Rp = Vc(), zp = O({
|
|
|
7845
7885
|
bytes: w().int().nonnegative(),
|
|
7846
7886
|
digest: S().regex(/^[a-f0-9]{64}$/),
|
|
7847
7887
|
createdAt: S().datetime()
|
|
7848
|
-
}),
|
|
7888
|
+
}), Up = O({
|
|
7849
7889
|
version: j(1),
|
|
7850
7890
|
runId: S(),
|
|
7851
|
-
results: E(
|
|
7891
|
+
results: E(Hp),
|
|
7852
7892
|
nextAfter: S().optional()
|
|
7853
|
-
}),
|
|
7893
|
+
}), Wp = O({
|
|
7854
7894
|
version: j(1),
|
|
7855
7895
|
runId: S(),
|
|
7856
|
-
result:
|
|
7857
|
-
page:
|
|
7896
|
+
result: Hp,
|
|
7897
|
+
page: Vp
|
|
7858
7898
|
});
|
|
7859
|
-
function Wp(e) {
|
|
7860
|
-
return Hp.parse(e);
|
|
7861
|
-
}
|
|
7862
7899
|
function Gp(e) {
|
|
7863
7900
|
return Up.parse(e);
|
|
7864
7901
|
}
|
|
7902
|
+
function Kp(e) {
|
|
7903
|
+
return Wp.parse(e);
|
|
7904
|
+
}
|
|
7865
7905
|
new TextEncoder();
|
|
7866
7906
|
//#endregion
|
|
7867
7907
|
//#region src/control/common/checkDecoders.ts
|
|
7868
|
-
function
|
|
7908
|
+
function qp(e) {
|
|
7869
7909
|
return Array.isArray(e) ? e.map((e) => typeof e == "string" || Number.isSafeInteger(e) ? e : P()) : P();
|
|
7870
7910
|
}
|
|
7871
|
-
function
|
|
7911
|
+
function Jp(e) {
|
|
7872
7912
|
let t = F(e), n = I(t.kind);
|
|
7873
7913
|
return n == "artifact" || n == "binary" || n == "nullable" ? { kind: n } : n == "schema" ? {
|
|
7874
7914
|
kind: n,
|
|
7875
|
-
path: t.path == null ? void 0 :
|
|
7915
|
+
path: t.path == null ? void 0 : qp(t.path)
|
|
7876
7916
|
} : n != "keyword" || typeof t.keyword != "string" || !Pl(t.keyword) ? P() : {
|
|
7877
7917
|
kind: n,
|
|
7878
7918
|
keyword: t.keyword,
|
|
7879
|
-
path:
|
|
7880
|
-
source: t.source === void 0 ? void 0 :
|
|
7881
|
-
target: t.target === void 0 ? void 0 :
|
|
7919
|
+
path: qp(t.path),
|
|
7920
|
+
source: t.source === void 0 ? void 0 : zl(t.source),
|
|
7921
|
+
target: t.target === void 0 ? void 0 : zl(t.target)
|
|
7882
7922
|
};
|
|
7883
7923
|
}
|
|
7884
|
-
function
|
|
7924
|
+
function Yp(e) {
|
|
7885
7925
|
let t = F(e), n = t.values == null ? void 0 : F(t.values);
|
|
7886
7926
|
return {
|
|
7887
7927
|
code: I(t.code),
|
|
@@ -7889,16 +7929,16 @@ function Jp(e) {
|
|
|
7889
7929
|
...t.fields === void 0 ? {} : { fields: Array.isArray(t.fields) ? t.fields.map(I) : P() },
|
|
7890
7930
|
line: R(t.line),
|
|
7891
7931
|
message: I(t.message),
|
|
7892
|
-
mismatch: t.mismatch == null ? void 0 :
|
|
7932
|
+
mismatch: t.mismatch == null ? void 0 : Jp(t.mismatch),
|
|
7893
7933
|
path: typeof t.path == "string" ? t.path : P(),
|
|
7894
7934
|
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : P()])) }
|
|
7895
7935
|
};
|
|
7896
7936
|
}
|
|
7897
|
-
function
|
|
7937
|
+
function Xp(e) {
|
|
7898
7938
|
let t = F(e);
|
|
7899
7939
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? P() : {
|
|
7900
7940
|
closureDigest: I(t.closureDigest),
|
|
7901
|
-
diagnostics: t.diagnostics.map(
|
|
7941
|
+
diagnostics: t.diagnostics.map(Yp),
|
|
7902
7942
|
engineContract: I(t.engineContract),
|
|
7903
7943
|
flowId: I(t.flowId),
|
|
7904
7944
|
modelVersion: R(t.modelVersion),
|
|
@@ -7910,8 +7950,8 @@ function Yp(e) {
|
|
|
7910
7950
|
}
|
|
7911
7951
|
//#endregion
|
|
7912
7952
|
//#region src/control/common/connectorQueries.ts
|
|
7913
|
-
var
|
|
7914
|
-
function
|
|
7953
|
+
var Zp = (e) => e == null ? "" : `?flowId=${encodeURIComponent(e)}`;
|
|
7954
|
+
function Qp(e, t) {
|
|
7915
7955
|
let n = new URLSearchParams({
|
|
7916
7956
|
...e == null ? {} : { flowId: e },
|
|
7917
7957
|
...t == null ? {} : { locale: t }
|
|
@@ -7920,11 +7960,11 @@ function Zp(e, t) {
|
|
|
7920
7960
|
path: `/v1/connector/providers${n ? `?${n}` : ""}`,
|
|
7921
7961
|
decode: (e) => {
|
|
7922
7962
|
let t = F(e);
|
|
7923
|
-
return L(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? P() : t.providers.map(
|
|
7963
|
+
return L(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? P() : t.providers.map(ru);
|
|
7924
7964
|
}
|
|
7925
7965
|
};
|
|
7926
7966
|
}
|
|
7927
|
-
function
|
|
7967
|
+
function $p(e, t, n) {
|
|
7928
7968
|
let r = new URLSearchParams({
|
|
7929
7969
|
...t == null ? {} : { flowId: t },
|
|
7930
7970
|
...n == null ? {} : { locale: n }
|
|
@@ -7933,35 +7973,35 @@ function Qp(e, t, n) {
|
|
|
7933
7973
|
path: `/v1/connector/actions/${encodeURIComponent(e)}${r ? `?${r}` : ""}`,
|
|
7934
7974
|
decode: (e) => {
|
|
7935
7975
|
let t = F(e);
|
|
7936
|
-
return L(t, ["action", "version"]), t.version == 1 ?
|
|
7976
|
+
return L(t, ["action", "version"]), t.version == 1 ? nu(t.action) : P();
|
|
7937
7977
|
}
|
|
7938
7978
|
};
|
|
7939
7979
|
}
|
|
7940
|
-
function
|
|
7980
|
+
function em(e) {
|
|
7941
7981
|
return {
|
|
7942
|
-
path: `/v1/connector/connections${
|
|
7982
|
+
path: `/v1/connector/connections${Zp(e)}`,
|
|
7943
7983
|
decode: (e) => {
|
|
7944
7984
|
let t = F(e);
|
|
7945
|
-
return L(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? P() : t.connections.map(
|
|
7985
|
+
return L(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? P() : t.connections.map(Zl);
|
|
7946
7986
|
}
|
|
7947
7987
|
};
|
|
7948
7988
|
}
|
|
7949
|
-
function
|
|
7989
|
+
function tm(e, t) {
|
|
7950
7990
|
return {
|
|
7951
|
-
path: `/v1/connector/connections/${encodeURIComponent(e)}${
|
|
7991
|
+
path: `/v1/connector/connections/${encodeURIComponent(e)}${Zp(t)}`,
|
|
7952
7992
|
decode: (t) => {
|
|
7953
7993
|
let n = F(t);
|
|
7954
7994
|
return L(n, [
|
|
7955
7995
|
"connections",
|
|
7956
7996
|
"serviceId",
|
|
7957
7997
|
"version"
|
|
7958
|
-
]), n.version != 1 || I(n.serviceId) != e || !Array.isArray(n.connections) ? P() : n.connections.map(
|
|
7998
|
+
]), n.version != 1 || I(n.serviceId) != e || !Array.isArray(n.connections) ? P() : n.connections.map(Zl);
|
|
7959
7999
|
}
|
|
7960
8000
|
};
|
|
7961
8001
|
}
|
|
7962
8002
|
//#endregion
|
|
7963
8003
|
//#region src/control/common/flowDecoders.ts
|
|
7964
|
-
function
|
|
8004
|
+
function nm(e) {
|
|
7965
8005
|
let t = F(e), n = t.status;
|
|
7966
8006
|
if (t.version != 1 || n != "active" && n != "retiring") return P();
|
|
7967
8007
|
let r = t.live == null ? void 0 : F(t.live);
|
|
@@ -7980,18 +8020,18 @@ function tm(e) {
|
|
|
7980
8020
|
version: 1
|
|
7981
8021
|
};
|
|
7982
8022
|
}
|
|
7983
|
-
function
|
|
8023
|
+
function rm(e) {
|
|
7984
8024
|
let t = F(e);
|
|
7985
8025
|
if (t.version != 1 || !Array.isArray(t.flows)) return P();
|
|
7986
8026
|
let n = t.nextCursor, r = t.total;
|
|
7987
8027
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? P() : {
|
|
7988
8028
|
...n == null ? {} : { nextCursor: n },
|
|
7989
|
-
flows: t.flows.map(
|
|
8029
|
+
flows: t.flows.map(nm),
|
|
7990
8030
|
...r == null ? {} : { total: r },
|
|
7991
8031
|
version: 1
|
|
7992
8032
|
};
|
|
7993
8033
|
}
|
|
7994
|
-
function
|
|
8034
|
+
function im(e) {
|
|
7995
8035
|
let t = F(e);
|
|
7996
8036
|
if (L(t, [
|
|
7997
8037
|
"name",
|
|
@@ -8014,25 +8054,31 @@ function rm(e) {
|
|
|
8014
8054
|
}
|
|
8015
8055
|
//#endregion
|
|
8016
8056
|
//#region src/control/common/publicationDecoders.ts
|
|
8017
|
-
function
|
|
8018
|
-
let t = F(e), n = t.
|
|
8019
|
-
|
|
8057
|
+
function am(e) {
|
|
8058
|
+
let t = F(e), n = t.liveEnd == null ? void 0 : F(t.liveEnd);
|
|
8059
|
+
if (n != null && typeof n.enabled != "boolean") return P();
|
|
8060
|
+
let r = t.operation, i = t.sourcePublicationId;
|
|
8061
|
+
return t.version != 1 || r != "publish" && r != "rollback" || i != null && typeof i != "string" ? P() : {
|
|
8062
|
+
...n == null ? {} : { liveEnd: {
|
|
8063
|
+
enabled: n.enabled,
|
|
8064
|
+
endedAt: I(n.endedAt)
|
|
8065
|
+
} },
|
|
8020
8066
|
actorId: I(t.actorId),
|
|
8021
8067
|
closureDigest: I(t.closureDigest),
|
|
8022
8068
|
createdAt: I(t.createdAt),
|
|
8023
8069
|
engineContract: I(t.engineContract),
|
|
8024
8070
|
flowId: I(t.flowId),
|
|
8025
8071
|
modelVersion: R(t.modelVersion),
|
|
8026
|
-
operation:
|
|
8072
|
+
operation: r,
|
|
8027
8073
|
publicationId: I(t.publicationId),
|
|
8028
8074
|
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
8029
8075
|
revisionDigest: I(t.revisionDigest),
|
|
8030
8076
|
revisionId: I(t.revisionId),
|
|
8031
|
-
...
|
|
8077
|
+
...i == null ? {} : { sourcePublicationId: i },
|
|
8032
8078
|
version: 1
|
|
8033
8079
|
};
|
|
8034
8080
|
}
|
|
8035
|
-
function
|
|
8081
|
+
function om(e) {
|
|
8036
8082
|
let t = F(e), n = t.status, r = {
|
|
8037
8083
|
createdAt: I(t.createdAt),
|
|
8038
8084
|
flowId: I(t.flowId),
|
|
@@ -8098,29 +8144,29 @@ function am(e) {
|
|
|
8098
8144
|
default: return P();
|
|
8099
8145
|
}
|
|
8100
8146
|
}
|
|
8101
|
-
function
|
|
8147
|
+
function sm(e) {
|
|
8102
8148
|
let t = F(e), n = t.status, r = t.publication;
|
|
8103
8149
|
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 ? P() : {
|
|
8104
8150
|
flowId: I(t.flowId),
|
|
8105
8151
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
8106
|
-
publication: r === null ? null :
|
|
8152
|
+
publication: r === null ? null : am(r),
|
|
8107
8153
|
revision: R(t.revision),
|
|
8108
8154
|
status: n,
|
|
8109
8155
|
version: 1
|
|
8110
8156
|
};
|
|
8111
8157
|
}
|
|
8112
|
-
function
|
|
8158
|
+
function cm(e) {
|
|
8113
8159
|
let t = F(e), n = t.nextCursor, r = t.total;
|
|
8114
8160
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? P() : {
|
|
8115
8161
|
...n == null ? {} : { nextCursor: n },
|
|
8116
|
-
publications: t.publications.map(
|
|
8162
|
+
publications: t.publications.map(am),
|
|
8117
8163
|
...r == null ? {} : { total: r },
|
|
8118
8164
|
version: 1
|
|
8119
8165
|
};
|
|
8120
8166
|
}
|
|
8121
8167
|
//#endregion
|
|
8122
8168
|
//#region src/control/common/revisionDecoders.ts
|
|
8123
|
-
function
|
|
8169
|
+
function lm(e) {
|
|
8124
8170
|
let t = F(e), n = t.parentRevisionId;
|
|
8125
8171
|
return t.version != 1 || n !== null && typeof n != "string" ? P() : {
|
|
8126
8172
|
actorId: I(t.actorId),
|
|
@@ -8133,50 +8179,50 @@ function cm(e) {
|
|
|
8133
8179
|
version: 1
|
|
8134
8180
|
};
|
|
8135
8181
|
}
|
|
8136
|
-
function
|
|
8182
|
+
function um(e) {
|
|
8137
8183
|
let t = F(e);
|
|
8138
8184
|
try {
|
|
8139
8185
|
return {
|
|
8140
|
-
...
|
|
8186
|
+
...lm(t),
|
|
8141
8187
|
content: jl(t.content)
|
|
8142
8188
|
};
|
|
8143
8189
|
} catch {
|
|
8144
8190
|
return P();
|
|
8145
8191
|
}
|
|
8146
8192
|
}
|
|
8147
|
-
function
|
|
8193
|
+
function dm(e) {
|
|
8148
8194
|
let t = F(e);
|
|
8149
8195
|
return t.version != 1 || R(t.revision) < 1 ? P() : {
|
|
8150
8196
|
revision: R(t.revision),
|
|
8151
8197
|
updatedAt: I(t.updatedAt),
|
|
8152
|
-
value: Object.fromEntries(Object.entries(F(t.value)).map(([e, t]) => [e,
|
|
8198
|
+
value: Object.fromEntries(Object.entries(F(t.value)).map(([e, t]) => [e, zl(t)])),
|
|
8153
8199
|
version: 1
|
|
8154
8200
|
};
|
|
8155
8201
|
}
|
|
8156
|
-
function
|
|
8202
|
+
function fm(e) {
|
|
8157
8203
|
let t = F(e);
|
|
8158
8204
|
return t.version == 1 ? {
|
|
8159
|
-
revision:
|
|
8205
|
+
revision: lm(t.revision),
|
|
8160
8206
|
version: 1
|
|
8161
8207
|
} : P();
|
|
8162
8208
|
}
|
|
8163
|
-
function
|
|
8209
|
+
function pm(e) {
|
|
8164
8210
|
let t = F(e);
|
|
8165
8211
|
return t.version != 1 || t.kind != "snapshot" ? P() : {
|
|
8166
|
-
draft:
|
|
8212
|
+
draft: um(t.draft),
|
|
8167
8213
|
kind: "snapshot",
|
|
8168
8214
|
version: 1
|
|
8169
8215
|
};
|
|
8170
8216
|
}
|
|
8171
8217
|
//#endregion
|
|
8172
8218
|
//#region src/control/common/runDecoders.ts
|
|
8173
|
-
var
|
|
8174
|
-
function mm(e) {
|
|
8175
|
-
return typeof e == "string" && pm.has(e) ? e : P();
|
|
8176
|
-
}
|
|
8219
|
+
var mm = new Set(Wc);
|
|
8177
8220
|
function hm(e) {
|
|
8221
|
+
return typeof e == "string" && mm.has(e) ? e : P();
|
|
8222
|
+
}
|
|
8223
|
+
function gm(e) {
|
|
8178
8224
|
let t = F(e), n = t.source, r = t.startedAt, i = t.finishedAt;
|
|
8179
|
-
return t.version != 1 || n != "draft" && n != "live"
|
|
8225
|
+
return t.version != 1 || n != "draft" && n != "live" || r != null && typeof r != "string" || i != null && typeof i != "string" ? P() : {
|
|
8180
8226
|
createdAt: I(t.createdAt),
|
|
8181
8227
|
...i == null ? {} : { finishedAt: i },
|
|
8182
8228
|
flowId: I(t.flowId),
|
|
@@ -8184,11 +8230,11 @@ function hm(e) {
|
|
|
8184
8230
|
runId: I(t.runId),
|
|
8185
8231
|
source: n,
|
|
8186
8232
|
...r == null ? {} : { startedAt: r },
|
|
8187
|
-
status:
|
|
8233
|
+
status: hm(t.status),
|
|
8188
8234
|
version: 1
|
|
8189
8235
|
};
|
|
8190
8236
|
}
|
|
8191
|
-
function
|
|
8237
|
+
function _m(e) {
|
|
8192
8238
|
let t = F(e);
|
|
8193
8239
|
L(t, [
|
|
8194
8240
|
"actions",
|
|
@@ -8208,16 +8254,16 @@ function gm(e) {
|
|
|
8208
8254
|
waitingSince: I(t.waitingSince)
|
|
8209
8255
|
};
|
|
8210
8256
|
}
|
|
8211
|
-
function
|
|
8212
|
-
let t = F(e), n =
|
|
8257
|
+
function vm(e) {
|
|
8258
|
+
let t = F(e), n = gm(t), r = t.eventsExpiresAt;
|
|
8213
8259
|
if (r != null && typeof r != "string" || t.waiting !== void 0 || !Array.isArray(t.waits)) return P();
|
|
8214
|
-
let i = t.waits.map(
|
|
8260
|
+
let i = t.waits.map(_m);
|
|
8215
8261
|
if (new Set(i.map((e) => e.waitId)).size != i.length || n.status == "waiting" && i.length == 0 || [
|
|
8216
8262
|
"completed",
|
|
8217
8263
|
"failed",
|
|
8218
8264
|
"canceled",
|
|
8219
8265
|
"indeterminate"
|
|
8220
|
-
].includes(n.status) && i.length > 0) return P();
|
|
8266
|
+
].includes(n.status) && i.length > 0 || t.occurrenceId === void 0 != (t.triggerNodeId === void 0)) return P();
|
|
8221
8267
|
let a = {
|
|
8222
8268
|
status: n.status,
|
|
8223
8269
|
waits: i
|
|
@@ -8240,28 +8286,25 @@ function _m(e) {
|
|
|
8240
8286
|
case "live": return {
|
|
8241
8287
|
...o,
|
|
8242
8288
|
publicationId: I(t.publicationId),
|
|
8243
|
-
source: "live"
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
publicationId: I(t.publicationId),
|
|
8249
|
-
source: "trigger",
|
|
8250
|
-
triggerNodeId: I(t.triggerNodeId)
|
|
8289
|
+
source: "live",
|
|
8290
|
+
...t.occurrenceId === void 0 ? {} : {
|
|
8291
|
+
occurrenceId: I(t.occurrenceId),
|
|
8292
|
+
triggerNodeId: I(t.triggerNodeId)
|
|
8293
|
+
}
|
|
8251
8294
|
};
|
|
8252
8295
|
}
|
|
8253
8296
|
}
|
|
8254
|
-
function
|
|
8297
|
+
function ym(e) {
|
|
8255
8298
|
let t = F(e), n = t.nextCursor;
|
|
8256
8299
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? P() : {
|
|
8257
8300
|
flowId: I(t.flowId),
|
|
8258
8301
|
...n == null ? {} : { nextCursor: n },
|
|
8259
|
-
runs: t.runs.map(
|
|
8302
|
+
runs: t.runs.map(gm),
|
|
8260
8303
|
version: 1
|
|
8261
8304
|
};
|
|
8262
8305
|
}
|
|
8263
|
-
function
|
|
8264
|
-
let t = F(e), n =
|
|
8306
|
+
function bm(e) {
|
|
8307
|
+
let t = F(e), n = hm(t.status);
|
|
8265
8308
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" || n == "waiting" ? P() : {
|
|
8266
8309
|
cancelAccepted: t.cancelAccepted,
|
|
8267
8310
|
runId: I(t.runId),
|
|
@@ -8269,7 +8312,7 @@ function ym(e) {
|
|
|
8269
8312
|
version: 1
|
|
8270
8313
|
};
|
|
8271
8314
|
}
|
|
8272
|
-
function
|
|
8315
|
+
function xm(e) {
|
|
8273
8316
|
let t = F(e);
|
|
8274
8317
|
L(t, [
|
|
8275
8318
|
"action",
|
|
@@ -8288,12 +8331,12 @@ function bm(e) {
|
|
|
8288
8331
|
resolutionAccepted: t.resolutionAccepted,
|
|
8289
8332
|
resolvedAt: r,
|
|
8290
8333
|
runId: I(t.runId),
|
|
8291
|
-
status:
|
|
8334
|
+
status: hm(t.status),
|
|
8292
8335
|
version: 1,
|
|
8293
8336
|
waitId: I(t.waitId)
|
|
8294
8337
|
};
|
|
8295
8338
|
}
|
|
8296
|
-
function
|
|
8339
|
+
function Sm(e) {
|
|
8297
8340
|
let t = F(e), n = t.status;
|
|
8298
8341
|
if (t.version != 1) return P();
|
|
8299
8342
|
let r = {
|
|
@@ -8336,7 +8379,7 @@ function xm(e) {
|
|
|
8336
8379
|
}
|
|
8337
8380
|
//#endregion
|
|
8338
8381
|
//#region src/control/common/random.ts
|
|
8339
|
-
function
|
|
8382
|
+
function Cm() {
|
|
8340
8383
|
let e = globalThis.crypto;
|
|
8341
8384
|
if (e != null) {
|
|
8342
8385
|
try {
|
|
@@ -8353,7 +8396,7 @@ function Sm() {
|
|
|
8353
8396
|
}
|
|
8354
8397
|
//#endregion
|
|
8355
8398
|
//#region src/control/common/api.ts
|
|
8356
|
-
function
|
|
8399
|
+
function wm(e) {
|
|
8357
8400
|
let t = F(e), n = R(t.sequence);
|
|
8358
8401
|
if (n < 0) return P();
|
|
8359
8402
|
let r = {
|
|
@@ -8381,7 +8424,7 @@ function Cm(e) {
|
|
|
8381
8424
|
payload: {
|
|
8382
8425
|
flowId: I(i.flowId),
|
|
8383
8426
|
scopeId: I(i.scopeId),
|
|
8384
|
-
progress:
|
|
8427
|
+
progress: Tm(i.progress)
|
|
8385
8428
|
}
|
|
8386
8429
|
};
|
|
8387
8430
|
case "run.waiting": return Array.isArray(i.waitIds) ? {
|
|
@@ -8418,12 +8461,12 @@ function Cm(e) {
|
|
|
8418
8461
|
case "run.indeterminate": return {
|
|
8419
8462
|
...r,
|
|
8420
8463
|
kind: a,
|
|
8421
|
-
payload: { result:
|
|
8464
|
+
payload: { result: zl(i.result) }
|
|
8422
8465
|
};
|
|
8423
8466
|
case "run.events-truncated": return {
|
|
8424
8467
|
...r,
|
|
8425
8468
|
kind: a,
|
|
8426
|
-
payload: Object.fromEntries(Object.entries(i).map(([e, t]) => [e,
|
|
8469
|
+
payload: Object.fromEntries(Object.entries(i).map(([e, t]) => [e, zl(t)]))
|
|
8427
8470
|
};
|
|
8428
8471
|
case "node.started":
|
|
8429
8472
|
case "node.completed":
|
|
@@ -8456,7 +8499,7 @@ function Cm(e) {
|
|
|
8456
8499
|
kind: a,
|
|
8457
8500
|
payload: {
|
|
8458
8501
|
...e,
|
|
8459
|
-
outputs: Object.fromEntries(Object.entries(F(i.outputs)).map(([e, t]) => [e,
|
|
8502
|
+
outputs: Object.fromEntries(Object.entries(F(i.outputs)).map(([e, t]) => [e, zl(t)]))
|
|
8460
8503
|
}
|
|
8461
8504
|
};
|
|
8462
8505
|
case "node.failed": {
|
|
@@ -8490,7 +8533,7 @@ function Cm(e) {
|
|
|
8490
8533
|
kind: a,
|
|
8491
8534
|
payload: {
|
|
8492
8535
|
...e,
|
|
8493
|
-
progress:
|
|
8536
|
+
progress: Tm(i.progress)
|
|
8494
8537
|
}
|
|
8495
8538
|
};
|
|
8496
8539
|
case "node.artifact": {
|
|
@@ -8516,14 +8559,14 @@ function Cm(e) {
|
|
|
8516
8559
|
default: return P();
|
|
8517
8560
|
}
|
|
8518
8561
|
}
|
|
8519
|
-
function
|
|
8562
|
+
function Tm(e) {
|
|
8520
8563
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : P();
|
|
8521
8564
|
}
|
|
8522
|
-
function
|
|
8565
|
+
function Em(e) {
|
|
8523
8566
|
let t = F(e), n = t.eventsExpiresAt, r = R(t.nextAfter);
|
|
8524
8567
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? P() : {
|
|
8525
8568
|
done: t.done,
|
|
8526
|
-
events: t.events.map(
|
|
8569
|
+
events: t.events.map(wm),
|
|
8527
8570
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
8528
8571
|
historyComplete: t.historyComplete,
|
|
8529
8572
|
nextAfter: r,
|
|
@@ -8532,10 +8575,10 @@ function Tm(e) {
|
|
|
8532
8575
|
};
|
|
8533
8576
|
}
|
|
8534
8577
|
var X = encodeURIComponent;
|
|
8535
|
-
function
|
|
8536
|
-
return `${e}-${
|
|
8578
|
+
function Dm(e) {
|
|
8579
|
+
return `${e}-${Cm()}`;
|
|
8537
8580
|
}
|
|
8538
|
-
var
|
|
8581
|
+
var Om = class {
|
|
8539
8582
|
constructor(e) {
|
|
8540
8583
|
this.requestControl = e;
|
|
8541
8584
|
}
|
|
@@ -8543,23 +8586,23 @@ var Dm = class {
|
|
|
8543
8586
|
let t = new URLSearchParams();
|
|
8544
8587
|
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));
|
|
8545
8588
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
8546
|
-
return
|
|
8589
|
+
return rm(await this.request(`/v1/flows${n}`));
|
|
8547
8590
|
}
|
|
8548
8591
|
async listEventSources(e, t) {
|
|
8549
|
-
return
|
|
8592
|
+
return Sp(await this.request("/v1/event-sources" + (e == null ? "" : `?flowId=${X(e)}`), { signal: t }));
|
|
8550
8593
|
}
|
|
8551
8594
|
async listEventSourceConnections(e, t) {
|
|
8552
8595
|
let n = F(await this.request(`/v1/event-sources/connections${e == null ? "" : `?teamId=${X(e)}`}`, { signal: t }));
|
|
8553
|
-
return L(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? P() : n.connections.map(
|
|
8596
|
+
return L(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? P() : n.connections.map(Zl);
|
|
8554
8597
|
}
|
|
8555
8598
|
async createEventSource(e) {
|
|
8556
|
-
return
|
|
8599
|
+
return xp(await this.request("/v1/event-sources", {
|
|
8557
8600
|
method: "POST",
|
|
8558
8601
|
body: JSON.stringify(e)
|
|
8559
8602
|
}));
|
|
8560
8603
|
}
|
|
8561
8604
|
async updateEventSource(e, t) {
|
|
8562
|
-
return
|
|
8605
|
+
return xp(await this.request(`/v1/event-sources/${X(e)}`, {
|
|
8563
8606
|
method: "PUT",
|
|
8564
8607
|
body: JSON.stringify(t)
|
|
8565
8608
|
}));
|
|
@@ -8576,15 +8619,15 @@ var Dm = class {
|
|
|
8576
8619
|
async listVariables() {
|
|
8577
8620
|
let e = F(await this.request("/v1/variables"));
|
|
8578
8621
|
return L(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? P() : {
|
|
8579
|
-
variables: e.variables.map(
|
|
8622
|
+
variables: e.variables.map(im),
|
|
8580
8623
|
version: 1
|
|
8581
8624
|
};
|
|
8582
8625
|
}
|
|
8583
8626
|
async getVariable(e) {
|
|
8584
|
-
return
|
|
8627
|
+
return im(await this.request(`/v1/variables/${X(e)}`));
|
|
8585
8628
|
}
|
|
8586
8629
|
async putVariable(e, t) {
|
|
8587
|
-
return
|
|
8630
|
+
return im(await this.request(`/v1/variables/${X(e)}`, {
|
|
8588
8631
|
body: JSON.stringify({ value: t }),
|
|
8589
8632
|
method: "PUT"
|
|
8590
8633
|
}));
|
|
@@ -8593,8 +8636,8 @@ var Dm = class {
|
|
|
8593
8636
|
let t = F(await this.request(`/v1/variables/${X(e)}`, { method: "DELETE" }));
|
|
8594
8637
|
if (L(t, ["version"]), t.version != 1) return P();
|
|
8595
8638
|
}
|
|
8596
|
-
async createFlow(e, t = `flow-${
|
|
8597
|
-
return
|
|
8639
|
+
async createFlow(e, t = `flow-${Cm()}`, n) {
|
|
8640
|
+
return nm(await this.request("/v1/flows", {
|
|
8598
8641
|
body: JSON.stringify({
|
|
8599
8642
|
name: e,
|
|
8600
8643
|
...n == null ? {} : { teamId: n },
|
|
@@ -8605,10 +8648,10 @@ var Dm = class {
|
|
|
8605
8648
|
}));
|
|
8606
8649
|
}
|
|
8607
8650
|
async getFlow(e) {
|
|
8608
|
-
return
|
|
8651
|
+
return nm(await this.request(`/v1/flows/${X(e)}`));
|
|
8609
8652
|
}
|
|
8610
8653
|
async renameFlow(e, t) {
|
|
8611
|
-
return
|
|
8654
|
+
return nm(await this.request(`/v1/flows/${X(e)}`, {
|
|
8612
8655
|
body: JSON.stringify({
|
|
8613
8656
|
name: t,
|
|
8614
8657
|
version: 1
|
|
@@ -8617,15 +8660,15 @@ var Dm = class {
|
|
|
8617
8660
|
}));
|
|
8618
8661
|
}
|
|
8619
8662
|
async deleteFlow(e) {
|
|
8620
|
-
return
|
|
8663
|
+
return nm(await this.request(`/v1/flows/${X(e)}`, { method: "DELETE" }));
|
|
8621
8664
|
}
|
|
8622
8665
|
async listTriggerKeys(e, t) {
|
|
8623
8666
|
let n = F(await this.request(`/v1/trigger-keys${t == null ? "" : `?locale=${encodeURIComponent(t)}`}`, { signal: e }));
|
|
8624
|
-
return n.version != 1 || !Array.isArray(n.keys) ? P() : n.keys.map(
|
|
8667
|
+
return n.version != 1 || !Array.isArray(n.keys) ? P() : n.keys.map(Ep);
|
|
8625
8668
|
}
|
|
8626
8669
|
async listTriggerDefinitions(e) {
|
|
8627
8670
|
let t = F(await this.request("/v1/trigger-keys/catalog", { signal: e }));
|
|
8628
|
-
return t.version != 2 || !Array.isArray(t.definitions) ? P() : t.definitions.map(
|
|
8671
|
+
return t.version != 2 || !Array.isArray(t.definitions) ? P() : t.definitions.map(Dp);
|
|
8629
8672
|
}
|
|
8630
8673
|
async readCatalog(e, t, n) {
|
|
8631
8674
|
let r = new Headers();
|
|
@@ -8654,41 +8697,41 @@ var Dm = class {
|
|
|
8654
8697
|
...t,
|
|
8655
8698
|
etag: i.headers.get("etag")?.trim() || t.etag
|
|
8656
8699
|
} : {
|
|
8657
|
-
data:
|
|
8700
|
+
data: Ip(await i.json()),
|
|
8658
8701
|
etag: i.headers.get("etag")?.trim() || null
|
|
8659
8702
|
};
|
|
8660
8703
|
}
|
|
8661
8704
|
async getTriggerKey(e, t) {
|
|
8662
8705
|
let n = F(await this.request(`/v1/trigger-keys/${X(e)}`, { signal: t }));
|
|
8663
|
-
return n.version == 1 ?
|
|
8706
|
+
return n.version == 1 ? Dp(n.definition) : P();
|
|
8664
8707
|
}
|
|
8665
8708
|
async listFlowTriggerBindings(e, t) {
|
|
8666
8709
|
let n = F(await this.request(`/v1/flows/${X(e)}/triggers`, { signal: t }));
|
|
8667
|
-
return n.version != 1 || I(n.flowId) != e || !Array.isArray(n.bindings) ? P() : n.bindings.map(
|
|
8710
|
+
return n.version != 1 || I(n.flowId) != e || !Array.isArray(n.bindings) ? P() : n.bindings.map(jp);
|
|
8668
8711
|
}
|
|
8669
8712
|
async getFlowTriggerBinding(e, t) {
|
|
8670
|
-
return
|
|
8713
|
+
return Mp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}`));
|
|
8671
8714
|
}
|
|
8672
8715
|
async listFlowTriggerActivities(e, t, n = {}) {
|
|
8673
8716
|
let r = new URLSearchParams();
|
|
8674
8717
|
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
8675
8718
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
8676
|
-
return
|
|
8719
|
+
return Pp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/activities${i}`));
|
|
8677
8720
|
}
|
|
8678
8721
|
async pauseFlowTrigger(e, t) {
|
|
8679
|
-
return
|
|
8722
|
+
return jp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/pause`, {
|
|
8680
8723
|
body: JSON.stringify({ version: 1 }),
|
|
8681
8724
|
method: "POST"
|
|
8682
8725
|
}));
|
|
8683
8726
|
}
|
|
8684
8727
|
async resumeFlowTrigger(e, t) {
|
|
8685
|
-
return
|
|
8728
|
+
return jp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/resume`, {
|
|
8686
8729
|
body: JSON.stringify({ version: 1 }),
|
|
8687
8730
|
method: "POST"
|
|
8688
8731
|
}));
|
|
8689
8732
|
}
|
|
8690
8733
|
async testFlowPollTrigger(e, t) {
|
|
8691
|
-
return
|
|
8734
|
+
return Fp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/test`, {
|
|
8692
8735
|
body: JSON.stringify({ version: 1 }),
|
|
8693
8736
|
method: "POST"
|
|
8694
8737
|
}));
|
|
@@ -8697,25 +8740,32 @@ var Dm = class {
|
|
|
8697
8740
|
let t = F(await this.request(`/v1/flows/${X(e)}/editor`));
|
|
8698
8741
|
if (t.version != 1) return P();
|
|
8699
8742
|
let n = {
|
|
8700
|
-
flow:
|
|
8701
|
-
draft:
|
|
8702
|
-
live:
|
|
8703
|
-
presentation:
|
|
8743
|
+
flow: nm(t.flow),
|
|
8744
|
+
draft: um(t.draft),
|
|
8745
|
+
live: sm(t.live),
|
|
8746
|
+
presentation: dm(t.presentation),
|
|
8704
8747
|
version: 1
|
|
8705
8748
|
};
|
|
8706
8749
|
return n.flow.flowId != e || n.draft.flowId != e || n.live.flowId != e || n.flow.draftRevisionId != n.draft.revisionId ? P() : n;
|
|
8707
8750
|
}
|
|
8751
|
+
async getPublicationPresentation(e, t, n) {
|
|
8752
|
+
let r = F(await this.request(`/v1/flows/${X(e)}/publications/${X(t)}/presentation`, { signal: n }));
|
|
8753
|
+
return r.version == 1 ? {
|
|
8754
|
+
version: 1,
|
|
8755
|
+
presentation: r.presentation === null ? null : dm(r.presentation)
|
|
8756
|
+
} : P();
|
|
8757
|
+
}
|
|
8708
8758
|
async getPresentation(e) {
|
|
8709
|
-
return
|
|
8759
|
+
return dm(await this.request(`/v1/flows/${X(e)}/presentation`));
|
|
8710
8760
|
}
|
|
8711
8761
|
async getDraft(e) {
|
|
8712
|
-
return
|
|
8762
|
+
return um(await this.request(`/v1/flows/${X(e)}/draft`));
|
|
8713
8763
|
}
|
|
8714
8764
|
async syncDraft(e) {
|
|
8715
|
-
return
|
|
8765
|
+
return pm(await this.request(`/v1/flows/${X(e)}/draft/sync`));
|
|
8716
8766
|
}
|
|
8717
8767
|
async getRevision(e, t, n) {
|
|
8718
|
-
return
|
|
8768
|
+
return um(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}`, { signal: n }));
|
|
8719
8769
|
}
|
|
8720
8770
|
async listTriggerConfigOptions(e, t, n, r) {
|
|
8721
8771
|
let i = F(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/options/${X(n)}`, { signal: r }));
|
|
@@ -8761,11 +8811,11 @@ var Dm = class {
|
|
|
8761
8811
|
};
|
|
8762
8812
|
}
|
|
8763
8813
|
async listConnectorProviders(e, t, n) {
|
|
8764
|
-
let r =
|
|
8814
|
+
let r = Qp(t, n);
|
|
8765
8815
|
return this.connectorRequest(r.path, "providers", e, r.decode);
|
|
8766
8816
|
}
|
|
8767
8817
|
async removeConnectionUsage(e, t, n, r, i) {
|
|
8768
|
-
return
|
|
8818
|
+
return fm(await this.request(`/v1/flows/${X(e)}/connection-usage/remove`, {
|
|
8769
8819
|
method: "POST",
|
|
8770
8820
|
headers: { "idempotency-key": i },
|
|
8771
8821
|
body: JSON.stringify({
|
|
@@ -8777,13 +8827,13 @@ var Dm = class {
|
|
|
8777
8827
|
}));
|
|
8778
8828
|
}
|
|
8779
8829
|
async getConnectorAccess(e, t) {
|
|
8780
|
-
return
|
|
8830
|
+
return Kl(await this.request(`/v1/flows/${X(e)}/connector-access`, { signal: t }));
|
|
8781
8831
|
}
|
|
8782
8832
|
async getPublishedConnectorAccess(e, t, n) {
|
|
8783
|
-
return
|
|
8833
|
+
return Jl(await this.request(`/v1/flows/${X(e)}/connector-access?publicationId=${X(t)}`, { signal: n }));
|
|
8784
8834
|
}
|
|
8785
8835
|
async listProviderAccessBindingCandidates(e, t, n) {
|
|
8786
|
-
return
|
|
8836
|
+
return Xl(await this.request(`/v1/flows/${X(e)}/connector-access/candidates/query`, {
|
|
8787
8837
|
method: "POST",
|
|
8788
8838
|
body: JSON.stringify({
|
|
8789
8839
|
providerIds: t,
|
|
@@ -8793,7 +8843,7 @@ var Dm = class {
|
|
|
8793
8843
|
}), t);
|
|
8794
8844
|
}
|
|
8795
8845
|
async setConnectorService(e, t, n, r) {
|
|
8796
|
-
return
|
|
8846
|
+
return Kl(await this.request(`/v1/flows/${X(e)}/connector-access/${X(t)}/service`, {
|
|
8797
8847
|
body: JSON.stringify({
|
|
8798
8848
|
expectedAccessRevision: r,
|
|
8799
8849
|
version: 1
|
|
@@ -8802,7 +8852,7 @@ var Dm = class {
|
|
|
8802
8852
|
}));
|
|
8803
8853
|
}
|
|
8804
8854
|
async addProviderAccessBinding(e, t, n, r) {
|
|
8805
|
-
return
|
|
8855
|
+
return Kl(await this.request(`/v1/flows/${X(e)}/connector-access/${X(t)}`, {
|
|
8806
8856
|
body: JSON.stringify({
|
|
8807
8857
|
accessBindingId: n,
|
|
8808
8858
|
expectedAccessRevision: r,
|
|
@@ -8812,7 +8862,7 @@ var Dm = class {
|
|
|
8812
8862
|
}));
|
|
8813
8863
|
}
|
|
8814
8864
|
async removeProviderAccessBinding(e, t, n, r) {
|
|
8815
|
-
return
|
|
8865
|
+
return Kl(await this.request(`/v1/flows/${X(e)}/connector-access/${X(t)}`, {
|
|
8816
8866
|
body: JSON.stringify({
|
|
8817
8867
|
accessBindingId: n,
|
|
8818
8868
|
expectedAccessRevision: r,
|
|
@@ -8836,15 +8886,15 @@ var Dm = class {
|
|
|
8836
8886
|
}, t);
|
|
8837
8887
|
}
|
|
8838
8888
|
async getConnectorAction(e, t, n, r, i = !1) {
|
|
8839
|
-
let a =
|
|
8889
|
+
let a = $p(e, n, r);
|
|
8840
8890
|
return this.connectorRequest(a.path, "actions", t, a.decode, i);
|
|
8841
8891
|
}
|
|
8842
8892
|
async listAllConnectorConnections(e, t, n = !1) {
|
|
8843
|
-
let r =
|
|
8893
|
+
let r = em(t);
|
|
8844
8894
|
return this.connectorRequest(r.path, "connections", e, r.decode, n);
|
|
8845
8895
|
}
|
|
8846
8896
|
async listConnectorConnections(e, t, n, r = !1) {
|
|
8847
|
-
let i =
|
|
8897
|
+
let i = tm(e, n);
|
|
8848
8898
|
return this.connectorRequest(i.path, "connections", t, i.decode, r);
|
|
8849
8899
|
}
|
|
8850
8900
|
async createConnectorConnectionPage(e, t, n) {
|
|
@@ -8862,8 +8912,8 @@ var Dm = class {
|
|
|
8862
8912
|
return P();
|
|
8863
8913
|
}
|
|
8864
8914
|
}
|
|
8865
|
-
async changeDraft(e, t, n, r =
|
|
8866
|
-
return
|
|
8915
|
+
async changeDraft(e, t, n, r = Dm("change")) {
|
|
8916
|
+
return fm(await this.request(`/v1/flows/${X(e)}/draft/changes`, {
|
|
8867
8917
|
body: JSON.stringify({
|
|
8868
8918
|
expectedRevisionId: t,
|
|
8869
8919
|
operations: n,
|
|
@@ -8873,8 +8923,8 @@ var Dm = class {
|
|
|
8873
8923
|
method: "POST"
|
|
8874
8924
|
}));
|
|
8875
8925
|
}
|
|
8876
|
-
async repairDraft(e, t, n =
|
|
8877
|
-
return
|
|
8926
|
+
async repairDraft(e, t, n = Dm("repair")) {
|
|
8927
|
+
return fm(await this.request(`/v1/flows/${X(e)}/draft/repair`, {
|
|
8878
8928
|
body: JSON.stringify({
|
|
8879
8929
|
expectedRevisionId: t,
|
|
8880
8930
|
version: 1
|
|
@@ -8884,7 +8934,7 @@ var Dm = class {
|
|
|
8884
8934
|
}));
|
|
8885
8935
|
}
|
|
8886
8936
|
async checkFlow(e, t) {
|
|
8887
|
-
return
|
|
8937
|
+
return Xp(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/check`, {
|
|
8888
8938
|
body: JSON.stringify({
|
|
8889
8939
|
engineContract: "open-flow-engine/v5",
|
|
8890
8940
|
version: 1
|
|
@@ -8893,42 +8943,42 @@ var Dm = class {
|
|
|
8893
8943
|
}));
|
|
8894
8944
|
}
|
|
8895
8945
|
async getLive(e, t) {
|
|
8896
|
-
return
|
|
8946
|
+
return sm(await this.request(`/v1/flows/${X(e)}/live`, { signal: t }));
|
|
8897
8947
|
}
|
|
8898
8948
|
async listPublications(e, t = {}, n) {
|
|
8899
8949
|
let r = new URLSearchParams();
|
|
8900
8950
|
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));
|
|
8901
8951
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
8902
|
-
return
|
|
8952
|
+
return cm(await this.request(`/v1/flows/${X(e)}/publications${i}`, { signal: n }));
|
|
8903
8953
|
}
|
|
8904
8954
|
async createDraftRun(e, t, n) {
|
|
8905
|
-
let r =
|
|
8955
|
+
let r = vm(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/runs`, {
|
|
8906
8956
|
body: JSON.stringify({
|
|
8907
8957
|
engineContract: "open-flow-engine/v5",
|
|
8908
8958
|
inputs: n.inputs ?? {},
|
|
8909
8959
|
trigger: n.trigger,
|
|
8910
8960
|
version: 2
|
|
8911
8961
|
}),
|
|
8912
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
8962
|
+
headers: { "idempotency-key": n.idempotencyKey ?? Dm("run") },
|
|
8913
8963
|
method: "POST"
|
|
8914
8964
|
}));
|
|
8915
8965
|
return r.source == "draft" ? r : P();
|
|
8916
8966
|
}
|
|
8917
8967
|
async createLiveRun(e, t) {
|
|
8918
|
-
let n =
|
|
8968
|
+
let n = vm(await this.request("/v1/runs", {
|
|
8919
8969
|
body: JSON.stringify({
|
|
8920
8970
|
inputs: t.inputs ?? {},
|
|
8921
8971
|
trigger: t.trigger,
|
|
8922
8972
|
publicationId: e,
|
|
8923
8973
|
version: 2
|
|
8924
8974
|
}),
|
|
8925
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
8975
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Dm("run") },
|
|
8926
8976
|
method: "POST"
|
|
8927
8977
|
}));
|
|
8928
8978
|
return n.source == "live" ? n : P();
|
|
8929
8979
|
}
|
|
8930
8980
|
async setFlowEnabled(e, t, n) {
|
|
8931
|
-
return
|
|
8981
|
+
return nm(await this.request(`/v1/flows/${X(e)}/enabled`, {
|
|
8932
8982
|
method: "PUT",
|
|
8933
8983
|
body: JSON.stringify({
|
|
8934
8984
|
enabled: n,
|
|
@@ -8938,65 +8988,65 @@ var Dm = class {
|
|
|
8938
8988
|
}));
|
|
8939
8989
|
}
|
|
8940
8990
|
async publishFlow(e, t, n, r = {}) {
|
|
8941
|
-
return
|
|
8991
|
+
return om(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/publications`, {
|
|
8942
8992
|
body: JSON.stringify({
|
|
8943
8993
|
engineContract: "open-flow-engine/v5",
|
|
8944
8994
|
expectedLivePublicationId: n,
|
|
8945
8995
|
version: 1
|
|
8946
8996
|
}),
|
|
8947
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
8997
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Dm("publication") },
|
|
8948
8998
|
method: "POST"
|
|
8949
8999
|
}));
|
|
8950
9000
|
}
|
|
8951
9001
|
async getPublishOperation(e, t, n) {
|
|
8952
|
-
return
|
|
9002
|
+
return om(await this.request(`/v1/flows/${X(e)}/publish-operations/${X(t)}`, { signal: n }));
|
|
8953
9003
|
}
|
|
8954
9004
|
async rollbackFlow(e, t, n, r = {}) {
|
|
8955
|
-
return
|
|
9005
|
+
return am(await this.request(`/v1/flows/${X(e)}/publications/${X(t)}/rollback`, {
|
|
8956
9006
|
body: JSON.stringify({
|
|
8957
9007
|
expectedLivePublicationId: n,
|
|
8958
9008
|
version: 1
|
|
8959
9009
|
}),
|
|
8960
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
9010
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Dm("publication") },
|
|
8961
9011
|
method: "POST"
|
|
8962
9012
|
}));
|
|
8963
9013
|
}
|
|
8964
9014
|
async getRun(e, t) {
|
|
8965
|
-
return
|
|
9015
|
+
return vm(await this.request(`/v1/runs/${X(e)}`, { signal: t }));
|
|
8966
9016
|
}
|
|
8967
9017
|
async listRuns(e, t = {}) {
|
|
8968
9018
|
let n = new URLSearchParams();
|
|
8969
9019
|
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status), t.pendingWait != null && n.set("pendingWait", String(t.pendingWait)), t.source != null && n.set("source", t.source), t.createdFrom != null && n.set("createdFrom", t.createdFrom), t.createdBefore != null && n.set("createdBefore", t.createdBefore), t.runId != null && n.set("runId", t.runId);
|
|
8970
9020
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
8971
|
-
return
|
|
9021
|
+
return ym(await this.request(`/v1/flows/${X(e)}/runs${r}`));
|
|
8972
9022
|
}
|
|
8973
9023
|
async getRunEvents(e, t = {}, n) {
|
|
8974
9024
|
let r = new URLSearchParams();
|
|
8975
9025
|
t.after != null && r.set("after", String(t.after)), t.limit != null && r.set("limit", String(t.limit));
|
|
8976
9026
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
8977
|
-
return
|
|
9027
|
+
return Em(await this.request(`/v1/runs/${X(e)}/events${i}`, { signal: n }));
|
|
8978
9028
|
}
|
|
8979
9029
|
async listRunResults(e, t, n) {
|
|
8980
|
-
return
|
|
9030
|
+
return Gp(await this.request(`/v1/runs/${X(e)}/results${t == null ? "" : `?after=${encodeURIComponent(t)}`}`, { signal: n }));
|
|
8981
9031
|
}
|
|
8982
9032
|
async readRunResult(e, t, n = {}, r) {
|
|
8983
9033
|
let i = new URLSearchParams(Object.entries(n).map(([e, t]) => [e, String(t)]));
|
|
8984
|
-
return
|
|
9034
|
+
return Kp(await this.request(`/v1/runs/${X(e)}/results/${X(t)}?${i}`, { signal: r }));
|
|
8985
9035
|
}
|
|
8986
9036
|
async downloadRunResult(e, t, n) {
|
|
8987
9037
|
return (await this.response(`/v1/runs/${X(e)}/results/${X(t)}/content`, { signal: n })).blob();
|
|
8988
9038
|
}
|
|
8989
9039
|
async getRunResult(e, t) {
|
|
8990
|
-
return
|
|
9040
|
+
return Sm(await this.request(`/v1/runs/${X(e)}/result`, { signal: t }));
|
|
8991
9041
|
}
|
|
8992
9042
|
async cancelRun(e) {
|
|
8993
|
-
return
|
|
9043
|
+
return bm(await this.request(`/v1/runs/${X(e)}/cancel`, {
|
|
8994
9044
|
body: JSON.stringify({ version: 1 }),
|
|
8995
9045
|
method: "POST"
|
|
8996
9046
|
}));
|
|
8997
9047
|
}
|
|
8998
9048
|
async resolveRunWait(e, t, n, r) {
|
|
8999
|
-
return
|
|
9049
|
+
return xm(await this.request(`/v1/runs/${X(e)}/waits/${X(t)}/resolve`, {
|
|
9000
9050
|
body: JSON.stringify({
|
|
9001
9051
|
action: n,
|
|
9002
9052
|
comment: r,
|
|
@@ -9009,7 +9059,7 @@ var Dm = class {
|
|
|
9009
9059
|
let n = Object.entries(e).map(([e, t]) => `${X(e)}=${X(t)}`).join("&"), r = n == "" ? "" : `?${n}`;
|
|
9010
9060
|
return this.connectorRequest(`/v1/connector/actions${r}`, "actions", t, (e) => {
|
|
9011
9061
|
let t = F(e);
|
|
9012
|
-
return L(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? P() : t.actions.map(
|
|
9062
|
+
return L(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? P() : t.actions.map(nu);
|
|
9013
9063
|
});
|
|
9014
9064
|
}
|
|
9015
9065
|
async connectorRequest(e, t, n, r, i = !1) {
|
|
@@ -9030,7 +9080,7 @@ var Dm = class {
|
|
|
9030
9080
|
return P();
|
|
9031
9081
|
}
|
|
9032
9082
|
let t = F(e).error, n = t == null ? void 0 : F(t);
|
|
9033
|
-
throw new
|
|
9083
|
+
throw new Rl(i.status, typeof n?.code == "string" ? n.code : "request.failed", typeof n?.message == "string" ? n.message : `Request failed with status ${i.status}.`);
|
|
9034
9084
|
}
|
|
9035
9085
|
return i;
|
|
9036
9086
|
}
|
|
@@ -9048,13 +9098,13 @@ var Dm = class {
|
|
|
9048
9098
|
function Z(e, t) {
|
|
9049
9099
|
if (!e) throw Error(t);
|
|
9050
9100
|
}
|
|
9051
|
-
async function
|
|
9101
|
+
async function km(e, t, n) {
|
|
9052
9102
|
let r = await e.request(new Request(new URL("/v1/mcp", e.origin), {
|
|
9053
9103
|
method: "POST",
|
|
9054
9104
|
headers: {
|
|
9055
9105
|
"content-type": "application/json",
|
|
9056
9106
|
accept: "application/json, text/event-stream",
|
|
9057
|
-
"mcp-protocol-version":
|
|
9107
|
+
"mcp-protocol-version": jm,
|
|
9058
9108
|
"mcp-method": t,
|
|
9059
9109
|
...t == "tools/call" ? { "mcp-name": String(n?.name) } : {}
|
|
9060
9110
|
},
|
|
@@ -9065,7 +9115,7 @@ async function Om(e, t, n) {
|
|
|
9065
9115
|
params: {
|
|
9066
9116
|
...n,
|
|
9067
9117
|
_meta: {
|
|
9068
|
-
"io.modelcontextprotocol/protocolVersion":
|
|
9118
|
+
"io.modelcontextprotocol/protocolVersion": jm,
|
|
9069
9119
|
"io.modelcontextprotocol/clientCapabilities": {}
|
|
9070
9120
|
}
|
|
9071
9121
|
}
|
|
@@ -9075,13 +9125,13 @@ async function Om(e, t, n) {
|
|
|
9075
9125
|
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);
|
|
9076
9126
|
return Z(a != null && a.error == null, `MCP ${t} failed: ${JSON.stringify(a)}.`), a.result;
|
|
9077
9127
|
}
|
|
9078
|
-
var
|
|
9128
|
+
var Am = [
|
|
9079
9129
|
{
|
|
9080
9130
|
name: "publishes the public MCP catalog, input schemas and annotations",
|
|
9081
9131
|
async verify(e) {
|
|
9082
|
-
let t = await
|
|
9083
|
-
Z(Array.isArray(t.tools), "MCP tools must be an array."), Z(t.tools.length == Object.keys(
|
|
9084
|
-
for (let [e, n] of Object.entries(
|
|
9132
|
+
let t = await km(e, "tools/list");
|
|
9133
|
+
Z(Array.isArray(t.tools), "MCP tools must be an array."), Z(t.tools.length == Object.keys(Rm).length, "MCP tool count differs from the public contract.");
|
|
9134
|
+
for (let [e, n] of Object.entries(Rm)) {
|
|
9085
9135
|
let r = t.tools.find((t) => t.name == e);
|
|
9086
9136
|
Z(r != null, `Missing MCP tool ${e}.`), Z(r.description == n.description, `${e} description differs.`), Z(Uc(r.annotations, n.annotations), `${e} annotations differ.`);
|
|
9087
9137
|
let { $schema: i, ...a } = n.inputSchema["~standard"].jsonSchema.input(), { $schema: o, ...s } = r.inputSchema;
|
|
@@ -9092,7 +9142,7 @@ var km = [
|
|
|
9092
9142
|
{
|
|
9093
9143
|
name: "shares Run pagination, status filters and cancellation between MCP and REST",
|
|
9094
9144
|
async verify(e) {
|
|
9095
|
-
let t = new
|
|
9145
|
+
let t = new Om((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, [{
|
|
9096
9146
|
kind: "graph.node.create",
|
|
9097
9147
|
target: { kind: "flow" },
|
|
9098
9148
|
nodeId: "start",
|
|
@@ -9110,7 +9160,7 @@ var km = [
|
|
|
9110
9160
|
}
|
|
9111
9161
|
}, a = [];
|
|
9112
9162
|
for (let t = 0; t < 2; t++) {
|
|
9113
|
-
let t = (await
|
|
9163
|
+
let t = (await km(e, "tools/call", {
|
|
9114
9164
|
name: "flow_run",
|
|
9115
9165
|
arguments: {
|
|
9116
9166
|
...i,
|
|
@@ -9119,7 +9169,7 @@ var km = [
|
|
|
9119
9169
|
})).structuredContent;
|
|
9120
9170
|
Z(typeof t.runId == "string", "MCP must return an accepted Run ID."), a.push(t.runId);
|
|
9121
9171
|
}
|
|
9122
|
-
let o = (await
|
|
9172
|
+
let o = (await km(e, "tools/call", {
|
|
9123
9173
|
name: "run_list",
|
|
9124
9174
|
arguments: {
|
|
9125
9175
|
flowId: n.flowId,
|
|
@@ -9133,24 +9183,24 @@ var km = [
|
|
|
9133
9183
|
});
|
|
9134
9184
|
Z(s.runs.length == 1 && s.runs[0]?.runId != o.runs[0]?.runId, "REST must continue the MCP Run cursor without duplicates.");
|
|
9135
9185
|
let c = await t.listRuns(n.flowId, { limit: 1 });
|
|
9136
|
-
Z(Uc((await
|
|
9186
|
+
Z(Uc((await km(e, "tools/call", {
|
|
9137
9187
|
name: "run_list",
|
|
9138
9188
|
arguments: {
|
|
9139
9189
|
flowId: n.flowId,
|
|
9140
9190
|
cursor: c.nextCursor,
|
|
9141
9191
|
limit: 1
|
|
9142
9192
|
}
|
|
9143
|
-
})).structuredContent, s), "MCP must continue the REST Run cursor."), await
|
|
9193
|
+
})).structuredContent, s), "MCP must continue the REST Run cursor."), await km(e, "tools/call", {
|
|
9144
9194
|
name: "run_cancel",
|
|
9145
9195
|
arguments: { runId: a[0] }
|
|
9146
|
-
}), Z(Uc((await
|
|
9196
|
+
}), Z(Uc((await km(e, "tools/call", {
|
|
9147
9197
|
name: "run_list",
|
|
9148
9198
|
arguments: {
|
|
9149
9199
|
flowId: n.flowId,
|
|
9150
9200
|
status: "canceled"
|
|
9151
9201
|
}
|
|
9152
9202
|
})).structuredContent, await t.listRuns(n.flowId, { status: "canceled" })), "MCP and REST status filters differ.");
|
|
9153
|
-
let l = await
|
|
9203
|
+
let l = await km(e, "tools/call", {
|
|
9154
9204
|
name: "run_list",
|
|
9155
9205
|
arguments: {
|
|
9156
9206
|
flowId: (await t.createFlow("Other Run scope")).flowId,
|
|
@@ -9166,7 +9216,7 @@ var km = [
|
|
|
9166
9216
|
let t = {
|
|
9167
9217
|
name: "MCP conformance",
|
|
9168
9218
|
idempotencyKey: crypto.randomUUID()
|
|
9169
|
-
}, n = () =>
|
|
9219
|
+
}, n = () => km(e, "tools/call", {
|
|
9170
9220
|
name: "flow_create",
|
|
9171
9221
|
arguments: t
|
|
9172
9222
|
}), r = await n();
|
|
@@ -9175,7 +9225,7 @@ var km = [
|
|
|
9175
9225
|
Z(typeof i.flowId == "string", "MCP did not return a Flow ID."), Z(Uc((await n()).structuredContent, i), "MCP mutation replay changed identity.");
|
|
9176
9226
|
let a = await e.request(new Request(new URL(`/v1/flows/${encodeURIComponent(i.flowId)}/draft`, e.origin)));
|
|
9177
9227
|
Z(a.ok, "REST cannot read the Flow created through MCP."), Z((await a.json()).revisionId == i.draftRevisionId, "MCP and REST disagree on the Draft head.");
|
|
9178
|
-
let o = await
|
|
9228
|
+
let o = await km(e, "tools/call", {
|
|
9179
9229
|
name: "flow_create",
|
|
9180
9230
|
arguments: {
|
|
9181
9231
|
...t,
|
|
@@ -9185,7 +9235,7 @@ var km = [
|
|
|
9185
9235
|
Z(o.isError == 1, "MCP must reject a changed idempotent replay."), Z(o.structuredContent.error.code == "flow.conflict", "MCP must preserve the Control error code.");
|
|
9186
9236
|
}
|
|
9187
9237
|
}
|
|
9188
|
-
],
|
|
9238
|
+
], jm = "2026-07-28", Mm = Vc(), Q = S().min(1), Nm = Q.max(256).describe("Stable identity for this mutation. Retry with the same key and identical arguments, even after a lost response."), Pm = Zs().min(1).max(100).default(50), Fm = Q.describe("Exact Flow ID returned by flow_list or flow_create."), Im = Q.describe("Exact Run ID returned by flow_run or run_list."), Lm = "Use flow_list and flow_get to inspect a Flow. Use flow_node_get with the observed revisionId for individual node schemas or code. 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. Before adding a Feishu Trigger, use event_source_list and compare its Connection IDs with connector_connections in the Flow scope. If no source is available, create and verify one in Workbench. 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.";
|
|
9189
9239
|
function $(e, t, n) {
|
|
9190
9240
|
return {
|
|
9191
9241
|
description: e,
|
|
@@ -9212,17 +9262,17 @@ function $(e, t, n) {
|
|
|
9212
9262
|
} }
|
|
9213
9263
|
};
|
|
9214
9264
|
}
|
|
9215
|
-
var
|
|
9265
|
+
var Rm = {
|
|
9216
9266
|
flow_list: $("List Flows in this deployment. Continue with nextCursor; cursors are compatible with the Control API.", O({
|
|
9217
9267
|
cursor: Q.optional(),
|
|
9218
|
-
limit:
|
|
9268
|
+
limit: Pm
|
|
9219
9269
|
}), !0),
|
|
9220
9270
|
flow_get: $("Read a compact Draft graph with input bindings, port handles, subflows and Live status. Use full=true for complete Revision content, schemas, source code and exact before values required by complex edits. Unreadable Drafts return draft=null and draftIssue; flow.live still identifies the published version. Use draft.revisionId as the base of an edit.", O({
|
|
9221
|
-
flowId:
|
|
9271
|
+
flowId: Fm,
|
|
9222
9272
|
full: T().optional()
|
|
9223
9273
|
}), !0),
|
|
9224
9274
|
flow_node_get: $("Read one node and its Task definition or code module from a fixed Revision. Omit subflowId for the root graph. Use revisionId from flow_get; the returned node contains exact before values for edits.", O({
|
|
9225
|
-
flowId:
|
|
9275
|
+
flowId: Fm,
|
|
9226
9276
|
revisionId: Q,
|
|
9227
9277
|
nodeId: Q,
|
|
9228
9278
|
subflowId: Q.optional()
|
|
@@ -9233,78 +9283,78 @@ var Lm = {
|
|
|
9233
9283
|
}).refine((e) => e.kind == null || e.example == null, "Choose kind or example, not both."), !0),
|
|
9234
9284
|
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.", O({
|
|
9235
9285
|
name: Q.refine((e) => e == e.trim() && Fl(e) == null, "Flow name is invalid."),
|
|
9236
|
-
idempotencyKey:
|
|
9286
|
+
idempotencyKey: Nm,
|
|
9237
9287
|
teamId: Q.optional()
|
|
9238
9288
|
}), !1),
|
|
9239
9289
|
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.", O({
|
|
9240
|
-
flowId:
|
|
9290
|
+
flowId: Fm,
|
|
9241
9291
|
expectedRevisionId: Q,
|
|
9242
|
-
idempotencyKey:
|
|
9243
|
-
operations: E(
|
|
9292
|
+
idempotencyKey: Nm,
|
|
9293
|
+
operations: E(Mm).min(1).describe("Change operations defined by flow_schema. Explicit IDs and before values refer to the base Revision.")
|
|
9244
9294
|
}), !1),
|
|
9245
9295
|
flow_check: $("Validate a fixed Revision and return diagnostics. Get its revisionId from flow_get or flow_apply.", O({
|
|
9246
|
-
flowId:
|
|
9296
|
+
flowId: Fm,
|
|
9247
9297
|
revisionId: Q
|
|
9248
9298
|
}), !0),
|
|
9249
9299
|
flow_publish: $("Publish a fixed Revision. Supply the observed Live publication ID, or null for the first publication, and a stable idempotencyKey. Returns an operation; poll flow_publish_status for success or failure.", O({
|
|
9250
|
-
flowId:
|
|
9300
|
+
flowId: Fm,
|
|
9251
9301
|
revisionId: Q,
|
|
9252
9302
|
expectedLivePublicationId: Q.nullable(),
|
|
9253
|
-
idempotencyKey:
|
|
9303
|
+
idempotencyKey: Nm
|
|
9254
9304
|
}), !1),
|
|
9255
9305
|
flow_publish_status: $("Read a publish operation. Only succeeded confirms publication; failed includes the failure details. Keep polling while pending.", O({
|
|
9256
|
-
flowId:
|
|
9306
|
+
flowId: Fm,
|
|
9257
9307
|
operationId: Q
|
|
9258
9308
|
}), !0),
|
|
9259
9309
|
flow_set_enabled: $("Enable or disable a published Flow. Supply expectedPublicationId from flow_get; a changed Live publication is a conflict. This does not cancel accepted Runs; use run_cancel for those.", O({
|
|
9260
|
-
flowId:
|
|
9310
|
+
flowId: Fm,
|
|
9261
9311
|
expectedPublicationId: Q,
|
|
9262
9312
|
enabled: T()
|
|
9263
9313
|
}), !1),
|
|
9264
9314
|
flow_run: $("Start a Run and return its runId. For draft supply flowId and revisionId; for live supply publicationId. Always fix the source, Trigger and idempotencyKey. Poll run_get for completion.", lc("source", [O({
|
|
9265
9315
|
source: j("draft"),
|
|
9266
|
-
flowId:
|
|
9316
|
+
flowId: Fm,
|
|
9267
9317
|
revisionId: Q,
|
|
9268
9318
|
trigger: O({
|
|
9269
9319
|
nodeId: Q,
|
|
9270
|
-
outputs: A(S(),
|
|
9320
|
+
outputs: A(S(), Mm)
|
|
9271
9321
|
}),
|
|
9272
|
-
inputs: A(S(), A(S(),
|
|
9273
|
-
idempotencyKey:
|
|
9322
|
+
inputs: A(S(), A(S(), Mm)).default({}),
|
|
9323
|
+
idempotencyKey: Nm
|
|
9274
9324
|
}), O({
|
|
9275
9325
|
source: j("live"),
|
|
9276
9326
|
publicationId: Q,
|
|
9277
9327
|
trigger: O({
|
|
9278
9328
|
nodeId: Q,
|
|
9279
|
-
outputs: A(S(),
|
|
9329
|
+
outputs: A(S(), Mm)
|
|
9280
9330
|
}),
|
|
9281
|
-
inputs: A(S(), A(S(),
|
|
9282
|
-
idempotencyKey:
|
|
9331
|
+
inputs: A(S(), A(S(), Mm)).default({}),
|
|
9332
|
+
idempotencyKey: Nm
|
|
9283
9333
|
})]).meta({ type: "object" }), !1),
|
|
9284
9334
|
run_list: $("List Runs for a Flow, optionally filtered by status. Continue with nextCursor; cursors are compatible with the Control API.", O({
|
|
9285
|
-
flowId:
|
|
9335
|
+
flowId: Fm,
|
|
9286
9336
|
pendingWait: T().optional(),
|
|
9287
9337
|
status: mc(Wc).optional(),
|
|
9288
9338
|
cursor: Q.optional(),
|
|
9289
|
-
limit:
|
|
9339
|
+
limit: Pm
|
|
9290
9340
|
}), !0),
|
|
9291
|
-
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", O({ runId:
|
|
9341
|
+
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", O({ runId: Im }), !0),
|
|
9292
9342
|
run_events: $("Read one page of Run events. Continue with nextAfter. Events can expire independently of the terminal result.", O({
|
|
9293
|
-
runId:
|
|
9343
|
+
runId: Im,
|
|
9294
9344
|
after: Zs().min(0).default(0),
|
|
9295
|
-
limit:
|
|
9345
|
+
limit: Pm
|
|
9296
9346
|
}), !0),
|
|
9297
|
-
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", O({ runId:
|
|
9347
|
+
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", O({ runId: Im }), !0),
|
|
9298
9348
|
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.", O({
|
|
9299
|
-
runId:
|
|
9349
|
+
runId: Im,
|
|
9300
9350
|
after: Q.optional()
|
|
9301
9351
|
}), !0),
|
|
9302
9352
|
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.", Il.extend({
|
|
9303
|
-
runId:
|
|
9353
|
+
runId: Im,
|
|
9304
9354
|
resultId: Q
|
|
9305
9355
|
}), !0),
|
|
9306
9356
|
run_resolve_wait: $("Explicitly resolve the waitId observed in run_get with one of its allowed actions. Optional comment records the reason (up to 2,000 Unicode code points). The first decision and comment win; inspect resolutionAccepted and action. Resume the same Run and poll run_get; do not create a replacement Run.", O({
|
|
9307
|
-
runId:
|
|
9357
|
+
runId: Im,
|
|
9308
9358
|
waitId: Q,
|
|
9309
9359
|
action: mc([
|
|
9310
9360
|
"approve",
|
|
@@ -9313,46 +9363,46 @@ var Lm = {
|
|
|
9313
9363
|
]),
|
|
9314
9364
|
comment: Gc
|
|
9315
9365
|
}), !1),
|
|
9316
|
-
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", O({ runId:
|
|
9366
|
+
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", O({ runId: Im }), !1),
|
|
9317
9367
|
flow_code_connections: $("Read the connections shared by all Code nodes in this Flow. With publicationId, read the fixed published snapshot; it cannot be edited.", O({
|
|
9318
|
-
flowId:
|
|
9368
|
+
flowId: Fm,
|
|
9319
9369
|
publicationId: Q.optional()
|
|
9320
9370
|
}), !0),
|
|
9321
9371
|
flow_connection_candidates: $("List connections and permissions available to select. Node selections do not add shared Code usage.", O({
|
|
9322
|
-
flowId:
|
|
9372
|
+
flowId: Fm,
|
|
9323
9373
|
providerIds: E(Q).min(1)
|
|
9324
9374
|
}), !0),
|
|
9325
9375
|
flow_code_connection_set: $("Add or remove shared Code usage in the Draft only. Does not change node selections or published versions. Use the observed accessRevision.", O({
|
|
9326
|
-
flowId:
|
|
9376
|
+
flowId: Fm,
|
|
9327
9377
|
providerId: Q,
|
|
9328
9378
|
accessBindingId: Q,
|
|
9329
9379
|
selected: T(),
|
|
9330
9380
|
expectedAccessRevision: Zs().nonnegative()
|
|
9331
9381
|
}), !1),
|
|
9332
9382
|
flow_connection_usage_remove: $("Remove a connection from all node selections and shared Code usage in this Draft atomically. Keeps the account, published versions and accepted Runs. Use the observed revisionId and accessRevision.", O({
|
|
9333
|
-
flowId:
|
|
9383
|
+
flowId: Fm,
|
|
9334
9384
|
connectionId: Q,
|
|
9335
9385
|
expectedRevisionId: Q,
|
|
9336
9386
|
expectedAccessRevision: Zs().nonnegative(),
|
|
9337
|
-
idempotencyKey:
|
|
9387
|
+
idempotencyKey: Nm
|
|
9338
9388
|
}), !1),
|
|
9339
9389
|
connector_teams: $("List OOMOL Teams available for Flow creation. An unconfigured or custom Connector may not provide Teams.", O({}), !0),
|
|
9340
|
-
connector_providers: $("List Connector providers available in the Flow scope.", O({ flowId:
|
|
9390
|
+
connector_providers: $("List Connector providers available in the Flow scope.", O({ flowId: Fm.optional() }), !0),
|
|
9341
9391
|
connector_search: $("Search Connector action summaries in the Flow scope. Read complete schemas with connector_get after selecting an action.", O({
|
|
9342
9392
|
query: S().trim().min(1).max(256),
|
|
9343
|
-
flowId:
|
|
9393
|
+
flowId: Fm.optional()
|
|
9344
9394
|
}), !0),
|
|
9345
9395
|
connector_get: $("Read a Connector action, input/output definitions and connection requirements before authoring a node.", O({
|
|
9346
9396
|
actionId: Q,
|
|
9347
|
-
flowId:
|
|
9397
|
+
flowId: Fm.optional()
|
|
9348
9398
|
}), !0),
|
|
9349
9399
|
connector_connections: $("List Connector connections in the Flow scope. Use active connection IDs in bindings.", O({
|
|
9350
9400
|
serviceId: Q.max(256),
|
|
9351
|
-
flowId:
|
|
9401
|
+
flowId: Fm.optional()
|
|
9352
9402
|
}), !0),
|
|
9353
9403
|
event_source_list: $("List independent Feishu event sources, including Team, Connection, event types, enabled and verification status. Inspect consumers for Flows actually using each source.", O({}), !0),
|
|
9354
9404
|
trigger_search: $("Search provider Trigger summaries; omit query to list all. Flow trigger instances are in flow_get. Manual, Webhook and Cron are built-in node kinds described by flow_schema.", O({ query: S().trim().min(1).max(256).optional() }), !0),
|
|
9355
9405
|
trigger_get: $("Read a provider Trigger definition before creating its node.", O({ key: Q }), !0)
|
|
9356
9406
|
};
|
|
9357
9407
|
//#endregion
|
|
9358
|
-
export {
|
|
9408
|
+
export { Am as mcpConformanceCases, Lm as mcpInstructions, jm as mcpProtocolVersion, Rm as mcpTools };
|