@oomol-lab/open-flow 0.1.0-beta.30 → 0.1.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{createResourceDialog-_y2xHaUA.js → createResourceDialog-DRB0OEtr.js} +2 -2
- package/dist/browser/{editorComponent-Dq4IKp5R.js → editorComponent-bXA-KosC.js} +2765 -1113
- package/dist/browser/flow-authoring-node.d.ts +5 -3
- package/dist/browser/flow-authoring.js +1575 -1472
- package/dist/browser/flow-change.d.ts +47 -20
- package/dist/browser/flow-change.js +1728 -1602
- package/dist/browser/flow-input-value.d.ts +6 -0
- package/dist/browser/flow-notifications.d.ts +5 -0
- package/dist/browser/flowChanges-FiZJreeB.js +9855 -0
- package/dist/browser/{flowRunInputEditorStore-CTORQcA2.js → flowRunInputEditorStore-Bgb5vSeS.js} +3 -3
- package/dist/browser/flowWorkspace-CBo6Ih_c.js +40987 -0
- package/dist/browser/{inputValues-DJfFraxG.js → inputValues-CUyjbECo.js} +2 -2
- package/dist/browser/licenses.md +0 -58
- package/dist/browser/{lite-BuKZ8joP.js → lite-BA96NG4M.js} +8 -4
- package/dist/browser/theme.css +2 -0
- package/dist/browser/ui.css +2 -1
- package/dist/browser/ui.d.ts +31 -3
- package/dist/browser/ui.js +3547 -772
- package/dist/browser/{value-DPg_9yXB.js → value-B_yE9ean.js} +22 -14
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -0
- package/dist/browser/workbench.js +3944 -1077
- package/dist/browser/{workbenchSelect-BDPIQxYK.js → workbenchSelect-DNteZJYP.js} +1698 -1470
- package/dist/common/control-api-conformance.d.ts +6 -0
- package/dist/common/control-api-conformance.js +510 -394
- package/dist/common/control-api-errors.d.ts +16 -0
- package/dist/common/control-api.d.ts +64 -7
- package/dist/common/control-api.js +1724 -1568
- package/dist/common/control-requests.d.ts +16 -0
- package/dist/common/control-requests.js +685 -651
- package/dist/common/event-sources.d.ts +0 -1
- package/dist/common/feishu-events.d.ts +0 -1
- package/dist/common/flow-encoding.js +1168 -1140
- package/dist/common/flow-graph.d.ts +16 -9
- package/dist/common/flow-notifications.d.ts +5 -0
- package/dist/common/flow-semantics.d.ts +2 -2
- package/dist/common/flow-semantics.js +2223 -1954
- package/dist/common/fr-ClB96SQY.js +298 -0
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/integration-trigger.js +7572 -88
- package/dist/common/ja-BJF-VrP2.js +298 -0
- package/dist/common/ko-Bght_VaB.js +298 -0
- package/dist/common/mcp.d.ts +1 -0
- package/dist/common/mcp.js +1727 -1574
- package/dist/common/poll-trigger.d.ts +3 -1
- package/dist/common/poll-trigger.js +7512 -28
- package/dist/common/provider-triggers.js +6806 -3525
- package/dist/common/ru-DrP4BRM5.js +298 -0
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +41 -27
- package/dist/common/scheduler.d.ts +7 -1
- package/dist/common/scheduler.js +981 -792
- package/dist/common/trigger-catalog.d.ts +3 -1
- package/dist/common/trigger-config.d.ts +7 -0
- package/dist/common/zh-CN-D2od3TNw.js +298 -0
- package/dist/common/zh-TW-CRmc3FMz.js +298 -0
- package/package.json +1 -1
- package/dist/browser/flowChanges-AdN0Iqma.js +0 -12304
- package/dist/browser/flowWorkspace-BrtzLKWB.js +0 -153066
- package/dist/common/fr-iv1541dF.js +0 -93
- package/dist/common/ja-Bq-ZDOD4.js +0 -93
- package/dist/common/ko-Z-k9R2c6.js +0 -93
- package/dist/common/ru-B4gFecYZ.js +0 -93
- package/dist/common/zh-CN-ByQ6nYam.js +0 -93
- package/dist/common/zh-TW-QjIarvX9.js +0 -93
|
@@ -234,17 +234,17 @@ function me(e, t, n) {
|
|
|
234
234
|
return l(this, "shape", i), i;
|
|
235
235
|
} }));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function he(e, t = 0) {
|
|
238
238
|
if (e.aborted === !0) return !0;
|
|
239
239
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
240
240
|
return !1;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function ge(e, t = 0) {
|
|
243
243
|
if (e.aborted === !0) return !0;
|
|
244
244
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
245
245
|
return !1;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function _(e, t) {
|
|
248
248
|
return t.map((t) => {
|
|
249
249
|
var n;
|
|
250
250
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
@@ -1012,24 +1012,24 @@ var Vt = (e) => {
|
|
|
1012
1012
|
else {
|
|
1013
1013
|
let t = (t, n, r) => {
|
|
1014
1014
|
if (t.memo) return t;
|
|
1015
|
-
let i =
|
|
1015
|
+
let i = he(t), a;
|
|
1016
1016
|
for (let o of n) {
|
|
1017
1017
|
if (o._zod.def.when) {
|
|
1018
|
-
if (
|
|
1018
|
+
if (ge(t) || !o._zod.def.when(t)) continue;
|
|
1019
1019
|
} else if (i) continue;
|
|
1020
1020
|
let n = t.issues.length, s = o._zod.check(t);
|
|
1021
1021
|
if (s instanceof Promise && r?.async === !1) throw new ze();
|
|
1022
1022
|
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1023
|
-
await s, t.issues.length !== n && (ve(t.issues, n, e), i ||=
|
|
1023
|
+
await s, t.issues.length !== n && (ve(t.issues, n, e), i ||= he(t, n));
|
|
1024
1024
|
});
|
|
1025
1025
|
else {
|
|
1026
1026
|
if (t.issues.length === n) continue;
|
|
1027
|
-
ve(t.issues, n, e), i ||=
|
|
1027
|
+
ve(t.issues, n, e), i ||= he(t, n);
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
return a ? a.then(() => t) : t;
|
|
1031
1031
|
}, n = (n, r, a) => {
|
|
1032
|
-
if (
|
|
1032
|
+
if (he(n)) return n.aborted = !0, n;
|
|
1033
1033
|
let o = t(r, i, a);
|
|
1034
1034
|
if (o instanceof Promise) {
|
|
1035
1035
|
if (a.async === !1) throw new ze();
|
|
@@ -1364,7 +1364,7 @@ var Xn = /*@__PURE__*/ b("$ZodJWT", (e, t) => {
|
|
|
1364
1364
|
}), t);
|
|
1365
1365
|
});
|
|
1366
1366
|
function rr(e, t, n) {
|
|
1367
|
-
e.issues.length && t.issues.push(...
|
|
1367
|
+
e.issues.length && t.issues.push(..._(n, e.issues)), t.value[n] = e.value;
|
|
1368
1368
|
}
|
|
1369
1369
|
var ir = /*@__PURE__*/ b("$ZodArray", (e, t) => {
|
|
1370
1370
|
w.init(e, t);
|
|
@@ -1394,7 +1394,7 @@ function ar(e, t, n, r, i, a) {
|
|
|
1394
1394
|
if (!(!o && s && i === "optional")) {
|
|
1395
1395
|
if (e.issues.length) {
|
|
1396
1396
|
if (i !== void 0 && s && !o) return;
|
|
1397
|
-
t.issues.push(...
|
|
1397
|
+
t.issues.push(..._(n, e.issues));
|
|
1398
1398
|
}
|
|
1399
1399
|
if (!o && i === void 0) {
|
|
1400
1400
|
e.issues.length || t.issues.push({
|
|
@@ -1572,7 +1572,7 @@ var lr = /* @__PURE__ */ new WeakMap(), ur = /*@__PURE__*/ b("$ZodObject", (e, t
|
|
|
1572
1572
|
});
|
|
1573
1573
|
function fr(e, t, n, r) {
|
|
1574
1574
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1575
|
-
let i = e.filter((e) => !
|
|
1575
|
+
let i = e.filter((e) => !he(e));
|
|
1576
1576
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1577
1577
|
code: "invalid_union",
|
|
1578
1578
|
input: t.value,
|
|
@@ -1691,7 +1691,7 @@ function gr(e, t, n) {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
let c = hr(t.value, n.value);
|
|
1693
1693
|
if (!c.valid) {
|
|
1694
|
-
if (
|
|
1694
|
+
if (he(e)) return e;
|
|
1695
1695
|
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
1696
1696
|
}
|
|
1697
1697
|
return e.value = c.data, e;
|
|
@@ -1736,8 +1736,8 @@ var _r = /*@__PURE__*/ b("$ZodRecord", (e, t) => {
|
|
|
1736
1736
|
issues: []
|
|
1737
1737
|
}, i);
|
|
1738
1738
|
u instanceof Promise ? o.push(u.then((e) => {
|
|
1739
|
-
e.issues.length && r.issues.push(...
|
|
1740
|
-
})) : (u.issues.length && r.issues.push(...
|
|
1739
|
+
e.issues.length && r.issues.push(..._(n, e.issues)), r.value[l] = e.value;
|
|
1740
|
+
})) : (u.issues.length && r.issues.push(..._(n, u.issues)), r.value[l] = u.value);
|
|
1741
1741
|
}
|
|
1742
1742
|
let l;
|
|
1743
1743
|
for (let e in a) if (!c.has(e)) {
|
|
@@ -1789,8 +1789,8 @@ var _r = /*@__PURE__*/ b("$ZodRecord", (e, t) => {
|
|
|
1789
1789
|
issues: []
|
|
1790
1790
|
}, i);
|
|
1791
1791
|
d instanceof Promise ? o.push(d.then((e) => {
|
|
1792
|
-
e.issues.length && r.issues.push(...
|
|
1793
|
-
})) : (d.issues.length && r.issues.push(...
|
|
1792
|
+
e.issues.length && r.issues.push(..._(n, e.issues)), r.value[u] = e.value;
|
|
1793
|
+
})) : (d.issues.length && r.issues.push(..._(n, d.issues)), r.value[u] = d.value);
|
|
1794
1794
|
}
|
|
1795
1795
|
c && c.length > 0 && r.issues.push({
|
|
1796
1796
|
code: "unrecognized_keys",
|
|
@@ -2686,34 +2686,34 @@ function Yi(e, t) {
|
|
|
2686
2686
|
});
|
|
2687
2687
|
}
|
|
2688
2688
|
// @__NO_SIDE_EFFECTS__
|
|
2689
|
-
function
|
|
2689
|
+
function Xi(e) {
|
|
2690
2690
|
return new dn({
|
|
2691
2691
|
check: "overwrite",
|
|
2692
2692
|
tx: e
|
|
2693
2693
|
});
|
|
2694
2694
|
}
|
|
2695
2695
|
// @__NO_SIDE_EFFECTS__
|
|
2696
|
-
function
|
|
2697
|
-
return /* @__PURE__ */
|
|
2698
|
-
}
|
|
2699
|
-
// @__NO_SIDE_EFFECTS__
|
|
2700
|
-
function Zi() {
|
|
2701
|
-
return /* @__PURE__ */ E((e) => e.trim());
|
|
2696
|
+
function Zi(e) {
|
|
2697
|
+
return /* @__PURE__ */ Xi((t) => t.normalize(e));
|
|
2702
2698
|
}
|
|
2703
2699
|
// @__NO_SIDE_EFFECTS__
|
|
2704
2700
|
function Qi() {
|
|
2705
|
-
return /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ Xi((e) => e.trim());
|
|
2706
2702
|
}
|
|
2707
2703
|
// @__NO_SIDE_EFFECTS__
|
|
2708
2704
|
function $i() {
|
|
2709
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ Xi((e) => e.toLowerCase());
|
|
2710
2706
|
}
|
|
2711
2707
|
// @__NO_SIDE_EFFECTS__
|
|
2712
2708
|
function ea() {
|
|
2713
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ Xi((e) => e.toUpperCase());
|
|
2710
|
+
}
|
|
2711
|
+
// @__NO_SIDE_EFFECTS__
|
|
2712
|
+
function ta() {
|
|
2713
|
+
return /* @__PURE__ */ Xi((e) => f(e));
|
|
2714
2714
|
}
|
|
2715
2715
|
// @__NO_SIDE_EFFECTS__
|
|
2716
|
-
function
|
|
2716
|
+
function na(e, t, n) {
|
|
2717
2717
|
return new e({
|
|
2718
2718
|
type: "array",
|
|
2719
2719
|
element: t,
|
|
@@ -2721,7 +2721,7 @@ function ta(e, t, n) {
|
|
|
2721
2721
|
});
|
|
2722
2722
|
}
|
|
2723
2723
|
// @__NO_SIDE_EFFECTS__
|
|
2724
|
-
function
|
|
2724
|
+
function ra(e, t, n) {
|
|
2725
2725
|
return new e({
|
|
2726
2726
|
type: "custom",
|
|
2727
2727
|
check: "custom",
|
|
@@ -2730,8 +2730,8 @@ function na(e, t, n) {
|
|
|
2730
2730
|
});
|
|
2731
2731
|
}
|
|
2732
2732
|
// @__NO_SIDE_EFFECTS__
|
|
2733
|
-
function
|
|
2734
|
-
let n = /* @__PURE__ */
|
|
2733
|
+
function ia(e, t) {
|
|
2734
|
+
let n = /* @__PURE__ */ aa((t) => (t.addIssue = (e) => {
|
|
2735
2735
|
if (typeof e == "string") t.issues.push(Ce(e, t.value, n._zod.def));
|
|
2736
2736
|
else {
|
|
2737
2737
|
let r = e;
|
|
@@ -2741,7 +2741,7 @@ function ra(e, t) {
|
|
|
2741
2741
|
return n;
|
|
2742
2742
|
}
|
|
2743
2743
|
// @__NO_SIDE_EFFECTS__
|
|
2744
|
-
function
|
|
2744
|
+
function aa(e, t) {
|
|
2745
2745
|
let n = new C({
|
|
2746
2746
|
check: "custom",
|
|
2747
2747
|
...g(t)
|
|
@@ -2750,11 +2750,11 @@ function ia(e, t) {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
//#endregion
|
|
2752
2752
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
|
|
2753
|
-
function
|
|
2753
|
+
function oa(e, ...t) {
|
|
2754
2754
|
for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && l(e, t, n[t]);
|
|
2755
2755
|
return e;
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function sa(e) {
|
|
2758
2758
|
let t = e?.target ?? "draft-2020-12";
|
|
2759
2759
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2760
2760
|
processors: e.processors ?? {},
|
|
@@ -2774,7 +2774,7 @@ function oa(e) {
|
|
|
2774
2774
|
external: e?.external ?? void 0
|
|
2775
2775
|
};
|
|
2776
2776
|
}
|
|
2777
|
-
function
|
|
2777
|
+
function E(e, t, n, r, i) {
|
|
2778
2778
|
let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
|
|
2779
2779
|
zodSchema: e,
|
|
2780
2780
|
path: r.path,
|
|
@@ -2784,7 +2784,7 @@ function D(e, t, n, r, i) {
|
|
|
2784
2784
|
if (a === void 0 || a === "throw") throw Error(i);
|
|
2785
2785
|
return Object.assign(n, a), !0;
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2787
|
+
function D(e, t, n = {
|
|
2788
2788
|
path: [],
|
|
2789
2789
|
schemaPath: []
|
|
2790
2790
|
}) {
|
|
@@ -2813,15 +2813,15 @@ function O(e, t, n = {
|
|
|
2813
2813
|
a(e, t, n, r);
|
|
2814
2814
|
}
|
|
2815
2815
|
let a = e._zod.parent;
|
|
2816
|
-
a && (o.ref ||= a,
|
|
2816
|
+
a && (o.ref ||= a, D(a, t, r), t.seen.get(a).isParent = !0);
|
|
2817
2817
|
}
|
|
2818
2818
|
let c = t.metadataRegistry.get(e);
|
|
2819
|
-
return c &&
|
|
2819
|
+
return c && oa(o.schema, c), t.io === "input" && O(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
|
|
2820
2820
|
}
|
|
2821
|
-
function
|
|
2821
|
+
function ca(e) {
|
|
2822
2822
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2823
2823
|
}
|
|
2824
|
-
function
|
|
2824
|
+
function la(e, t) {
|
|
2825
2825
|
let n = e.seen.get(t);
|
|
2826
2826
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2827
2827
|
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
@@ -2842,7 +2842,7 @@ function ca(e, t) {
|
|
|
2842
2842
|
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2843
2843
|
return t[1].defId = a, {
|
|
2844
2844
|
defId: a,
|
|
2845
|
-
ref: `${i("__shared")}#/${r}/${
|
|
2845
|
+
ref: `${i("__shared")}#/${r}/${ca(a)}`
|
|
2846
2846
|
};
|
|
2847
2847
|
}
|
|
2848
2848
|
let i = `#/${r}/`;
|
|
@@ -2850,7 +2850,7 @@ function ca(e, t) {
|
|
|
2850
2850
|
let a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2851
2851
|
return {
|
|
2852
2852
|
defId: a,
|
|
2853
|
-
ref: i +
|
|
2853
|
+
ref: i + ca(a)
|
|
2854
2854
|
};
|
|
2855
2855
|
}, a = (e) => {
|
|
2856
2856
|
if (e[1].schema.$ref) return;
|
|
@@ -2894,13 +2894,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2894
2894
|
}
|
|
2895
2895
|
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
2896
2896
|
}
|
|
2897
|
-
function
|
|
2897
|
+
function ua(e) {
|
|
2898
2898
|
let t = e.anyOf;
|
|
2899
2899
|
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
2900
2900
|
let n = [];
|
|
2901
2901
|
for (let e of t) {
|
|
2902
2902
|
if (!e || typeof e != "object") return;
|
|
2903
|
-
|
|
2903
|
+
ua(e);
|
|
2904
2904
|
let t = Object.keys(e);
|
|
2905
2905
|
if (t.length !== 1 || t[0] !== "type") return;
|
|
2906
2906
|
let r = e.type;
|
|
@@ -2911,21 +2911,21 @@ function la(e) {
|
|
|
2911
2911
|
}
|
|
2912
2912
|
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
2913
2913
|
}
|
|
2914
|
-
var
|
|
2914
|
+
var da = /* @__PURE__ */ new Set([
|
|
2915
2915
|
"type",
|
|
2916
2916
|
"properties",
|
|
2917
2917
|
"required",
|
|
2918
2918
|
"additionalProperties"
|
|
2919
|
-
]),
|
|
2920
|
-
function
|
|
2919
|
+
]), fa = ["oneOf", "anyOf"];
|
|
2920
|
+
function pa(e) {
|
|
2921
2921
|
let t = e.additionalProperties;
|
|
2922
2922
|
return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2924
|
+
function ma(e) {
|
|
2925
2925
|
let t = [];
|
|
2926
2926
|
for (let n of e) {
|
|
2927
2927
|
if (typeof n != "object" || n.type !== "object") return null;
|
|
2928
|
-
for (let e in n) if (!
|
|
2928
|
+
for (let e in n) if (!da.has(e)) return null;
|
|
2929
2929
|
t.push(n);
|
|
2930
2930
|
}
|
|
2931
2931
|
let n = {}, r = /* @__PURE__ */ new Set();
|
|
@@ -2934,10 +2934,10 @@ function pa(e) {
|
|
|
2934
2934
|
if (Object.prototype.hasOwnProperty.call(n, r)) continue;
|
|
2935
2935
|
let e = [];
|
|
2936
2936
|
for (let n of t) {
|
|
2937
|
-
let t = n.properties?.[r] ??
|
|
2937
|
+
let t = n.properties?.[r] ?? pa(n);
|
|
2938
2938
|
t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
|
|
2939
2939
|
}
|
|
2940
|
-
l(n, r, e.length === 1 ? e[0] :
|
|
2940
|
+
l(n, r, e.length === 1 ? e[0] : ma(e) ?? { allOf: e });
|
|
2941
2941
|
}
|
|
2942
2942
|
for (let t of e.required ?? []) r.add(t);
|
|
2943
2943
|
}
|
|
@@ -2949,29 +2949,29 @@ function pa(e) {
|
|
|
2949
2949
|
else {
|
|
2950
2950
|
let e = [];
|
|
2951
2951
|
for (let n of t) {
|
|
2952
|
-
let t =
|
|
2952
|
+
let t = pa(n);
|
|
2953
2953
|
t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
|
|
2954
2954
|
}
|
|
2955
2955
|
e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
|
|
2956
2956
|
}
|
|
2957
2957
|
return i;
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2959
|
+
function ha(e) {
|
|
2960
2960
|
let t = e.allOf;
|
|
2961
2961
|
if (!Array.isArray(t) || t.length < 2) return;
|
|
2962
|
-
for (let t of
|
|
2963
|
-
let n = t.filter((e) =>
|
|
2964
|
-
if (!n.length) r =
|
|
2962
|
+
for (let t of da) if (t in e) return;
|
|
2963
|
+
let n = t.filter((e) => fa.some((t) => Array.isArray(e[t]))), r = null;
|
|
2964
|
+
if (!n.length) r = ma(t);
|
|
2965
2965
|
else {
|
|
2966
|
-
let e = n[0], i =
|
|
2966
|
+
let e = n[0], i = fa.find((t) => Array.isArray(e[t]));
|
|
2967
2967
|
if (Object.keys(e).length !== 1) return;
|
|
2968
|
-
let a = t.filter((t) => t !== e), o = e[i].map((e) =>
|
|
2968
|
+
let a = t.filter((t) => t !== e), o = e[i].map((e) => ma([...a, e]));
|
|
2969
2969
|
if (o.some((e) => !e)) return;
|
|
2970
2970
|
r = { [i]: o };
|
|
2971
2971
|
}
|
|
2972
|
-
r && (delete e.allOf,
|
|
2972
|
+
r && (delete e.allOf, oa(e, r));
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2974
|
+
function ga(e, t) {
|
|
2975
2975
|
let n = e.seen.get(t);
|
|
2976
2976
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2977
2977
|
let r = (t) => {
|
|
@@ -2981,7 +2981,7 @@ function ha(e, t) {
|
|
|
2981
2981
|
if (n.ref = null, o) {
|
|
2982
2982
|
r(o);
|
|
2983
2983
|
let n = e.seen.get(o), s = n.schema;
|
|
2984
|
-
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) :
|
|
2984
|
+
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : oa(i, s), oa(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
|
|
2985
2985
|
if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
|
|
2986
2986
|
}
|
|
2987
2987
|
let s = t._zod.parent;
|
|
@@ -2998,7 +2998,7 @@ function ha(e, t) {
|
|
|
2998
2998
|
};
|
|
2999
2999
|
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
3000
3000
|
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
3001
|
-
if (e.target !== "openapi-3.0") for (let t of e.seen.entries())
|
|
3001
|
+
if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ua(t[1].def ?? t[1].schema);
|
|
3002
3002
|
for (let t of e.deferred) t();
|
|
3003
3003
|
if (e.intersections.length) {
|
|
3004
3004
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3008,7 +3008,7 @@ function ha(e, t) {
|
|
|
3008
3008
|
let r = t.get(n);
|
|
3009
3009
|
r ? r.push(e) : t.set(n, [e]);
|
|
3010
3010
|
}
|
|
3011
|
-
for (let n of e.intersections) for (let e of t.get(n) ?? [])
|
|
3011
|
+
for (let n of e.intersections) for (let e of t.get(n) ?? []) ha(e);
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
let i = {};
|
|
@@ -3017,7 +3017,7 @@ function ha(e, t) {
|
|
|
3017
3017
|
if (!n) throw Error("Schema is missing an `id` property");
|
|
3018
3018
|
i.$id = e.external.uri(n);
|
|
3019
3019
|
}
|
|
3020
|
-
|
|
3020
|
+
oa(i, n.defId ? n.schema : n.def ?? n.schema);
|
|
3021
3021
|
let a = e.metadataRegistry.get(t)?.id;
|
|
3022
3022
|
a !== void 0 && i.id === a && delete i.id;
|
|
3023
3023
|
let o = e.external?.defs ?? {};
|
|
@@ -3032,8 +3032,8 @@ function ha(e, t) {
|
|
|
3032
3032
|
value: {
|
|
3033
3033
|
...t["~standard"],
|
|
3034
3034
|
jsonSchema: {
|
|
3035
|
-
input:
|
|
3036
|
-
output:
|
|
3035
|
+
input: va(t, "input", e.processors),
|
|
3036
|
+
output: va(t, "output", e.processors)
|
|
3037
3037
|
}
|
|
3038
3038
|
},
|
|
3039
3039
|
enumerable: !1,
|
|
@@ -3043,93 +3043,93 @@ function ha(e, t) {
|
|
|
3043
3043
|
throw Error("Error converting schema to JSON.");
|
|
3044
3044
|
}
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3046
|
+
function O(e, t) {
|
|
3047
3047
|
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3048
3048
|
if (n.seen.has(e)) return !1;
|
|
3049
3049
|
n.seen.add(e);
|
|
3050
3050
|
let r = e._zod.def;
|
|
3051
3051
|
if (r.type === "transform") return !0;
|
|
3052
|
-
if (r.type === "array") return
|
|
3053
|
-
if (r.type === "set") return
|
|
3054
|
-
if (r.type === "lazy") return
|
|
3055
|
-
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return
|
|
3056
|
-
if (r.type === "intersection") return
|
|
3057
|
-
if (r.type === "record" || r.type === "map") return
|
|
3058
|
-
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 :
|
|
3052
|
+
if (r.type === "array") return O(r.element, n);
|
|
3053
|
+
if (r.type === "set") return O(r.valueType, n);
|
|
3054
|
+
if (r.type === "lazy") return O(r.getter(), n);
|
|
3055
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return O(r.innerType, n);
|
|
3056
|
+
if (r.type === "intersection") return O(r.left, n) || O(r.right, n);
|
|
3057
|
+
if (r.type === "record" || r.type === "map") return O(r.keyType, n) || O(r.valueType, n);
|
|
3058
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : O(r.in, n) || O(r.out, n);
|
|
3059
3059
|
if (r.type === "object") {
|
|
3060
|
-
for (let e in r.shape) if (
|
|
3060
|
+
for (let e in r.shape) if (O(r.shape[e], n)) return !0;
|
|
3061
3061
|
return !1;
|
|
3062
3062
|
}
|
|
3063
3063
|
if (r.type === "union") {
|
|
3064
|
-
for (let e of r.options) if (
|
|
3064
|
+
for (let e of r.options) if (O(e, n)) return !0;
|
|
3065
3065
|
return !1;
|
|
3066
3066
|
}
|
|
3067
3067
|
if (r.type === "tuple") {
|
|
3068
|
-
for (let e of r.items) if (
|
|
3069
|
-
return !!(r.rest &&
|
|
3068
|
+
for (let e of r.items) if (O(e, n)) return !0;
|
|
3069
|
+
return !!(r.rest && O(r.rest, n));
|
|
3070
3070
|
}
|
|
3071
3071
|
return !1;
|
|
3072
3072
|
}
|
|
3073
|
-
var
|
|
3074
|
-
let r =
|
|
3073
|
+
var _a = (e, t = {}) => (n) => {
|
|
3074
|
+
let r = sa({
|
|
3075
3075
|
...n,
|
|
3076
3076
|
processors: t
|
|
3077
3077
|
});
|
|
3078
|
-
return
|
|
3079
|
-
},
|
|
3080
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
3078
|
+
return D(e, r), la(r, e), ga(r, e);
|
|
3079
|
+
}, va = (e, t, n = {}) => (r) => {
|
|
3080
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = sa({
|
|
3081
3081
|
...i ?? {},
|
|
3082
3082
|
target: a,
|
|
3083
3083
|
io: t,
|
|
3084
3084
|
processors: n
|
|
3085
3085
|
});
|
|
3086
|
-
return
|
|
3087
|
-
},
|
|
3086
|
+
return D(e, o), la(o, e), ga(o, e);
|
|
3087
|
+
}, ya = {
|
|
3088
3088
|
guid: "uuid",
|
|
3089
3089
|
url: "uri",
|
|
3090
3090
|
datetime: "date-time",
|
|
3091
3091
|
json_string: "json-string",
|
|
3092
3092
|
regex: ""
|
|
3093
|
-
},
|
|
3093
|
+
}, ba = (e, t, n, r) => {
|
|
3094
3094
|
let i = n;
|
|
3095
3095
|
i.type = "string";
|
|
3096
3096
|
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
|
|
3097
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format =
|
|
3097
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ya[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
3098
3098
|
let e = [...c];
|
|
3099
3099
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
3100
3100
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3101
3101
|
pattern: e.source
|
|
3102
3102
|
}))]);
|
|
3103
3103
|
}
|
|
3104
|
-
},
|
|
3104
|
+
}, xa = (e, t, n, r) => {
|
|
3105
3105
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
3106
3106
|
i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
|
|
3107
3107
|
let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
|
|
3108
|
-
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) :
|
|
3109
|
-
}, xa = (e, t, n, r) => {
|
|
3110
|
-
n.type = "boolean";
|
|
3108
|
+
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : E(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
|
|
3111
3109
|
}, Sa = (e, t, n, r) => {
|
|
3112
|
-
|
|
3110
|
+
n.type = "boolean";
|
|
3113
3111
|
}, Ca = (e, t, n, r) => {
|
|
3114
|
-
|
|
3112
|
+
E(e, t, n, r, "BigInt cannot be represented in JSON Schema");
|
|
3115
3113
|
}, wa = (e, t, n, r) => {
|
|
3116
|
-
|
|
3114
|
+
E(e, t, n, r, "Symbols cannot be represented in JSON Schema");
|
|
3117
3115
|
}, Ta = (e, t, n, r) => {
|
|
3118
|
-
|
|
3116
|
+
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
3119
3117
|
}, Ea = (e, t, n, r) => {
|
|
3120
|
-
|
|
3118
|
+
E(e, t, n, r, "Undefined cannot be represented in JSON Schema");
|
|
3121
3119
|
}, Da = (e, t, n, r) => {
|
|
3120
|
+
E(e, t, n, r, "Void cannot be represented in JSON Schema");
|
|
3121
|
+
}, Oa = (e, t, n, r) => {
|
|
3122
3122
|
n.not = {};
|
|
3123
|
-
},
|
|
3124
|
-
|
|
3125
|
-
},
|
|
3123
|
+
}, ka = (e, t, n, r) => {}, Aa = (e, t, n, r) => {}, ja = (e, t, n, r) => {
|
|
3124
|
+
E(e, t, n, r, "Date cannot be represented in JSON Schema");
|
|
3125
|
+
}, Ma = (t, n, r, i) => {
|
|
3126
3126
|
let a = t._zod.def, o = e(a.entries);
|
|
3127
3127
|
if (o.length === 0) {
|
|
3128
3128
|
r.not = {};
|
|
3129
3129
|
return;
|
|
3130
3130
|
}
|
|
3131
3131
|
o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
|
|
3132
|
-
},
|
|
3132
|
+
}, Na = (e, t, n, r) => {
|
|
3133
3133
|
let i = e._zod.def;
|
|
3134
3134
|
if (i.values.length === 0) {
|
|
3135
3135
|
n.not = {};
|
|
@@ -3137,9 +3137,9 @@ var ga = (e, t = {}) => (n) => {
|
|
|
3137
3137
|
}
|
|
3138
3138
|
let a = [];
|
|
3139
3139
|
for (let o of i.values) if (o === void 0) {
|
|
3140
|
-
if (
|
|
3140
|
+
if (E(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
|
|
3141
3141
|
} else if (typeof o == "bigint") {
|
|
3142
|
-
if (
|
|
3142
|
+
if (E(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
|
|
3143
3143
|
a.push(Number(o));
|
|
3144
3144
|
} else a.push(o);
|
|
3145
3145
|
if (a.length !== 0) {
|
|
@@ -3148,47 +3148,47 @@ var ga = (e, t = {}) => (n) => {
|
|
|
3148
3148
|
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
|
|
3149
3149
|
} else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
|
|
3150
3150
|
}
|
|
3151
|
-
}, Na = (e, t, n, r) => {
|
|
3152
|
-
D(e, t, n, r, "NaN cannot be represented in JSON Schema");
|
|
3153
3151
|
}, Pa = (e, t, n, r) => {
|
|
3152
|
+
E(e, t, n, r, "NaN cannot be represented in JSON Schema");
|
|
3153
|
+
}, Fa = (e, t, n, r) => {
|
|
3154
3154
|
let i = n, a = e._zod.pattern;
|
|
3155
3155
|
if (!a) throw Error("Pattern not found in template literal");
|
|
3156
3156
|
i.type = "string", i.pattern = a.source;
|
|
3157
|
-
},
|
|
3157
|
+
}, Ia = (e, t, n, r) => {
|
|
3158
3158
|
let i = n, a = {
|
|
3159
3159
|
type: "string",
|
|
3160
3160
|
format: "binary",
|
|
3161
3161
|
contentEncoding: "binary"
|
|
3162
3162
|
}, { minimum: o, maximum: s, mime: c } = e._zod.bag;
|
|
3163
3163
|
o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a);
|
|
3164
|
-
}, Ia = (e, t, n, r) => {
|
|
3165
|
-
n.type = "boolean";
|
|
3166
3164
|
}, La = (e, t, n, r) => {
|
|
3167
|
-
|
|
3165
|
+
n.type = "boolean";
|
|
3168
3166
|
}, Ra = (e, t, n, r) => {
|
|
3169
|
-
|
|
3167
|
+
E(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3170
3168
|
}, za = (e, t, n, r) => {
|
|
3171
|
-
|
|
3169
|
+
E(e, t, n, r, "Function types cannot be represented in JSON Schema");
|
|
3172
3170
|
}, Ba = (e, t, n, r) => {
|
|
3173
|
-
|
|
3171
|
+
E(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3174
3172
|
}, Va = (e, t, n, r) => {
|
|
3175
|
-
|
|
3173
|
+
E(e, t, n, r, "Map cannot be represented in JSON Schema");
|
|
3176
3174
|
}, Ha = (e, t, n, r) => {
|
|
3175
|
+
E(e, t, n, r, "Set cannot be represented in JSON Schema");
|
|
3176
|
+
}, Ua = (e, t, n, r) => {
|
|
3177
3177
|
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
3178
|
-
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items =
|
|
3178
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = D(a.element, t, {
|
|
3179
3179
|
...r,
|
|
3180
3180
|
path: [...r.path, "items"]
|
|
3181
3181
|
});
|
|
3182
3182
|
};
|
|
3183
|
-
function
|
|
3183
|
+
function Wa(e) {
|
|
3184
3184
|
let t = e._zod.def;
|
|
3185
|
-
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ?
|
|
3185
|
+
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Wa(t.out) : t.type === "catch" ? Wa(t.innerType) : e._zod.optin;
|
|
3186
3186
|
}
|
|
3187
|
-
var
|
|
3187
|
+
var Ga = (e, t, n, r) => {
|
|
3188
3188
|
let i = n, a = e._zod.def, o = a.shape;
|
|
3189
|
-
if (Object.getOwnPropertySymbols(o).length &&
|
|
3189
|
+
if (Object.getOwnPropertySymbols(o).length && E(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
3190
3190
|
i.type = "object", i.properties = {};
|
|
3191
|
-
for (let e in o) l(i.properties, e,
|
|
3191
|
+
for (let e in o) l(i.properties, e, D(o[e], t, {
|
|
3192
3192
|
...r,
|
|
3193
3193
|
path: [
|
|
3194
3194
|
...r.path,
|
|
@@ -3198,14 +3198,14 @@ var Wa = (e, t, n, r) => {
|
|
|
3198
3198
|
}));
|
|
3199
3199
|
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
3200
3200
|
let n = a.shape[e];
|
|
3201
|
-
return t.io === "input" ?
|
|
3201
|
+
return t.io === "input" ? Wa(n) === void 0 : n._zod.optout === void 0;
|
|
3202
3202
|
}));
|
|
3203
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties =
|
|
3203
|
+
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = D(a.catchall, t, {
|
|
3204
3204
|
...r,
|
|
3205
3205
|
path: [...r.path, "additionalProperties"]
|
|
3206
3206
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
3207
|
-
},
|
|
3208
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) =>
|
|
3207
|
+
}, Ka = (e, t, n, r) => {
|
|
3208
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => D(e, t, {
|
|
3209
3209
|
...r,
|
|
3210
3210
|
path: [
|
|
3211
3211
|
...r.path,
|
|
@@ -3214,15 +3214,15 @@ var Wa = (e, t, n, r) => {
|
|
|
3214
3214
|
]
|
|
3215
3215
|
}));
|
|
3216
3216
|
a ? n.oneOf = o : n.anyOf = o;
|
|
3217
|
-
},
|
|
3218
|
-
let i = e._zod.def, a =
|
|
3217
|
+
}, qa = (e, t, n, r) => {
|
|
3218
|
+
let i = e._zod.def, a = D(i.left, t, {
|
|
3219
3219
|
...r,
|
|
3220
3220
|
path: [
|
|
3221
3221
|
...r.path,
|
|
3222
3222
|
"allOf",
|
|
3223
3223
|
0
|
|
3224
3224
|
]
|
|
3225
|
-
}), o =
|
|
3225
|
+
}), o = D(i.right, t, {
|
|
3226
3226
|
...r,
|
|
3227
3227
|
path: [
|
|
3228
3228
|
...r.path,
|
|
@@ -3231,17 +3231,17 @@ var Wa = (e, t, n, r) => {
|
|
|
3231
3231
|
]
|
|
3232
3232
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
3233
3233
|
n.allOf = c, t.intersections.push(c);
|
|
3234
|
-
},
|
|
3234
|
+
}, Ja = (e, t, n, r) => {
|
|
3235
3235
|
let i = n, a = e._zod.def;
|
|
3236
3236
|
i.type = "array";
|
|
3237
|
-
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) =>
|
|
3237
|
+
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => D(e, t, {
|
|
3238
3238
|
...r,
|
|
3239
3239
|
path: [
|
|
3240
3240
|
...r.path,
|
|
3241
3241
|
o,
|
|
3242
3242
|
n
|
|
3243
3243
|
]
|
|
3244
|
-
})), l = a.rest ?
|
|
3244
|
+
})), l = a.rest ? D(a.rest, t, {
|
|
3245
3245
|
...r,
|
|
3246
3246
|
path: [
|
|
3247
3247
|
...r.path,
|
|
@@ -3251,7 +3251,7 @@ var Wa = (e, t, n, r) => {
|
|
|
3251
3251
|
}) : null, u = a.items.length;
|
|
3252
3252
|
for (; u > 0;) {
|
|
3253
3253
|
let e = a.items[u - 1];
|
|
3254
|
-
if (!(t.io === "input" ?
|
|
3254
|
+
if (!(t.io === "input" ? Wa(e) !== void 0 : e._zod.optout === "optional")) break;
|
|
3255
3255
|
u--;
|
|
3256
3256
|
}
|
|
3257
3257
|
let d = a.items.length, f = !a.rest;
|
|
@@ -3259,19 +3259,19 @@ var Wa = (e, t, n, r) => {
|
|
|
3259
3259
|
let { minimum: p, maximum: m } = e._zod.bag;
|
|
3260
3260
|
typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
|
|
3261
3261
|
};
|
|
3262
|
-
function
|
|
3262
|
+
function Ya(e, t, n) {
|
|
3263
3263
|
if (t.$ref) {
|
|
3264
3264
|
if (n.has(t)) return t;
|
|
3265
3265
|
n.add(t);
|
|
3266
3266
|
let r = e.get(t)?.def;
|
|
3267
3267
|
if (!r) return t;
|
|
3268
|
-
let i =
|
|
3268
|
+
let i = Ya(e, r, n);
|
|
3269
3269
|
return i === r ? t : i;
|
|
3270
3270
|
}
|
|
3271
3271
|
for (let r of ["anyOf", "oneOf"]) {
|
|
3272
3272
|
let i = t[r];
|
|
3273
3273
|
if (!Array.isArray(i)) continue;
|
|
3274
|
-
let a = i.map((t) =>
|
|
3274
|
+
let a = i.map((t) => Ya(e, t, n));
|
|
3275
3275
|
a.some((e, t) => e !== i[t]) && (t = {
|
|
3276
3276
|
...t,
|
|
3277
3277
|
[r]: a
|
|
@@ -3282,15 +3282,15 @@ function Ja(e, t, n) {
|
|
|
3282
3282
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3283
3283
|
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Ut : Ht).source), p) : p;
|
|
3284
3284
|
}
|
|
3285
|
-
var
|
|
3286
|
-
function
|
|
3285
|
+
var Xa = /* @__PURE__ */ new WeakMap();
|
|
3286
|
+
function Za(e) {
|
|
3287
3287
|
let t = /* @__PURE__ */ new Map();
|
|
3288
3288
|
for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
|
|
3289
3289
|
let n = /* @__PURE__ */ new Map();
|
|
3290
|
-
for (let r of
|
|
3290
|
+
for (let r of Xa.get(e) ?? []) {
|
|
3291
3291
|
let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
|
|
3292
3292
|
if (!a || a === !0 || n.has(a)) continue;
|
|
3293
|
-
let o =
|
|
3293
|
+
let o = Ya(t, a, /* @__PURE__ */ new Set());
|
|
3294
3294
|
o !== a && n.set(a, o);
|
|
3295
3295
|
}
|
|
3296
3296
|
if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
|
|
@@ -3298,12 +3298,12 @@ function Xa(e) {
|
|
|
3298
3298
|
t && (e.propertyNames = t);
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
|
-
var
|
|
3301
|
+
var Qa = (e, t, n, r) => {
|
|
3302
3302
|
let i = n, a = e._zod.def;
|
|
3303
3303
|
i.type = "object";
|
|
3304
3304
|
let o = a.keyType, s = o._zod.bag?.patterns;
|
|
3305
3305
|
if (a.mode === "loose" && s && s.size > 0) {
|
|
3306
|
-
let e =
|
|
3306
|
+
let e = D(a.valueType, t, {
|
|
3307
3307
|
...r,
|
|
3308
3308
|
path: [
|
|
3309
3309
|
...r.path,
|
|
@@ -3315,138 +3315,138 @@ var Za = (e, t, n, r) => {
|
|
|
3315
3315
|
for (let t of s) l(i.patternProperties, t.source, e);
|
|
3316
3316
|
} else {
|
|
3317
3317
|
if (t.target === "draft-07" || t.target === "draft-2020-12") {
|
|
3318
|
-
i.propertyNames =
|
|
3318
|
+
i.propertyNames = D(a.keyType, t, {
|
|
3319
3319
|
...r,
|
|
3320
3320
|
path: [...r.path, "propertyNames"]
|
|
3321
3321
|
});
|
|
3322
|
-
let n =
|
|
3323
|
-
n || (n = [],
|
|
3322
|
+
let n = Xa.get(t);
|
|
3323
|
+
n || (n = [], Xa.set(t, n), t.deferred.push(() => Za(t))), n.push(e);
|
|
3324
3324
|
}
|
|
3325
|
-
i.additionalProperties =
|
|
3325
|
+
i.additionalProperties = D(a.valueType, t, {
|
|
3326
3326
|
...r,
|
|
3327
3327
|
path: [...r.path, "additionalProperties"]
|
|
3328
3328
|
});
|
|
3329
3329
|
}
|
|
3330
|
-
let c = o._zod.values, u = t.io === "input" &&
|
|
3330
|
+
let c = o._zod.values, u = t.io === "input" && Wa(a.valueType) !== void 0;
|
|
3331
3331
|
if (c && !a.partial && !u) {
|
|
3332
3332
|
let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
|
|
3333
3333
|
e.length > 0 && (i.required = e.map(String));
|
|
3334
3334
|
}
|
|
3335
|
-
}, Qa = (e, t, n, r) => {
|
|
3336
|
-
let i = e._zod.def, a = O(i.innerType, t, r), o = t.seen.get(e);
|
|
3337
|
-
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3338
3335
|
}, $a = (e, t, n, r) => {
|
|
3336
|
+
let i = e._zod.def, a = D(i.innerType, t, r), o = t.seen.get(e);
|
|
3337
|
+
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3338
|
+
}, eo = (e, t, n, r) => {
|
|
3339
3339
|
let i = e._zod.def;
|
|
3340
|
-
|
|
3340
|
+
D(i.innerType, t, r);
|
|
3341
3341
|
let a = t.seen.get(e);
|
|
3342
3342
|
a.ref = i.innerType;
|
|
3343
|
-
},
|
|
3344
|
-
function
|
|
3343
|
+
}, to = Symbol();
|
|
3344
|
+
function no(e, t, n, r, i) {
|
|
3345
3345
|
let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
|
|
3346
|
-
return a ? (
|
|
3346
|
+
return a ? (E(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), to) : JSON.parse(o);
|
|
3347
3347
|
}
|
|
3348
|
-
var
|
|
3348
|
+
var ro = (e, t, n, r) => {
|
|
3349
3349
|
let i = e._zod.def;
|
|
3350
|
-
|
|
3350
|
+
D(i.innerType, t, r);
|
|
3351
3351
|
let a = t.seen.get(e);
|
|
3352
3352
|
a.ref = i.innerType;
|
|
3353
|
-
let o =
|
|
3354
|
-
o !==
|
|
3355
|
-
},
|
|
3353
|
+
let o = no(i.defaultValue, e, t, n, r);
|
|
3354
|
+
o !== to && (n.default = o);
|
|
3355
|
+
}, io = (e, t, n, r) => {
|
|
3356
3356
|
let i = e._zod.def;
|
|
3357
|
-
|
|
3357
|
+
D(i.innerType, t, r);
|
|
3358
3358
|
let a = t.seen.get(e);
|
|
3359
3359
|
if (a.ref = i.innerType, t.io !== "input") return;
|
|
3360
|
-
let o =
|
|
3361
|
-
o !==
|
|
3362
|
-
},
|
|
3360
|
+
let o = no(i.defaultValue, e, t, n, r);
|
|
3361
|
+
o !== to && (n._prefault = o);
|
|
3362
|
+
}, ao = (e, t, n, r) => {
|
|
3363
3363
|
let i = e._zod.def;
|
|
3364
|
-
|
|
3364
|
+
D(i.innerType, t, r);
|
|
3365
3365
|
let a = t.seen.get(e);
|
|
3366
3366
|
a.ref = i.innerType;
|
|
3367
3367
|
let o;
|
|
3368
3368
|
try {
|
|
3369
3369
|
o = i.catchValue(void 0);
|
|
3370
3370
|
} catch {
|
|
3371
|
-
|
|
3371
|
+
E(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
|
|
3372
3372
|
return;
|
|
3373
3373
|
}
|
|
3374
3374
|
n.default = o;
|
|
3375
|
-
},
|
|
3375
|
+
}, oo = (e, t, n, r) => {
|
|
3376
3376
|
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
3377
|
-
|
|
3377
|
+
D(o, t, r);
|
|
3378
3378
|
let s = t.seen.get(e);
|
|
3379
3379
|
s.ref = o;
|
|
3380
|
-
},
|
|
3380
|
+
}, so = (e, t, n, r) => {
|
|
3381
3381
|
let i = e._zod.def;
|
|
3382
|
-
|
|
3382
|
+
D(i.innerType, t, r);
|
|
3383
3383
|
let a = t.seen.get(e);
|
|
3384
3384
|
a.ref = i.innerType, n.readOnly = !0;
|
|
3385
|
-
},
|
|
3385
|
+
}, co = (e, t, n, r) => {
|
|
3386
3386
|
let i = e._zod.def;
|
|
3387
|
-
|
|
3387
|
+
D(i.innerType, t, r);
|
|
3388
3388
|
let a = t.seen.get(e);
|
|
3389
3389
|
a.ref = i.innerType;
|
|
3390
|
-
},
|
|
3390
|
+
}, lo = (e, t, n, r) => {
|
|
3391
3391
|
let i = e._zod.def;
|
|
3392
|
-
|
|
3392
|
+
D(i.innerType, t, r);
|
|
3393
3393
|
let a = t.seen.get(e);
|
|
3394
3394
|
a.ref = i.innerType;
|
|
3395
|
-
},
|
|
3395
|
+
}, uo = (e, t, n, r) => {
|
|
3396
3396
|
let i = e._zod.innerType;
|
|
3397
|
-
|
|
3397
|
+
D(i, t, r);
|
|
3398
3398
|
let a = t.seen.get(e);
|
|
3399
3399
|
a.ref = i;
|
|
3400
|
-
},
|
|
3401
|
-
string:
|
|
3402
|
-
number:
|
|
3403
|
-
boolean:
|
|
3404
|
-
bigint:
|
|
3405
|
-
symbol:
|
|
3406
|
-
null:
|
|
3407
|
-
undefined:
|
|
3408
|
-
void:
|
|
3409
|
-
never:
|
|
3410
|
-
any:
|
|
3411
|
-
unknown:
|
|
3412
|
-
date:
|
|
3413
|
-
enum:
|
|
3414
|
-
literal:
|
|
3415
|
-
nan:
|
|
3416
|
-
template_literal:
|
|
3417
|
-
file:
|
|
3418
|
-
success:
|
|
3419
|
-
custom:
|
|
3420
|
-
function:
|
|
3421
|
-
transform:
|
|
3422
|
-
map:
|
|
3423
|
-
set:
|
|
3424
|
-
array:
|
|
3425
|
-
object:
|
|
3426
|
-
union:
|
|
3427
|
-
intersection:
|
|
3428
|
-
tuple:
|
|
3429
|
-
record:
|
|
3430
|
-
nullable:
|
|
3431
|
-
nonoptional:
|
|
3432
|
-
default:
|
|
3433
|
-
prefault:
|
|
3434
|
-
catch:
|
|
3435
|
-
pipe:
|
|
3436
|
-
readonly:
|
|
3437
|
-
promise:
|
|
3438
|
-
optional:
|
|
3439
|
-
lazy:
|
|
3400
|
+
}, fo = {
|
|
3401
|
+
string: ba,
|
|
3402
|
+
number: xa,
|
|
3403
|
+
boolean: Sa,
|
|
3404
|
+
bigint: Ca,
|
|
3405
|
+
symbol: wa,
|
|
3406
|
+
null: Ta,
|
|
3407
|
+
undefined: Ea,
|
|
3408
|
+
void: Da,
|
|
3409
|
+
never: Oa,
|
|
3410
|
+
any: ka,
|
|
3411
|
+
unknown: Aa,
|
|
3412
|
+
date: ja,
|
|
3413
|
+
enum: Ma,
|
|
3414
|
+
literal: Na,
|
|
3415
|
+
nan: Pa,
|
|
3416
|
+
template_literal: Fa,
|
|
3417
|
+
file: Ia,
|
|
3418
|
+
success: La,
|
|
3419
|
+
custom: Ra,
|
|
3420
|
+
function: za,
|
|
3421
|
+
transform: Ba,
|
|
3422
|
+
map: Va,
|
|
3423
|
+
set: Ha,
|
|
3424
|
+
array: Ua,
|
|
3425
|
+
object: Ga,
|
|
3426
|
+
union: Ka,
|
|
3427
|
+
intersection: qa,
|
|
3428
|
+
tuple: Ja,
|
|
3429
|
+
record: Qa,
|
|
3430
|
+
nullable: $a,
|
|
3431
|
+
nonoptional: eo,
|
|
3432
|
+
default: ro,
|
|
3433
|
+
prefault: io,
|
|
3434
|
+
catch: ao,
|
|
3435
|
+
pipe: oo,
|
|
3436
|
+
readonly: so,
|
|
3437
|
+
promise: co,
|
|
3438
|
+
optional: lo,
|
|
3439
|
+
lazy: uo
|
|
3440
3440
|
};
|
|
3441
|
-
function
|
|
3441
|
+
function po(e, t) {
|
|
3442
3442
|
if ("_idmap" in e) {
|
|
3443
|
-
let n = e, r =
|
|
3443
|
+
let n = e, r = sa({
|
|
3444
3444
|
...t,
|
|
3445
|
-
processors:
|
|
3445
|
+
processors: fo
|
|
3446
3446
|
}), i = {};
|
|
3447
3447
|
for (let e of n._idmap.entries()) {
|
|
3448
3448
|
let [t, n] = e;
|
|
3449
|
-
|
|
3449
|
+
D(n, r);
|
|
3450
3450
|
}
|
|
3451
3451
|
let a = {};
|
|
3452
3452
|
r.external = {
|
|
@@ -3456,20 +3456,20 @@ function fo(e, t) {
|
|
|
3456
3456
|
};
|
|
3457
3457
|
for (let e of n._idmap.entries()) {
|
|
3458
3458
|
let [t, n] = e;
|
|
3459
|
-
|
|
3459
|
+
la(r, n), l(a, t, ga(r, n));
|
|
3460
3460
|
}
|
|
3461
3461
|
return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
|
|
3462
3462
|
}
|
|
3463
|
-
let n =
|
|
3463
|
+
let n = sa({
|
|
3464
3464
|
...t,
|
|
3465
|
-
processors:
|
|
3465
|
+
processors: fo
|
|
3466
3466
|
});
|
|
3467
|
-
return
|
|
3467
|
+
return D(e, n), la(n, e), ga(n, e);
|
|
3468
3468
|
}
|
|
3469
3469
|
//#endregion
|
|
3470
3470
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
|
|
3471
|
-
var
|
|
3472
|
-
function
|
|
3471
|
+
var mo = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3472
|
+
function ho(e, t, n) {
|
|
3473
3473
|
Object.defineProperty(e, t, {
|
|
3474
3474
|
configurable: !0,
|
|
3475
3475
|
enumerable: !1,
|
|
@@ -3490,12 +3490,12 @@ function mo(e, t, n) {
|
|
|
3490
3490
|
}
|
|
3491
3491
|
});
|
|
3492
3492
|
}
|
|
3493
|
-
var
|
|
3493
|
+
var go = (e, t) => {
|
|
3494
3494
|
Je.init(e, t), e.name = "ZodError";
|
|
3495
3495
|
let r = Object.getPrototypeOf(e);
|
|
3496
|
-
|
|
3496
|
+
mo.has(r) || (mo.add(r), ho(r, "format", (e) => (t) => Qe(e, t)), ho(r, "flatten", (e) => (t) => Ze(e, t)), ho(r, "addIssue", (e) => (t) => {
|
|
3497
3497
|
e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3498
|
-
}),
|
|
3498
|
+
}), ho(r, "addIssues", (e) => (t) => {
|
|
3499
3499
|
e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3500
3500
|
}), Object.defineProperty(r, "isEmpty", {
|
|
3501
3501
|
configurable: !0,
|
|
@@ -3504,16 +3504,16 @@ var ho = (e, t) => {
|
|
|
3504
3504
|
return this.issues.length === 0;
|
|
3505
3505
|
}
|
|
3506
3506
|
}));
|
|
3507
|
-
},
|
|
3507
|
+
}, _o = /*@__PURE__*/ b("ZodError", go), k = /*@__PURE__*/ b("ZodError", go, void 0, { Parent: Error }), vo = /* @__PURE__ */ et(k), yo = /* @__PURE__ */ tt(k), bo = /* @__PURE__ */ nt(k), xo = /* @__PURE__ */ it(k), So = /* @__PURE__ */ ot(k), Co = /* @__PURE__ */ st(k), wo = /* @__PURE__ */ ct(k), To = /* @__PURE__ */ lt(k), Eo = /* @__PURE__ */ ut(k), Do = /* @__PURE__ */ dt(k), Oo = /* @__PURE__ */ ft(k), ko = /* @__PURE__ */ pt(k);
|
|
3508
3508
|
//#endregion
|
|
3509
3509
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3510
|
-
function
|
|
3510
|
+
function Ao() {
|
|
3511
3511
|
x.localeError || S(Qr());
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function jo() {
|
|
3514
3514
|
x.memoizer || S({ memoizer: Yr() });
|
|
3515
3515
|
}
|
|
3516
|
-
var
|
|
3516
|
+
var A = /*@__PURE__*/ b("ZodType", (e, t) => (Ao(), w.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3517
3517
|
check(...e) {
|
|
3518
3518
|
let t = this.def;
|
|
3519
3519
|
return this.clone(u(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3541,7 +3541,7 @@ var j = /*@__PURE__*/ b("ZodType", (e, t) => (ko(), w.init(e, t), e.def = t, e.t
|
|
|
3541
3541
|
return this.check(Ws(e, t));
|
|
3542
3542
|
},
|
|
3543
3543
|
overwrite(e) {
|
|
3544
|
-
return this.check(/* @__PURE__ */
|
|
3544
|
+
return this.check(/* @__PURE__ */ Xi(e));
|
|
3545
3545
|
},
|
|
3546
3546
|
optional() {
|
|
3547
3547
|
return Cs(this);
|
|
@@ -3607,8 +3607,8 @@ var j = /*@__PURE__*/ b("ZodType", (e, t) => (ko(), w.init(e, t), e.def = t, e.t
|
|
|
3607
3607
|
return Ee(this, "~standard", {
|
|
3608
3608
|
...hn(this),
|
|
3609
3609
|
jsonSchema: {
|
|
3610
|
-
input:
|
|
3611
|
-
output:
|
|
3610
|
+
input: va(this, "input"),
|
|
3611
|
+
output: va(this, "output")
|
|
3612
3612
|
}
|
|
3613
3613
|
});
|
|
3614
3614
|
},
|
|
@@ -3616,16 +3616,16 @@ var j = /*@__PURE__*/ b("ZodType", (e, t) => (ko(), w.init(e, t), e.def = t, e.t
|
|
|
3616
3616
|
Te(this, "~standard", e);
|
|
3617
3617
|
},
|
|
3618
3618
|
parse: function e(t, n) {
|
|
3619
|
-
return
|
|
3619
|
+
return vo(this, t, n, { callee: e });
|
|
3620
3620
|
},
|
|
3621
3621
|
parseAsync: async function e(t, n) {
|
|
3622
|
-
return await
|
|
3622
|
+
return await yo(this, t, n, { callee: e });
|
|
3623
3623
|
},
|
|
3624
3624
|
safeParse(e, t) {
|
|
3625
|
-
return
|
|
3625
|
+
return bo(this, e, t);
|
|
3626
3626
|
},
|
|
3627
3627
|
async safeParseAsync(e, t) {
|
|
3628
|
-
return
|
|
3628
|
+
return xo(this, e, t);
|
|
3629
3629
|
},
|
|
3630
3630
|
get spa() {
|
|
3631
3631
|
return this?.safeParseAsync;
|
|
@@ -3634,31 +3634,31 @@ var j = /*@__PURE__*/ b("ZodType", (e, t) => (ko(), w.init(e, t), e.def = t, e.t
|
|
|
3634
3634
|
Te(this, "spa", e);
|
|
3635
3635
|
},
|
|
3636
3636
|
encode: function e(t, n) {
|
|
3637
|
-
return
|
|
3637
|
+
return So(this, t, n, { callee: e });
|
|
3638
3638
|
},
|
|
3639
3639
|
decode: function e(t, n) {
|
|
3640
|
-
return
|
|
3640
|
+
return Co(this, t, n, { callee: e });
|
|
3641
3641
|
},
|
|
3642
3642
|
encodeAsync: async function e(t, n) {
|
|
3643
|
-
return await
|
|
3643
|
+
return await wo(this, t, n, { callee: e });
|
|
3644
3644
|
},
|
|
3645
3645
|
decodeAsync: async function e(t, n) {
|
|
3646
|
-
return await
|
|
3646
|
+
return await To(this, t, n, { callee: e });
|
|
3647
3647
|
},
|
|
3648
3648
|
safeEncode(e, t) {
|
|
3649
|
-
return
|
|
3649
|
+
return Eo(this, e, t);
|
|
3650
3650
|
},
|
|
3651
3651
|
safeDecode(e, t) {
|
|
3652
|
-
return
|
|
3652
|
+
return Do(this, e, t);
|
|
3653
3653
|
},
|
|
3654
3654
|
async safeEncodeAsync(e, t) {
|
|
3655
|
-
return
|
|
3655
|
+
return Oo(this, e, t);
|
|
3656
3656
|
},
|
|
3657
3657
|
async safeDecodeAsync(e, t) {
|
|
3658
|
-
return
|
|
3658
|
+
return ko(this, e, t);
|
|
3659
3659
|
},
|
|
3660
3660
|
toJSONSchema(e) {
|
|
3661
|
-
return
|
|
3661
|
+
return _a(this, {})(e);
|
|
3662
3662
|
},
|
|
3663
3663
|
get description() {
|
|
3664
3664
|
return ni.get(this)?.description;
|
|
@@ -3666,8 +3666,8 @@ var j = /*@__PURE__*/ b("ZodType", (e, t) => (ko(), w.init(e, t), e.def = t, e.t
|
|
|
3666
3666
|
get _def() {
|
|
3667
3667
|
return this._zod.def;
|
|
3668
3668
|
}
|
|
3669
|
-
}),
|
|
3670
|
-
gn.init(e, t),
|
|
3669
|
+
}), Mo = /*@__PURE__*/ b("_ZodString", (e, t) => {
|
|
3670
|
+
gn.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
|
|
3671
3671
|
let n = e._zod.bag;
|
|
3672
3672
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
3673
3673
|
}, {
|
|
@@ -3702,155 +3702,155 @@ var j = /*@__PURE__*/ b("ZodType", (e, t) => (ko(), w.init(e, t), e.def = t, e.t
|
|
|
3702
3702
|
return this.check(/* @__PURE__ */ Ki(e));
|
|
3703
3703
|
},
|
|
3704
3704
|
trim() {
|
|
3705
|
-
return this.check(/* @__PURE__ */
|
|
3705
|
+
return this.check(/* @__PURE__ */ Qi());
|
|
3706
3706
|
},
|
|
3707
3707
|
normalize(...e) {
|
|
3708
|
-
return this.check(/* @__PURE__ */
|
|
3708
|
+
return this.check(/* @__PURE__ */ Zi(...e));
|
|
3709
3709
|
},
|
|
3710
3710
|
toLowerCase() {
|
|
3711
|
-
return this.check(/* @__PURE__ */
|
|
3711
|
+
return this.check(/* @__PURE__ */ $i());
|
|
3712
3712
|
},
|
|
3713
3713
|
toUpperCase() {
|
|
3714
|
-
return this.check(/* @__PURE__ */
|
|
3714
|
+
return this.check(/* @__PURE__ */ ea());
|
|
3715
3715
|
},
|
|
3716
3716
|
slugify() {
|
|
3717
|
-
return this.check(/* @__PURE__ */
|
|
3717
|
+
return this.check(/* @__PURE__ */ ta());
|
|
3718
3718
|
}
|
|
3719
|
-
}),
|
|
3720
|
-
gn.init(e, t),
|
|
3719
|
+
}), No = /*@__PURE__*/ b("ZodString", (e, t) => {
|
|
3720
|
+
gn.init(e, t), Mo.init(e, t);
|
|
3721
3721
|
}, {
|
|
3722
3722
|
email(e) {
|
|
3723
|
-
return this.check(/* @__PURE__ */ ii(
|
|
3723
|
+
return this.check(/* @__PURE__ */ ii(Ro, e));
|
|
3724
3724
|
},
|
|
3725
3725
|
url(e) {
|
|
3726
|
-
return this.check(/* @__PURE__ */ ui(
|
|
3726
|
+
return this.check(/* @__PURE__ */ ui(Vo, e));
|
|
3727
3727
|
},
|
|
3728
3728
|
jwt(e) {
|
|
3729
|
-
return this.check(/* @__PURE__ */ Ti(
|
|
3729
|
+
return this.check(/* @__PURE__ */ Ti(ns, e));
|
|
3730
3730
|
},
|
|
3731
3731
|
emoji(e) {
|
|
3732
|
-
return this.check(/* @__PURE__ */ di(
|
|
3732
|
+
return this.check(/* @__PURE__ */ di(Ho, e));
|
|
3733
3733
|
},
|
|
3734
3734
|
guid(e) {
|
|
3735
|
-
return this.check(/* @__PURE__ */ ai(
|
|
3735
|
+
return this.check(/* @__PURE__ */ ai(zo, e));
|
|
3736
3736
|
},
|
|
3737
3737
|
uuid(e) {
|
|
3738
|
-
return this.check(/* @__PURE__ */ oi(
|
|
3738
|
+
return this.check(/* @__PURE__ */ oi(Bo, e));
|
|
3739
3739
|
},
|
|
3740
3740
|
uuidv4(e) {
|
|
3741
|
-
return this.check(/* @__PURE__ */ si(
|
|
3741
|
+
return this.check(/* @__PURE__ */ si(Bo, e));
|
|
3742
3742
|
},
|
|
3743
3743
|
uuidv6(e) {
|
|
3744
|
-
return this.check(/* @__PURE__ */ ci(
|
|
3744
|
+
return this.check(/* @__PURE__ */ ci(Bo, e));
|
|
3745
3745
|
},
|
|
3746
3746
|
uuidv7(e) {
|
|
3747
|
-
return this.check(/* @__PURE__ */ li(
|
|
3747
|
+
return this.check(/* @__PURE__ */ li(Bo, e));
|
|
3748
3748
|
},
|
|
3749
3749
|
nanoid(e) {
|
|
3750
|
-
return this.check(/* @__PURE__ */ fi(
|
|
3750
|
+
return this.check(/* @__PURE__ */ fi(Uo, e));
|
|
3751
3751
|
},
|
|
3752
3752
|
cuid(e) {
|
|
3753
|
-
return this.check(/* @__PURE__ */ pi(
|
|
3753
|
+
return this.check(/* @__PURE__ */ pi(Wo, e));
|
|
3754
3754
|
},
|
|
3755
3755
|
cuid2(e) {
|
|
3756
|
-
return this.check(/* @__PURE__ */ mi(
|
|
3756
|
+
return this.check(/* @__PURE__ */ mi(Go, e));
|
|
3757
3757
|
},
|
|
3758
3758
|
ulid(e) {
|
|
3759
|
-
return this.check(/* @__PURE__ */ hi(
|
|
3759
|
+
return this.check(/* @__PURE__ */ hi(Ko, e));
|
|
3760
3760
|
},
|
|
3761
3761
|
base64(e) {
|
|
3762
|
-
return this.check(/* @__PURE__ */ Si(
|
|
3762
|
+
return this.check(/* @__PURE__ */ Si($o, e));
|
|
3763
3763
|
},
|
|
3764
3764
|
base64url(e) {
|
|
3765
|
-
return this.check(/* @__PURE__ */ Ci(
|
|
3765
|
+
return this.check(/* @__PURE__ */ Ci(es, e));
|
|
3766
3766
|
},
|
|
3767
3767
|
xid(e) {
|
|
3768
|
-
return this.check(/* @__PURE__ */ gi(
|
|
3768
|
+
return this.check(/* @__PURE__ */ gi(qo, e));
|
|
3769
3769
|
},
|
|
3770
3770
|
ksuid(e) {
|
|
3771
|
-
return this.check(/* @__PURE__ */ _i(
|
|
3771
|
+
return this.check(/* @__PURE__ */ _i(Jo, e));
|
|
3772
3772
|
},
|
|
3773
3773
|
ipv4(e) {
|
|
3774
|
-
return this.check(/* @__PURE__ */ vi(
|
|
3774
|
+
return this.check(/* @__PURE__ */ vi(Yo, e));
|
|
3775
3775
|
},
|
|
3776
3776
|
ipv6(e) {
|
|
3777
|
-
return this.check(/* @__PURE__ */ yi(
|
|
3777
|
+
return this.check(/* @__PURE__ */ yi(Xo, e));
|
|
3778
3778
|
},
|
|
3779
3779
|
cidrv4(e) {
|
|
3780
|
-
return this.check(/* @__PURE__ */ bi(
|
|
3780
|
+
return this.check(/* @__PURE__ */ bi(Zo, e));
|
|
3781
3781
|
},
|
|
3782
3782
|
cidrv6(e) {
|
|
3783
|
-
return this.check(/* @__PURE__ */ xi(
|
|
3783
|
+
return this.check(/* @__PURE__ */ xi(Qo, e));
|
|
3784
3784
|
},
|
|
3785
3785
|
e164(e) {
|
|
3786
|
-
return this.check(/* @__PURE__ */ wi(
|
|
3786
|
+
return this.check(/* @__PURE__ */ wi(ts, e));
|
|
3787
3787
|
},
|
|
3788
3788
|
datetime(e) {
|
|
3789
|
-
return this.check(/* @__PURE__ */ Ei(
|
|
3789
|
+
return this.check(/* @__PURE__ */ Ei(Po, e));
|
|
3790
3790
|
},
|
|
3791
3791
|
date(e) {
|
|
3792
|
-
return this.check(/* @__PURE__ */ Di(
|
|
3792
|
+
return this.check(/* @__PURE__ */ Di(Fo, e));
|
|
3793
3793
|
},
|
|
3794
3794
|
time(e) {
|
|
3795
|
-
return this.check(/* @__PURE__ */ Oi(
|
|
3795
|
+
return this.check(/* @__PURE__ */ Oi(Io, e));
|
|
3796
3796
|
},
|
|
3797
3797
|
duration(e) {
|
|
3798
|
-
return this.check(/* @__PURE__ */ ki(
|
|
3798
|
+
return this.check(/* @__PURE__ */ ki(Lo, e));
|
|
3799
3799
|
}
|
|
3800
3800
|
});
|
|
3801
|
-
function
|
|
3802
|
-
return /* @__PURE__ */ ri(
|
|
3803
|
-
}
|
|
3804
|
-
var
|
|
3805
|
-
T.init(e, t),
|
|
3806
|
-
}),
|
|
3807
|
-
Nn.init(e, t),
|
|
3808
|
-
}),
|
|
3809
|
-
Pn.init(e, t),
|
|
3810
|
-
}),
|
|
3811
|
-
Fn.init(e, t),
|
|
3812
|
-
}),
|
|
3813
|
-
In.init(e, t),
|
|
3814
|
-
}),
|
|
3815
|
-
yn.init(e, t),
|
|
3816
|
-
}),
|
|
3817
|
-
_n.init(e, t),
|
|
3818
|
-
}),
|
|
3819
|
-
vn.init(e, t),
|
|
3820
|
-
}),
|
|
3821
|
-
Tn.init(e, t),
|
|
3822
|
-
}),
|
|
3823
|
-
En.init(e, t),
|
|
3824
|
-
}),
|
|
3825
|
-
Dn.init(e, t),
|
|
3826
|
-
}),
|
|
3827
|
-
On.init(e, t),
|
|
3828
|
-
}),
|
|
3829
|
-
kn.init(e, t),
|
|
3830
|
-
}),
|
|
3831
|
-
An.init(e, t),
|
|
3832
|
-
}),
|
|
3833
|
-
jn.init(e, t),
|
|
3834
|
-
}),
|
|
3835
|
-
Mn.init(e, t),
|
|
3836
|
-
}),
|
|
3837
|
-
Ln.init(e, t),
|
|
3838
|
-
}),
|
|
3839
|
-
Bn.init(e, t),
|
|
3840
|
-
}),
|
|
3841
|
-
Vn.init(e, t),
|
|
3842
|
-
}),
|
|
3843
|
-
Un.init(e, t),
|
|
3844
|
-
}),
|
|
3845
|
-
Gn.init(e, t),
|
|
3846
|
-
}),
|
|
3847
|
-
qn.init(e, t),
|
|
3848
|
-
}),
|
|
3849
|
-
Jn.init(e, t),
|
|
3850
|
-
}),
|
|
3851
|
-
Xn.init(e, t),
|
|
3852
|
-
}),
|
|
3853
|
-
Zn.init(e, t),
|
|
3801
|
+
function j(e) {
|
|
3802
|
+
return /* @__PURE__ */ ri(No, e);
|
|
3803
|
+
}
|
|
3804
|
+
var M = /*@__PURE__*/ b("ZodStringFormat", (e, t) => {
|
|
3805
|
+
T.init(e, t), Mo.init(e, t);
|
|
3806
|
+
}), Po = /*@__PURE__*/ b("ZodISODateTime", (e, t) => {
|
|
3807
|
+
Nn.init(e, t), M.init(e, t);
|
|
3808
|
+
}), Fo = /*@__PURE__*/ b("ZodISODate", (e, t) => {
|
|
3809
|
+
Pn.init(e, t), M.init(e, t);
|
|
3810
|
+
}), Io = /*@__PURE__*/ b("ZodISOTime", (e, t) => {
|
|
3811
|
+
Fn.init(e, t), M.init(e, t);
|
|
3812
|
+
}), Lo = /*@__PURE__*/ b("ZodISODuration", (e, t) => {
|
|
3813
|
+
In.init(e, t), M.init(e, t);
|
|
3814
|
+
}), Ro = /*@__PURE__*/ b("ZodEmail", (e, t) => {
|
|
3815
|
+
yn.init(e, t), M.init(e, t);
|
|
3816
|
+
}), zo = /*@__PURE__*/ b("ZodGUID", (e, t) => {
|
|
3817
|
+
_n.init(e, t), M.init(e, t);
|
|
3818
|
+
}), Bo = /*@__PURE__*/ b("ZodUUID", (e, t) => {
|
|
3819
|
+
vn.init(e, t), M.init(e, t);
|
|
3820
|
+
}), Vo = /*@__PURE__*/ b("ZodURL", (e, t) => {
|
|
3821
|
+
Tn.init(e, t), M.init(e, t);
|
|
3822
|
+
}), Ho = /*@__PURE__*/ b("ZodEmoji", (e, t) => {
|
|
3823
|
+
En.init(e, t), M.init(e, t);
|
|
3824
|
+
}), Uo = /*@__PURE__*/ b("ZodNanoID", (e, t) => {
|
|
3825
|
+
Dn.init(e, t), M.init(e, t);
|
|
3826
|
+
}), Wo = /*@__PURE__*/ b("ZodCUID", (e, t) => {
|
|
3827
|
+
On.init(e, t), M.init(e, t);
|
|
3828
|
+
}), Go = /*@__PURE__*/ b("ZodCUID2", (e, t) => {
|
|
3829
|
+
kn.init(e, t), M.init(e, t);
|
|
3830
|
+
}), Ko = /*@__PURE__*/ b("ZodULID", (e, t) => {
|
|
3831
|
+
An.init(e, t), M.init(e, t);
|
|
3832
|
+
}), qo = /*@__PURE__*/ b("ZodXID", (e, t) => {
|
|
3833
|
+
jn.init(e, t), M.init(e, t);
|
|
3834
|
+
}), Jo = /*@__PURE__*/ b("ZodKSUID", (e, t) => {
|
|
3835
|
+
Mn.init(e, t), M.init(e, t);
|
|
3836
|
+
}), Yo = /*@__PURE__*/ b("ZodIPv4", (e, t) => {
|
|
3837
|
+
Ln.init(e, t), M.init(e, t);
|
|
3838
|
+
}), Xo = /*@__PURE__*/ b("ZodIPv6", (e, t) => {
|
|
3839
|
+
Bn.init(e, t), M.init(e, t);
|
|
3840
|
+
}), Zo = /*@__PURE__*/ b("ZodCIDRv4", (e, t) => {
|
|
3841
|
+
Vn.init(e, t), M.init(e, t);
|
|
3842
|
+
}), Qo = /*@__PURE__*/ b("ZodCIDRv6", (e, t) => {
|
|
3843
|
+
Un.init(e, t), M.init(e, t);
|
|
3844
|
+
}), $o = /*@__PURE__*/ b("ZodBase64", (e, t) => {
|
|
3845
|
+
Gn.init(e, t), M.init(e, t);
|
|
3846
|
+
}), es = /*@__PURE__*/ b("ZodBase64URL", (e, t) => {
|
|
3847
|
+
qn.init(e, t), M.init(e, t);
|
|
3848
|
+
}), ts = /*@__PURE__*/ b("ZodE164", (e, t) => {
|
|
3849
|
+
Jn.init(e, t), M.init(e, t);
|
|
3850
|
+
}), ns = /*@__PURE__*/ b("ZodJWT", (e, t) => {
|
|
3851
|
+
Xn.init(e, t), M.init(e, t);
|
|
3852
|
+
}), rs = /*@__PURE__*/ b("ZodNumber", (e, t) => {
|
|
3853
|
+
Zn.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3854
3854
|
let n = e._zod.bag;
|
|
3855
3855
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
3856
3856
|
}, {
|
|
@@ -3873,10 +3873,10 @@ var N = /*@__PURE__*/ b("ZodStringFormat", (e, t) => {
|
|
|
3873
3873
|
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3874
3874
|
},
|
|
3875
3875
|
int(e) {
|
|
3876
|
-
return this.check(
|
|
3876
|
+
return this.check(P(e));
|
|
3877
3877
|
},
|
|
3878
3878
|
safe(e) {
|
|
3879
|
-
return this.check(
|
|
3879
|
+
return this.check(P(e));
|
|
3880
3880
|
},
|
|
3881
3881
|
positive(e) {
|
|
3882
3882
|
return this.check(/* @__PURE__ */ Ri(0, e));
|
|
@@ -3900,41 +3900,41 @@ var N = /*@__PURE__*/ b("ZodStringFormat", (e, t) => {
|
|
|
3900
3900
|
return this;
|
|
3901
3901
|
}
|
|
3902
3902
|
});
|
|
3903
|
-
function
|
|
3904
|
-
return /* @__PURE__ */ Ai(
|
|
3903
|
+
function N(e) {
|
|
3904
|
+
return /* @__PURE__ */ Ai(rs, e);
|
|
3905
3905
|
}
|
|
3906
|
-
var
|
|
3907
|
-
Qn.init(e, t),
|
|
3906
|
+
var is = /*@__PURE__*/ b("ZodNumberFormat", (e, t) => {
|
|
3907
|
+
Qn.init(e, t), rs.init(e, t);
|
|
3908
3908
|
});
|
|
3909
|
-
function
|
|
3910
|
-
return /* @__PURE__ */ ji(
|
|
3909
|
+
function P(e) {
|
|
3910
|
+
return /* @__PURE__ */ ji(is, e);
|
|
3911
3911
|
}
|
|
3912
3912
|
var as = /*@__PURE__*/ b("ZodBoolean", (e, t) => {
|
|
3913
|
-
$n.init(e, t),
|
|
3913
|
+
$n.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
|
|
3914
3914
|
});
|
|
3915
3915
|
function F(e) {
|
|
3916
3916
|
return /* @__PURE__ */ Mi(as, e);
|
|
3917
3917
|
}
|
|
3918
3918
|
var os = /*@__PURE__*/ b("ZodNull", (e, t) => {
|
|
3919
|
-
er.init(e, t),
|
|
3919
|
+
er.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r);
|
|
3920
3920
|
});
|
|
3921
3921
|
function ss(e) {
|
|
3922
3922
|
return /* @__PURE__ */ Ni(os, e);
|
|
3923
3923
|
}
|
|
3924
3924
|
var cs = /*@__PURE__*/ b("ZodUnknown", (e, t) => {
|
|
3925
|
-
tr.init(e, t),
|
|
3925
|
+
tr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3926
3926
|
});
|
|
3927
3927
|
function ls() {
|
|
3928
3928
|
return /* @__PURE__ */ Pi(cs);
|
|
3929
3929
|
}
|
|
3930
3930
|
var us = /*@__PURE__*/ b("ZodNever", (e, t) => {
|
|
3931
|
-
nr.init(e, t),
|
|
3931
|
+
nr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oa(e, t, n, r);
|
|
3932
3932
|
});
|
|
3933
3933
|
function ds(e) {
|
|
3934
3934
|
return /* @__PURE__ */ Fi(us, e);
|
|
3935
3935
|
}
|
|
3936
3936
|
var fs = /*@__PURE__*/ b("ZodArray", (e, t) => {
|
|
3937
|
-
|
|
3937
|
+
jo(), ir.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.element = t.element;
|
|
3938
3938
|
}, {
|
|
3939
3939
|
min(e, t) {
|
|
3940
3940
|
return this.check(/* @__PURE__ */ Hi(e, t));
|
|
@@ -3953,10 +3953,10 @@ var fs = /*@__PURE__*/ b("ZodArray", (e, t) => {
|
|
|
3953
3953
|
}
|
|
3954
3954
|
});
|
|
3955
3955
|
function I(e, t) {
|
|
3956
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ na(fs, e, t);
|
|
3957
3957
|
}
|
|
3958
3958
|
var ps = /*@__PURE__*/ b("ZodObject", (e, t) => {
|
|
3959
|
-
|
|
3959
|
+
jo(), dr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), Me(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3960
3960
|
}, {
|
|
3961
3961
|
keyof() {
|
|
3962
3962
|
return V(Object.keys(this._zod.def.shape));
|
|
@@ -4032,7 +4032,7 @@ function R(e, t) {
|
|
|
4032
4032
|
});
|
|
4033
4033
|
}
|
|
4034
4034
|
var ms = /*@__PURE__*/ b("ZodUnion", (e, t) => {
|
|
4035
|
-
pr.init(e, t),
|
|
4035
|
+
pr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.options = t.options;
|
|
4036
4036
|
});
|
|
4037
4037
|
function z(e, t) {
|
|
4038
4038
|
return new ms({
|
|
@@ -4042,7 +4042,7 @@ function z(e, t) {
|
|
|
4042
4042
|
});
|
|
4043
4043
|
}
|
|
4044
4044
|
var hs = /*@__PURE__*/ b("ZodIntersection", (e, t) => {
|
|
4045
|
-
mr.init(e, t),
|
|
4045
|
+
mr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r);
|
|
4046
4046
|
});
|
|
4047
4047
|
function gs(e, t) {
|
|
4048
4048
|
return new hs({
|
|
@@ -4052,12 +4052,12 @@ function gs(e, t) {
|
|
|
4052
4052
|
});
|
|
4053
4053
|
}
|
|
4054
4054
|
var _s = /*@__PURE__*/ b("ZodRecord", (e, t) => {
|
|
4055
|
-
|
|
4055
|
+
jo(), _r.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4056
4056
|
});
|
|
4057
4057
|
function B(e, t, n) {
|
|
4058
4058
|
return !t || !t._zod ? new _s({
|
|
4059
4059
|
type: "record",
|
|
4060
|
-
keyType:
|
|
4060
|
+
keyType: j(),
|
|
4061
4061
|
valueType: e,
|
|
4062
4062
|
...g(t)
|
|
4063
4063
|
}) : new _s({
|
|
@@ -4068,7 +4068,7 @@ function B(e, t, n) {
|
|
|
4068
4068
|
});
|
|
4069
4069
|
}
|
|
4070
4070
|
var vs = /*@__PURE__*/ b("ZodEnum", (e, t) => {
|
|
4071
|
-
vr.init(e, t),
|
|
4071
|
+
vr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4072
4072
|
let n = new Set(Object.keys(t.entries));
|
|
4073
4073
|
e.extract = (e, r) => {
|
|
4074
4074
|
let i = {};
|
|
@@ -4100,7 +4100,7 @@ function V(e, t) {
|
|
|
4100
4100
|
});
|
|
4101
4101
|
}
|
|
4102
4102
|
var ys = /*@__PURE__*/ b("ZodLiteral", (e, t) => {
|
|
4103
|
-
yr.init(e, t),
|
|
4103
|
+
yr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4104
4104
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4105
4105
|
return t.values[0];
|
|
4106
4106
|
} });
|
|
@@ -4113,7 +4113,7 @@ function H(e, t) {
|
|
|
4113
4113
|
});
|
|
4114
4114
|
}
|
|
4115
4115
|
var bs = /*@__PURE__*/ b("ZodTransform", (e, t) => {
|
|
4116
|
-
|
|
4116
|
+
jo(), br.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4117
4117
|
if (r.direction === "backward") throw new Be(e.constructor.name);
|
|
4118
4118
|
n.addIssue = (r) => {
|
|
4119
4119
|
if (typeof r == "string") n.issues.push(Ce(r, n.value, t));
|
|
@@ -4133,7 +4133,7 @@ function xs(e) {
|
|
|
4133
4133
|
});
|
|
4134
4134
|
}
|
|
4135
4135
|
var Ss = /*@__PURE__*/ b("ZodOptional", (e, t) => {
|
|
4136
|
-
Sr.init(e, t),
|
|
4136
|
+
Sr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => lo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4137
4137
|
});
|
|
4138
4138
|
function Cs(e) {
|
|
4139
4139
|
return new Ss({
|
|
@@ -4142,7 +4142,7 @@ function Cs(e) {
|
|
|
4142
4142
|
});
|
|
4143
4143
|
}
|
|
4144
4144
|
var ws = /*@__PURE__*/ b("ZodExactOptional", (e, t) => {
|
|
4145
|
-
Cr.init(e, t),
|
|
4145
|
+
Cr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => lo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4146
4146
|
});
|
|
4147
4147
|
function Ts(e) {
|
|
4148
4148
|
return new ws({
|
|
@@ -4151,7 +4151,7 @@ function Ts(e) {
|
|
|
4151
4151
|
});
|
|
4152
4152
|
}
|
|
4153
4153
|
var Es = /*@__PURE__*/ b("ZodNullable", (e, t) => {
|
|
4154
|
-
wr.init(e, t),
|
|
4154
|
+
wr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => $a(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4155
4155
|
});
|
|
4156
4156
|
function Ds(e) {
|
|
4157
4157
|
return new Es({
|
|
@@ -4160,7 +4160,7 @@ function Ds(e) {
|
|
|
4160
4160
|
});
|
|
4161
4161
|
}
|
|
4162
4162
|
var Os = /*@__PURE__*/ b("ZodDefault", (e, t) => {
|
|
4163
|
-
Tr.init(e, t),
|
|
4163
|
+
Tr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4164
4164
|
});
|
|
4165
4165
|
function ks(e, t) {
|
|
4166
4166
|
return new Os({
|
|
@@ -4172,7 +4172,7 @@ function ks(e, t) {
|
|
|
4172
4172
|
});
|
|
4173
4173
|
}
|
|
4174
4174
|
var As = /*@__PURE__*/ b("ZodPrefault", (e, t) => {
|
|
4175
|
-
Dr.init(e, t),
|
|
4175
|
+
Dr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4176
4176
|
});
|
|
4177
4177
|
function js(e, t) {
|
|
4178
4178
|
return new As({
|
|
@@ -4184,7 +4184,7 @@ function js(e, t) {
|
|
|
4184
4184
|
});
|
|
4185
4185
|
}
|
|
4186
4186
|
var Ms = /*@__PURE__*/ b("ZodNonOptional", (e, t) => {
|
|
4187
|
-
Or.init(e, t),
|
|
4187
|
+
Or.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4188
4188
|
});
|
|
4189
4189
|
function Ns(e, t) {
|
|
4190
4190
|
return new Ms({
|
|
@@ -4194,7 +4194,7 @@ function Ns(e, t) {
|
|
|
4194
4194
|
});
|
|
4195
4195
|
}
|
|
4196
4196
|
var Ps = /*@__PURE__*/ b("ZodCatch", (e, t) => {
|
|
4197
|
-
jr.init(e, t),
|
|
4197
|
+
jr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4198
4198
|
});
|
|
4199
4199
|
function Fs(e, t) {
|
|
4200
4200
|
return new Ps({
|
|
@@ -4204,7 +4204,7 @@ function Fs(e, t) {
|
|
|
4204
4204
|
});
|
|
4205
4205
|
}
|
|
4206
4206
|
var Is = /*@__PURE__*/ b("ZodPipe", (e, t) => {
|
|
4207
|
-
Mr.init(e, t),
|
|
4207
|
+
Mr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4208
4208
|
});
|
|
4209
4209
|
function Ls(e, t) {
|
|
4210
4210
|
return new Is({
|
|
@@ -4214,7 +4214,7 @@ function Ls(e, t) {
|
|
|
4214
4214
|
});
|
|
4215
4215
|
}
|
|
4216
4216
|
var Rs = /*@__PURE__*/ b("ZodReadonly", (e, t) => {
|
|
4217
|
-
Pr.init(e, t),
|
|
4217
|
+
Pr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4218
4218
|
});
|
|
4219
4219
|
function zs(e) {
|
|
4220
4220
|
return new Rs({
|
|
@@ -4223,7 +4223,7 @@ function zs(e) {
|
|
|
4223
4223
|
});
|
|
4224
4224
|
}
|
|
4225
4225
|
var Bs = /*@__PURE__*/ b("ZodLazy", (e, t) => {
|
|
4226
|
-
Ir.init(e, t),
|
|
4226
|
+
Ir.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4227
4227
|
});
|
|
4228
4228
|
function Vs(e) {
|
|
4229
4229
|
return new Bs({
|
|
@@ -4232,35 +4232,46 @@ function Vs(e) {
|
|
|
4232
4232
|
});
|
|
4233
4233
|
}
|
|
4234
4234
|
var Hs = /*@__PURE__*/ b("ZodCustom", (e, t) => {
|
|
4235
|
-
Lr.init(e, t),
|
|
4235
|
+
Lr.init(e, t), A.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r);
|
|
4236
4236
|
});
|
|
4237
4237
|
function Us(e, t = {}) {
|
|
4238
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ ra(Hs, e, t);
|
|
4239
4239
|
}
|
|
4240
4240
|
function Ws(e, t) {
|
|
4241
|
-
return /* @__PURE__ */
|
|
4241
|
+
return /* @__PURE__ */ ia(e, t);
|
|
4242
4242
|
}
|
|
4243
4243
|
function Gs(e) {
|
|
4244
4244
|
let t = Vs(() => z([
|
|
4245
|
-
|
|
4246
|
-
|
|
4245
|
+
j(e),
|
|
4246
|
+
N(),
|
|
4247
4247
|
F(),
|
|
4248
4248
|
ss(),
|
|
4249
4249
|
I(t),
|
|
4250
|
-
B(
|
|
4250
|
+
B(j(), t)
|
|
4251
4251
|
]));
|
|
4252
4252
|
return t;
|
|
4253
4253
|
}
|
|
4254
|
-
|
|
4254
|
+
//#endregion
|
|
4255
|
+
//#region src/execution/common/wait.ts
|
|
4256
|
+
var Ks = j().trim().refine((e) => [...e].length <= 2e3, "Wait comment must contain at most 2,000 Unicode code points.").nullable().optional();
|
|
4257
|
+
//#endregion
|
|
4258
|
+
//#region src/flow/common/inputValue.ts
|
|
4259
|
+
function qs(e) {
|
|
4260
|
+
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, {
|
|
4261
|
+
kind: "value",
|
|
4262
|
+
value: t
|
|
4263
|
+
}]));
|
|
4264
|
+
}
|
|
4265
|
+
function Js(e, t = 0) {
|
|
4255
4266
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4256
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4267
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) Js(n, t + 1);
|
|
4257
4268
|
}
|
|
4258
4269
|
//#endregion
|
|
4259
4270
|
//#region src/flow/common/triggerScheduleSchema.ts
|
|
4260
|
-
var
|
|
4271
|
+
var Ys = I(z([L({
|
|
4261
4272
|
type: H("cron"),
|
|
4262
|
-
expression:
|
|
4263
|
-
timezone:
|
|
4273
|
+
expression: j(),
|
|
4274
|
+
timezone: j()
|
|
4264
4275
|
}), L({
|
|
4265
4276
|
type: H("every"),
|
|
4266
4277
|
unit: V([
|
|
@@ -4270,59 +4281,68 @@ var qs = I(z([L({
|
|
|
4270
4281
|
"month",
|
|
4271
4282
|
"week"
|
|
4272
4283
|
]),
|
|
4273
|
-
value:
|
|
4274
|
-
})])), U =
|
|
4284
|
+
value: N()
|
|
4285
|
+
})])), U = j(), W = Gs(), Xs = I(U), Zs = L({
|
|
4275
4286
|
description: U.optional(),
|
|
4276
4287
|
jsonSchema: W,
|
|
4277
4288
|
nullable: F(),
|
|
4278
4289
|
handle: U
|
|
4279
|
-
}), G =
|
|
4290
|
+
}), G = Zs.extend({ value: W.optional() }), Qs = L({
|
|
4280
4291
|
collapsed: F().optional(),
|
|
4281
4292
|
group: U
|
|
4282
|
-
}),
|
|
4293
|
+
}), $s = L({
|
|
4283
4294
|
kind: H("node"),
|
|
4284
4295
|
nodeId: U,
|
|
4285
|
-
output: U
|
|
4286
|
-
|
|
4296
|
+
output: U,
|
|
4297
|
+
field: U.optional()
|
|
4298
|
+
}), ec = L({
|
|
4287
4299
|
kind: H("flow"),
|
|
4288
4300
|
input: U
|
|
4289
|
-
}),
|
|
4290
|
-
|
|
4291
|
-
|
|
4301
|
+
}), tc = z([
|
|
4302
|
+
$s,
|
|
4303
|
+
ec,
|
|
4292
4304
|
L({
|
|
4293
4305
|
kind: H("binding"),
|
|
4294
4306
|
bindingId: U
|
|
4295
4307
|
})
|
|
4296
|
-
]),
|
|
4308
|
+
]), nc = z([L({ kind: H("unset") }), L({
|
|
4297
4309
|
kind: H("value"),
|
|
4298
4310
|
value: W
|
|
4299
|
-
}), L({
|
|
4311
|
+
})]), rc = z([nc, L({
|
|
4300
4312
|
kind: H("sources"),
|
|
4301
|
-
sources: I(
|
|
4302
|
-
})]),
|
|
4303
|
-
inputs: I(z([G,
|
|
4304
|
-
outputs: I(z([
|
|
4305
|
-
},
|
|
4313
|
+
sources: I(tc)
|
|
4314
|
+
})]), ic = B(U, rc), ac = {
|
|
4315
|
+
inputs: I(z([G, Qs])),
|
|
4316
|
+
outputs: I(z([Zs, Qs]))
|
|
4317
|
+
}, oc = z([R({
|
|
4306
4318
|
kind: H("connector"),
|
|
4307
4319
|
action: U,
|
|
4308
4320
|
connectionId: U.optional(),
|
|
4309
|
-
connections: I(
|
|
4321
|
+
connections: I(R({
|
|
4310
4322
|
connectionId: U,
|
|
4311
4323
|
alias: U.optional()
|
|
4312
4324
|
}))
|
|
4313
|
-
}),
|
|
4314
|
-
|
|
4325
|
+
}), R({
|
|
4326
|
+
kind: H("connector"),
|
|
4327
|
+
actionHints: I(U).optional(),
|
|
4328
|
+
connectionHints: I(R({
|
|
4329
|
+
action: U,
|
|
4330
|
+
connectionId: U,
|
|
4331
|
+
alias: U.optional()
|
|
4332
|
+
})).optional()
|
|
4333
|
+
})]), sc = L({
|
|
4334
|
+
...ac,
|
|
4315
4335
|
name: U,
|
|
4316
4336
|
moduleId: U,
|
|
4317
|
-
capabilities: I(
|
|
4318
|
-
}),
|
|
4337
|
+
capabilities: I(oc).optional()
|
|
4338
|
+
}), cc = z([L({
|
|
4319
4339
|
kind: H("value"),
|
|
4320
4340
|
value: W
|
|
4321
4341
|
}), L({
|
|
4322
4342
|
kind: H("input"),
|
|
4323
4343
|
input: U
|
|
4324
|
-
})]),
|
|
4325
|
-
...
|
|
4344
|
+
})]), lc = z([cc, L({ kind: H("model") })]), uc = L({
|
|
4345
|
+
...ac,
|
|
4326
4346
|
name: U,
|
|
4327
4347
|
executor: z([
|
|
4328
4348
|
L({
|
|
@@ -4338,9 +4358,9 @@ var qs = I(z([L({
|
|
|
4338
4358
|
kind: H("agent"),
|
|
4339
4359
|
code: F().optional(),
|
|
4340
4360
|
model: U,
|
|
4341
|
-
prompt:
|
|
4361
|
+
prompt: cc,
|
|
4342
4362
|
system: U,
|
|
4343
|
-
maxRounds:
|
|
4363
|
+
maxRounds: N(),
|
|
4344
4364
|
tools: I(L({
|
|
4345
4365
|
id: U,
|
|
4346
4366
|
name: U,
|
|
@@ -4348,22 +4368,29 @@ var qs = I(z([L({
|
|
|
4348
4368
|
action: U,
|
|
4349
4369
|
connectionId: U.optional(),
|
|
4350
4370
|
approval: F(),
|
|
4351
|
-
inputs: I(G.extend({ source:
|
|
4371
|
+
inputs: I(G.extend({ source: lc }))
|
|
4352
4372
|
})),
|
|
4353
4373
|
notification: L({
|
|
4354
4374
|
taskId: U,
|
|
4355
4375
|
messageHandle: U,
|
|
4356
|
-
inputs: B(U,
|
|
4376
|
+
inputs: B(U, cc)
|
|
4357
4377
|
}).optional()
|
|
4358
4378
|
})
|
|
4359
4379
|
])
|
|
4360
|
-
}),
|
|
4361
|
-
|
|
4380
|
+
}), dc = z([L({
|
|
4381
|
+
kind: H("value"),
|
|
4382
|
+
value: W.optional(),
|
|
4383
|
+
jsonSchema: W.optional()
|
|
4384
|
+
}), L({
|
|
4385
|
+
kind: H("source"),
|
|
4386
|
+
source: tc
|
|
4387
|
+
})]), fc = {
|
|
4388
|
+
matchMode: V(["first", "all"]),
|
|
4362
4389
|
cases: I(L({
|
|
4390
|
+
description: U.optional(),
|
|
4363
4391
|
output: U,
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
input: U,
|
|
4392
|
+
groups: I(L({ expressions: I(L({
|
|
4393
|
+
left: dc,
|
|
4367
4394
|
operator: V([
|
|
4368
4395
|
"!=",
|
|
4369
4396
|
"<",
|
|
@@ -4386,30 +4413,32 @@ var qs = I(z([L({
|
|
|
4386
4413
|
"notHasValue",
|
|
4387
4414
|
"startsWith"
|
|
4388
4415
|
]),
|
|
4389
|
-
|
|
4390
|
-
}))
|
|
4391
|
-
}))
|
|
4392
|
-
|
|
4393
|
-
|
|
4416
|
+
right: dc.optional()
|
|
4417
|
+
})) }))
|
|
4418
|
+
}))
|
|
4419
|
+
}, pc = {
|
|
4420
|
+
inputDefinitions: I(G),
|
|
4421
|
+
prompt: U
|
|
4422
|
+
}, mc = {
|
|
4394
4423
|
bodyFields: I(G),
|
|
4395
4424
|
options: L({
|
|
4396
|
-
allowedMethods:
|
|
4397
|
-
allowedOrigins:
|
|
4425
|
+
allowedMethods: Xs.optional(),
|
|
4426
|
+
allowedOrigins: Xs.optional(),
|
|
4398
4427
|
noResponseBody: F().optional(),
|
|
4399
4428
|
responseData: U.optional(),
|
|
4400
4429
|
responseHeaders: B(U, U).optional(),
|
|
4401
|
-
responseStatusCode:
|
|
4430
|
+
responseStatusCode: N().optional()
|
|
4402
4431
|
}).optional()
|
|
4403
|
-
},
|
|
4404
|
-
|
|
4432
|
+
}, hc = {
|
|
4433
|
+
configInputs: ac.inputs,
|
|
4405
4434
|
definitionVersion: H(2),
|
|
4406
4435
|
description: U,
|
|
4407
4436
|
displayName: U,
|
|
4408
4437
|
key: U,
|
|
4409
4438
|
name: U,
|
|
4410
|
-
outputs: I(
|
|
4439
|
+
outputs: I(Zs).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
|
|
4411
4440
|
provider: U
|
|
4412
|
-
},
|
|
4441
|
+
}, gc = L({
|
|
4413
4442
|
body: L({
|
|
4414
4443
|
allowArray: F(),
|
|
4415
4444
|
allowEmpty: F(),
|
|
@@ -4428,23 +4457,24 @@ var qs = I(z([L({
|
|
|
4428
4457
|
"POST",
|
|
4429
4458
|
"PUT"
|
|
4430
4459
|
])),
|
|
4431
|
-
successStatus:
|
|
4432
|
-
}),
|
|
4460
|
+
successStatus: N()
|
|
4461
|
+
}), _c = {
|
|
4433
4462
|
name: U,
|
|
4434
4463
|
description: U.optional(),
|
|
4435
4464
|
icon: U.optional()
|
|
4436
4465
|
}, K = {
|
|
4437
|
-
maxExecutions:
|
|
4438
|
-
inputs:
|
|
4466
|
+
maxExecutions: N().int().positive().max(2 ** 53 - 1).optional(),
|
|
4467
|
+
inputs: ic,
|
|
4439
4468
|
name: U.optional(),
|
|
4440
4469
|
description: U.optional(),
|
|
4441
4470
|
icon: U.optional(),
|
|
4442
|
-
timeoutMs:
|
|
4443
|
-
},
|
|
4471
|
+
timeoutMs: N().optional()
|
|
4472
|
+
}, vc = z([
|
|
4444
4473
|
L({
|
|
4445
4474
|
...K,
|
|
4475
|
+
inputs: B(U, ds()),
|
|
4446
4476
|
kind: H("condition"),
|
|
4447
|
-
...
|
|
4477
|
+
...fc
|
|
4448
4478
|
}),
|
|
4449
4479
|
L({
|
|
4450
4480
|
...K,
|
|
@@ -4460,7 +4490,7 @@ var qs = I(z([L({
|
|
|
4460
4490
|
L({
|
|
4461
4491
|
...K,
|
|
4462
4492
|
kind: H("task"),
|
|
4463
|
-
task:
|
|
4493
|
+
task: sc,
|
|
4464
4494
|
additionalInputs: I(G).optional()
|
|
4465
4495
|
}),
|
|
4466
4496
|
L({
|
|
@@ -4472,93 +4502,91 @@ var qs = I(z([L({
|
|
|
4472
4502
|
R({
|
|
4473
4503
|
...K,
|
|
4474
4504
|
kind: H("approval"),
|
|
4475
|
-
|
|
4476
|
-
...lc
|
|
4505
|
+
...pc
|
|
4477
4506
|
}).omit({ timeoutMs: !0 }),
|
|
4478
4507
|
R({
|
|
4479
4508
|
...K,
|
|
4480
4509
|
kind: H("wait"),
|
|
4481
|
-
|
|
4482
|
-
...lc
|
|
4510
|
+
...pc
|
|
4483
4511
|
}).omit({ timeoutMs: !0 }),
|
|
4484
4512
|
L({
|
|
4485
|
-
...
|
|
4513
|
+
..._c,
|
|
4486
4514
|
kind: H("manual")
|
|
4487
4515
|
}),
|
|
4488
4516
|
L({
|
|
4489
|
-
...
|
|
4517
|
+
..._c,
|
|
4490
4518
|
kind: H("webhook"),
|
|
4491
|
-
...
|
|
4519
|
+
...mc
|
|
4492
4520
|
}),
|
|
4493
4521
|
L({
|
|
4494
|
-
...
|
|
4522
|
+
..._c,
|
|
4495
4523
|
kind: H("cron"),
|
|
4496
|
-
cronTimes:
|
|
4524
|
+
cronTimes: Ys
|
|
4497
4525
|
}),
|
|
4498
4526
|
L({
|
|
4499
|
-
...
|
|
4527
|
+
..._c,
|
|
4500
4528
|
kind: H("poll"),
|
|
4501
4529
|
bindingId: U,
|
|
4502
|
-
config: B(U,
|
|
4530
|
+
config: B(U, nc),
|
|
4503
4531
|
definition: L({
|
|
4504
|
-
...
|
|
4532
|
+
...hc,
|
|
4505
4533
|
type: H("poll")
|
|
4506
4534
|
}),
|
|
4507
|
-
pollTimes:
|
|
4535
|
+
pollTimes: Ys
|
|
4508
4536
|
}),
|
|
4509
4537
|
L({
|
|
4510
|
-
...
|
|
4538
|
+
..._c,
|
|
4511
4539
|
kind: H("integration"),
|
|
4512
4540
|
bindingId: U,
|
|
4513
|
-
config: B(U,
|
|
4541
|
+
config: B(U, nc),
|
|
4514
4542
|
definition: L({
|
|
4515
|
-
...
|
|
4543
|
+
...hc,
|
|
4516
4544
|
type: H("integration"),
|
|
4517
|
-
endpoint:
|
|
4545
|
+
endpoint: gc
|
|
4518
4546
|
})
|
|
4519
4547
|
})
|
|
4520
|
-
]),
|
|
4548
|
+
]), yc = z([L({ kind: H("flow") }), L({
|
|
4521
4549
|
kind: H("subflow"),
|
|
4522
4550
|
id: U
|
|
4523
|
-
})]),
|
|
4551
|
+
})]), bc = L({
|
|
4524
4552
|
source: U,
|
|
4525
4553
|
target: U,
|
|
4526
4554
|
sourceHandle: U.optional()
|
|
4527
4555
|
}), q = {
|
|
4528
4556
|
nodeId: U,
|
|
4529
|
-
target:
|
|
4530
|
-
},
|
|
4557
|
+
target: yc
|
|
4558
|
+
}, xc = L({
|
|
4531
4559
|
name: U,
|
|
4532
4560
|
inputs: I(G),
|
|
4533
|
-
outputs: I(
|
|
4534
|
-
}),
|
|
4535
|
-
nodes: B(U,
|
|
4536
|
-
edges: I(
|
|
4537
|
-
}),
|
|
4561
|
+
outputs: I(Zs.extend({ sources: I(z([$s, ec])) }))
|
|
4562
|
+
}), Sc = L({
|
|
4563
|
+
nodes: B(U, vc),
|
|
4564
|
+
edges: I(bc).default([])
|
|
4565
|
+
}), Cc = L({
|
|
4538
4566
|
kind: V(["connection", "variable"]),
|
|
4539
4567
|
target: U
|
|
4540
|
-
}),
|
|
4568
|
+
}), wc = L({
|
|
4541
4569
|
name: U,
|
|
4542
|
-
imports:
|
|
4570
|
+
imports: Xs,
|
|
4543
4571
|
source: U
|
|
4544
|
-
}),
|
|
4545
|
-
bindings: B(U,
|
|
4546
|
-
graph:
|
|
4547
|
-
subflows: B(U,
|
|
4548
|
-
tasks: B(U,
|
|
4549
|
-
}), Sc = L({
|
|
4550
|
-
modelVersion: z([H(2), H(3)]),
|
|
4551
|
-
document: xc,
|
|
4552
|
-
modules: B(U, bc)
|
|
4572
|
+
}), Tc = L({
|
|
4573
|
+
bindings: B(U, Cc),
|
|
4574
|
+
graph: Sc,
|
|
4575
|
+
subflows: B(U, xc.extend({ graph: Sc })),
|
|
4576
|
+
tasks: B(U, uc)
|
|
4553
4577
|
});
|
|
4554
|
-
|
|
4578
|
+
L({
|
|
4579
|
+
modelVersion: z([H(2), H(3)]),
|
|
4580
|
+
document: Tc,
|
|
4581
|
+
modules: B(U, wc)
|
|
4582
|
+
}).extend({
|
|
4555
4583
|
kind: H("open-flow-flow-revision"),
|
|
4556
4584
|
version: H(1)
|
|
4557
4585
|
});
|
|
4558
|
-
var
|
|
4586
|
+
var Ec = {
|
|
4559
4587
|
"binding.create": {
|
|
4560
4588
|
bindingId: U,
|
|
4561
|
-
binding:
|
|
4589
|
+
binding: Cc
|
|
4562
4590
|
},
|
|
4563
4591
|
"binding.delete": { bindingId: U },
|
|
4564
4592
|
"binding.target.set": {
|
|
@@ -4567,16 +4595,16 @@ var Cc = {
|
|
|
4567
4595
|
value: U
|
|
4568
4596
|
},
|
|
4569
4597
|
"graph.edge.connect": {
|
|
4570
|
-
target:
|
|
4571
|
-
edge:
|
|
4598
|
+
target: yc,
|
|
4599
|
+
edge: bc
|
|
4572
4600
|
},
|
|
4573
4601
|
"graph.edge.disconnect": {
|
|
4574
|
-
target:
|
|
4575
|
-
edge:
|
|
4602
|
+
target: yc,
|
|
4603
|
+
edge: bc
|
|
4576
4604
|
},
|
|
4577
4605
|
"graph.node.create": {
|
|
4578
4606
|
...q,
|
|
4579
|
-
node:
|
|
4607
|
+
node: vc
|
|
4580
4608
|
},
|
|
4581
4609
|
"graph.node.delete": q,
|
|
4582
4610
|
"graph.node.field.set": z([
|
|
@@ -4595,22 +4623,22 @@ var Cc = {
|
|
|
4595
4623
|
...q,
|
|
4596
4624
|
kind: H("graph.node.field.set"),
|
|
4597
4625
|
field: H("maxExecutions"),
|
|
4598
|
-
before:
|
|
4599
|
-
value:
|
|
4626
|
+
before: N().int().positive().max(2 ** 53 - 1).optional(),
|
|
4627
|
+
value: N().int().positive().max(2 ** 53 - 1).optional()
|
|
4600
4628
|
}),
|
|
4601
4629
|
L({
|
|
4602
4630
|
...q,
|
|
4603
4631
|
kind: H("graph.node.field.set"),
|
|
4604
4632
|
field: H("timeoutMs"),
|
|
4605
|
-
before:
|
|
4606
|
-
value:
|
|
4633
|
+
before: N().optional(),
|
|
4634
|
+
value: N().optional()
|
|
4607
4635
|
})
|
|
4608
4636
|
]),
|
|
4609
4637
|
"graph.node.input.set": {
|
|
4610
4638
|
...q,
|
|
4611
4639
|
handle: U,
|
|
4612
|
-
before:
|
|
4613
|
-
value:
|
|
4640
|
+
before: rc.optional(),
|
|
4641
|
+
value: rc.optional()
|
|
4614
4642
|
},
|
|
4615
4643
|
"graph.node.additional-inputs.set": {
|
|
4616
4644
|
...q,
|
|
@@ -4619,8 +4647,8 @@ var Cc = {
|
|
|
4619
4647
|
},
|
|
4620
4648
|
"graph.node.condition.set": {
|
|
4621
4649
|
...q,
|
|
4622
|
-
before: L(
|
|
4623
|
-
value: L(
|
|
4650
|
+
before: L(fc),
|
|
4651
|
+
value: L(fc)
|
|
4624
4652
|
},
|
|
4625
4653
|
"graph.node.values.set": {
|
|
4626
4654
|
...q,
|
|
@@ -4630,19 +4658,19 @@ var Cc = {
|
|
|
4630
4658
|
"graph.node.resolution.set": {
|
|
4631
4659
|
...q,
|
|
4632
4660
|
target: L({ kind: H("flow") }),
|
|
4633
|
-
before: L(
|
|
4634
|
-
value: L(
|
|
4661
|
+
before: L(pc),
|
|
4662
|
+
value: L(pc)
|
|
4635
4663
|
},
|
|
4636
4664
|
"graph.node.webhook.set": {
|
|
4637
4665
|
...q,
|
|
4638
4666
|
target: L({ kind: H("flow") }),
|
|
4639
|
-
before: L(
|
|
4640
|
-
value: L(
|
|
4667
|
+
before: L(mc),
|
|
4668
|
+
value: L(mc)
|
|
4641
4669
|
},
|
|
4642
4670
|
"graph.node.task.ports.set": {
|
|
4643
4671
|
...q,
|
|
4644
|
-
before: L(
|
|
4645
|
-
value: L(
|
|
4672
|
+
before: L(ac),
|
|
4673
|
+
value: L(ac)
|
|
4646
4674
|
},
|
|
4647
4675
|
"graph.node.task.name.set": {
|
|
4648
4676
|
...q,
|
|
@@ -4651,23 +4679,23 @@ var Cc = {
|
|
|
4651
4679
|
},
|
|
4652
4680
|
"graph.node.task.capabilities.set": {
|
|
4653
4681
|
...q,
|
|
4654
|
-
before: I(
|
|
4655
|
-
value: I(
|
|
4682
|
+
before: I(oc).optional(),
|
|
4683
|
+
value: I(oc).optional()
|
|
4656
4684
|
},
|
|
4657
4685
|
"graph.trigger.config.set": {
|
|
4658
4686
|
nodeId: U,
|
|
4659
4687
|
name: U,
|
|
4660
|
-
before:
|
|
4661
|
-
value:
|
|
4688
|
+
before: nc.optional(),
|
|
4689
|
+
value: nc.optional()
|
|
4662
4690
|
},
|
|
4663
4691
|
"graph.trigger.schedule.set": {
|
|
4664
4692
|
nodeId: U,
|
|
4665
|
-
before:
|
|
4666
|
-
value:
|
|
4693
|
+
before: Ys,
|
|
4694
|
+
value: Ys
|
|
4667
4695
|
},
|
|
4668
4696
|
"module.create": {
|
|
4669
4697
|
moduleId: U,
|
|
4670
|
-
module:
|
|
4698
|
+
module: wc
|
|
4671
4699
|
},
|
|
4672
4700
|
"module.delete": { moduleId: U },
|
|
4673
4701
|
"module.rename": {
|
|
@@ -4677,24 +4705,24 @@ var Cc = {
|
|
|
4677
4705
|
},
|
|
4678
4706
|
"module.source.replace": {
|
|
4679
4707
|
moduleId: U,
|
|
4680
|
-
beforeImports:
|
|
4708
|
+
beforeImports: Xs,
|
|
4681
4709
|
beforeSource: U,
|
|
4682
|
-
imports:
|
|
4710
|
+
imports: Xs,
|
|
4683
4711
|
source: U
|
|
4684
4712
|
},
|
|
4685
4713
|
"subflow.create": {
|
|
4686
4714
|
subflowId: U,
|
|
4687
|
-
subflow:
|
|
4715
|
+
subflow: xc.extend({ graph: Sc })
|
|
4688
4716
|
},
|
|
4689
4717
|
"subflow.definition.set": {
|
|
4690
4718
|
subflowId: U,
|
|
4691
|
-
before:
|
|
4692
|
-
definition:
|
|
4719
|
+
before: xc,
|
|
4720
|
+
definition: xc
|
|
4693
4721
|
},
|
|
4694
4722
|
"subflow.delete": { subflowId: U },
|
|
4695
4723
|
"task.create": {
|
|
4696
4724
|
taskId: U,
|
|
4697
|
-
task:
|
|
4725
|
+
task: uc
|
|
4698
4726
|
},
|
|
4699
4727
|
"task.delete": { taskId: U },
|
|
4700
4728
|
"task.connector.connection.set": {
|
|
@@ -4704,8 +4732,8 @@ var Cc = {
|
|
|
4704
4732
|
},
|
|
4705
4733
|
"task.agent.set": {
|
|
4706
4734
|
taskId: U,
|
|
4707
|
-
before:
|
|
4708
|
-
value:
|
|
4735
|
+
before: uc,
|
|
4736
|
+
value: uc
|
|
4709
4737
|
},
|
|
4710
4738
|
"task.llm.mode.set": {
|
|
4711
4739
|
taskId: U,
|
|
@@ -4717,28 +4745,28 @@ var Cc = {
|
|
|
4717
4745
|
before: U,
|
|
4718
4746
|
value: U
|
|
4719
4747
|
}
|
|
4720
|
-
},
|
|
4748
|
+
}, Dc = new Map(Object.entries(Ec).map(([e, t]) => [e, t instanceof A ? t : L({
|
|
4721
4749
|
kind: H(e),
|
|
4722
4750
|
...t
|
|
4723
|
-
})])),
|
|
4724
|
-
function
|
|
4751
|
+
})])), Oc = I(z([...Dc.values()])).min(1);
|
|
4752
|
+
function kc(e, t, n) {
|
|
4725
4753
|
try {
|
|
4726
4754
|
return n(e);
|
|
4727
4755
|
} catch (e) {
|
|
4728
|
-
throw e instanceof
|
|
4756
|
+
throw e instanceof _o ? TypeError(`operations[${t}]: ${e.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`, { cause: e }) : e;
|
|
4729
4757
|
}
|
|
4730
4758
|
}
|
|
4731
|
-
function
|
|
4732
|
-
let { kind: n } =
|
|
4759
|
+
function Ac(e, t) {
|
|
4760
|
+
let { kind: n } = kc(e, t, L({ kind: U }).parse), r = Dc.get(n);
|
|
4733
4761
|
if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
|
|
4734
|
-
return
|
|
4762
|
+
return kc(e, t, r.parse);
|
|
4735
4763
|
}
|
|
4736
|
-
function
|
|
4737
|
-
let t = e == null ?
|
|
4764
|
+
function jc(e) {
|
|
4765
|
+
let t = e == null ? Oc : Dc.get(e);
|
|
4738
4766
|
if (t == null) throw TypeError(`Unknown operation ${JSON.stringify(e)}.`);
|
|
4739
|
-
return
|
|
4767
|
+
return po(t, { io: "input" });
|
|
4740
4768
|
}
|
|
4741
|
-
function
|
|
4769
|
+
function Mc(e) {
|
|
4742
4770
|
let t = e.trim();
|
|
4743
4771
|
if (t.length == 0) return "empty";
|
|
4744
4772
|
if (t.length > 80) return "tooLong";
|
|
@@ -4750,13 +4778,13 @@ function kc(e) {
|
|
|
4750
4778
|
}
|
|
4751
4779
|
//#endregion
|
|
4752
4780
|
//#region src/flow/common/nodeChanges.ts
|
|
4753
|
-
var
|
|
4754
|
-
function
|
|
4781
|
+
var Nc = "export default async function (inputs, context) {\n return { result: inputs.value }\n}\n";
|
|
4782
|
+
function Pc(e, t, n, r = void 0, i = {
|
|
4755
4783
|
inputs: [{
|
|
4756
4784
|
handle: "value",
|
|
4757
|
-
jsonSchema: {},
|
|
4785
|
+
jsonSchema: { type: "string" },
|
|
4758
4786
|
nullable: !0,
|
|
4759
|
-
value:
|
|
4787
|
+
value: "foo"
|
|
4760
4788
|
}],
|
|
4761
4789
|
outputs: [{
|
|
4762
4790
|
handle: "result",
|
|
@@ -4769,7 +4797,7 @@ function jc(e, t, n, r = void 0, i = {
|
|
|
4769
4797
|
module: {
|
|
4770
4798
|
...r ?? {
|
|
4771
4799
|
imports: [],
|
|
4772
|
-
source:
|
|
4800
|
+
source: Nc
|
|
4773
4801
|
},
|
|
4774
4802
|
name: n
|
|
4775
4803
|
},
|
|
@@ -4777,7 +4805,7 @@ function jc(e, t, n, r = void 0, i = {
|
|
|
4777
4805
|
}, {
|
|
4778
4806
|
kind: "graph.node.create",
|
|
4779
4807
|
node: {
|
|
4780
|
-
inputs:
|
|
4808
|
+
inputs: Uc(i.inputs),
|
|
4781
4809
|
kind: "task",
|
|
4782
4810
|
name: n,
|
|
4783
4811
|
task: {
|
|
@@ -4792,7 +4820,7 @@ function jc(e, t, n, r = void 0, i = {
|
|
|
4792
4820
|
target: e
|
|
4793
4821
|
}];
|
|
4794
4822
|
}
|
|
4795
|
-
function
|
|
4823
|
+
function Fc(e, t, n) {
|
|
4796
4824
|
return [{
|
|
4797
4825
|
kind: "task.create",
|
|
4798
4826
|
task: n,
|
|
@@ -4800,7 +4828,7 @@ function Mc(e, t, n) {
|
|
|
4800
4828
|
}, {
|
|
4801
4829
|
kind: "graph.node.create",
|
|
4802
4830
|
node: {
|
|
4803
|
-
inputs:
|
|
4831
|
+
inputs: Uc(n.inputs),
|
|
4804
4832
|
kind: "task",
|
|
4805
4833
|
name: n.name,
|
|
4806
4834
|
taskId: t.taskId
|
|
@@ -4809,9 +4837,9 @@ function Mc(e, t, n) {
|
|
|
4809
4837
|
target: e
|
|
4810
4838
|
}];
|
|
4811
4839
|
}
|
|
4812
|
-
function
|
|
4840
|
+
function Ic(e, t, n, r, i, a = {}) {
|
|
4813
4841
|
let o = a.inputs ?? {};
|
|
4814
|
-
return
|
|
4842
|
+
return Fc(e, t, {
|
|
4815
4843
|
executor: {
|
|
4816
4844
|
kind: "llm",
|
|
4817
4845
|
mode: r
|
|
@@ -4824,13 +4852,13 @@ function Nc(e, t, n, r, i, a = {}) {
|
|
|
4824
4852
|
type: "array"
|
|
4825
4853
|
},
|
|
4826
4854
|
nullable: !0,
|
|
4827
|
-
value:
|
|
4855
|
+
value: Wc(o, "messages", null)
|
|
4828
4856
|
},
|
|
4829
4857
|
{
|
|
4830
4858
|
handle: "input",
|
|
4831
4859
|
jsonSchema: { type: "string" },
|
|
4832
4860
|
nullable: !1,
|
|
4833
|
-
value:
|
|
4861
|
+
value: Wc(o, "input", "Alex")
|
|
4834
4862
|
},
|
|
4835
4863
|
{
|
|
4836
4864
|
handle: "template",
|
|
@@ -4840,7 +4868,7 @@ function Nc(e, t, n, r, i, a = {}) {
|
|
|
4840
4868
|
type: "array"
|
|
4841
4869
|
},
|
|
4842
4870
|
nullable: !1,
|
|
4843
|
-
value:
|
|
4871
|
+
value: Wc(o, "template", [{
|
|
4844
4872
|
content: "Hello, I'm {{input}}",
|
|
4845
4873
|
role: "user"
|
|
4846
4874
|
}])
|
|
@@ -4849,7 +4877,7 @@ function Nc(e, t, n, r, i, a = {}) {
|
|
|
4849
4877
|
handle: "model",
|
|
4850
4878
|
jsonSchema: { type: "object" },
|
|
4851
4879
|
nullable: !1,
|
|
4852
|
-
value:
|
|
4880
|
+
value: Wc(o, "model", { model: "deepseek-v4-flash" })
|
|
4853
4881
|
}
|
|
4854
4882
|
],
|
|
4855
4883
|
name: n,
|
|
@@ -4862,29 +4890,20 @@ function Nc(e, t, n, r, i, a = {}) {
|
|
|
4862
4890
|
}]
|
|
4863
4891
|
});
|
|
4864
4892
|
}
|
|
4865
|
-
function
|
|
4893
|
+
function Lc(e, t, n) {
|
|
4866
4894
|
return [{
|
|
4867
4895
|
kind: "graph.node.create",
|
|
4868
4896
|
node: {
|
|
4869
4897
|
cases: [{
|
|
4870
|
-
expressions: [{
|
|
4871
|
-
|
|
4872
|
-
operator: "
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4898
|
+
groups: [{ expressions: [{
|
|
4899
|
+
left: { kind: "value" },
|
|
4900
|
+
operator: "==",
|
|
4901
|
+
right: { kind: "value" }
|
|
4902
|
+
}] }],
|
|
4903
|
+
output: "case"
|
|
4876
4904
|
}],
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
handle: "value",
|
|
4880
|
-
jsonSchema: {},
|
|
4881
|
-
nullable: !0,
|
|
4882
|
-
value: null
|
|
4883
|
-
},
|
|
4884
|
-
inputs: { value: {
|
|
4885
|
-
kind: "value",
|
|
4886
|
-
value: null
|
|
4887
|
-
} },
|
|
4905
|
+
matchMode: "first",
|
|
4906
|
+
inputs: {},
|
|
4888
4907
|
kind: "condition",
|
|
4889
4908
|
name: n
|
|
4890
4909
|
},
|
|
@@ -4892,7 +4911,7 @@ function Pc(e, t, n) {
|
|
|
4892
4911
|
target: e
|
|
4893
4912
|
}];
|
|
4894
4913
|
}
|
|
4895
|
-
function
|
|
4914
|
+
function Rc(e, t, n) {
|
|
4896
4915
|
return [{
|
|
4897
4916
|
kind: "graph.node.create",
|
|
4898
4917
|
node: {
|
|
@@ -4910,20 +4929,12 @@ function Fc(e, t, n) {
|
|
|
4910
4929
|
target: e
|
|
4911
4930
|
}];
|
|
4912
4931
|
}
|
|
4913
|
-
function
|
|
4932
|
+
function zc(e, t, n) {
|
|
4914
4933
|
return [{
|
|
4915
4934
|
kind: "graph.node.create",
|
|
4916
4935
|
node: {
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
jsonSchema: {},
|
|
4920
|
-
nullable: !0,
|
|
4921
|
-
value: null
|
|
4922
|
-
},
|
|
4923
|
-
inputs: { value: {
|
|
4924
|
-
kind: "value",
|
|
4925
|
-
value: null
|
|
4926
|
-
} },
|
|
4936
|
+
inputDefinitions: [],
|
|
4937
|
+
inputs: {},
|
|
4927
4938
|
kind: "wait",
|
|
4928
4939
|
name: n,
|
|
4929
4940
|
prompt: n
|
|
@@ -4932,20 +4943,12 @@ function Ic(e, t, n) {
|
|
|
4932
4943
|
target: e
|
|
4933
4944
|
}];
|
|
4934
4945
|
}
|
|
4935
|
-
function
|
|
4946
|
+
function Bc(e, t, n) {
|
|
4936
4947
|
return [{
|
|
4937
4948
|
kind: "graph.node.create",
|
|
4938
4949
|
node: {
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
jsonSchema: {},
|
|
4942
|
-
nullable: !0,
|
|
4943
|
-
value: null
|
|
4944
|
-
},
|
|
4945
|
-
inputs: { value: {
|
|
4946
|
-
kind: "value",
|
|
4947
|
-
value: null
|
|
4948
|
-
} },
|
|
4950
|
+
inputDefinitions: [],
|
|
4951
|
+
inputs: {},
|
|
4949
4952
|
kind: "approval",
|
|
4950
4953
|
name: n,
|
|
4951
4954
|
prompt: n
|
|
@@ -4954,7 +4957,7 @@ function Lc(e, t, n) {
|
|
|
4954
4957
|
target: e
|
|
4955
4958
|
}];
|
|
4956
4959
|
}
|
|
4957
|
-
function
|
|
4960
|
+
function Vc(e, t, n) {
|
|
4958
4961
|
return [{
|
|
4959
4962
|
kind: "graph.node.create",
|
|
4960
4963
|
node: n,
|
|
@@ -4962,10 +4965,10 @@ function Rc(e, t, n) {
|
|
|
4962
4965
|
target: e
|
|
4963
4966
|
}];
|
|
4964
4967
|
}
|
|
4965
|
-
function
|
|
4968
|
+
function Hc(e, t, n, r) {
|
|
4966
4969
|
let i = r.name ?? n.displayName, a = n.type == "poll" ? {
|
|
4967
4970
|
bindingId: t.bindingId,
|
|
4968
|
-
config: r.config,
|
|
4971
|
+
config: qs(r.config),
|
|
4969
4972
|
definition: n,
|
|
4970
4973
|
kind: "poll",
|
|
4971
4974
|
name: i,
|
|
@@ -4976,7 +4979,7 @@ function zc(e, t, n, r) {
|
|
|
4976
4979
|
}]
|
|
4977
4980
|
} : {
|
|
4978
4981
|
bindingId: t.bindingId,
|
|
4979
|
-
config: r.config,
|
|
4982
|
+
config: qs(r.config),
|
|
4980
4983
|
definition: n,
|
|
4981
4984
|
kind: "integration",
|
|
4982
4985
|
name: i
|
|
@@ -4995,74 +4998,74 @@ function zc(e, t, n, r) {
|
|
|
4995
4998
|
target: e
|
|
4996
4999
|
}];
|
|
4997
5000
|
}
|
|
4998
|
-
function
|
|
5001
|
+
function Uc(e) {
|
|
4999
5002
|
return Object.fromEntries(e.flatMap((e) => "handle" in e && Object.hasOwn(e, "value") ? [[e.handle, {
|
|
5000
5003
|
kind: "value",
|
|
5001
5004
|
value: e.value
|
|
5002
5005
|
}]] : []));
|
|
5003
5006
|
}
|
|
5004
|
-
function
|
|
5007
|
+
function Wc(e, t, n) {
|
|
5005
5008
|
return e != null && Object.hasOwn(e, t) ? e[t] : n;
|
|
5006
5009
|
}
|
|
5007
5010
|
//#endregion
|
|
5008
5011
|
//#region src/control/common/draftOperations.ts
|
|
5009
|
-
var J =
|
|
5012
|
+
var J = j().min(1), Gc = Gs(), Kc = R({
|
|
5010
5013
|
kind: H("graph.trigger.create"),
|
|
5011
5014
|
nodeId: J,
|
|
5012
5015
|
bindingId: J,
|
|
5013
5016
|
key: J,
|
|
5014
5017
|
connectionId: J.optional(),
|
|
5015
5018
|
name: J.optional(),
|
|
5016
|
-
config: B(J,
|
|
5017
|
-
schedule:
|
|
5019
|
+
config: B(J, Gc),
|
|
5020
|
+
schedule: Ys.readonly().optional()
|
|
5018
5021
|
});
|
|
5019
|
-
function
|
|
5020
|
-
return
|
|
5021
|
-
let { kind: n } =
|
|
5022
|
-
return n == "graph.trigger.create" ?
|
|
5022
|
+
function qc(e) {
|
|
5023
|
+
return Js(e), I(ls()).min(1).parse(e).map((e, t) => {
|
|
5024
|
+
let { kind: n } = kc(e, t, L({ kind: J }).parse);
|
|
5025
|
+
return n == "graph.trigger.create" ? kc(e, t, Kc.parse) : Ac(e, t);
|
|
5023
5026
|
});
|
|
5024
5027
|
}
|
|
5025
|
-
function
|
|
5026
|
-
if (e != null && e != "graph.trigger.create") return
|
|
5027
|
-
let t =
|
|
5028
|
+
function Jc(e) {
|
|
5029
|
+
if (e != null && e != "graph.trigger.create") return jc(e);
|
|
5030
|
+
let t = po(Kc);
|
|
5028
5031
|
if (e == "graph.trigger.create") return t;
|
|
5029
|
-
let n =
|
|
5032
|
+
let n = jc();
|
|
5030
5033
|
return {
|
|
5031
5034
|
...n,
|
|
5032
5035
|
items: { anyOf: [n.items, t] }
|
|
5033
5036
|
};
|
|
5034
5037
|
}
|
|
5035
|
-
function
|
|
5038
|
+
function Yc(e, t) {
|
|
5036
5039
|
return e.flatMap((e) => {
|
|
5037
5040
|
if (e.kind != "graph.trigger.create") return [e];
|
|
5038
5041
|
let n = t(e.key);
|
|
5039
5042
|
if (n.type != "poll" && e.schedule != null) throw Error("Only Poll triggers accept a schedule.");
|
|
5040
|
-
return
|
|
5043
|
+
return Hc({ kind: "flow" }, e, n, e);
|
|
5041
5044
|
});
|
|
5042
5045
|
}
|
|
5043
5046
|
//#endregion
|
|
5044
5047
|
//#region src/control/common/eventSourceSchemas.ts
|
|
5045
|
-
var
|
|
5048
|
+
var Xc = j().min(1).max(256), Zc = j().regex(/^[a-z][a-z0-9_.]{0,127}$/), Qc = j().trim().min(1).max(128), $c = j().min(1).max(256), el = R({
|
|
5046
5049
|
version: H(1),
|
|
5047
|
-
name:
|
|
5048
|
-
connectionId:
|
|
5049
|
-
teamId:
|
|
5050
|
-
verificationToken:
|
|
5051
|
-
encryptKey:
|
|
5052
|
-
eventTypes: I(
|
|
5050
|
+
name: Qc,
|
|
5051
|
+
connectionId: Xc,
|
|
5052
|
+
teamId: Xc.nullable(),
|
|
5053
|
+
verificationToken: $c,
|
|
5054
|
+
encryptKey: $c,
|
|
5055
|
+
eventTypes: I(Zc).min(1).max(200).refine((e) => new Set(e).size == e.length),
|
|
5053
5056
|
manageSubscriptions: F()
|
|
5054
|
-
}),
|
|
5057
|
+
}), tl = R({
|
|
5055
5058
|
version: H(1),
|
|
5056
|
-
expectedRevision:
|
|
5057
|
-
name:
|
|
5059
|
+
expectedRevision: P().positive(),
|
|
5060
|
+
name: Qc,
|
|
5058
5061
|
enabled: F(),
|
|
5059
|
-
eventTypes: I(
|
|
5060
|
-
verificationToken:
|
|
5061
|
-
encryptKey:
|
|
5062
|
-
}),
|
|
5062
|
+
eventTypes: I(Zc).min(1).max(200).refine((e) => new Set(e).size == e.length),
|
|
5063
|
+
verificationToken: $c.optional(),
|
|
5064
|
+
encryptKey: $c.optional()
|
|
5065
|
+
}), nl = R({
|
|
5063
5066
|
version: H(1),
|
|
5064
|
-
expectedRevision:
|
|
5065
|
-
}), Y = { kind: "flow" },
|
|
5067
|
+
expectedRevision: P().positive()
|
|
5068
|
+
}), Y = { kind: "flow" }, rl = {
|
|
5066
5069
|
manual: "A Manual start node.",
|
|
5067
5070
|
webhook: "A Webhook start node.",
|
|
5068
5071
|
cron: "An hourly scheduled start node.",
|
|
@@ -5078,28 +5081,28 @@ var qc = M().min(1).max(256), Jc = M().regex(/^[a-z][a-z0-9_.]{0,127}$/), Yc = M
|
|
|
5078
5081
|
"llm-chat": "An LLM chat Task and its node; configure a model available in the deployment.",
|
|
5079
5082
|
"llm-json": "An LLM JSON Task and its node; configure a model available in the deployment.",
|
|
5080
5083
|
"poll-notification": "Gmail events → JavaScript text formatting → Connector notification. Replace connection/action IDs and match the notification input ports."
|
|
5081
|
-
},
|
|
5084
|
+
}, il = Object.keys(rl).map((e) => ({
|
|
5082
5085
|
name: e,
|
|
5083
|
-
description:
|
|
5086
|
+
description: rl[e]
|
|
5084
5087
|
}));
|
|
5085
|
-
function
|
|
5088
|
+
function al(e) {
|
|
5086
5089
|
let t;
|
|
5087
5090
|
switch (e) {
|
|
5088
5091
|
case "manual":
|
|
5089
|
-
t =
|
|
5092
|
+
t = Vc(Y, "start", {
|
|
5090
5093
|
kind: "manual",
|
|
5091
5094
|
name: "Start"
|
|
5092
5095
|
});
|
|
5093
5096
|
break;
|
|
5094
5097
|
case "webhook":
|
|
5095
|
-
t =
|
|
5098
|
+
t = Vc(Y, "start", {
|
|
5096
5099
|
kind: "webhook",
|
|
5097
5100
|
name: "Webhook",
|
|
5098
5101
|
bodyFields: []
|
|
5099
5102
|
});
|
|
5100
5103
|
break;
|
|
5101
5104
|
case "cron":
|
|
5102
|
-
t =
|
|
5105
|
+
t = Vc(Y, "start", {
|
|
5103
5106
|
kind: "cron",
|
|
5104
5107
|
name: "Schedule",
|
|
5105
5108
|
cronTimes: [{
|
|
@@ -5135,7 +5138,7 @@ function nl(e) {
|
|
|
5135
5138
|
}];
|
|
5136
5139
|
break;
|
|
5137
5140
|
case "agent":
|
|
5138
|
-
t =
|
|
5141
|
+
t = Fc(Y, {
|
|
5139
5142
|
nodeId: "agent",
|
|
5140
5143
|
taskId: "agent-task"
|
|
5141
5144
|
}, {
|
|
@@ -5166,7 +5169,7 @@ function nl(e) {
|
|
|
5166
5169
|
});
|
|
5167
5170
|
break;
|
|
5168
5171
|
case "connector":
|
|
5169
|
-
t =
|
|
5172
|
+
t = Fc(Y, {
|
|
5170
5173
|
nodeId: "notify",
|
|
5171
5174
|
taskId: "notify-task"
|
|
5172
5175
|
}, {
|
|
@@ -5186,25 +5189,21 @@ function nl(e) {
|
|
|
5186
5189
|
});
|
|
5187
5190
|
break;
|
|
5188
5191
|
case "code":
|
|
5189
|
-
t =
|
|
5192
|
+
t = Pc(Y, {
|
|
5190
5193
|
nodeId: "format",
|
|
5191
5194
|
moduleId: "format-module"
|
|
5192
5195
|
}, "Format", {
|
|
5193
5196
|
imports: [],
|
|
5194
|
-
source: "export default async function (inputs) { return { text: inputs.
|
|
5197
|
+
source: "export default async function (inputs) { return { text: inputs.events.map(event => `${event.sender}: ${event.subject}`).join(\"\\n\") } }"
|
|
5195
5198
|
}, {
|
|
5196
5199
|
inputs: [{
|
|
5197
|
-
handle: "
|
|
5200
|
+
handle: "events",
|
|
5198
5201
|
jsonSchema: {
|
|
5199
|
-
type: "
|
|
5200
|
-
|
|
5201
|
-
type: "array",
|
|
5202
|
-
items: { type: "object" }
|
|
5203
|
-
} },
|
|
5204
|
-
required: ["events"]
|
|
5202
|
+
type: "array",
|
|
5203
|
+
items: { type: "object" }
|
|
5205
5204
|
},
|
|
5206
5205
|
nullable: !1,
|
|
5207
|
-
value:
|
|
5206
|
+
value: []
|
|
5208
5207
|
}],
|
|
5209
5208
|
outputs: [{
|
|
5210
5209
|
handle: "text",
|
|
@@ -5214,29 +5213,51 @@ function nl(e) {
|
|
|
5214
5213
|
});
|
|
5215
5214
|
break;
|
|
5216
5215
|
case "condition":
|
|
5217
|
-
t =
|
|
5216
|
+
t = [
|
|
5217
|
+
...Lc(Y, "condition", "Condition"),
|
|
5218
|
+
{
|
|
5219
|
+
kind: "graph.node.input.set",
|
|
5220
|
+
target: Y,
|
|
5221
|
+
nodeId: "condition",
|
|
5222
|
+
handle: "0/0/0/left",
|
|
5223
|
+
value: {
|
|
5224
|
+
kind: "value",
|
|
5225
|
+
value: 100
|
|
5226
|
+
}
|
|
5227
|
+
},
|
|
5228
|
+
{
|
|
5229
|
+
kind: "graph.node.input.set",
|
|
5230
|
+
target: Y,
|
|
5231
|
+
nodeId: "condition",
|
|
5232
|
+
handle: "0/0/0/right",
|
|
5233
|
+
value: {
|
|
5234
|
+
kind: "value",
|
|
5235
|
+
value: 100
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
];
|
|
5218
5239
|
break;
|
|
5219
5240
|
case "value":
|
|
5220
|
-
t =
|
|
5241
|
+
t = Rc(Y, "value", "Value");
|
|
5221
5242
|
break;
|
|
5222
5243
|
case "approval":
|
|
5223
|
-
t =
|
|
5244
|
+
t = Bc(Y, "approval", "Approve?");
|
|
5224
5245
|
break;
|
|
5225
5246
|
case "wait":
|
|
5226
|
-
t =
|
|
5247
|
+
t = zc(Y, "wait", "Continue?");
|
|
5227
5248
|
break;
|
|
5228
5249
|
case "llm-chat":
|
|
5229
5250
|
case "llm-json":
|
|
5230
|
-
t =
|
|
5251
|
+
t = Ic(Y, {
|
|
5231
5252
|
nodeId: "llm",
|
|
5232
5253
|
taskId: "llm-task"
|
|
5233
5254
|
}, "LLM", e == "llm-chat" ? "chat" : "json", "Generated response.");
|
|
5234
5255
|
break;
|
|
5235
5256
|
case "poll-notification":
|
|
5236
5257
|
t = [
|
|
5237
|
-
...
|
|
5238
|
-
...
|
|
5239
|
-
...
|
|
5258
|
+
...al("poll").operations,
|
|
5259
|
+
...al("code").operations,
|
|
5260
|
+
...al("connector").operations,
|
|
5240
5261
|
{
|
|
5241
5262
|
kind: "graph.edge.connect",
|
|
5242
5263
|
target: Y,
|
|
@@ -5257,17 +5278,17 @@ function nl(e) {
|
|
|
5257
5278
|
kind: "graph.node.input.set",
|
|
5258
5279
|
target: Y,
|
|
5259
5280
|
nodeId: "format",
|
|
5260
|
-
handle: "
|
|
5281
|
+
handle: "events",
|
|
5261
5282
|
before: {
|
|
5262
5283
|
kind: "value",
|
|
5263
|
-
value:
|
|
5284
|
+
value: []
|
|
5264
5285
|
},
|
|
5265
5286
|
value: {
|
|
5266
5287
|
kind: "sources",
|
|
5267
5288
|
sources: [{
|
|
5268
5289
|
kind: "node",
|
|
5269
5290
|
nodeId: "mail",
|
|
5270
|
-
output: "
|
|
5291
|
+
output: "events"
|
|
5271
5292
|
}]
|
|
5272
5293
|
}
|
|
5273
5294
|
},
|
|
@@ -5300,24 +5321,24 @@ function nl(e) {
|
|
|
5300
5321
|
}
|
|
5301
5322
|
//#endregion
|
|
5302
5323
|
//#region src/control/common/requests.ts
|
|
5303
|
-
var
|
|
5324
|
+
var ol = R({ comment: Ks }), sl = Gs(), X = j().min(1), Z = H(1), cl = X.refine((e) => e == e.trim() && Mc(e) == null, "Flow name is invalid."), ll = B(j(), B(j(), sl)), ul = R({
|
|
5304
5325
|
nodeId: X,
|
|
5305
|
-
outputs: B(
|
|
5326
|
+
outputs: B(j(), sl)
|
|
5306
5327
|
}), Q = {
|
|
5307
|
-
createEventSource:
|
|
5308
|
-
updateEventSource:
|
|
5309
|
-
eventSourceRevision:
|
|
5328
|
+
createEventSource: el,
|
|
5329
|
+
updateEventSource: tl,
|
|
5330
|
+
eventSourceRevision: nl,
|
|
5310
5331
|
createFlow: R({
|
|
5311
|
-
name:
|
|
5332
|
+
name: cl,
|
|
5312
5333
|
version: Z
|
|
5313
5334
|
}),
|
|
5314
5335
|
renameFlow: R({
|
|
5315
|
-
name:
|
|
5336
|
+
name: cl,
|
|
5316
5337
|
version: Z
|
|
5317
5338
|
}),
|
|
5318
5339
|
changeDraft: R({
|
|
5319
5340
|
expectedRevisionId: X,
|
|
5320
|
-
operations: I(
|
|
5341
|
+
operations: I(sl).min(1),
|
|
5321
5342
|
version: Z
|
|
5322
5343
|
}),
|
|
5323
5344
|
repairDraft: R({
|
|
@@ -5330,8 +5351,8 @@ var rl = Gs(), X = M().min(1), Z = H(1), il = X.refine((e) => e == e.trim() && k
|
|
|
5330
5351
|
version: Z
|
|
5331
5352
|
}),
|
|
5332
5353
|
updatePresentation: R({
|
|
5333
|
-
expectedRevision:
|
|
5334
|
-
value: B(
|
|
5354
|
+
expectedRevision: P().positive(),
|
|
5355
|
+
value: B(j(), sl),
|
|
5335
5356
|
version: Z
|
|
5336
5357
|
}),
|
|
5337
5358
|
checkFlow: R({
|
|
@@ -5349,14 +5370,14 @@ var rl = Gs(), X = M().min(1), Z = H(1), il = X.refine((e) => e == e.trim() && k
|
|
|
5349
5370
|
}),
|
|
5350
5371
|
createDraftRun: R({
|
|
5351
5372
|
engineContract: X,
|
|
5352
|
-
inputs:
|
|
5353
|
-
trigger:
|
|
5373
|
+
inputs: ll,
|
|
5374
|
+
trigger: ul,
|
|
5354
5375
|
version: H(2)
|
|
5355
5376
|
}),
|
|
5356
5377
|
createLiveRun: R({
|
|
5357
5378
|
publicationId: X,
|
|
5358
|
-
inputs:
|
|
5359
|
-
trigger:
|
|
5379
|
+
inputs: ll,
|
|
5380
|
+
trigger: ul,
|
|
5360
5381
|
version: H(2)
|
|
5361
5382
|
}),
|
|
5362
5383
|
resolveWait: R({
|
|
@@ -5365,15 +5386,26 @@ var rl = Gs(), X = M().min(1), Z = H(1), il = X.refine((e) => e == e.trim() && k
|
|
|
5365
5386
|
"continue",
|
|
5366
5387
|
"reject"
|
|
5367
5388
|
]),
|
|
5389
|
+
comment: Ks,
|
|
5390
|
+
version: Z
|
|
5391
|
+
}),
|
|
5392
|
+
putVariable: R({ value: j().refine((e) => new TextEncoder().encode(e).byteLength <= 65536, "Environment variable value is too large.") }),
|
|
5393
|
+
addProviderAccessBinding: R({
|
|
5394
|
+
accessBindingId: X,
|
|
5395
|
+
expectedAccessRevision: P().nonnegative(),
|
|
5396
|
+
version: Z
|
|
5397
|
+
}),
|
|
5398
|
+
removeProviderAccessBinding: R({
|
|
5399
|
+
accessBindingId: X,
|
|
5400
|
+
expectedAccessRevision: P().nonnegative(),
|
|
5368
5401
|
version: Z
|
|
5369
5402
|
}),
|
|
5370
|
-
putVariable: R({ value: M().refine((e) => new TextEncoder().encode(e).byteLength <= 65536, "Variable value is too large.") }),
|
|
5371
5403
|
versionOnly: R({ version: Z })
|
|
5372
5404
|
};
|
|
5373
5405
|
function $(e) {
|
|
5374
5406
|
return (t) => e.parse(t);
|
|
5375
5407
|
}
|
|
5376
|
-
var
|
|
5408
|
+
var dl = {
|
|
5377
5409
|
createEventSource: $(Q.createEventSource),
|
|
5378
5410
|
updateEventSource: $(Q.updateEventSource),
|
|
5379
5411
|
eventSourceRevision: $(Q.eventSourceRevision),
|
|
@@ -5383,7 +5415,7 @@ var sl = {
|
|
|
5383
5415
|
let t = Q.changeDraft.parse(e);
|
|
5384
5416
|
return {
|
|
5385
5417
|
...t,
|
|
5386
|
-
operations:
|
|
5418
|
+
operations: qc(t.operations)
|
|
5387
5419
|
};
|
|
5388
5420
|
},
|
|
5389
5421
|
repairDraft: $(Q.repairDraft),
|
|
@@ -5396,17 +5428,19 @@ var sl = {
|
|
|
5396
5428
|
createLiveRun: $(Q.createLiveRun),
|
|
5397
5429
|
resolveWait: $(Q.resolveWait),
|
|
5398
5430
|
putVariable: $(Q.putVariable),
|
|
5431
|
+
addProviderAccessBinding: $(Q.addProviderAccessBinding),
|
|
5432
|
+
removeProviderAccessBinding: $(Q.removeProviderAccessBinding),
|
|
5399
5433
|
versionOnly: $(Q.versionOnly)
|
|
5400
5434
|
};
|
|
5401
|
-
function
|
|
5402
|
-
let t =
|
|
5435
|
+
function fl(e) {
|
|
5436
|
+
let t = po(Q[e]);
|
|
5403
5437
|
return e == "changeDraft" ? {
|
|
5404
5438
|
...t,
|
|
5405
5439
|
properties: {
|
|
5406
5440
|
...t.properties,
|
|
5407
|
-
operations:
|
|
5441
|
+
operations: Jc()
|
|
5408
5442
|
}
|
|
5409
5443
|
} : t;
|
|
5410
5444
|
}
|
|
5411
5445
|
//#endregion
|
|
5412
|
-
export {
|
|
5446
|
+
export { al as authoringExample, il as authoringExamples, fl as controlRequestSchema, dl as controlRequests, qc as decodeDraftOperations, Jc as draftOperationsSchema, Yc as resolveDraftOperations, ol as waitActionBodySchema };
|