@voltro/protocol 0.32.0 → 0.34.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 +2006 -0
- package/dist/auth-B6YZuSBr.js +303 -0
- package/dist/index.d.ts +1052 -27
- package/dist/index.js +267 -148
- package/dist/rest.d.ts +115 -3
- package/dist/rest.js +12 -12
- package/dist/serverErrorBus-BeN9pOpY.js +43 -0
- package/dist/session.d.ts +77 -16
- package/dist/session.js +62 -49
- package/package.json +5 -3
- package/dist/auth-CXMrvPyX.js +0 -90
- package/dist/serverErrorBus-C3JTqgIc.js +0 -157
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { Context as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, H as ee, I as te, L as ne, M as re, N as ie, O as ae, P as oe, R as o, S as se, T as s, U as ce, V as le, _ as ue, a as de, b as fe, c as pe, d as me, f as he, g as ge, h as _e, i as ve, j as ye, k as be, l as xe, m as Se, n as Ce, o as we, p as Te, r as Ee, s as De, t as Oe, u as ke, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./auth-B6YZuSBr.js";
|
|
2
|
+
import { a as Fe, c as Ie, i as Le, n as Re, o as ze, r as Be, s as Ve, t as He } from "./serverErrorBus-BeN9pOpY.js";
|
|
3
|
+
import { Context as Ue, Layer as We, Schema as c } from "effect";
|
|
4
4
|
import { Rpc as l } from "@effect/rpc";
|
|
5
5
|
//#region src/rowPatch.ts
|
|
6
|
-
var
|
|
6
|
+
var Ge = c.Union(c.String, c.Number), u = c.Record({
|
|
7
7
|
key: c.String,
|
|
8
8
|
value: c.Unknown
|
|
9
9
|
}).pipe(c.filter((e) => "id" in e, { message: () => "patch row must carry an id" })), d = c.Union(c.Struct({
|
|
@@ -19,12 +19,12 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
19
19
|
path: c.String
|
|
20
20
|
})), f = c.Struct({
|
|
21
21
|
ops: c.Array(d),
|
|
22
|
-
order: c.Array(
|
|
23
|
-
}), p = (e) => `/${String(e).replace(/~/g, "~0").replace(/\//g, "~1")}`,
|
|
22
|
+
order: c.Array(Ge)
|
|
23
|
+
}), p = (e) => `/${String(e).replace(/~/g, "~0").replace(/\//g, "~1")}`, Ke = (e) => (e.startsWith("/") ? e.slice(1) : e).replace(/~1/g, "/").replace(/~0/g, "~"), m = (e) => {
|
|
24
24
|
let t = Object.keys(e).sort(), n = {};
|
|
25
25
|
for (let r of t) n[r] = e[r];
|
|
26
26
|
return JSON.stringify(n);
|
|
27
|
-
},
|
|
27
|
+
}, qe = (e, t) => m(e) === m(t), Je = (e, t) => {
|
|
28
28
|
let n = /* @__PURE__ */ new Map();
|
|
29
29
|
for (let t of e) n.set(t.id, t);
|
|
30
30
|
let r = [], i = [], a = /* @__PURE__ */ new Set();
|
|
@@ -35,7 +35,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
35
35
|
op: "add",
|
|
36
36
|
path: p(e.id),
|
|
37
37
|
value: e
|
|
38
|
-
}) :
|
|
38
|
+
}) : qe(t, e) || r.push({
|
|
39
39
|
op: "replace",
|
|
40
40
|
path: p(e.id),
|
|
41
41
|
value: e
|
|
@@ -49,10 +49,10 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
49
49
|
ops: r,
|
|
50
50
|
order: i
|
|
51
51
|
};
|
|
52
|
-
},
|
|
52
|
+
}, Ye = (e) => e.every((e) => {
|
|
53
53
|
let t = e.id;
|
|
54
54
|
return typeof t == "string" || typeof t == "number";
|
|
55
|
-
}),
|
|
55
|
+
}), Xe = (e, t) => {
|
|
56
56
|
let n = /* @__PURE__ */ new Map();
|
|
57
57
|
for (let t of e) n.set(t.id, t);
|
|
58
58
|
for (let e of t.ops) (e.op === "add" || e.op === "replace") && n.set(e.value.id, e.value);
|
|
@@ -62,7 +62,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
62
62
|
t !== void 0 && r.push(t);
|
|
63
63
|
}
|
|
64
64
|
return r;
|
|
65
|
-
},
|
|
65
|
+
}, h = (e) => c.Union(c.Struct({
|
|
66
66
|
_tag: c.Literal("snapshot"),
|
|
67
67
|
revision: c.Number,
|
|
68
68
|
data: e,
|
|
@@ -76,7 +76,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
76
76
|
_tag: c.Literal("error"),
|
|
77
77
|
error: c.Unknown,
|
|
78
78
|
revision: c.optional(c.Number)
|
|
79
|
-
})),
|
|
79
|
+
})), g = class extends c.TaggedError()("BusinessRuleViolation", {
|
|
80
80
|
rule: c.String,
|
|
81
81
|
params: c.optional(c.Record({
|
|
82
82
|
key: c.String,
|
|
@@ -85,59 +85,155 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
85
85
|
field: c.optional(c.String),
|
|
86
86
|
message: c.optional(c.String),
|
|
87
87
|
severity: c.Literal("error", "warning")
|
|
88
|
-
}) {},
|
|
89
|
-
|
|
88
|
+
}) {}, _ = class extends c.TaggedError()("ApprovalRequired", {
|
|
89
|
+
approvalId: c.String,
|
|
90
|
+
procedure: c.String,
|
|
91
|
+
expiresAt: c.String,
|
|
92
|
+
requiredScopes: c.Array(c.String),
|
|
93
|
+
reason: c.NullOr(c.String),
|
|
94
|
+
created: c.Boolean
|
|
95
|
+
}) {}, v = class extends c.TaggedError()("ApprovalNotFound", { approvalId: c.String }) {}, y = class extends c.TaggedError()("ApprovalSelfApproval", {
|
|
96
|
+
approvalId: c.String,
|
|
97
|
+
subjectId: c.NullOr(c.String)
|
|
98
|
+
}) {}, b = class extends c.TaggedError()("ApprovalRejected", {
|
|
99
|
+
approvalId: c.String,
|
|
100
|
+
decidedBy: c.NullOr(c.String),
|
|
101
|
+
note: c.NullOr(c.String)
|
|
102
|
+
}) {}, x = class extends c.TaggedError()("ApprovalExpired", {
|
|
103
|
+
approvalId: c.String,
|
|
104
|
+
expiredAt: c.String
|
|
105
|
+
}) {}, S = class extends c.TaggedError()("ApprovalNotPending", {
|
|
106
|
+
approvalId: c.String,
|
|
107
|
+
status: c.String
|
|
108
|
+
}) {}, C = class extends c.TaggedError()("ApprovalForbidden", {
|
|
109
|
+
approvalId: c.String,
|
|
110
|
+
required: c.NullOr(c.String),
|
|
111
|
+
message: c.String
|
|
112
|
+
}) {}, w = class extends c.TaggedError()("ApprovalUnavailable", {
|
|
113
|
+
procedure: c.String,
|
|
114
|
+
message: c.String
|
|
115
|
+
}) {}, T = c.Union(_, b, x, w), E = c.Union(v, y, x, S, C, w), D = c.Struct({
|
|
116
|
+
id: c.String,
|
|
117
|
+
procedure: c.String,
|
|
118
|
+
kind: c.Literal("mutation", "action"),
|
|
119
|
+
requestedBy: c.NullOr(c.String),
|
|
120
|
+
status: c.Literal("pending", "approved", "rejected", "expired", "consumed"),
|
|
121
|
+
reason: c.NullOr(c.String),
|
|
122
|
+
requiredScopes: c.Array(c.String),
|
|
123
|
+
requestedAt: c.String,
|
|
124
|
+
expiresAt: c.String,
|
|
125
|
+
decidedBy: c.NullOr(c.String),
|
|
126
|
+
decidedAt: c.NullOr(c.String),
|
|
127
|
+
note: c.NullOr(c.String),
|
|
128
|
+
relation: c.Literal("to-decide", "requested")
|
|
129
|
+
}), O = "channel:", k = Symbol.for("@voltro/protocol/reactivityChannels"), A = globalThis, j = A[k] ?? (A[k] = /* @__PURE__ */ new Map()), Ze = /^[a-z][a-z0-9-]*(\.[a-z0-9-]+)*$/, Qe = (e) => {
|
|
130
|
+
if (!Ze.test(e)) throw Error(`reactivityChannel('${e}'): invalid channel name.\n Use lowercase kebab segments separated by dots — \`presence\`, \`job-queue\`,
|
|
131
|
+
\`billing.usage\`. A \`:\` is refused because it is the namespace separator in
|
|
132
|
+
the routing key (\`${O}<name>\`), and an uppercase letter is\n refused because a key that differs only by case reads as one channel and
|
|
133
|
+
routes as two.`);
|
|
134
|
+
let t = j.get(e);
|
|
135
|
+
if (t !== void 0) return t;
|
|
136
|
+
let n = `${O}${e}`, r = Object.freeze({
|
|
137
|
+
kind: "reactivity-channel",
|
|
138
|
+
name: e,
|
|
139
|
+
key: n,
|
|
140
|
+
toString: () => n
|
|
141
|
+
});
|
|
142
|
+
return j.set(e, r), r;
|
|
143
|
+
}, M = (e) => typeof e == "object" && !!e && e.kind === "reactivity-channel", N = (e) => e.startsWith(O), P = () => new Set([...j.values()].map((e) => e.key)), F = (e) => M(e) ? e.key : e, I = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map(F) : [F(e)], L = (e) => e === void 0 ? void 0 : Array.isArray(e) ? e.map(F) : F(e), $e = (e) => {
|
|
144
|
+
let t = P(), n = [];
|
|
145
|
+
for (let r of e) for (let e of I(r.source)) !N(e) || t.has(e) || n.push({
|
|
146
|
+
procedure: r.name,
|
|
147
|
+
key: e
|
|
148
|
+
});
|
|
149
|
+
return n;
|
|
150
|
+
}, et = (e, t) => {
|
|
151
|
+
let n = e?.injectExternalChange;
|
|
152
|
+
return n === void 0 ? !1 : (n.call(e, {
|
|
153
|
+
table: t.key,
|
|
154
|
+
op: "update",
|
|
155
|
+
new: {},
|
|
156
|
+
old: {}
|
|
157
|
+
}), !0);
|
|
158
|
+
}, tt = (e) => e.internal !== !0, R = (e) => {
|
|
159
|
+
if (nt(e), 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
|
|
90
160
|
unguarded procedure, or list the scopes required to call it.`);
|
|
91
161
|
let t = typeof e.source == "string" ? [e.source] : Array.isArray(e.source) ? e.source : void 0;
|
|
92
162
|
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,
|
|
93
163
|
which is indistinguishable from "nothing changed". Name the table(s) it
|
|
94
164
|
reads, or omit \`source\` for a non-reactive query.`);
|
|
95
165
|
if (e.internal !== !0) return e;
|
|
166
|
+
if (e.openAccess !== void 0) throw Error(`${e.name}: \`internal: true\` cannot be combined with \`openAccess\`.\n \`internal\` takes the procedure OFF the wire, and \`openAccess\` declares who may
|
|
167
|
+
call it there — together they describe a decision about a surface that does not
|
|
168
|
+
exist. Drop \`openAccess\` (an internal procedure needs no wire decision), or drop
|
|
169
|
+
\`internal: true\` if the procedure really is meant to be callable.`);
|
|
96
170
|
if (e.overridesPlugin === !0) throw Error(`${e.name}: \`internal: true\` cannot be combined with \`overridesPlugin\`.\n The override REMOVES the plugin route, and an internal procedure is not
|
|
97
171
|
wire-reachable — so the plugin's route would vanish with nothing callable
|
|
98
172
|
in its place, and callers would get a 404 for something that used to work.`);
|
|
99
173
|
let n = [e.publicApi === void 0 ? void 0 : "publicApi", e.exposeAsTool === void 0 ? void 0 : "exposeAsTool"].filter((e) => e !== void 0);
|
|
100
174
|
if (n.length === 0) return e;
|
|
101
175
|
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.`);
|
|
102
|
-
},
|
|
176
|
+
}, nt = (e) => {
|
|
177
|
+
let t = e.requiresApproval;
|
|
178
|
+
if (t !== void 0) {
|
|
179
|
+
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
|
|
180
|
+
— e.g. \`approvers: [{ scope: 'invoices:approve' }]\`.`);
|
|
181
|
+
if (e.openAccess !== void 0) throw Error(`${e.name}: \`requiresApproval\` cannot be combined with \`openAccess\`.\n The self-approval refusal compares subject ids, and an unauthenticated caller has
|
|
182
|
+
none — so on an open procedure every anonymous caller would count as a DIFFERENT
|
|
183
|
+
human from every other, and the second-pair-of-eyes control would enforce nothing.
|
|
184
|
+
Give the procedure a \`guards:\` decision, or drop \`requiresApproval\`.`);
|
|
185
|
+
}
|
|
186
|
+
}, rt = (e) => e.action !== void 0 && e.resourceType !== void 0, it = (e) => e.openAccess !== void 0 || e.guards !== void 0 && e.guards.length > 0, z = (e, t, n) => {
|
|
187
|
+
if (n === void 0) return t;
|
|
188
|
+
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
|
|
189
|
+
without an authorization check — e.g. \`openAccess: 'public pricing, no caller data'\`.`);
|
|
190
|
+
if (t !== void 0 && t.length > 0) throw Error(`${e}: \`openAccess\` and \`guards\` are two different access decisions, so\n declaring both says the procedure is protected AND open. Keep the guards if a
|
|
191
|
+
caller must hold a scope; drop them if anyone may call it.`);
|
|
192
|
+
return [o(n.trim())];
|
|
193
|
+
}, B = (e) => R({
|
|
103
194
|
kind: "query",
|
|
104
195
|
name: e.name,
|
|
105
196
|
input: e.input,
|
|
106
197
|
output: e.output,
|
|
107
198
|
error: e.error ?? c.Never,
|
|
108
|
-
source: e.source,
|
|
199
|
+
source: L(e.source),
|
|
109
200
|
cache: e.cache,
|
|
110
|
-
guards: e.guards,
|
|
201
|
+
guards: z(e.name, e.guards, e.openAccess),
|
|
202
|
+
openAccess: e.openAccess,
|
|
111
203
|
publicApi: e.publicApi,
|
|
112
204
|
exposeAsTool: e.exposeAsTool,
|
|
113
205
|
internal: e.internal,
|
|
114
206
|
overridesPlugin: e.overridesPlugin
|
|
115
|
-
}),
|
|
207
|
+
}), V = (e) => R({
|
|
116
208
|
kind: "mutation",
|
|
117
209
|
name: e.name,
|
|
118
210
|
input: e.input,
|
|
119
211
|
output: e.output,
|
|
120
212
|
error: e.error ?? c.Never,
|
|
121
213
|
target: e.target,
|
|
122
|
-
guards: e.guards,
|
|
214
|
+
guards: z(e.name, e.guards, e.openAccess),
|
|
215
|
+
openAccess: e.openAccess,
|
|
123
216
|
publicApi: e.publicApi,
|
|
124
217
|
exposeAsTool: e.exposeAsTool,
|
|
218
|
+
requiresApproval: e.requiresApproval,
|
|
125
219
|
internal: e.internal,
|
|
126
220
|
overridesPlugin: e.overridesPlugin
|
|
127
|
-
}),
|
|
221
|
+
}), H = (e) => R({
|
|
128
222
|
kind: "action",
|
|
129
223
|
name: e.name,
|
|
130
224
|
input: e.input,
|
|
131
225
|
output: e.output,
|
|
132
226
|
error: e.error ?? c.Never,
|
|
133
|
-
guards: e.guards,
|
|
227
|
+
guards: z(e.name, e.guards, e.openAccess),
|
|
228
|
+
openAccess: e.openAccess,
|
|
134
229
|
source: e.source,
|
|
135
230
|
target: e.target,
|
|
136
231
|
publicApi: e.publicApi,
|
|
137
232
|
exposeAsTool: e.exposeAsTool,
|
|
233
|
+
requiresApproval: e.requiresApproval,
|
|
138
234
|
internal: e.internal,
|
|
139
235
|
overridesPlugin: e.overridesPlugin
|
|
140
|
-
}),
|
|
236
|
+
}), at = (e) => R({
|
|
141
237
|
kind: "stream",
|
|
142
238
|
name: e.name,
|
|
143
239
|
input: e.input,
|
|
@@ -145,37 +241,38 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
145
241
|
error: e.error ?? c.Never,
|
|
146
242
|
internal: e.internal,
|
|
147
243
|
overridesPlugin: e.overridesPlugin,
|
|
148
|
-
guards: e.guards
|
|
149
|
-
|
|
244
|
+
guards: z(e.name, e.guards, e.openAccess),
|
|
245
|
+
openAccess: e.openAccess
|
|
246
|
+
}), U = (e, t) => t && t.length > 0 ? c.Union(e, ...t) : e, W = (e, t) => t && t.some((e) => !a(e)) ? c.Union(e, s) : e, ot = (e) => c.Union(e, g), st = (e, t) => t === void 0 ? e : c.Union(e, T), ct = (e, t) => l.make(e.name, {
|
|
150
247
|
payload: e.input,
|
|
151
|
-
success:
|
|
152
|
-
error:
|
|
248
|
+
success: h(e.output),
|
|
249
|
+
error: U(W(e.error, e.guards), t),
|
|
153
250
|
stream: !0
|
|
154
|
-
}),
|
|
251
|
+
}), lt = (e, t) => l.make(e.name, {
|
|
155
252
|
payload: e.input,
|
|
156
253
|
success: e.output,
|
|
157
|
-
error:
|
|
158
|
-
}),
|
|
254
|
+
error: U(st(ot(W(e.error, e.guards)), e.requiresApproval), t)
|
|
255
|
+
}), ut = (e, t) => l.make(e.name, {
|
|
159
256
|
payload: e.input,
|
|
160
257
|
success: e.output,
|
|
161
|
-
error:
|
|
162
|
-
}),
|
|
258
|
+
error: U(st(W(e.error, e.guards), e.requiresApproval), t)
|
|
259
|
+
}), dt = (e, t) => l.make(e.name, {
|
|
163
260
|
payload: e.input,
|
|
164
261
|
success: e.element,
|
|
165
|
-
error:
|
|
262
|
+
error: U(e.error, t),
|
|
166
263
|
stream: !0
|
|
167
|
-
}),
|
|
264
|
+
}), ft = (e) => {
|
|
168
265
|
if (typeof e != "object" || !e) return;
|
|
169
266
|
let t = e._tag;
|
|
170
267
|
return typeof t == "string" ? t : void 0;
|
|
171
|
-
},
|
|
268
|
+
}, pt = (e) => {
|
|
172
269
|
switch (e.kind) {
|
|
173
|
-
case "query": return
|
|
174
|
-
case "mutation": return
|
|
175
|
-
case "action": return
|
|
176
|
-
case "stream": return
|
|
270
|
+
case "query": return ct(e);
|
|
271
|
+
case "mutation": return lt(e);
|
|
272
|
+
case "action": return ut(e);
|
|
273
|
+
case "stream": return dt(e);
|
|
177
274
|
}
|
|
178
|
-
},
|
|
275
|
+
}, mt = (e) => {
|
|
179
276
|
let t = e.input, n = t === void 0 ? {} : { input: t }, r = e.output, i = r === void 0 ? {} : { output: r };
|
|
180
277
|
if (e.kind === "query") return {
|
|
181
278
|
kind: "query",
|
|
@@ -199,12 +296,12 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
199
296
|
...n,
|
|
200
297
|
...i
|
|
201
298
|
};
|
|
202
|
-
let
|
|
299
|
+
let ee = Array.isArray(a) ? a : [a];
|
|
203
300
|
return {
|
|
204
301
|
kind: "mutation",
|
|
205
302
|
...n,
|
|
206
303
|
...i,
|
|
207
|
-
targets:
|
|
304
|
+
targets: ee.map((e) => ({
|
|
208
305
|
table: e.table,
|
|
209
306
|
op: e.op,
|
|
210
307
|
..."order" in e && e.order !== void 0 ? { order: e.order } : {},
|
|
@@ -216,7 +313,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
216
313
|
..."shapeItem" in e && e.shapeItem !== void 0 ? { shapeItem: e.shapeItem } : {}
|
|
217
314
|
}))
|
|
218
315
|
};
|
|
219
|
-
},
|
|
316
|
+
}, ht = 7500, gt = (e) => typeof e == "object" && !!e && e.kind === "event", _t = (e) => {
|
|
220
317
|
if (e.name.length === 0) throw Error("defineEvent: `name` must not be empty");
|
|
221
318
|
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
|
|
222
319
|
whitespace and delivers nothing — silently, and only on that broker, so an
|
|
@@ -243,66 +340,69 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
243
340
|
webhook: e.webhook,
|
|
244
341
|
delivery: e.delivery
|
|
245
342
|
};
|
|
246
|
-
},
|
|
343
|
+
}, vt = (e) => c.Struct({
|
|
247
344
|
_tag: c.Literal("event"),
|
|
248
345
|
origin: c.String,
|
|
249
346
|
n: c.Number,
|
|
250
347
|
emittedAt: c.Number,
|
|
251
348
|
payload: e
|
|
252
|
-
}),
|
|
349
|
+
}), yt = c.Struct({
|
|
253
350
|
_tag: c.Literal("gap"),
|
|
254
351
|
missed: c.Number,
|
|
255
352
|
reason: c.Literal("buffer", "resume")
|
|
256
|
-
}),
|
|
353
|
+
}), bt = c.Struct({ _tag: c.Literal("attached") }), xt = (e) => c.Union(bt, vt(e), yt), G = c.Struct({
|
|
257
354
|
origin: c.String,
|
|
258
355
|
n: c.Number
|
|
259
|
-
}),
|
|
356
|
+
}), St = (e) => c.Struct({
|
|
260
357
|
key: e,
|
|
261
|
-
resume: c.optional(c.Array(
|
|
262
|
-
}),
|
|
358
|
+
resume: c.optional(c.Array(G))
|
|
359
|
+
}), Ct = (e, t) => {
|
|
263
360
|
let n = e.guards && e.guards.length > 0 ? s : c.Never, r = t && t.length > 0 ? c.Union(n, ...t) : n;
|
|
264
361
|
return l.make(e.name, {
|
|
265
|
-
payload:
|
|
266
|
-
success:
|
|
362
|
+
payload: St(e.key),
|
|
363
|
+
success: xt(e.payload),
|
|
267
364
|
error: r,
|
|
268
365
|
stream: !0
|
|
269
366
|
});
|
|
270
|
-
},
|
|
367
|
+
}, wt = class extends c.TaggedError()("EventPayloadInvalid", {
|
|
271
368
|
event: c.String,
|
|
272
369
|
message: c.String
|
|
273
|
-
}) {},
|
|
370
|
+
}) {}, Tt = class extends c.TaggedError()("EventKeyInvalid", {
|
|
274
371
|
event: c.String,
|
|
275
372
|
message: c.String
|
|
276
|
-
}) {},
|
|
373
|
+
}) {}, Et = class extends c.TaggedError()("EventPayloadTooLarge", {
|
|
277
374
|
event: c.String,
|
|
278
375
|
bytes: c.Number,
|
|
279
376
|
limit: c.Number
|
|
280
|
-
}) {},
|
|
377
|
+
}) {}, Dt = (e) => {
|
|
281
378
|
if (typeof e != "object" || !e) return JSON.stringify(e) ?? "null";
|
|
282
379
|
let t = Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t));
|
|
283
380
|
return JSON.stringify(t);
|
|
284
|
-
},
|
|
381
|
+
}, Ot = "\0", kt = (e, t, n) => [
|
|
285
382
|
e ?? "~",
|
|
286
383
|
t,
|
|
287
|
-
|
|
288
|
-
].join("\0"),
|
|
384
|
+
Dt(n)
|
|
385
|
+
].join("\0"), At = (e) => {
|
|
289
386
|
let [t = "~", n = "", r = ""] = e.split("\0");
|
|
290
387
|
return {
|
|
291
388
|
tenantId: t === "~" ? null : t,
|
|
292
389
|
event: n,
|
|
293
390
|
key: r
|
|
294
391
|
};
|
|
295
|
-
},
|
|
392
|
+
}, jt = (e) => e.split("\0").join(" · "), Mt = (e) => e, Nt = (e) => e, Pt = (e) => {
|
|
393
|
+
let t = e.alias?.trim(), n = e.instance?.trim(), r = t !== void 0 && t !== "" ? t : e.base;
|
|
394
|
+
return n !== void 0 && n !== "" ? `${r}#${n}` : r;
|
|
395
|
+
}, Ft = (e) => {
|
|
296
396
|
if (e.length !== 0) return (t, n) => e.reduceRight((e, t) => t(e, n), t);
|
|
297
|
-
},
|
|
298
|
-
let n =
|
|
397
|
+
}, It = (e, t) => {
|
|
398
|
+
let n = Ue.GenericTag(e);
|
|
299
399
|
return {
|
|
300
400
|
Tag: n,
|
|
301
|
-
Live:
|
|
401
|
+
Live: We.succeed(n, t)
|
|
302
402
|
};
|
|
303
|
-
},
|
|
403
|
+
}, Lt = (e, t, n) => {
|
|
304
404
|
if (!t) return { ok: !0 };
|
|
305
|
-
let r =
|
|
405
|
+
let r = K(n);
|
|
306
406
|
if (!r) return {
|
|
307
407
|
ok: !1,
|
|
308
408
|
reason: `cannot parse runningVersion "${n}"`
|
|
@@ -310,12 +410,12 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
310
410
|
let i = t.trim();
|
|
311
411
|
if (i === "*" || i === "") return { ok: !0 };
|
|
312
412
|
let a = i.split(/\s+/).filter((e) => e.length > 0);
|
|
313
|
-
for (let i of a) if (!
|
|
413
|
+
for (let i of a) if (!Rt(i, r)) return {
|
|
314
414
|
ok: !1,
|
|
315
415
|
reason: `plugin "${e}" requires framework ${t}, running ${n}`
|
|
316
416
|
};
|
|
317
417
|
return { ok: !0 };
|
|
318
|
-
},
|
|
418
|
+
}, K = (e) => {
|
|
319
419
|
let t = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9a-zA-Z.-]+))?$/.exec(e.trim());
|
|
320
420
|
return t ? {
|
|
321
421
|
major: Number(t[1]),
|
|
@@ -323,44 +423,44 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
323
423
|
patch: Number(t[3]),
|
|
324
424
|
pre: t[4] ?? ""
|
|
325
425
|
} : null;
|
|
326
|
-
},
|
|
426
|
+
}, q = (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, Rt = (e, t) => {
|
|
327
427
|
if (e === "*") return !0;
|
|
328
428
|
if (e.startsWith("^")) {
|
|
329
|
-
let n =
|
|
330
|
-
return !n || t.major !== n.major ? !1 :
|
|
429
|
+
let n = K(e.slice(1));
|
|
430
|
+
return !n || t.major !== n.major ? !1 : q(t, n) >= 0;
|
|
331
431
|
}
|
|
332
432
|
if (e.startsWith("~")) {
|
|
333
|
-
let n =
|
|
334
|
-
return !n || t.major !== n.major || t.minor !== n.minor ? !1 :
|
|
433
|
+
let n = K(e.slice(1));
|
|
434
|
+
return !n || t.major !== n.major || t.minor !== n.minor ? !1 : q(t, n) >= 0;
|
|
335
435
|
}
|
|
336
436
|
let n = /^(>=|<=|>|<)(.+)$/.exec(e);
|
|
337
437
|
if (n) {
|
|
338
|
-
let e = n[1], r =
|
|
438
|
+
let e = n[1], r = K(n[2]);
|
|
339
439
|
if (!r) return !1;
|
|
340
|
-
let i =
|
|
440
|
+
let i = q(t, r);
|
|
341
441
|
if (e === ">=") return i >= 0;
|
|
342
442
|
if (e === "<=") return i <= 0;
|
|
343
443
|
if (e === ">") return i > 0;
|
|
344
444
|
if (e === "<") return i < 0;
|
|
345
445
|
}
|
|
346
|
-
let r =
|
|
347
|
-
return r ?
|
|
348
|
-
},
|
|
446
|
+
let r = K(e);
|
|
447
|
+
return r ? q(t, r) === 0 : !1;
|
|
448
|
+
}, J = c.Literal("running", "succeeded", "failed", "cancelled", "suspended"), zt = c.Literal("cancel", "terminate", "abandon"), Bt = c.Struct({
|
|
349
449
|
mode: c.String,
|
|
350
450
|
dueAt: c.NullOr(c.Number),
|
|
351
451
|
retryAfterMs: c.NullOr(c.Number),
|
|
352
452
|
intentId: c.NullOr(c.String)
|
|
353
|
-
}),
|
|
453
|
+
}), Vt = c.Struct({
|
|
354
454
|
id: c.String,
|
|
355
455
|
workflowName: c.String,
|
|
356
456
|
executionId: c.NullOr(c.String),
|
|
357
457
|
status: c.Literal("running", "queued", "dropped", "skipped"),
|
|
358
|
-
deferral: c.optional(
|
|
359
|
-
}),
|
|
458
|
+
deferral: c.optional(Bt)
|
|
459
|
+
}), Y = c.Struct({
|
|
360
460
|
id: c.String,
|
|
361
461
|
tag: c.String,
|
|
362
462
|
executionId: c.String,
|
|
363
|
-
status:
|
|
463
|
+
status: J,
|
|
364
464
|
payload: c.Unknown,
|
|
365
465
|
workflowVersion: c.NullOr(c.String),
|
|
366
466
|
workflowPatches: c.NullOr(c.Unknown),
|
|
@@ -375,12 +475,12 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
375
475
|
durationMs: c.NullOr(c.Number),
|
|
376
476
|
traceId: c.NullOr(c.String),
|
|
377
477
|
parentExecutionId: c.NullOr(c.String),
|
|
378
|
-
parentClosePolicy: c.NullOr(
|
|
379
|
-
}),
|
|
478
|
+
parentClosePolicy: c.NullOr(zt)
|
|
479
|
+
}), Ht = c.Struct({
|
|
380
480
|
tag: c.optional(c.String),
|
|
381
|
-
status: c.optional(
|
|
481
|
+
status: c.optional(J),
|
|
382
482
|
limit: c.optional(c.Number)
|
|
383
|
-
}),
|
|
483
|
+
}), Ut = c.Struct({
|
|
384
484
|
id: c.String,
|
|
385
485
|
runId: c.String,
|
|
386
486
|
stepName: c.String,
|
|
@@ -395,7 +495,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
395
495
|
startedAt: c.Date,
|
|
396
496
|
completedAt: c.NullOr(c.Date),
|
|
397
497
|
durationMs: c.NullOr(c.Number)
|
|
398
|
-
}),
|
|
498
|
+
}), Wt = c.Struct({
|
|
399
499
|
id: c.String,
|
|
400
500
|
runId: c.String,
|
|
401
501
|
eventType: c.String,
|
|
@@ -403,7 +503,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
403
503
|
occurredAt: c.Date,
|
|
404
504
|
stepName: c.NullOr(c.String),
|
|
405
505
|
attempt: c.NullOr(c.Number)
|
|
406
|
-
}),
|
|
506
|
+
}), Gt = c.Struct({
|
|
407
507
|
id: c.String,
|
|
408
508
|
name: c.String,
|
|
409
509
|
payload: c.Unknown,
|
|
@@ -411,7 +511,7 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
411
511
|
subject: c.NullOr(c.Unknown),
|
|
412
512
|
traceId: c.NullOr(c.String),
|
|
413
513
|
occurredAt: c.Date
|
|
414
|
-
}),
|
|
514
|
+
}), Kt = c.Struct({
|
|
415
515
|
id: c.String,
|
|
416
516
|
eventId: c.String,
|
|
417
517
|
eventName: c.String,
|
|
@@ -424,123 +524,142 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
424
524
|
errorMessage: c.NullOr(c.String),
|
|
425
525
|
createdAt: c.Date,
|
|
426
526
|
completedAt: c.NullOr(c.Date)
|
|
427
|
-
}),
|
|
527
|
+
}), qt = c.Struct({ id: c.String }), X = c.Struct({ runId: c.String }), Jt = c.Struct({
|
|
428
528
|
name: c.optional(c.String),
|
|
429
529
|
limit: c.optional(c.Number)
|
|
430
|
-
}),
|
|
530
|
+
}), Yt = c.Struct({ eventId: c.String }), Z = c.Struct({
|
|
431
531
|
workflowName: c.String,
|
|
432
532
|
executionId: c.String
|
|
433
|
-
}),
|
|
533
|
+
}), Xt = c.Struct({
|
|
434
534
|
id: c.String,
|
|
435
535
|
signalName: c.String,
|
|
436
536
|
payload: c.optional(c.Unknown)
|
|
437
|
-
}),
|
|
537
|
+
}), Zt = c.Struct({
|
|
438
538
|
id: c.String,
|
|
439
539
|
updateName: c.String,
|
|
440
540
|
payload: c.optional(c.Unknown),
|
|
441
541
|
timeoutMs: c.optional(c.Number)
|
|
442
|
-
}),
|
|
542
|
+
}), Qt = c.Struct({
|
|
443
543
|
eventId: c.String,
|
|
444
544
|
updateId: c.String,
|
|
445
545
|
completedEventId: c.String,
|
|
446
546
|
result: c.Unknown
|
|
447
|
-
}),
|
|
547
|
+
}), $t = B({
|
|
448
548
|
name: "__voltro.workflow.run",
|
|
449
549
|
source: "_voltro_workflow_runs",
|
|
450
|
-
input:
|
|
451
|
-
output: c.Array(
|
|
452
|
-
}),
|
|
550
|
+
input: qt,
|
|
551
|
+
output: c.Array(Y)
|
|
552
|
+
}), en = B({
|
|
453
553
|
name: "__voltro.workflow.runs",
|
|
454
554
|
source: "_voltro_workflow_runs",
|
|
455
|
-
input:
|
|
456
|
-
output: c.Array(
|
|
457
|
-
}),
|
|
555
|
+
input: Ht,
|
|
556
|
+
output: c.Array(Y)
|
|
557
|
+
}), tn = B({
|
|
458
558
|
name: "__voltro.workflow.run.steps",
|
|
459
559
|
source: "_voltro_workflow_run_steps",
|
|
460
|
-
input:
|
|
461
|
-
output: c.Array(
|
|
462
|
-
}),
|
|
560
|
+
input: X,
|
|
561
|
+
output: c.Array(Ut)
|
|
562
|
+
}), nn = B({
|
|
463
563
|
name: "__voltro.workflow.run.events",
|
|
464
564
|
source: "_voltro_workflow_run_events",
|
|
465
|
-
input:
|
|
466
|
-
output: c.Array(
|
|
467
|
-
}),
|
|
565
|
+
input: X,
|
|
566
|
+
output: c.Array(Wt)
|
|
567
|
+
}), rn = B({
|
|
468
568
|
name: "__voltro.workflow.domainEvents",
|
|
469
569
|
source: "_voltro_workflow_events",
|
|
470
|
-
input:
|
|
471
|
-
output: c.Array(
|
|
472
|
-
}),
|
|
570
|
+
input: Jt,
|
|
571
|
+
output: c.Array(Gt)
|
|
572
|
+
}), an = B({
|
|
473
573
|
name: "__voltro.workflow.event.deliveries",
|
|
474
574
|
source: "_voltro_workflow_event_deliveries",
|
|
475
|
-
input:
|
|
476
|
-
output: c.Array(
|
|
477
|
-
}),
|
|
575
|
+
input: Yt,
|
|
576
|
+
output: c.Array(Kt)
|
|
577
|
+
}), on = H({
|
|
478
578
|
name: "__voltro.workflow.cancel",
|
|
479
|
-
input:
|
|
579
|
+
input: Z,
|
|
480
580
|
output: c.Struct({ ok: c.Boolean })
|
|
481
|
-
}),
|
|
581
|
+
}), sn = H({
|
|
482
582
|
name: "__voltro.workflow.resume",
|
|
483
|
-
input:
|
|
583
|
+
input: Z,
|
|
484
584
|
output: c.Struct({ ok: c.Boolean })
|
|
485
|
-
}),
|
|
585
|
+
}), cn = H({
|
|
486
586
|
name: "__voltro.workflow.signal",
|
|
487
|
-
input:
|
|
587
|
+
input: Xt,
|
|
488
588
|
output: c.Struct({ eventId: c.String })
|
|
489
|
-
}),
|
|
589
|
+
}), ln = H({
|
|
490
590
|
name: "__voltro.workflow.update",
|
|
491
|
-
input:
|
|
492
|
-
output:
|
|
493
|
-
}),
|
|
591
|
+
input: Zt,
|
|
592
|
+
output: Qt
|
|
593
|
+
}), un = "__voltro.undo.log", dn = "__voltro.undo.apply", fn = "__voltro.undo.redo", pn = c.Struct({
|
|
494
594
|
id: c.String,
|
|
495
595
|
tag: c.String,
|
|
496
596
|
label: c.NullOr(c.String),
|
|
497
597
|
undone: c.Boolean,
|
|
498
598
|
crossesAction: c.Boolean,
|
|
499
599
|
createdAt: c.String
|
|
500
|
-
}),
|
|
600
|
+
}), mn = class extends c.TaggedError()("UndoNotFound", { invocationId: c.String }) {}, hn = class extends c.TaggedError()("UndoForbidden", { invocationId: c.String }) {}, gn = class extends c.TaggedError()("UndoConflict", {
|
|
501
601
|
invocationId: c.String,
|
|
502
602
|
reason: c.Literal("conflict", "action")
|
|
503
|
-
}) {},
|
|
504
|
-
name:
|
|
603
|
+
}) {}, _n = c.Union(mn, hn, gn), vn = B({
|
|
604
|
+
name: un,
|
|
505
605
|
source: "_voltro_undo_log",
|
|
506
606
|
input: c.Struct({ limit: c.optional(c.Number) }),
|
|
507
|
-
output: c.Array(
|
|
508
|
-
}),
|
|
509
|
-
name:
|
|
607
|
+
output: c.Array(pn)
|
|
608
|
+
}), yn = V({
|
|
609
|
+
name: dn,
|
|
510
610
|
input: c.Struct({ invocationId: c.String }),
|
|
511
611
|
output: c.Struct({ ok: c.Boolean }),
|
|
512
|
-
error:
|
|
513
|
-
}),
|
|
514
|
-
name:
|
|
612
|
+
error: _n
|
|
613
|
+
}), bn = V({
|
|
614
|
+
name: fn,
|
|
515
615
|
input: c.Struct({ invocationId: c.String }),
|
|
516
616
|
output: c.Struct({ ok: c.Boolean }),
|
|
517
|
-
error:
|
|
518
|
-
}),
|
|
617
|
+
error: _n
|
|
618
|
+
}), xn = "__voltro.approvals.pending", Sn = "__voltro.approvals.decide", Cn = B({
|
|
619
|
+
name: xn,
|
|
620
|
+
source: "_voltro_approvals",
|
|
621
|
+
input: c.Struct({ limit: c.optional(c.Number) }),
|
|
622
|
+
output: c.Array(D),
|
|
623
|
+
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"
|
|
624
|
+
}), wn = V({
|
|
625
|
+
name: Sn,
|
|
626
|
+
input: c.Struct({
|
|
627
|
+
approvalId: c.String,
|
|
628
|
+
decision: c.Literal("approve", "reject"),
|
|
629
|
+
note: c.optional(c.String)
|
|
630
|
+
}),
|
|
631
|
+
output: c.Struct({
|
|
632
|
+
approvalId: c.String,
|
|
633
|
+
status: c.Literal("approved", "rejected")
|
|
634
|
+
}),
|
|
635
|
+
error: E,
|
|
636
|
+
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"
|
|
637
|
+
}), Tn = "__voltro.connections.list", En = "__voltro.connections.start", Dn = "__voltro.connections.submitToken", On = "__voltro.connections.disconnect", Q = c.Literal("oauth2", "pat"), kn = c.Literal("disconnected", "connected", "expired", "revoked", "error"), An = c.Struct({
|
|
519
638
|
connectionId: c.String,
|
|
520
|
-
kind:
|
|
639
|
+
kind: Q,
|
|
521
640
|
label: c.String,
|
|
522
|
-
status:
|
|
641
|
+
status: kn,
|
|
523
642
|
accountId: c.NullOr(c.String),
|
|
524
643
|
accountLabel: c.NullOr(c.String),
|
|
525
644
|
scopes: c.Array(c.String),
|
|
526
645
|
expiresAt: c.NullOr(c.String),
|
|
527
646
|
lastError: c.NullOr(c.String),
|
|
528
647
|
connectedAt: c.NullOr(c.String)
|
|
529
|
-
}),
|
|
648
|
+
}), jn = class extends c.TaggedError()("ConnectionNotDeclared", { connectionId: c.String }) {}, Mn = class extends c.TaggedError()("ConnectionSubjectRequired", { connectionId: c.String }) {}, Nn = class extends c.TaggedError()("ConnectionKindMismatch", {
|
|
530
649
|
connectionId: c.String,
|
|
531
|
-
expected:
|
|
532
|
-
actual:
|
|
533
|
-
}) {},
|
|
650
|
+
expected: Q,
|
|
651
|
+
actual: Q
|
|
652
|
+
}) {}, Pn = class extends c.TaggedError()("ConnectionHandshakeFailed", {
|
|
534
653
|
connectionId: c.String,
|
|
535
654
|
reason: c.String,
|
|
536
655
|
transient: c.Boolean
|
|
537
|
-
}) {}, $ = c.Union(
|
|
538
|
-
name:
|
|
656
|
+
}) {}, $ = c.Union(jn, Mn, Nn, Pn), Fn = B({
|
|
657
|
+
name: Tn,
|
|
539
658
|
source: "_voltro_connections",
|
|
540
659
|
input: c.Struct({}),
|
|
541
|
-
output: c.Array(
|
|
542
|
-
}),
|
|
543
|
-
name:
|
|
660
|
+
output: c.Array(An)
|
|
661
|
+
}), In = H({
|
|
662
|
+
name: En,
|
|
544
663
|
input: c.Struct({
|
|
545
664
|
connectionId: c.String,
|
|
546
665
|
redirectTo: c.optional(c.String)
|
|
@@ -550,22 +669,22 @@ var Fe = c.Union(c.String, c.Number), u = c.Record({
|
|
|
550
669
|
state: c.String
|
|
551
670
|
}),
|
|
552
671
|
error: $
|
|
553
|
-
}),
|
|
554
|
-
name:
|
|
672
|
+
}), Ln = V({
|
|
673
|
+
name: Dn,
|
|
555
674
|
input: c.Struct({
|
|
556
675
|
connectionId: c.String,
|
|
557
676
|
token: c.String
|
|
558
677
|
}),
|
|
559
678
|
output: c.Struct({ ok: c.Boolean }),
|
|
560
679
|
error: $
|
|
561
|
-
}),
|
|
562
|
-
name:
|
|
680
|
+
}), Rn = V({
|
|
681
|
+
name: On,
|
|
563
682
|
input: c.Struct({ connectionId: c.String }),
|
|
564
683
|
output: c.Struct({ ok: c.Boolean }),
|
|
565
684
|
error: $
|
|
566
|
-
}),
|
|
685
|
+
}), zn = (e) => {
|
|
567
686
|
let t = e instanceof Date ? e.getTime() : typeof e == "number" ? e : typeof e == "string" ? new Date(e).getTime() : 0;
|
|
568
687
|
return Number.isNaN(t) ? 0 : t;
|
|
569
|
-
},
|
|
688
|
+
}, Bn = 1;
|
|
570
689
|
//#endregion
|
|
571
|
-
export {
|
|
690
|
+
export { Me as ADMIN_SCOPE, se as APIKEY_ISSUE_ORG_SCOPE, n as APIKEY_ISSUE_OTHER_SCOPE, je as APIKEY_ISSUE_SELF_SCOPE, Sn as APPROVALS_DECIDE_TAG, xn as APPROVALS_PENDING_TAG, E as ApprovalDecisionErrors, T as ApprovalErrors, x as ApprovalExpired, C as ApprovalForbidden, v as ApprovalNotFound, S as ApprovalNotPending, b as ApprovalRejected, _ as ApprovalRequired, y as ApprovalSelfApproval, w as ApprovalUnavailable, Oe as AuthMiddleware, g as BusinessRuleViolation, Tn as CONNECTIONS_LIST_TAG, On as CONNECTION_DISCONNECT_TAG, En as CONNECTION_START_TAG, Dn as CONNECTION_SUBMIT_TOKEN_TAG, Pn as ConnectionHandshakeFailed, Ce as ConnectionInfo, Ee as ConnectionInfoMiddleware, Q as ConnectionKind, Nn as ConnectionKindMismatch, jn as ConnectionNotDeclared, An as ConnectionState, kn as ConnectionStatus, Mn as ConnectionSubjectRequired, ve as DEFAULT_SCOPE_CACHE_MAX_ENTRIES, de as DEFAULT_SCOPE_CACHE_TTL_MS, Ot as EVENT_ROUTE_SEP, Tt as EventKeyInvalid, wt as EventPayloadInvalid, Et as EventPayloadTooLarge, ht as MAX_EVENT_ENVELOPE_BYTES, Bn as PROTOCOL_VERSION, D as PendingApproval, O as REACTIVITY_CHANNEL_PREFIX, s as ScopeError, we as Subject, De as SubjectIdentity, pe as SubjectService, dn as UNDO_APPLY_TAG, un as UNDO_LOG_TAG, fn as UNDO_REDO_TAG, xe as Unauthenticated, gn as UndoConflict, hn as UndoForbidden, pn as UndoLogEntry, mn as UndoNotFound, Z as WorkflowControlInputSchema, Gt as WorkflowDomainEventRowSchema, Jt as WorkflowDomainEventsInputSchema, Yt as WorkflowEventDeliveriesInputSchema, Kt as WorkflowEventDeliveryRowSchema, zt as WorkflowParentClosePolicySchema, Wt as WorkflowRunEventRowSchema, Vt as WorkflowRunHandleSchema, qt as WorkflowRunRefSchema, Y as WorkflowRunRowSchema, J as WorkflowRunStatusSchema, Ut as WorkflowRunStepRowSchema, X as WorkflowRunTableRefSchema, Ht as WorkflowRunsInputSchema, Xt as WorkflowSignalInputSchema, Bt as WorkflowStartDeferralSchema, Zt as WorkflowUpdateInputSchema, Qt as WorkflowUpdateResultSchema, ut as actionToRpc, i as advisoryResourceGuardWarning, ke as anonymousSubject, Xe as applyRowPatch, me as applyScopeDecision, wn as approvalsDecideDescriptor, Cn as approvalsPendingQueryDescriptor, he as assertAuthenticated, Be as beginIdempotent, Lt as checkFrameworkCompat, r as checkGuards, ae as checkGuardsEffect, Te as composeAuthStrategies, Ft as composeRpcInterceptors, Rn as connectionDisconnectDescriptor, In as connectionStartDescriptor, Ln as connectionSubmitTokenDescriptor, Fn as connectionsListQueryDescriptor, P as declaredReactivityChannelKeys, H as defineAction, _t as defineEvent, V as defineMutation, Mt as definePlugin, Nt as definePluginRoute, It as definePluginService, B as defineQuery, at as defineStream, Je as diffRows, be as effectiveScopes, Dt as encodeEventKey, ft as errorTag, bt as eventAttached, vt as eventEnvelope, yt as eventGap, G as eventResumePoint, kt as eventRoute, xt as eventStreamEvent, St as eventSubscribeInput, Ct as eventToRpc, Le as failIdempotent, e as findAdvisoryResourceGuards, Fe as finishIdempotent, jt as formatEventRoute, ye as getPolicyGuardResolver, re as getResourceScopeResolver, it as hasAccessDecision, Se as hasCallbackRoutes, ie as hasEffectiveScope, oe as hasScope, p as idToPath, ze as idempotencyScope, gt as isEventDescriptor, Ye as isIdKeyed, a as isOpenAccess, te as isPolicyCheck, rt as isPolicyGuard, M as isReactivityChannel, N as isReactivityChannelKey, _e as isSystemSubject, tt as isWireReachable, ge as makeScopeCache, Ve as memoryIdempotencyStore, ne as missingAccessDecision, lt as mutationToRpc, mt as normalizeDescriptor, L as normalizeSource, o as openAccessSpec, At as parseEventRoute, Ke as pathToId, Pt as pluginInstanceName, et as publishReactivity, He as publishServerError, ct as queryToRpc, Qe as reactivityChannel, Pe as requireScope, d as rowPatchOpSchema, f as rowPatchSchema, ue as scopeCacheKey, t as setEffectiveScopes, le as setPolicyGuardResolver, ee as setResourceScopeResolver, I as sourceKeys, dt as streamToRpc, Ae as subjectIdentity, ce as subjectScopes, Re as subscribeServerErrors, h as subscriptionEvent, Ne as systemSubject, fe as tenantScopedSubject, pt as toRpc, zn as tsMs, $e as undeclaredChannelKeys, yn as undoApplyDescriptor, vn as undoLogQueryDescriptor, bn as undoRedoDescriptor, on as workflowCancelDescriptor, rn as workflowDomainEventsQueryDescriptor, an as workflowEventDeliveriesQueryDescriptor, sn as workflowResumeDescriptor, nn as workflowRunEventsQueryDescriptor, $t as workflowRunQueryDescriptor, tn as workflowRunStepsQueryDescriptor, en as workflowRunsQueryDescriptor, cn as workflowSignalDescriptor, ln as workflowUpdateDescriptor, Ie as wsMutationIdempotencyScope };
|