@voltro/protocol 0.65.0 → 0.66.0
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/CHANGELOG.md +94 -0
- package/dist/index.d.ts +34 -1
- package/dist/index.js +461 -454
- package/dist/rest.d.ts +62 -1
- package/dist/rest.js +135 -87
- package/dist/{serverErrorBus-QQgyq6fV.js → serverErrorBus-BTnTpMqj.js} +17 -8
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, K as ee, L as te, M as ne, N as re, O as ie, P as l, R as ae, S as oe, T as se, U as ce, V as le, W as ue, _ as de, a as u, b as fe, c as pe, d as me, f as he, g as d, h as ge, i as _e, j as ve, k as ye, l as be, m as xe, n as Se, o as Ce, p as we, r as Te, s as Ee, t as De, u as Oe, v as ke, w as Ae, x as je, y as f, z as Me } from "./scopes-C86BDyNJ.js";
|
|
2
|
-
import { a as
|
|
3
|
-
import { Context as He, Layer as Ue, Schema as
|
|
4
|
-
import { Rpc as
|
|
2
|
+
import { a as p, c as Ne, d as Pe, i as m, l as Fe, n as Ie, o as Le, r as Re, s as ze, t as Be, u as Ve } from "./serverErrorBus-BTnTpMqj.js";
|
|
3
|
+
import { Context as He, Layer as Ue, Schema as h } from "effect";
|
|
4
|
+
import { Rpc as g } from "@effect/rpc";
|
|
5
5
|
import { VersionConflict as We } from "@voltro/database/wire";
|
|
6
6
|
//#region src/rowPatch.ts
|
|
7
|
-
var Ge =
|
|
8
|
-
key:
|
|
9
|
-
value:
|
|
10
|
-
}).pipe(
|
|
11
|
-
op:
|
|
12
|
-
path:
|
|
13
|
-
value:
|
|
14
|
-
}),
|
|
15
|
-
op:
|
|
16
|
-
path:
|
|
17
|
-
value:
|
|
18
|
-
}),
|
|
19
|
-
op:
|
|
20
|
-
path:
|
|
21
|
-
}),
|
|
22
|
-
op:
|
|
23
|
-
path:
|
|
24
|
-
value:
|
|
25
|
-
key:
|
|
26
|
-
value:
|
|
7
|
+
var Ge = h.Union(h.String, h.Number), _ = h.Record({
|
|
8
|
+
key: h.String,
|
|
9
|
+
value: h.Unknown
|
|
10
|
+
}).pipe(h.filter((e) => "id" in e, { message: () => "patch row must carry an id" })), v = h.Union(h.Struct({
|
|
11
|
+
op: h.Literal("add"),
|
|
12
|
+
path: h.String,
|
|
13
|
+
value: _
|
|
14
|
+
}), h.Struct({
|
|
15
|
+
op: h.Literal("replace"),
|
|
16
|
+
path: h.String,
|
|
17
|
+
value: _
|
|
18
|
+
}), h.Struct({
|
|
19
|
+
op: h.Literal("remove"),
|
|
20
|
+
path: h.String
|
|
21
|
+
}), h.Struct({
|
|
22
|
+
op: h.Literal("mergeCells"),
|
|
23
|
+
path: h.String,
|
|
24
|
+
value: h.Record({
|
|
25
|
+
key: h.String,
|
|
26
|
+
value: h.Unknown
|
|
27
27
|
})
|
|
28
|
-
})),
|
|
29
|
-
ops:
|
|
30
|
-
order:
|
|
31
|
-
}),
|
|
28
|
+
})), y = h.Struct({
|
|
29
|
+
ops: h.Array(v),
|
|
30
|
+
order: h.Array(Ge)
|
|
31
|
+
}), b = (e) => `/${String(e).replace(/~/g, "~0").replace(/\//g, "~1")}`, x = (e) => (e.startsWith("/") ? e.slice(1) : e).replace(/~1/g, "/").replace(/~0/g, "~"), S = (e) => {
|
|
32
32
|
let t = Object.keys(e).sort(), n = {};
|
|
33
33
|
for (let r of t) n[r] = e[r];
|
|
34
34
|
return JSON.stringify(n);
|
|
35
|
-
},
|
|
35
|
+
}, C = (e, t) => S(e) === S(t), Ke = (e, t) => {
|
|
36
36
|
if (e instanceof Uint8Array && t instanceof Uint8Array) {
|
|
37
37
|
if (e.length !== t.length) return !1;
|
|
38
38
|
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
39
39
|
return !0;
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return S({
|
|
42
42
|
id: 0,
|
|
43
43
|
v: e
|
|
44
|
-
}) ===
|
|
44
|
+
}) === S({
|
|
45
45
|
id: 0,
|
|
46
46
|
v: t
|
|
47
47
|
});
|
|
@@ -70,29 +70,29 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
70
70
|
let t = r.get(e.id);
|
|
71
71
|
if (t === void 0) i.push({
|
|
72
72
|
op: "add",
|
|
73
|
-
path:
|
|
73
|
+
path: b(e.id),
|
|
74
74
|
value: e
|
|
75
75
|
});
|
|
76
|
-
else if (!
|
|
76
|
+
else if (!C(t, e)) {
|
|
77
77
|
let n = c(t, e);
|
|
78
78
|
n === void 0 ? i.push({
|
|
79
79
|
op: "replace",
|
|
80
|
-
path:
|
|
80
|
+
path: b(e.id),
|
|
81
81
|
value: e
|
|
82
|
-
}) : (
|
|
82
|
+
}) : (C(Object.fromEntries(Object.entries(t).filter(([e]) => !s.columns.has(e))), n.scalars) || i.push({
|
|
83
83
|
op: "replace",
|
|
84
|
-
path:
|
|
84
|
+
path: b(e.id),
|
|
85
85
|
value: n.scalars
|
|
86
86
|
}), i.push({
|
|
87
87
|
op: "mergeCells",
|
|
88
|
-
path:
|
|
88
|
+
path: b(e.id),
|
|
89
89
|
value: n.merges
|
|
90
90
|
}));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
for (let t of e) o.has(t.id) || i.push({
|
|
94
94
|
op: "remove",
|
|
95
|
-
path:
|
|
95
|
+
path: b(t.id)
|
|
96
96
|
});
|
|
97
97
|
return {
|
|
98
98
|
ops: i,
|
|
@@ -106,7 +106,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
106
106
|
for (let t of e) r.set(t.id, t);
|
|
107
107
|
for (let e of t.ops) {
|
|
108
108
|
if (e.op === "mergeCells") {
|
|
109
|
-
let t =
|
|
109
|
+
let t = x(e.path), i = r.get(t) ?? r.get(Number(t)), a = r.has(t) ? t : Number(t);
|
|
110
110
|
if (i === void 0) continue;
|
|
111
111
|
let o = { ...i };
|
|
112
112
|
for (let [t, r] of Object.entries(e.value)) o[t] = n.mergeCell === void 0 ? r : n.mergeCell(t, i[t], r);
|
|
@@ -121,56 +121,56 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
121
121
|
t !== void 0 && i.push(t);
|
|
122
122
|
}
|
|
123
123
|
return i;
|
|
124
|
-
},
|
|
125
|
-
_tag:
|
|
126
|
-
revision:
|
|
124
|
+
}, w = (e) => h.Union(h.Struct({
|
|
125
|
+
_tag: h.Literal("snapshot"),
|
|
126
|
+
revision: h.Number,
|
|
127
127
|
data: e,
|
|
128
|
-
computed:
|
|
129
|
-
}),
|
|
130
|
-
_tag:
|
|
131
|
-
revision:
|
|
132
|
-
emittedAt:
|
|
133
|
-
patch:
|
|
134
|
-
}),
|
|
135
|
-
_tag:
|
|
136
|
-
error:
|
|
137
|
-
revision:
|
|
138
|
-
})),
|
|
128
|
+
computed: h.optional(h.Boolean)
|
|
129
|
+
}), h.Struct({
|
|
130
|
+
_tag: h.Literal("delta"),
|
|
131
|
+
revision: h.Number,
|
|
132
|
+
emittedAt: h.Number,
|
|
133
|
+
patch: y
|
|
134
|
+
}), h.Struct({
|
|
135
|
+
_tag: h.Literal("error"),
|
|
136
|
+
error: h.Unknown,
|
|
137
|
+
revision: h.optional(h.Number)
|
|
138
|
+
})), T = (e, t) => {
|
|
139
139
|
let n = `${e ?? "this procedure"} input`;
|
|
140
140
|
return t === !0 ? `${n} (guarded — the guard did NOT run: the payload failed to decode first, so this says nothing about access)` : n;
|
|
141
141
|
}, Xe = (e) => {
|
|
142
142
|
let t = e.ast;
|
|
143
143
|
return t._tag === "TypeLiteral" && (t.propertySignatures?.length ?? 0) === 0 && (t.indexSignatures?.length ?? 0) === 0;
|
|
144
|
-
},
|
|
145
|
-
let r =
|
|
144
|
+
}, E = (e, t, n) => {
|
|
145
|
+
let r = T(t, n), i = e.annotations({
|
|
146
146
|
parseOptions: { onExcessProperty: "error" },
|
|
147
147
|
parseIssueTitle: () => r
|
|
148
148
|
});
|
|
149
|
-
return Xe(e) ?
|
|
150
|
-
},
|
|
151
|
-
rule:
|
|
152
|
-
params:
|
|
153
|
-
key:
|
|
154
|
-
value:
|
|
149
|
+
return Xe(e) ? h.filter((e) => typeof e == "object" && e && Object.keys(e).length > 0 ? `this procedure declares no input; received: ${Object.keys(e).join(", ")}` : void 0)(i).annotations({ identifier: r }) : i;
|
|
150
|
+
}, D = class extends h.TaggedError()("BusinessRuleViolation", {
|
|
151
|
+
rule: h.String,
|
|
152
|
+
params: h.optional(h.Record({
|
|
153
|
+
key: h.String,
|
|
154
|
+
value: h.Unknown
|
|
155
155
|
})),
|
|
156
|
-
field:
|
|
157
|
-
message:
|
|
158
|
-
severity:
|
|
159
|
-
}) {},
|
|
160
|
-
field:
|
|
161
|
-
message:
|
|
162
|
-
params:
|
|
163
|
-
key:
|
|
164
|
-
value:
|
|
156
|
+
field: h.optional(h.String),
|
|
157
|
+
message: h.optional(h.String),
|
|
158
|
+
severity: h.Literal("error", "warning")
|
|
159
|
+
}) {}, O = h.Struct({
|
|
160
|
+
field: h.String,
|
|
161
|
+
message: h.String,
|
|
162
|
+
params: h.optional(h.Record({
|
|
163
|
+
key: h.String,
|
|
164
|
+
value: h.Unknown
|
|
165
165
|
}))
|
|
166
|
-
}),
|
|
167
|
-
field:
|
|
168
|
-
message:
|
|
169
|
-
params:
|
|
170
|
-
key:
|
|
171
|
-
value:
|
|
166
|
+
}), Ze = class extends h.TaggedError()("ValidationError", {
|
|
167
|
+
field: h.String,
|
|
168
|
+
message: h.String,
|
|
169
|
+
params: h.optional(h.Record({
|
|
170
|
+
key: h.String,
|
|
171
|
+
value: h.Unknown
|
|
172
172
|
}))
|
|
173
|
-
}) {},
|
|
173
|
+
}) {}, Qe = class extends h.TaggedError()("ValidationErrors", { issues: h.Array(O).pipe(h.minItems(1)) }) {}, $e = (e) => {
|
|
174
174
|
if (typeof e != "object" || !e) return [];
|
|
175
175
|
let t = e._tag;
|
|
176
176
|
if (t === "ValidationError") {
|
|
@@ -196,49 +196,49 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
196
196
|
}];
|
|
197
197
|
}
|
|
198
198
|
return [];
|
|
199
|
-
},
|
|
200
|
-
approvalId:
|
|
201
|
-
procedure:
|
|
202
|
-
expiresAt:
|
|
203
|
-
requiredScopes:
|
|
204
|
-
reason:
|
|
205
|
-
created:
|
|
206
|
-
}) {},
|
|
207
|
-
approvalId:
|
|
208
|
-
subjectId:
|
|
209
|
-
}) {},
|
|
210
|
-
approvalId:
|
|
211
|
-
decidedBy:
|
|
212
|
-
note:
|
|
213
|
-
}) {}, k = class extends
|
|
214
|
-
approvalId:
|
|
215
|
-
expiredAt:
|
|
216
|
-
}) {},
|
|
217
|
-
approvalId:
|
|
218
|
-
status:
|
|
219
|
-
}) {},
|
|
220
|
-
approvalId:
|
|
221
|
-
required:
|
|
222
|
-
message:
|
|
223
|
-
}) {}, A = class extends
|
|
224
|
-
procedure:
|
|
225
|
-
message:
|
|
226
|
-
}) {},
|
|
227
|
-
id:
|
|
228
|
-
procedure:
|
|
229
|
-
kind:
|
|
230
|
-
requestedBy:
|
|
231
|
-
status:
|
|
232
|
-
reason:
|
|
233
|
-
requiredScopes:
|
|
234
|
-
requestedAt:
|
|
235
|
-
expiresAt:
|
|
236
|
-
decidedBy:
|
|
237
|
-
decidedAt:
|
|
238
|
-
note:
|
|
239
|
-
relation:
|
|
240
|
-
}), j = "channel:",
|
|
241
|
-
if (!
|
|
199
|
+
}, et = class extends h.TaggedError()("ApprovalRequired", {
|
|
200
|
+
approvalId: h.String,
|
|
201
|
+
procedure: h.String,
|
|
202
|
+
expiresAt: h.String,
|
|
203
|
+
requiredScopes: h.Array(h.String),
|
|
204
|
+
reason: h.NullOr(h.String),
|
|
205
|
+
created: h.Boolean
|
|
206
|
+
}) {}, tt = class extends h.TaggedError()("ApprovalNotFound", { approvalId: h.String }) {}, nt = class extends h.TaggedError()("ApprovalSelfApproval", {
|
|
207
|
+
approvalId: h.String,
|
|
208
|
+
subjectId: h.NullOr(h.String)
|
|
209
|
+
}) {}, rt = class extends h.TaggedError()("ApprovalRejected", {
|
|
210
|
+
approvalId: h.String,
|
|
211
|
+
decidedBy: h.NullOr(h.String),
|
|
212
|
+
note: h.NullOr(h.String)
|
|
213
|
+
}) {}, k = class extends h.TaggedError()("ApprovalExpired", {
|
|
214
|
+
approvalId: h.String,
|
|
215
|
+
expiredAt: h.String
|
|
216
|
+
}) {}, it = class extends h.TaggedError()("ApprovalNotPending", {
|
|
217
|
+
approvalId: h.String,
|
|
218
|
+
status: h.String
|
|
219
|
+
}) {}, at = class extends h.TaggedError()("ApprovalForbidden", {
|
|
220
|
+
approvalId: h.String,
|
|
221
|
+
required: h.NullOr(h.String),
|
|
222
|
+
message: h.String
|
|
223
|
+
}) {}, A = class extends h.TaggedError()("ApprovalUnavailable", {
|
|
224
|
+
procedure: h.String,
|
|
225
|
+
message: h.String
|
|
226
|
+
}) {}, ot = h.Union(et, rt, k, A), st = h.Union(tt, nt, k, it, at, A), ct = h.Struct({
|
|
227
|
+
id: h.String,
|
|
228
|
+
procedure: h.String,
|
|
229
|
+
kind: h.Literal("mutation", "action"),
|
|
230
|
+
requestedBy: h.NullOr(h.String),
|
|
231
|
+
status: h.Literal("pending", "approved", "rejected", "expired", "consumed"),
|
|
232
|
+
reason: h.NullOr(h.String),
|
|
233
|
+
requiredScopes: h.Array(h.String),
|
|
234
|
+
requestedAt: h.String,
|
|
235
|
+
expiresAt: h.String,
|
|
236
|
+
decidedBy: h.NullOr(h.String),
|
|
237
|
+
decidedAt: h.NullOr(h.String),
|
|
238
|
+
note: h.NullOr(h.String),
|
|
239
|
+
relation: h.Literal("to-decide", "requested")
|
|
240
|
+
}), j = "channel:", lt = Symbol.for("@voltro/protocol/reactivityChannels"), ut = globalThis, M = ut[lt] ?? (ut[lt] = /* @__PURE__ */ new Map()), dt = /^[a-z][a-z0-9-]*(\.[a-z0-9-]+)*$/, ft = (e) => {
|
|
241
|
+
if (!dt.test(e)) throw Error(`reactivityChannel('${e}'): invalid channel name.\n Use lowercase kebab segments separated by dots — \`presence\`, \`job-queue\`,
|
|
242
242
|
\`billing.usage\`. A \`:\` is refused because it is the namespace separator in
|
|
243
243
|
the routing key (\`${j}<name>\`), and an uppercase letter is\n refused because a key that differs only by case reads as one channel and
|
|
244
244
|
routes as two.`);
|
|
@@ -251,14 +251,14 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
251
251
|
toString: () => n
|
|
252
252
|
});
|
|
253
253
|
return M.set(e, r), r;
|
|
254
|
-
},
|
|
255
|
-
let t =
|
|
256
|
-
for (let r of e) for (let e of
|
|
254
|
+
}, pt = (e) => typeof e == "object" && !!e && e.kind === "reactivity-channel", mt = (e) => e.startsWith(j), ht = () => new Set([...M.values()].map((e) => e.key)), N = (e) => pt(e) ? e.key : e, gt = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map(N) : [N(e)], _t = (e) => e === void 0 ? void 0 : Array.isArray(e) ? e.map(N) : N(e), vt = (e) => {
|
|
255
|
+
let t = ht(), n = [];
|
|
256
|
+
for (let r of e) for (let e of gt(r.source)) !mt(e) || t.has(e) || n.push({
|
|
257
257
|
procedure: r.name,
|
|
258
258
|
key: e
|
|
259
259
|
});
|
|
260
260
|
return n;
|
|
261
|
-
},
|
|
261
|
+
}, yt = (e, t) => {
|
|
262
262
|
let n = e?.injectExternalChange;
|
|
263
263
|
return n !== void 0 && (n.call(e, {
|
|
264
264
|
table: t.key,
|
|
@@ -267,8 +267,10 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
267
267
|
old: {},
|
|
268
268
|
origin: "inline"
|
|
269
269
|
}), !0);
|
|
270
|
-
},
|
|
271
|
-
if (
|
|
270
|
+
}, bt = (e) => e.internal !== !0, P = (e) => {
|
|
271
|
+
if (xt(e), e.idempotencyScope !== void 0 && e.idempotencyScope !== "subject" && e.idempotencyScope !== "connection") throw Error(`${e.name}: idempotencyScope must be 'subject' or 'connection'`);
|
|
272
|
+
if (e.idempotencyScope === "connection" && (e.internal === !0 || e.publicApi !== void 0 || e.exposeAsTool !== void 0)) throw Error(`${e.name}: connection-scoped mutations require the native WebSocket RPC surface; internal, publicApi and exposeAsTool cannot establish its connection state`);
|
|
273
|
+
if (Array.isArray(e.guards) && e.guards.length === 0) throw Error(`${e.name}: \`guards: []\` is empty, so it enforces nothing — but it reads\n at the call site as if this procedure were protected. Omit the field for an
|
|
272
274
|
unguarded procedure, or list the scopes required to call it.`);
|
|
273
275
|
let t = typeof e.source == "string" ? [e.source] : Array.isArray(e.source) ? e.source : void 0;
|
|
274
276
|
if (t !== void 0 && (t.length === 0 || t.some((e) => String(e).trim() === ""))) throw Error(`${e.name}: \`source\` is empty, so this query declares reactivity and\n subscribes to nothing — it serves one snapshot and never updates again,
|
|
@@ -285,7 +287,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
285
287
|
let n = [e.publicApi === void 0 ? void 0 : "publicApi", e.exposeAsTool === void 0 ? void 0 : "exposeAsTool"].filter((e) => e !== void 0);
|
|
286
288
|
if (n.length === 0) return e;
|
|
287
289
|
throw Error(`${e.name}: \`internal: true\` cannot be combined with ${n.map((e) => `\`${e}\``).join(" or ")}. \`internal\` takes the procedure OFF the wire; those put it back ON a different one (${n.includes("publicApi") ? "a REST route" : "an agent tool"}), and that surface is projected without consulting the flag — so the procedure would be unreachable from your client and reachable from the internet. Drop \`internal: true\` if the wider surface is intended, or remove the ${n.join(" / ")} annotation if it is not.`);
|
|
288
|
-
},
|
|
290
|
+
}, xt = (e) => {
|
|
289
291
|
let t = e.requiresApproval;
|
|
290
292
|
if (t !== void 0) {
|
|
291
293
|
if (!Array.isArray(t.approvers) || t.approvers.length === 0) throw Error(`${e.name}: \`requiresApproval.approvers\` is empty, so NOBODY can approve this\n procedure and every call would park forever. Name the scope(s) an approver must hold
|
|
@@ -295,7 +297,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
295
297
|
human from every other, and the second-pair-of-eyes control would enforce nothing.
|
|
296
298
|
Give the procedure a \`guards:\` decision, or drop \`requiresApproval\`.`);
|
|
297
299
|
}
|
|
298
|
-
},
|
|
300
|
+
}, St = (e) => e.action !== void 0 && e.resourceType !== void 0, Ct = (e) => e.authenticated === !0, wt = (e) => e.openAccess !== void 0 || e.guards !== void 0 && e.guards.length > 0, F = (e, t, n) => {
|
|
299
301
|
if (n === void 0) return t;
|
|
300
302
|
if (n.trim() === "") throw Error(`${e}: \`openAccess\` needs a REASON, not an empty string. It is the sentence a\n reviewer reads to decide whether this procedure should really be callable
|
|
301
303
|
without an authorization check — e.g. \`openAccess: 'public pricing, no caller data'\`.`);
|
|
@@ -307,8 +309,8 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
307
309
|
name: e.name,
|
|
308
310
|
input: e.input,
|
|
309
311
|
output: e.output,
|
|
310
|
-
error: e.error ??
|
|
311
|
-
source:
|
|
312
|
+
error: e.error ?? h.Never,
|
|
313
|
+
source: _t(e.source),
|
|
312
314
|
cache: e.cache,
|
|
313
315
|
guards: F(e.name, e.guards, e.openAccess),
|
|
314
316
|
openAccess: e.openAccess,
|
|
@@ -321,7 +323,8 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
321
323
|
name: e.name,
|
|
322
324
|
input: e.input,
|
|
323
325
|
output: e.output,
|
|
324
|
-
error: e.error ??
|
|
326
|
+
error: e.error ?? h.Never,
|
|
327
|
+
...e.idempotencyScope === void 0 ? {} : { idempotencyScope: e.idempotencyScope },
|
|
325
328
|
target: e.target,
|
|
326
329
|
guards: F(e.name, e.guards, e.openAccess),
|
|
327
330
|
openAccess: e.openAccess,
|
|
@@ -335,7 +338,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
335
338
|
name: e.name,
|
|
336
339
|
input: e.input,
|
|
337
340
|
output: e.output,
|
|
338
|
-
error: e.error ??
|
|
341
|
+
error: e.error ?? h.Never,
|
|
339
342
|
guards: F(e.name, e.guards, e.openAccess),
|
|
340
343
|
openAccess: e.openAccess,
|
|
341
344
|
source: e.source,
|
|
@@ -345,53 +348,55 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
345
348
|
requiresApproval: e.requiresApproval,
|
|
346
349
|
internal: e.internal,
|
|
347
350
|
overridesPlugin: e.overridesPlugin
|
|
348
|
-
}),
|
|
351
|
+
}), Tt = (e) => P({
|
|
349
352
|
kind: "stream",
|
|
350
353
|
name: e.name,
|
|
351
354
|
input: e.input,
|
|
352
355
|
element: e.element,
|
|
353
|
-
error: e.error ??
|
|
356
|
+
error: e.error ?? h.Never,
|
|
354
357
|
internal: e.internal,
|
|
355
358
|
overridesPlugin: e.overridesPlugin,
|
|
356
359
|
guards: F(e.name, e.guards, e.openAccess),
|
|
357
360
|
openAccess: e.openAccess
|
|
358
|
-
}), z = (e, t) => t && t.length > 0 ?
|
|
361
|
+
}), z = (e, t) => t && t.length > 0 ? h.Union(e, ...t) : e, B = (e) => e !== void 0 && e.some((e) => !d(e)), Et = (e, t) => B(t) ? h.Union(e, u, l) : e, Dt = (e) => h.Union(e, D), Ot = (e) => h.Union(e, Ze, Qe), kt = (e, t) => t === void 0 ? e : h.Union(e, ot), V = (e, t) => {
|
|
359
362
|
if (t === "stream") return e.error;
|
|
360
|
-
let n =
|
|
361
|
-
|
|
362
|
-
|
|
363
|
+
let n = Et(e.error, e.guards);
|
|
364
|
+
if (t === "query") return n;
|
|
365
|
+
let r = t === "mutation" ? h.Union(Dt(n), p, We) : n;
|
|
366
|
+
return kt(Ot(t === "mutation" && e.idempotencyScope === "connection" ? h.Union(r, m) : r), e.requiresApproval);
|
|
367
|
+
}, At = (e, t) => z(Et(e.errorSchema, e.guards), t), jt = (e, t) => ({
|
|
363
368
|
...e,
|
|
364
369
|
name: t
|
|
365
|
-
}),
|
|
366
|
-
payload:
|
|
367
|
-
success:
|
|
368
|
-
error: z(
|
|
370
|
+
}), Mt = (e, t) => g.make(e.name, {
|
|
371
|
+
payload: E(e.input, e.name, B(e.guards)),
|
|
372
|
+
success: w(e.output),
|
|
373
|
+
error: z(V(e, "query"), t),
|
|
369
374
|
stream: !0
|
|
370
|
-
}),
|
|
371
|
-
payload:
|
|
375
|
+
}), Nt = (e, t) => g.make(e.name, {
|
|
376
|
+
payload: E(e.input, e.name, B(e.guards)),
|
|
372
377
|
success: e.output,
|
|
373
|
-
error: z(
|
|
374
|
-
}),
|
|
375
|
-
payload:
|
|
378
|
+
error: z(V(e, "mutation"), t)
|
|
379
|
+
}), Pt = (e, t) => g.make(e.name, {
|
|
380
|
+
payload: E(e.input, e.name, B(e.guards)),
|
|
376
381
|
success: e.output,
|
|
377
|
-
error: z(
|
|
378
|
-
}),
|
|
379
|
-
payload:
|
|
382
|
+
error: z(V(e, "action"), t)
|
|
383
|
+
}), Ft = (e, t) => g.make(e.name, {
|
|
384
|
+
payload: E(e.input, e.name, B(e.guards)),
|
|
380
385
|
success: e.element,
|
|
381
386
|
error: z(e.error, t),
|
|
382
387
|
stream: !0
|
|
383
|
-
}),
|
|
388
|
+
}), It = (e) => {
|
|
384
389
|
if (typeof e != "object" || !e) return;
|
|
385
390
|
let t = e._tag;
|
|
386
391
|
return typeof t == "string" ? t : void 0;
|
|
387
|
-
},
|
|
392
|
+
}, Lt = (e) => {
|
|
388
393
|
switch (e.kind) {
|
|
389
|
-
case "query": return
|
|
390
|
-
case "mutation": return
|
|
391
|
-
case "action": return
|
|
392
|
-
case "stream": return
|
|
394
|
+
case "query": return Mt(e);
|
|
395
|
+
case "mutation": return Nt(e);
|
|
396
|
+
case "action": return Pt(e);
|
|
397
|
+
case "stream": return Ft(e);
|
|
393
398
|
}
|
|
394
|
-
},
|
|
399
|
+
}, Rt = (e) => {
|
|
395
400
|
let t = e.input, n = t === void 0 ? {} : { input: t }, r = e.output, i = r === void 0 ? {} : { output: r };
|
|
396
401
|
if (e.kind === "query") return {
|
|
397
402
|
kind: "query",
|
|
@@ -409,18 +414,20 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
409
414
|
...n,
|
|
410
415
|
...i
|
|
411
416
|
};
|
|
412
|
-
let a = e.target;
|
|
417
|
+
let a = e.target, o = e.idempotencyScope === void 0 ? {} : { idempotencyScope: e.idempotencyScope };
|
|
413
418
|
if (a === void 0) return {
|
|
414
419
|
kind: "mutation",
|
|
415
420
|
...n,
|
|
416
|
-
...i
|
|
421
|
+
...i,
|
|
422
|
+
...o
|
|
417
423
|
};
|
|
418
|
-
let
|
|
424
|
+
let s = Array.isArray(a) ? a : [a];
|
|
419
425
|
return {
|
|
420
426
|
kind: "mutation",
|
|
421
427
|
...n,
|
|
422
428
|
...i,
|
|
423
|
-
|
|
429
|
+
...o,
|
|
430
|
+
targets: s.map((e) => ({
|
|
424
431
|
table: e.table,
|
|
425
432
|
op: e.op,
|
|
426
433
|
..."order" in e && e.order !== void 0 ? { order: e.order } : {},
|
|
@@ -433,7 +440,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
433
440
|
..."relations" in e && e.relations !== void 0 ? { relations: e.relations } : {}
|
|
434
441
|
}))
|
|
435
442
|
};
|
|
436
|
-
},
|
|
443
|
+
}, zt = 7500, Bt = (e) => typeof e == "object" && !!e && e.kind === "event", Vt = (e) => {
|
|
437
444
|
if (e.name.length === 0) throw Error("defineEvent: `name` must not be empty");
|
|
438
445
|
if (/\s/.test(e.name)) throw Error(`defineEvent("${e.name}"): \`name\` must not contain whitespace.\n The name is used as a broker subject segment. NATS refuses a subject with
|
|
439
446
|
whitespace and delivers nothing — silently, and only on that broker, so an
|
|
@@ -468,60 +475,60 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
468
475
|
webhook: e.webhook,
|
|
469
476
|
delivery: e.delivery
|
|
470
477
|
};
|
|
471
|
-
},
|
|
472
|
-
_tag:
|
|
473
|
-
origin:
|
|
474
|
-
n:
|
|
475
|
-
emittedAt:
|
|
478
|
+
}, Ht = (e) => h.Struct({
|
|
479
|
+
_tag: h.Literal("event"),
|
|
480
|
+
origin: h.String,
|
|
481
|
+
n: h.Number,
|
|
482
|
+
emittedAt: h.Number,
|
|
476
483
|
payload: e
|
|
477
|
-
}),
|
|
478
|
-
_tag:
|
|
479
|
-
missed:
|
|
480
|
-
reason:
|
|
481
|
-
}),
|
|
482
|
-
origin:
|
|
483
|
-
n:
|
|
484
|
-
}),
|
|
484
|
+
}), Ut = h.Struct({
|
|
485
|
+
_tag: h.Literal("gap"),
|
|
486
|
+
missed: h.Number,
|
|
487
|
+
reason: h.Literal("buffer", "resume")
|
|
488
|
+
}), Wt = h.Struct({ _tag: h.Literal("attached") }), H = (e) => h.Union(Wt, Ht(e), Ut), Gt = h.Struct({
|
|
489
|
+
origin: h.String,
|
|
490
|
+
n: h.Number
|
|
491
|
+
}), Kt = (e) => h.Struct({
|
|
485
492
|
key: e,
|
|
486
|
-
resume:
|
|
487
|
-
}),
|
|
488
|
-
let n = e.guards !== void 0 && e.guards.some((e) => !d(e)) ?
|
|
489
|
-
return
|
|
490
|
-
payload:
|
|
491
|
-
success:
|
|
493
|
+
resume: h.optional(h.Array(Gt))
|
|
494
|
+
}), qt = (e, t) => {
|
|
495
|
+
let n = e.guards !== void 0 && e.guards.some((e) => !d(e)) ? h.Union(u, l) : h.Never, r = t && t.length > 0 ? h.Union(n, ...t) : n;
|
|
496
|
+
return g.make(e.name, {
|
|
497
|
+
payload: E(Kt(e.key), e.name, B(e.guards)),
|
|
498
|
+
success: H(e.payload),
|
|
492
499
|
error: r,
|
|
493
500
|
stream: !0
|
|
494
501
|
});
|
|
495
|
-
},
|
|
496
|
-
event:
|
|
497
|
-
message:
|
|
498
|
-
}) {},
|
|
499
|
-
event:
|
|
500
|
-
message:
|
|
501
|
-
}) {},
|
|
502
|
-
event:
|
|
503
|
-
bytes:
|
|
504
|
-
limit:
|
|
505
|
-
}) {},
|
|
502
|
+
}, Jt = class extends h.TaggedError()("EventPayloadInvalid", {
|
|
503
|
+
event: h.String,
|
|
504
|
+
message: h.String
|
|
505
|
+
}) {}, Yt = class extends h.TaggedError()("EventKeyInvalid", {
|
|
506
|
+
event: h.String,
|
|
507
|
+
message: h.String
|
|
508
|
+
}) {}, Xt = class extends h.TaggedError()("EventPayloadTooLarge", {
|
|
509
|
+
event: h.String,
|
|
510
|
+
bytes: h.Number,
|
|
511
|
+
limit: h.Number
|
|
512
|
+
}) {}, Zt = (e) => {
|
|
506
513
|
if (typeof e != "object" || !e) return JSON.stringify(e) ?? "null";
|
|
507
514
|
let t = Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t));
|
|
508
515
|
return JSON.stringify(t);
|
|
509
|
-
},
|
|
516
|
+
}, Qt = "\0", $t = (e, t, n) => [
|
|
510
517
|
e ?? "~",
|
|
511
518
|
t,
|
|
512
|
-
|
|
513
|
-
].join("\0"),
|
|
519
|
+
Zt(n)
|
|
520
|
+
].join("\0"), en = (e) => {
|
|
514
521
|
let [t = "~", n = "", r = ""] = e.split("\0");
|
|
515
522
|
return {
|
|
516
523
|
tenantId: t === "~" ? null : t,
|
|
517
524
|
event: n,
|
|
518
525
|
key: r
|
|
519
526
|
};
|
|
520
|
-
},
|
|
527
|
+
}, tn = (e) => e.split("\0").join(" · "), U = Symbol.for("@voltro/protocol/workflow-access"), nn = {
|
|
521
528
|
guards: void 0,
|
|
522
529
|
openAccess: void 0,
|
|
523
530
|
internal: !1
|
|
524
|
-
},
|
|
531
|
+
}, rn = (e, t) => {
|
|
525
532
|
let n = t.guards;
|
|
526
533
|
if (n !== void 0 && n.length === 0) throw Error(`workflow("${e}"): \`guards: []\` is empty, so it enforces nothing —\n but it reads at the call site as if the start were protected. Omit the field
|
|
527
534
|
and decide with \`openAccess\` or \`internal\`, or list the scopes that may start it.`);
|
|
@@ -541,16 +548,16 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
541
548
|
openAccess: t.openAccess?.trim(),
|
|
542
549
|
internal: t.internal === !0
|
|
543
550
|
};
|
|
544
|
-
},
|
|
551
|
+
}, an = (e, t) => {
|
|
545
552
|
Object.defineProperty(e, U, {
|
|
546
553
|
value: t,
|
|
547
554
|
enumerable: !1
|
|
548
555
|
});
|
|
549
556
|
}, W = (e) => {
|
|
550
|
-
if (typeof e != "object" || !e) return
|
|
557
|
+
if (typeof e != "object" || !e) return nn;
|
|
551
558
|
let t = e[U];
|
|
552
|
-
return t === void 0 ?
|
|
553
|
-
},
|
|
559
|
+
return t === void 0 ? nn : t;
|
|
560
|
+
}, on = (e) => {
|
|
554
561
|
let t = W(e);
|
|
555
562
|
return {
|
|
556
563
|
name: e.name,
|
|
@@ -558,18 +565,18 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
558
565
|
guards: t.guards,
|
|
559
566
|
openAccess: t.openAccess
|
|
560
567
|
};
|
|
561
|
-
},
|
|
568
|
+
}, sn = (e) => e, cn = (e) => e, ln = (e) => {
|
|
562
569
|
let t = e.alias?.trim(), n = e.instance?.trim(), r = t !== void 0 && t !== "" ? t : e.base;
|
|
563
570
|
return n !== void 0 && n !== "" ? `${r}#${n}` : r;
|
|
564
|
-
},
|
|
571
|
+
}, un = (e) => {
|
|
565
572
|
if (e.length !== 0) return (t, n) => e.reduceRight((e, t) => t(e, n), t);
|
|
566
|
-
},
|
|
573
|
+
}, dn = (e, t) => {
|
|
567
574
|
let n = He.GenericTag(e);
|
|
568
575
|
return {
|
|
569
576
|
Tag: n,
|
|
570
577
|
Live: Ue.succeed(n, t)
|
|
571
578
|
};
|
|
572
|
-
},
|
|
579
|
+
}, fn = (e, t, n) => {
|
|
573
580
|
if (!t) return { ok: !0 };
|
|
574
581
|
let r = n === void 0 ? null : G(n);
|
|
575
582
|
if (!r) return {
|
|
@@ -579,7 +586,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
579
586
|
let i = t.trim();
|
|
580
587
|
if (i === "*" || i === "") return { ok: !0 };
|
|
581
588
|
let a = i.split(/\s+/).filter((e) => e.length > 0);
|
|
582
|
-
for (let i of a) if (!
|
|
589
|
+
for (let i of a) if (!pn(i, r)) return {
|
|
583
590
|
ok: !1,
|
|
584
591
|
reason: `plugin "${e}" requires framework ${t}, running ${n}`
|
|
585
592
|
};
|
|
@@ -592,7 +599,7 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
592
599
|
patch: Number(t[3]),
|
|
593
600
|
pre: t[4] ?? ""
|
|
594
601
|
} : null;
|
|
595
|
-
}, K = (e, t) => e.major === t.major ? e.minor === t.minor ? e.patch === t.patch ? e.pre && !t.pre ? -1 : !e.pre && t.pre ? 1 : e.pre && t.pre ? e.pre < t.pre ? -1 : +(e.pre > t.pre) : 0 : e.patch - t.patch : e.minor - t.minor : e.major - t.major,
|
|
602
|
+
}, K = (e, t) => e.major === t.major ? e.minor === t.minor ? e.patch === t.patch ? e.pre && !t.pre ? -1 : !e.pre && t.pre ? 1 : e.pre && t.pre ? e.pre < t.pre ? -1 : +(e.pre > t.pre) : 0 : e.patch - t.patch : e.minor - t.minor : e.major - t.major, pn = (e, t) => {
|
|
596
603
|
if (e === "*") return !0;
|
|
597
604
|
if (e.startsWith("^")) {
|
|
598
605
|
let n = G(e.slice(1));
|
|
@@ -614,251 +621,251 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
614
621
|
}
|
|
615
622
|
let r = G(e);
|
|
616
623
|
return r ? K(t, r) === 0 : !1;
|
|
617
|
-
},
|
|
624
|
+
}, mn = (e) => {
|
|
618
625
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
619
626
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
|
|
620
|
-
},
|
|
627
|
+
}, hn = (e) => {
|
|
621
628
|
let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
|
|
622
629
|
return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
623
|
-
},
|
|
624
|
-
let e = globalThis, t = e[
|
|
630
|
+
}, gn = Symbol.for("@voltro/protocol/pluginAliases"), q = () => {
|
|
631
|
+
let e = globalThis, t = e[gn];
|
|
625
632
|
if (t instanceof Map) return t;
|
|
626
633
|
let n = /* @__PURE__ */ new Map();
|
|
627
|
-
return e[
|
|
628
|
-
},
|
|
634
|
+
return e[gn] = n, n;
|
|
635
|
+
}, _n = (e) => {
|
|
629
636
|
let t = q();
|
|
630
637
|
for (let [n, r] of Object.entries(e)) {
|
|
631
638
|
if (r === "") continue;
|
|
632
639
|
let e = t.get(n);
|
|
633
640
|
e === void 0 ? t.set(n, /* @__PURE__ */ new Set([r])) : e.add(r);
|
|
634
641
|
}
|
|
635
|
-
},
|
|
642
|
+
}, vn = () => {
|
|
636
643
|
q().clear();
|
|
637
|
-
},
|
|
644
|
+
}, yn = (e, t) => {
|
|
638
645
|
let n = q().get(e);
|
|
639
|
-
if (n === void 0 || n.size === 0) return `${
|
|
646
|
+
if (n === void 0 || n.size === 0) return `${mn(e)}.${t}`;
|
|
640
647
|
if (n.size === 1) return `${[...n][0]}.${t}`;
|
|
641
648
|
let r = [...n].filter((e) => !e.includes("#"));
|
|
642
649
|
if (r.length === 1) return `${r[0]}.${t}`;
|
|
643
650
|
throw Error(`[voltro] ${e} is installed more than once (${[...n].sort().join(", ")}) and no single install is the primary one, so a plugin hook cannot tell which of them it addresses. Call the route by its full tag instead — e.g. useSubscription(api, '${[...n].sort()[0]}.${t}').`);
|
|
644
|
-
}, J =
|
|
645
|
-
mode:
|
|
646
|
-
dueAt:
|
|
647
|
-
retryAfterMs:
|
|
648
|
-
intentId:
|
|
649
|
-
}),
|
|
650
|
-
id:
|
|
651
|
-
workflowName:
|
|
652
|
-
executionId:
|
|
653
|
-
status:
|
|
654
|
-
deferral:
|
|
655
|
-
}),
|
|
651
|
+
}, J = h.Literal("running", "succeeded", "failed", "cancelled", "suspended"), bn = h.Literal("cancel", "terminate", "abandon"), xn = h.Struct({
|
|
652
|
+
mode: h.String,
|
|
653
|
+
dueAt: h.NullOr(h.Number),
|
|
654
|
+
retryAfterMs: h.NullOr(h.Number),
|
|
655
|
+
intentId: h.NullOr(h.String)
|
|
656
|
+
}), Sn = h.Struct({
|
|
657
|
+
id: h.String,
|
|
658
|
+
workflowName: h.String,
|
|
659
|
+
executionId: h.NullOr(h.String),
|
|
660
|
+
status: h.Literal("running", "queued", "dropped", "skipped", "replayed"),
|
|
661
|
+
deferral: h.optional(xn)
|
|
662
|
+
}), Cn = (e, t) => {
|
|
656
663
|
let n = W(e);
|
|
657
|
-
return
|
|
658
|
-
payload:
|
|
659
|
-
success:
|
|
660
|
-
error:
|
|
664
|
+
return g.make(e.name, {
|
|
665
|
+
payload: E(e.payloadSchema, e.name, B(n.guards)),
|
|
666
|
+
success: Sn,
|
|
667
|
+
error: At({
|
|
661
668
|
errorSchema: e.errorSchema,
|
|
662
669
|
guards: n.guards
|
|
663
670
|
}, t)
|
|
664
671
|
});
|
|
665
|
-
}, Y =
|
|
666
|
-
id:
|
|
667
|
-
tag:
|
|
668
|
-
executionId:
|
|
672
|
+
}, Y = h.Struct({
|
|
673
|
+
id: h.String,
|
|
674
|
+
tag: h.String,
|
|
675
|
+
executionId: h.String,
|
|
669
676
|
status: J,
|
|
670
|
-
payload:
|
|
671
|
-
workflowVersion:
|
|
672
|
-
workflowPatches:
|
|
673
|
-
output:
|
|
674
|
-
subject:
|
|
675
|
-
source:
|
|
676
|
-
errorTag:
|
|
677
|
-
errorMessage:
|
|
678
|
-
cancelled:
|
|
679
|
-
startedAt:
|
|
680
|
-
completedAt:
|
|
681
|
-
durationMs:
|
|
682
|
-
traceId:
|
|
683
|
-
parentExecutionId:
|
|
684
|
-
parentClosePolicy:
|
|
685
|
-
}),
|
|
686
|
-
tag:
|
|
687
|
-
status:
|
|
688
|
-
limit:
|
|
689
|
-
}),
|
|
690
|
-
id:
|
|
691
|
-
runId:
|
|
692
|
-
stepName:
|
|
693
|
-
attempt:
|
|
694
|
-
status:
|
|
695
|
-
input:
|
|
696
|
-
retryPolicy:
|
|
697
|
-
output:
|
|
698
|
-
errorTag:
|
|
699
|
-
errorMessage:
|
|
700
|
-
errorCause:
|
|
701
|
-
startedAt:
|
|
702
|
-
completedAt:
|
|
703
|
-
durationMs:
|
|
704
|
-
}),
|
|
705
|
-
id:
|
|
706
|
-
runId:
|
|
707
|
-
eventType:
|
|
708
|
-
payload:
|
|
709
|
-
occurredAt:
|
|
710
|
-
stepName:
|
|
711
|
-
attempt:
|
|
712
|
-
}),
|
|
713
|
-
id:
|
|
714
|
-
name:
|
|
715
|
-
payload:
|
|
716
|
-
source:
|
|
717
|
-
subject:
|
|
718
|
-
traceId:
|
|
719
|
-
occurredAt:
|
|
720
|
-
}),
|
|
721
|
-
id:
|
|
722
|
-
eventId:
|
|
723
|
-
eventName:
|
|
724
|
-
triggerId:
|
|
725
|
-
workflowName:
|
|
726
|
-
executionId:
|
|
727
|
-
status:
|
|
728
|
-
idempotencyKey:
|
|
729
|
-
skipped:
|
|
730
|
-
errorMessage:
|
|
731
|
-
createdAt:
|
|
732
|
-
completedAt:
|
|
733
|
-
}),
|
|
734
|
-
name:
|
|
735
|
-
limit:
|
|
736
|
-
}),
|
|
737
|
-
workflowName:
|
|
738
|
-
executionId:
|
|
739
|
-
}),
|
|
740
|
-
id:
|
|
741
|
-
signalName:
|
|
742
|
-
payload:
|
|
743
|
-
}),
|
|
744
|
-
id:
|
|
745
|
-
updateName:
|
|
746
|
-
payload:
|
|
747
|
-
timeoutMs:
|
|
748
|
-
}),
|
|
749
|
-
eventId:
|
|
750
|
-
updateId:
|
|
751
|
-
completedEventId:
|
|
752
|
-
result:
|
|
753
|
-
}),
|
|
677
|
+
payload: h.Unknown,
|
|
678
|
+
workflowVersion: h.NullOr(h.String),
|
|
679
|
+
workflowPatches: h.NullOr(h.Unknown),
|
|
680
|
+
output: h.NullOr(h.Unknown),
|
|
681
|
+
subject: h.NullOr(h.Unknown),
|
|
682
|
+
source: h.NullOr(h.String),
|
|
683
|
+
errorTag: h.NullOr(h.String),
|
|
684
|
+
errorMessage: h.NullOr(h.String),
|
|
685
|
+
cancelled: h.Boolean,
|
|
686
|
+
startedAt: h.Date,
|
|
687
|
+
completedAt: h.NullOr(h.Date),
|
|
688
|
+
durationMs: h.NullOr(h.Number),
|
|
689
|
+
traceId: h.NullOr(h.String),
|
|
690
|
+
parentExecutionId: h.NullOr(h.String),
|
|
691
|
+
parentClosePolicy: h.NullOr(bn)
|
|
692
|
+
}), wn = h.Struct({
|
|
693
|
+
tag: h.optional(h.String),
|
|
694
|
+
status: h.optional(J),
|
|
695
|
+
limit: h.optional(h.Number)
|
|
696
|
+
}), Tn = h.Struct({
|
|
697
|
+
id: h.String,
|
|
698
|
+
runId: h.String,
|
|
699
|
+
stepName: h.String,
|
|
700
|
+
attempt: h.Number,
|
|
701
|
+
status: h.Literal("running", "succeeded", "failed"),
|
|
702
|
+
input: h.NullOr(h.Unknown),
|
|
703
|
+
retryPolicy: h.NullOr(h.Unknown),
|
|
704
|
+
output: h.NullOr(h.Unknown),
|
|
705
|
+
errorTag: h.NullOr(h.String),
|
|
706
|
+
errorMessage: h.NullOr(h.String),
|
|
707
|
+
errorCause: h.NullOr(h.Unknown),
|
|
708
|
+
startedAt: h.Date,
|
|
709
|
+
completedAt: h.NullOr(h.Date),
|
|
710
|
+
durationMs: h.NullOr(h.Number)
|
|
711
|
+
}), En = h.Struct({
|
|
712
|
+
id: h.String,
|
|
713
|
+
runId: h.String,
|
|
714
|
+
eventType: h.String,
|
|
715
|
+
payload: h.NullOr(h.Unknown),
|
|
716
|
+
occurredAt: h.Date,
|
|
717
|
+
stepName: h.NullOr(h.String),
|
|
718
|
+
attempt: h.NullOr(h.Number)
|
|
719
|
+
}), Dn = h.Struct({
|
|
720
|
+
id: h.String,
|
|
721
|
+
name: h.String,
|
|
722
|
+
payload: h.Unknown,
|
|
723
|
+
source: h.String,
|
|
724
|
+
subject: h.NullOr(h.Unknown),
|
|
725
|
+
traceId: h.NullOr(h.String),
|
|
726
|
+
occurredAt: h.Date
|
|
727
|
+
}), On = h.Struct({
|
|
728
|
+
id: h.String,
|
|
729
|
+
eventId: h.String,
|
|
730
|
+
eventName: h.String,
|
|
731
|
+
triggerId: h.String,
|
|
732
|
+
workflowName: h.String,
|
|
733
|
+
executionId: h.NullOr(h.String),
|
|
734
|
+
status: h.Literal("starting", "started", "skipped", "failed"),
|
|
735
|
+
idempotencyKey: h.String,
|
|
736
|
+
skipped: h.Boolean,
|
|
737
|
+
errorMessage: h.NullOr(h.String),
|
|
738
|
+
createdAt: h.Date,
|
|
739
|
+
completedAt: h.NullOr(h.Date)
|
|
740
|
+
}), kn = h.Struct({ id: h.String }), X = h.Struct({ runId: h.String }), An = h.Struct({
|
|
741
|
+
name: h.optional(h.String),
|
|
742
|
+
limit: h.optional(h.Number)
|
|
743
|
+
}), jn = h.Struct({ eventId: h.String }), Z = h.Struct({
|
|
744
|
+
workflowName: h.String,
|
|
745
|
+
executionId: h.String
|
|
746
|
+
}), Mn = h.Struct({
|
|
747
|
+
id: h.String,
|
|
748
|
+
signalName: h.String,
|
|
749
|
+
payload: h.optional(h.Unknown)
|
|
750
|
+
}), Nn = h.Struct({
|
|
751
|
+
id: h.String,
|
|
752
|
+
updateName: h.String,
|
|
753
|
+
payload: h.optional(h.Unknown),
|
|
754
|
+
timeoutMs: h.optional(h.Number)
|
|
755
|
+
}), Pn = h.Struct({
|
|
756
|
+
eventId: h.String,
|
|
757
|
+
updateId: h.String,
|
|
758
|
+
completedEventId: h.String,
|
|
759
|
+
result: h.Unknown
|
|
760
|
+
}), Fn = I({
|
|
754
761
|
name: "__voltro.workflow.run",
|
|
755
762
|
source: "_voltro_workflow_runs",
|
|
756
|
-
input:
|
|
757
|
-
output:
|
|
758
|
-
}),
|
|
763
|
+
input: kn,
|
|
764
|
+
output: h.Array(Y)
|
|
765
|
+
}), In = I({
|
|
759
766
|
name: "__voltro.workflow.runs",
|
|
760
767
|
source: "_voltro_workflow_runs",
|
|
761
|
-
input:
|
|
762
|
-
output:
|
|
763
|
-
}),
|
|
768
|
+
input: wn,
|
|
769
|
+
output: h.Array(Y)
|
|
770
|
+
}), Ln = I({
|
|
764
771
|
name: "__voltro.workflow.run.steps",
|
|
765
772
|
source: "_voltro_workflow_run_steps",
|
|
766
773
|
input: X,
|
|
767
|
-
output:
|
|
768
|
-
}),
|
|
774
|
+
output: h.Array(Tn)
|
|
775
|
+
}), Rn = I({
|
|
769
776
|
name: "__voltro.workflow.run.events",
|
|
770
777
|
source: "_voltro_workflow_run_events",
|
|
771
778
|
input: X,
|
|
772
|
-
output:
|
|
773
|
-
}),
|
|
779
|
+
output: h.Array(En)
|
|
780
|
+
}), zn = I({
|
|
774
781
|
name: "__voltro.workflow.domainEvents",
|
|
775
782
|
source: "_voltro_workflow_events",
|
|
776
|
-
input:
|
|
777
|
-
output:
|
|
778
|
-
}),
|
|
783
|
+
input: An,
|
|
784
|
+
output: h.Array(Dn)
|
|
785
|
+
}), Bn = I({
|
|
779
786
|
name: "__voltro.workflow.event.deliveries",
|
|
780
787
|
source: "_voltro_workflow_event_deliveries",
|
|
781
|
-
input:
|
|
782
|
-
output:
|
|
783
|
-
}),
|
|
788
|
+
input: jn,
|
|
789
|
+
output: h.Array(On)
|
|
790
|
+
}), Vn = R({
|
|
784
791
|
name: "__voltro.workflow.cancel",
|
|
785
792
|
input: Z,
|
|
786
|
-
output:
|
|
787
|
-
}),
|
|
793
|
+
output: h.Struct({ ok: h.Boolean })
|
|
794
|
+
}), Hn = R({
|
|
788
795
|
name: "__voltro.workflow.resume",
|
|
789
796
|
input: Z,
|
|
790
|
-
output:
|
|
791
|
-
}), Hn = R({
|
|
792
|
-
name: "__voltro.workflow.signal",
|
|
793
|
-
input: jn,
|
|
794
|
-
output: m.Struct({ eventId: m.String })
|
|
797
|
+
output: h.Struct({ ok: h.Boolean })
|
|
795
798
|
}), Un = R({
|
|
796
|
-
name: "__voltro.workflow.
|
|
799
|
+
name: "__voltro.workflow.signal",
|
|
797
800
|
input: Mn,
|
|
798
|
-
output:
|
|
799
|
-
}), Wn =
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
801
|
+
output: h.Struct({ eventId: h.String })
|
|
802
|
+
}), Wn = R({
|
|
803
|
+
name: "__voltro.workflow.update",
|
|
804
|
+
input: Nn,
|
|
805
|
+
output: Pn
|
|
806
|
+
}), Gn = "__voltro.undo.log", Kn = "__voltro.undo.apply", qn = "__voltro.undo.redo", Jn = h.Struct({
|
|
807
|
+
id: h.String,
|
|
808
|
+
tag: h.String,
|
|
809
|
+
label: h.NullOr(h.String),
|
|
810
|
+
undone: h.Boolean,
|
|
811
|
+
crossesAction: h.Boolean,
|
|
812
|
+
createdAt: h.String
|
|
813
|
+
}), Yn = class extends h.TaggedError()("UndoNotFound", { invocationId: h.String }) {}, Xn = class extends h.TaggedError()("UndoForbidden", { invocationId: h.String }) {}, Zn = class extends h.TaggedError()("UndoConflict", {
|
|
814
|
+
invocationId: h.String,
|
|
815
|
+
reason: h.Literal("conflict", "action")
|
|
816
|
+
}) {}, Qn = h.Union(Yn, Xn, Zn), $n = I({
|
|
817
|
+
name: Gn,
|
|
811
818
|
source: "_voltro_undo_log",
|
|
812
|
-
input:
|
|
813
|
-
output:
|
|
819
|
+
input: h.Struct({ limit: h.optional(h.Number) }),
|
|
820
|
+
output: h.Array(Jn),
|
|
814
821
|
openAccess: "subject-scoped by construction: lists only the calling subject's own undoable actions"
|
|
815
|
-
}), $n = L({
|
|
816
|
-
name: Gn,
|
|
817
|
-
input: m.Struct({ invocationId: m.String }),
|
|
818
|
-
output: m.Struct({ ok: m.Boolean }),
|
|
819
|
-
error: Zn,
|
|
820
|
-
openAccess: "subject-scoped by construction: undo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
821
822
|
}), er = L({
|
|
822
823
|
name: Kn,
|
|
823
|
-
input:
|
|
824
|
-
output:
|
|
825
|
-
error:
|
|
824
|
+
input: h.Struct({ invocationId: h.String }),
|
|
825
|
+
output: h.Struct({ ok: h.Boolean }),
|
|
826
|
+
error: Qn,
|
|
827
|
+
openAccess: "subject-scoped by construction: undo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
828
|
+
}), tr = L({
|
|
829
|
+
name: qn,
|
|
830
|
+
input: h.Struct({ invocationId: h.String }),
|
|
831
|
+
output: h.Struct({ ok: h.Boolean }),
|
|
832
|
+
error: Qn,
|
|
826
833
|
openAccess: "subject-scoped by construction: redo is per-actor — another subject's invocation fails typed with UndoForbidden"
|
|
827
|
-
}),
|
|
828
|
-
table:
|
|
829
|
-
reason:
|
|
830
|
-
}) {},
|
|
831
|
-
operation:
|
|
832
|
-
table:
|
|
833
|
-
cause:
|
|
834
|
-
}) {},
|
|
835
|
-
table:
|
|
836
|
-
found:
|
|
834
|
+
}), nr = class extends h.TaggedError()("TenantScopeViolation", {
|
|
835
|
+
table: h.String,
|
|
836
|
+
reason: h.String
|
|
837
|
+
}) {}, rr = class extends h.TaggedError()("StoreOperationFailed", {
|
|
838
|
+
operation: h.String,
|
|
839
|
+
table: h.String,
|
|
840
|
+
cause: h.String
|
|
841
|
+
}) {}, ir = class extends h.TaggedError()("NoRowFound", {
|
|
842
|
+
table: h.String,
|
|
843
|
+
found: h.Number
|
|
837
844
|
}) {
|
|
838
845
|
get message() {
|
|
839
846
|
return this.found === 0 ? `expected exactly one row in '${this.table}', found none` : `expected exactly one row in '${this.table}', found more than one`;
|
|
840
847
|
}
|
|
841
|
-
},
|
|
842
|
-
table:
|
|
843
|
-
summary:
|
|
844
|
-
issues:
|
|
845
|
-
path:
|
|
846
|
-
message:
|
|
848
|
+
}, ar = class extends h.TaggedError()("TableValidationFailed", {
|
|
849
|
+
table: h.String,
|
|
850
|
+
summary: h.String,
|
|
851
|
+
issues: h.Array(h.Struct({
|
|
852
|
+
path: h.String,
|
|
853
|
+
message: h.String
|
|
847
854
|
}))
|
|
848
|
-
}) {},
|
|
849
|
-
table:
|
|
850
|
-
id:
|
|
851
|
-
reason:
|
|
852
|
-
}) {},
|
|
853
|
-
table:
|
|
854
|
-
columns:
|
|
855
|
-
}) {},
|
|
856
|
-
kind:
|
|
857
|
-
table:
|
|
858
|
-
operation:
|
|
859
|
-
constraint:
|
|
860
|
-
column:
|
|
861
|
-
detail:
|
|
855
|
+
}) {}, or = class extends h.TaggedError()("TenantRowNotFound", {
|
|
856
|
+
table: h.String,
|
|
857
|
+
id: h.String,
|
|
858
|
+
reason: h.String
|
|
859
|
+
}) {}, sr = class extends h.TaggedError()("ServerOnlyColumnWrite", {
|
|
860
|
+
table: h.String,
|
|
861
|
+
columns: h.Array(h.String)
|
|
862
|
+
}) {}, cr = class extends h.TaggedError()("ConstraintViolation", {
|
|
863
|
+
kind: h.Literal("foreignKey", "foreignKeyInUse", "unique", "notNull", "check"),
|
|
864
|
+
table: h.String,
|
|
865
|
+
operation: h.String,
|
|
866
|
+
constraint: h.optional(h.String),
|
|
867
|
+
column: h.optional(h.String),
|
|
868
|
+
detail: h.optional(h.String)
|
|
862
869
|
}) {
|
|
863
870
|
get message() {
|
|
864
871
|
if (this.detail !== void 0) return this.detail;
|
|
@@ -871,85 +878,85 @@ var Ge = m.Union(m.String, m.Number), g = m.Record({
|
|
|
871
878
|
case "check": return `check constraint ${t}: the row does not satisfy it`;
|
|
872
879
|
}
|
|
873
880
|
}
|
|
874
|
-
},
|
|
875
|
-
name:
|
|
881
|
+
}, lr = "__voltro.approvals.pending", ur = "__voltro.approvals.decide", dr = I({
|
|
882
|
+
name: lr,
|
|
876
883
|
source: "_voltro_approvals",
|
|
877
|
-
input:
|
|
878
|
-
output:
|
|
884
|
+
input: h.Struct({ limit: h.optional(h.Number) }),
|
|
885
|
+
output: h.Array(ct),
|
|
879
886
|
openAccess: "the answer is scoped to the caller — a row appears only if they requested it or hold its recorded approver scopes, so an anonymous caller sees nothing"
|
|
880
|
-
}),
|
|
881
|
-
name:
|
|
882
|
-
input:
|
|
883
|
-
approvalId:
|
|
884
|
-
decision:
|
|
885
|
-
note:
|
|
887
|
+
}), fr = L({
|
|
888
|
+
name: ur,
|
|
889
|
+
input: h.Struct({
|
|
890
|
+
approvalId: h.String,
|
|
891
|
+
decision: h.Literal("approve", "reject"),
|
|
892
|
+
note: h.optional(h.String)
|
|
886
893
|
}),
|
|
887
|
-
output:
|
|
888
|
-
approvalId:
|
|
889
|
-
status:
|
|
894
|
+
output: h.Struct({
|
|
895
|
+
approvalId: h.String,
|
|
896
|
+
status: h.Literal("approved", "rejected")
|
|
890
897
|
}),
|
|
891
|
-
error:
|
|
898
|
+
error: st,
|
|
892
899
|
openAccess: "the approver authority is the PENDING ROW's own recorded scopes (plus an unconditional self-approval refusal), checked in-handler — a descriptor-level scope would have to be the union of every approval-requiring procedure in the app"
|
|
893
|
-
}),
|
|
894
|
-
connectionId:
|
|
900
|
+
}), pr = "__voltro.connections.list", mr = "__voltro.connections.start", hr = "__voltro.connections.submitToken", gr = "__voltro.connections.disconnect", Q = h.Literal("oauth2", "pat"), _r = h.Literal("disconnected", "connected", "expired", "revoked", "error"), vr = h.Struct({
|
|
901
|
+
connectionId: h.String,
|
|
895
902
|
kind: Q,
|
|
896
|
-
label:
|
|
897
|
-
status:
|
|
898
|
-
accountId:
|
|
899
|
-
accountLabel:
|
|
900
|
-
scopes:
|
|
901
|
-
expiresAt:
|
|
902
|
-
lastError:
|
|
903
|
-
connectedAt:
|
|
904
|
-
}),
|
|
905
|
-
connectionId:
|
|
903
|
+
label: h.String,
|
|
904
|
+
status: _r,
|
|
905
|
+
accountId: h.NullOr(h.String),
|
|
906
|
+
accountLabel: h.NullOr(h.String),
|
|
907
|
+
scopes: h.Array(h.String),
|
|
908
|
+
expiresAt: h.NullOr(h.String),
|
|
909
|
+
lastError: h.NullOr(h.String),
|
|
910
|
+
connectedAt: h.NullOr(h.String)
|
|
911
|
+
}), yr = class extends h.TaggedError()("ConnectionNotDeclared", { connectionId: h.String }) {}, br = class extends h.TaggedError()("ConnectionSubjectRequired", { connectionId: h.String }) {}, xr = class extends h.TaggedError()("ConnectionKindMismatch", {
|
|
912
|
+
connectionId: h.String,
|
|
906
913
|
expected: Q,
|
|
907
914
|
actual: Q
|
|
908
|
-
}) {},
|
|
909
|
-
connectionId:
|
|
910
|
-
reason:
|
|
911
|
-
transient:
|
|
912
|
-
}) {}, $ =
|
|
913
|
-
name:
|
|
915
|
+
}) {}, Sr = class extends h.TaggedError()("ConnectionHandshakeFailed", {
|
|
916
|
+
connectionId: h.String,
|
|
917
|
+
reason: h.String,
|
|
918
|
+
transient: h.Boolean
|
|
919
|
+
}) {}, $ = h.Union(yr, br, xr, Sr), Cr = I({
|
|
920
|
+
name: pr,
|
|
914
921
|
source: "_voltro_connections",
|
|
915
|
-
input:
|
|
916
|
-
output:
|
|
922
|
+
input: h.Struct({}),
|
|
923
|
+
output: h.Array(vr),
|
|
917
924
|
openAccess: "self-scoped read: projects the declared connections for the calling subject only (its own connect/disconnect state)"
|
|
918
|
-
}),
|
|
919
|
-
name:
|
|
920
|
-
input:
|
|
921
|
-
connectionId:
|
|
922
|
-
redirectTo:
|
|
925
|
+
}), wr = R({
|
|
926
|
+
name: mr,
|
|
927
|
+
input: h.Struct({
|
|
928
|
+
connectionId: h.String,
|
|
929
|
+
redirectTo: h.optional(h.String)
|
|
923
930
|
}),
|
|
924
|
-
output:
|
|
925
|
-
authorizeUrl:
|
|
926
|
-
state:
|
|
931
|
+
output: h.Struct({
|
|
932
|
+
authorizeUrl: h.String,
|
|
933
|
+
state: h.String
|
|
927
934
|
}),
|
|
928
935
|
error: $,
|
|
929
936
|
openAccess: "self-service: begins an oauth handshake that stores a credential for the calling subject only; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
930
|
-
}),
|
|
931
|
-
name:
|
|
932
|
-
input:
|
|
933
|
-
connectionId:
|
|
934
|
-
token:
|
|
937
|
+
}), Tr = L({
|
|
938
|
+
name: hr,
|
|
939
|
+
input: h.Struct({
|
|
940
|
+
connectionId: h.String,
|
|
941
|
+
token: h.String
|
|
935
942
|
}),
|
|
936
|
-
output:
|
|
943
|
+
output: h.Struct({ ok: h.Boolean }),
|
|
937
944
|
error: $,
|
|
938
945
|
openAccess: "self-service: stores a pasted token as the calling subject's own credential; anonymous callers fail typed with ConnectionSubjectRequired"
|
|
939
|
-
}),
|
|
940
|
-
name:
|
|
941
|
-
input:
|
|
942
|
-
output:
|
|
946
|
+
}), Er = L({
|
|
947
|
+
name: gr,
|
|
948
|
+
input: h.Struct({ connectionId: h.String }),
|
|
949
|
+
output: h.Struct({ ok: h.Boolean }),
|
|
943
950
|
error: $,
|
|
944
951
|
openAccess: "self-service: deletes only the calling subject's own credential row for this connection"
|
|
945
|
-
}),
|
|
952
|
+
}), Dr = (e) => {
|
|
946
953
|
let t = e instanceof Date ? e.getTime() : typeof e == "number" ? e : typeof e == "string" ? new Date(e).getTime() : 0;
|
|
947
954
|
return Number.isNaN(t) ? 0 : t;
|
|
948
|
-
},
|
|
955
|
+
}, Or = 4001, kr = /* @__PURE__ */ new Set(["/rpc", "/ws"]), Ar = (e) => {
|
|
949
956
|
if (!e.path.startsWith("/")) throw Error(`defineWebSocket: path must be absolute, got '${e.path}'`);
|
|
950
|
-
if (
|
|
957
|
+
if (kr.has(e.path)) throw Error(`defineWebSocket: '${e.path}' is the framework's own socket surface — mount the gateway elsewhere`);
|
|
951
958
|
if (e.auth !== "subject" && e.auth !== "public") throw Error(`defineWebSocket: auth must be 'subject' or 'public' (explicitly — an unauthenticated socket has to be a decision somebody wrote down), got '${String(e.auth)}'`);
|
|
952
959
|
return e;
|
|
953
|
-
},
|
|
960
|
+
}, jr = 1;
|
|
954
961
|
//#endregion
|
|
955
|
-
export { De as ADMIN_SCOPE, Se as APIKEY_ISSUE_ORG_SCOPE, Te as APIKEY_ISSUE_OTHER_SCOPE, _e as APIKEY_ISSUE_SELF_SCOPE,
|
|
962
|
+
export { De as ADMIN_SCOPE, Se as APIKEY_ISSUE_ORG_SCOPE, Te as APIKEY_ISSUE_OTHER_SCOPE, _e as APIKEY_ISSUE_SELF_SCOPE, ur as APPROVALS_DECIDE_TAG, lr as APPROVALS_PENDING_TAG, st as ApprovalDecisionErrors, ot as ApprovalErrors, k as ApprovalExpired, at as ApprovalForbidden, tt as ApprovalNotFound, it as ApprovalNotPending, rt as ApprovalRejected, et as ApprovalRequired, nt as ApprovalSelfApproval, A as ApprovalUnavailable, se as AuthMiddleware, D as BusinessRuleViolation, pr as CONNECTIONS_LIST_TAG, gr as CONNECTION_DISCONNECT_TAG, mr as CONNECTION_START_TAG, hr as CONNECTION_SUBMIT_TOKEN_TAG, Sr as ConnectionHandshakeFailed, i as ConnectionInfo, r as ConnectionInfoMiddleware, Q as ConnectionKind, xr as ConnectionKindMismatch, yr as ConnectionNotDeclared, vr as ConnectionState, _r as ConnectionStatus, br as ConnectionSubjectRequired, cr as ConstraintViolation, ie as DEFAULT_SCOPE_CACHE_MAX_ENTRIES, ye as DEFAULT_SCOPE_CACHE_TTL_MS, Qt as EVENT_ROUTE_SEP, Yt as EventKeyInvalid, Jt as EventPayloadInvalid, Xt as EventPayloadTooLarge, Or as GATEWAY_CREDENTIAL_EXPIRED_CLOSE_CODE, e as IMPERSONATION_METADATA_KEY, zt as MAX_EVENT_ENVELOPE_BYTES, Re as MUTATION_IN_FLIGHT_RETRY_AFTER_MS, m as MutationConnectionRequired, p as MutationInFlight, ir as NoRowFound, jr as PROTOCOL_VERSION, ct as PendingApproval, j as REACTIVITY_CHANNEL_PREFIX, u as ScopeError, sr as ServerOnlyColumnWrite, rr as StoreOperationFailed, ve as Subject, ne as SubjectIdentity, re as SubjectService, ar as TableValidationFailed, or as TenantRowNotFound, nr as TenantScopeViolation, Kn as UNDO_APPLY_TAG, Gn as UNDO_LOG_TAG, qn as UNDO_REDO_TAG, l as Unauthenticated, Zn as UndoConflict, Xn as UndoForbidden, Jn as UndoLogEntry, Yn as UndoNotFound, Ze as ValidationError, Qe as ValidationErrors, O as ValidationIssue, U as WorkflowAccessProperty, Z as WorkflowControlInputSchema, Dn as WorkflowDomainEventRowSchema, An as WorkflowDomainEventsInputSchema, jn as WorkflowEventDeliveriesInputSchema, On as WorkflowEventDeliveryRowSchema, bn as WorkflowParentClosePolicySchema, En as WorkflowRunEventRowSchema, Sn as WorkflowRunHandleSchema, kn as WorkflowRunRefSchema, Y as WorkflowRunRowSchema, J as WorkflowRunStatusSchema, Tn as WorkflowRunStepRowSchema, X as WorkflowRunTableRefSchema, wn as WorkflowRunsInputSchema, Mn as WorkflowSignalInputSchema, xn as WorkflowStartDeferralSchema, Nn as WorkflowUpdateInputSchema, Pn as WorkflowUpdateResultSchema, Pt as actionToRpc, Ce as advisoryResourceGuardWarning, a as anonymousSubject, Ye as applyRowPatch, c as applyScopeDecision, fr as approvalsDecideDescriptor, dr as approvalsPendingQueryDescriptor, te as assertAuthenticated, an as attachWorkflowAccess, Le as beginIdempotent, fn as checkFrameworkCompat, Ee as checkGuards, pe as checkGuardsEffect, ae as composeAuthStrategies, un as composeRpcInterceptors, Er as connectionDisconnectDescriptor, wr as connectionStartDescriptor, Tr as connectionSubmitTokenDescriptor, Cr as connectionsListQueryDescriptor, ht as declaredReactivityChannelKeys, R as defineAction, Vt as defineEvent, L as defineMutation, sn as definePlugin, cn as definePluginRoute, dn as definePluginService, I as defineQuery, Tt as defineStream, Ar as defineWebSocket, qe as diffRows, be as effectiveScopes, Zt as encodeEventKey, It as errorTag, Wt as eventAttached, Ht as eventEnvelope, Ut as eventGap, Gt as eventResumePoint, $t as eventRoute, H as eventStreamEvent, Kt as eventSubscribeInput, qt as eventToRpc, ze as failIdempotent, $e as fieldIssuesOf, Oe as findAdvisoryResourceGuards, Ne as finishIdempotent, tn as formatEventRoute, me as getPolicyGuardResolver, he as getResourceScopeResolver, W as getWorkflowAccess, wt as hasAccessDecision, Me as hasCallbackRoutes, we as hasEffectiveScope, B as hasEnforcedGuard, xe as hasScope, b as idToPath, Fe as idempotencyScope, T as inputLabel, ge as isAuthenticatedCheck, Ct as isAuthenticatedGuard, Bt as isEventDescriptor, Je as isIdKeyed, d as isOpenAccess, de as isPolicyCheck, St as isPolicyGuard, pt as isReactivityChannel, mt as isReactivityChannelKey, t as isSystemSubject, bt as isWireReachable, le as makeScopeCache, Ve as memoryIdempotencyStore, ke as missingAccessDecision, Nt as mutationToRpc, Rt as normalizeDescriptor, _t as normalizeSource, f as openAccessSpec, en as parseEventRoute, x as pathToId, mn as pluginAlias, ln as pluginInstanceName, hn as pluginSlug, yn as pluginTag, yt as publishReactivity, Be as publishServerError, Mt as queryToRpc, s as rawImpersonationMark, ft as reactivityChannel, _n as registerPluginAliases, fe as requireScope, vn as resetPluginAliases, rn as resolveWorkflowAccess, v as rowPatchOpSchema, y as rowPatchSchema, ce as scopeCacheKey, je as setEffectiveScopes, oe as setPolicyGuardResolver, n as setResourceScopeResolver, gt as sourceKeys, Ft as streamToRpc, E as strictInput, ue as subjectIdentity, Ae as subjectScopes, Ie as subscribeServerErrors, w as subscriptionEvent, o as systemSubject, ee as tenantScopedSubject, Lt as toRpc, Dr as tsMs, vt as undeclaredChannelKeys, er as undoApplyDescriptor, $n as undoLogQueryDescriptor, tr as undoRedoDescriptor, V as wireErrorUnion, jt as withRpcTag, on as workflowAccessDescriptor, Vn as workflowCancelDescriptor, zn as workflowDomainEventsQueryDescriptor, Bn as workflowEventDeliveriesQueryDescriptor, Hn as workflowResumeDescriptor, Rn as workflowRunEventsQueryDescriptor, Fn as workflowRunQueryDescriptor, Ln as workflowRunStepsQueryDescriptor, In as workflowRunsQueryDescriptor, Un as workflowSignalDescriptor, Cn as workflowToRpc, Wn as workflowUpdateDescriptor, At as workflowWireErrorUnion, Pe as wsMutationIdempotencyScope };
|