@mnmal-ai/substrate 1.0.0-alpha.15 → 1.0.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{boot-store-CvQabBdk.js → boot-store-DNU0UfX7.js} +19 -66
- package/dist/{bridge-CvZGzNIO.d.ts → bridge-5VHZiH9o.d.ts} +1 -1
- package/dist/{cli-6evrDG1o.js → cli-CwWUYUMv.js} +71 -13
- package/dist/client.d.ts +3 -3
- package/dist/client.js +3 -3
- package/dist/{errors-BXxm9eZF.d.ts → errors-DHgT7Fa8.d.ts} +8 -2
- package/dist/{index-EN-nQsX8.d.ts → index-DKJXQ031.d.ts} +1 -1
- package/dist/{node-version-C5FSmwJX.js → node-version-CxqcqECU.js} +1 -1
- package/dist/pack.d.ts +18 -2
- package/dist/pack.js +2 -2
- package/dist/{pg-edges-store-DHbpr8QY.js → pg-edges-store-CSJ7sG2l.js} +1 -1
- package/dist/{plugin-Dpa_Y7Ep.js → plugin-Dk9RC3LH.js} +2 -2
- package/dist/proposals-bootstrap.js +2 -2
- package/dist/proposals.d.ts +5 -3
- package/dist/proposals.js +1 -1
- package/dist/recall-bootstrap.js +2 -2
- package/dist/recall.d.ts +1 -1
- package/dist/recall.js +2 -2
- package/dist/{repl-DWXNLUyd.js → repl-BNnKFG3y.js} +1 -1
- package/dist/{row-Dh57ShWL.d.ts → row-DHxnCnhA.d.ts} +10 -8
- package/dist/{run-BTdS6Z6i.js → run-NmwNmVUD.js} +142 -106
- package/dist/{schema-B--_bHjn.d.ts → schema-B5WBO8yh.d.ts} +79 -19
- package/dist/sdk.d.ts +48 -6
- package/dist/sdk.js +4 -4
- package/dist/{src-EqhJm93D.js → src-7lp1y4HK.js} +3 -3
- package/dist/{src-BMHI_rTJ.js → src-BHh6UZ7L.js} +2141 -493
- package/dist/{src-DWqzrm3O.js → src-CdbUzLhB.js} +209 -36
- package/dist/{src-Bi3NhEsT.js → src-DR_hUj2p.js} +1 -1
- package/dist/{src-CHND7-Pm.js → src-DV6PcXym.js} +2 -2
- package/dist/{src-CZQ25H4i.js → src-DWrFdHrY.js} +1018 -252
- package/dist/{src-B4sqnLRy.js → src-DwynOVMk.js} +77 -28
- package/dist/substrate-admin.js +2 -2
- package/dist/substrate.js +2 -2
- package/dist/testing.d.ts +5 -3
- package/dist/testing.js +4 -4
- package/dist/{ws-CpHWxwp9.d.ts → ws-BL9nSELO.d.ts} +2 -2
- package/package.json +23 -23
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
-
import { _ as AUDIT_EVENT_TYPE, g as buildAuditRow } from "./src-
|
|
2
|
+
import { _ as AUDIT_EVENT_TYPE, g as buildAuditRow } from "./src-BHh6UZ7L.js";
|
|
3
3
|
import { n as trimTrailingSlashes } from "./env-utils-CGNazUNt.js";
|
|
4
|
-
import { I as decodeList, L as encodeList, M as grantEntryError, g as checkUpdatable, h as checkRevocable, y as newlyGranted } from "./src-
|
|
5
|
-
import "./src-
|
|
6
|
-
import { A as UPDATE_EXIT_CODES, B as readKeyById, C as grantLines, D as parseBootstrapArgs, E as formatBootstrapOutput, F as CLI_ACTOR_KID, G as validateArgv, H as resolveAdminAuth, I as base64Url, J as argvError, K as RESTART_NOTE, L as forUpdate, M as runKeyPatchViaRoute, N as ACTOR_HINT, O as runBootstrap, P as BootstrapError, R as generateAdminKeypair, S as runRegisterViaRoute, T as formatDoctorReport, U as resolveAdminTarget, V as describeAdminTarget, W as ARGV_SPEC, X as pgNoticeOptions, Y as AdminCliError, _ as openPgDataset, b as parseRegisterArgs, c as refuseContractViolation, d as registeredTypes, g as version, h as loadPluginsFromDir, j as runKeyListViaRoute, k as REVOKE_EXIT_CODES, l as buildDeferredIndexes, n as resolvePluginDir, q as USAGE, r as BINARY_CONTRACT_VERSION, s as parseEnv, t as bootStore, v as onboardCommand, w as doctorCommand, x as runRegister, y as formatRegisterOutput, z as listActiveAdminKeys } from "./boot-store-
|
|
7
|
-
import { C as
|
|
4
|
+
import { I as decodeList, L as encodeList, M as grantEntryError, g as checkUpdatable, h as checkRevocable, y as newlyGranted } from "./src-DR_hUj2p.js";
|
|
5
|
+
import "./src-CdbUzLhB.js";
|
|
6
|
+
import { A as UPDATE_EXIT_CODES, B as readKeyById, C as grantLines, D as parseBootstrapArgs, E as formatBootstrapOutput, F as CLI_ACTOR_KID, G as validateArgv, H as resolveAdminAuth, I as base64Url, J as argvError, K as RESTART_NOTE, L as forUpdate, M as runKeyPatchViaRoute, N as ACTOR_HINT, O as runBootstrap, P as BootstrapError, R as generateAdminKeypair, S as runRegisterViaRoute, T as formatDoctorReport, U as resolveAdminTarget, V as describeAdminTarget, W as ARGV_SPEC, X as pgNoticeOptions, Y as AdminCliError, _ as openPgDataset, b as parseRegisterArgs, c as refuseContractViolation, d as registeredTypes, g as version, h as loadPluginsFromDir, j as runKeyListViaRoute, k as REVOKE_EXIT_CODES, l as buildDeferredIndexes, n as resolvePluginDir, q as USAGE, r as BINARY_CONTRACT_VERSION, s as parseEnv, t as bootStore, v as onboardCommand, w as doctorCommand, x as runRegister, y as formatRegisterOutput, z as listActiveAdminKeys } from "./boot-store-DNU0UfX7.js";
|
|
7
|
+
import { C as copyRows, S as detectLayout, a as ensureTypeTable, b as UUID_CHECK_MIGRATION, c as typeTableRef, d as PLAIN_SCHEMA_NAME, g as isDerivedMigration, i as seqName, p as assertStoreSchema, s as loadTypeTable, u as MIGRATE_STORE_MARKER_TABLE, w as parseSourceBody, x as UUID_REGEX } from "./src-DWrFdHrY.js";
|
|
8
8
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { dirname } from "node:path";
|
|
10
10
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -201,6 +201,137 @@ var RowCounter = class extends Transform {
|
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/admin/migrate-store/source.ts
|
|
206
|
+
/**
|
|
207
|
+
* Read-only inventory of a migrate-store source. Every read runs in one
|
|
208
|
+
* REPEATABLE READ, READ ONLY transaction, so the inventory is one snapshot and
|
|
209
|
+
* nothing here can write to the source. It never runs migrations and never
|
|
210
|
+
* goes through `assertServerVersion`: the source may be PG 17.
|
|
211
|
+
*/
|
|
212
|
+
async function inspectSource(sql) {
|
|
213
|
+
return await sql.begin("isolation level repeatable read read only", async (tx) => {
|
|
214
|
+
await assertStoreSchema(tx);
|
|
215
|
+
const layout = await detectLayout(tx);
|
|
216
|
+
if (layout === "absent") throw new Error("the source schema holds no rows table");
|
|
217
|
+
if (layout === "tables") throw new Error("the source is already in the tables layout; migrate-store copies a legacy or partitioned store");
|
|
218
|
+
const [version] = await tx`SELECT current_setting('server_version_num')::int AS v`;
|
|
219
|
+
const [ledger] = await tx`SELECT to_regclass('migrations') IS NOT NULL AS present`;
|
|
220
|
+
const appliedMigrations = ledger?.present ? (await tx`SELECT version FROM migrations ORDER BY version`).map((r) => r.version) : [];
|
|
221
|
+
const tableRows = await tx`
|
|
222
|
+
SELECT c.relname AS name,
|
|
223
|
+
-- pg_partition_tree is empty for an ordinary table.
|
|
224
|
+
(CASE WHEN c.relkind = 'p'
|
|
225
|
+
THEN (SELECT coalesce(sum(pg_table_size(t.relid)), 0) FROM pg_partition_tree(c.oid) t WHERE t.isleaf)
|
|
226
|
+
ELSE pg_table_size(c.oid) END)::text AS bytes
|
|
227
|
+
FROM pg_class c
|
|
228
|
+
WHERE c.relnamespace = current_schema()::regnamespace
|
|
229
|
+
AND c.relkind IN ('r', 'p') AND NOT c.relispartition
|
|
230
|
+
ORDER BY c.relname`;
|
|
231
|
+
const colRows = await tx`
|
|
232
|
+
SELECT c.relname AS "table", a.attname AS col
|
|
233
|
+
FROM pg_attribute a JOIN pg_class c ON c.oid = a.attrelid
|
|
234
|
+
WHERE c.relnamespace = current_schema()::regnamespace
|
|
235
|
+
AND c.relkind IN ('r', 'p') AND NOT c.relispartition
|
|
236
|
+
AND a.attnum > 0 AND NOT a.attisdropped AND a.attgenerated = ''
|
|
237
|
+
ORDER BY c.relname, a.attnum`;
|
|
238
|
+
const columns = {};
|
|
239
|
+
for (const r of colRows) {
|
|
240
|
+
const list = columns[r.table] ?? [];
|
|
241
|
+
list.push(r.col);
|
|
242
|
+
columns[r.table] = list;
|
|
243
|
+
}
|
|
244
|
+
const types = await tx`
|
|
245
|
+
SELECT namespace, type,
|
|
246
|
+
count(*) FILTER (WHERE deleted_at IS NULL)::text AS live,
|
|
247
|
+
count(*) FILTER (WHERE deleted_at IS NOT NULL)::text AS deleted,
|
|
248
|
+
coalesce(sum(pg_column_size(r.*)), 0)::text AS bytes
|
|
249
|
+
FROM rows r GROUP BY namespace, type ORDER BY namespace, type`;
|
|
250
|
+
const nonUuid = (table, column, nsCol, typeCol) => tx`
|
|
251
|
+
SELECT ${tx(nsCol)} AS namespace, ${tx(typeCol)} AS type, ${tx(column)} AS id
|
|
252
|
+
FROM ${tx(table)} WHERE ${tx(column)} !~ ${UUID_REGEX}
|
|
253
|
+
ORDER BY 1, 2, 3 LIMIT 20`.then((rs) => rs.map((r) => ({
|
|
254
|
+
table,
|
|
255
|
+
column,
|
|
256
|
+
...r
|
|
257
|
+
})));
|
|
258
|
+
const nonUuidIds = appliedMigrations.includes("0002_uuid_format_check") ? [] : [
|
|
259
|
+
...await nonUuid("rows", "id", "namespace", "type"),
|
|
260
|
+
...columns.short_ids ? await nonUuid("short_ids", "row_id", "namespace", "type") : [],
|
|
261
|
+
...columns.edges ? await nonUuid("edges", "from_id", "from_ns", "from_type") : [],
|
|
262
|
+
...columns.edges ? await nonUuid("edges", "to_id", "to_ns", "to_type") : []
|
|
263
|
+
];
|
|
264
|
+
const [dims] = columns.embeddings ? await tx`
|
|
265
|
+
SELECT a.atttypmod AS dims FROM pg_attribute a
|
|
266
|
+
WHERE a.attrelid = to_regclass('embeddings') AND a.attname = 'embedding' AND NOT a.attisdropped` : [];
|
|
267
|
+
const extensions = await tx`SELECT extname, extversion FROM pg_extension ORDER BY extname`;
|
|
268
|
+
const sessions = await tx`
|
|
269
|
+
SELECT pid, extract(epoch FROM backend_start)::text AS start, usename,
|
|
270
|
+
application_name AS "applicationName", client_addr::text AS "clientAddr",
|
|
271
|
+
backend_type AS "backendType", state
|
|
272
|
+
FROM pg_stat_activity
|
|
273
|
+
WHERE datname = current_database() AND pid <> pg_backend_pid()
|
|
274
|
+
-- Another role's session shows a NULL backend_type to a non-monitoring role.
|
|
275
|
+
AND (backend_type = 'client backend' OR (backend_type IS NULL AND usesysid IS NOT NULL))
|
|
276
|
+
ORDER BY pid`;
|
|
277
|
+
return {
|
|
278
|
+
serverVersionNum: version?.v ?? 0,
|
|
279
|
+
layout,
|
|
280
|
+
appliedMigrations,
|
|
281
|
+
hasSeq: columns.rows?.includes("seq") ?? false,
|
|
282
|
+
hasVisibleSeqs: columns.visible_seqs !== void 0,
|
|
283
|
+
types: types.map((t) => ({
|
|
284
|
+
...t,
|
|
285
|
+
live: Number(t.live),
|
|
286
|
+
deleted: Number(t.deleted),
|
|
287
|
+
bytes: Number(t.bytes)
|
|
288
|
+
})),
|
|
289
|
+
tables: tableRows.map((t) => t.name),
|
|
290
|
+
columns,
|
|
291
|
+
tableBytes: Object.fromEntries(tableRows.map((t) => [t.name, Number(t.bytes)])),
|
|
292
|
+
nonUuidIds,
|
|
293
|
+
vectorDims: dims !== void 0 && dims.dims > 0 ? dims.dims : null,
|
|
294
|
+
extensions: Object.fromEntries(extensions.map((e) => [e.extname, e.extversion])),
|
|
295
|
+
otherSessions: sessions.length,
|
|
296
|
+
sessions
|
|
297
|
+
};
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
/** The `rows` columns the engine itself defined in the legacy and partitioned layouts. */
|
|
301
|
+
const ENGINE_ROWS_COLUMNS = /* @__PURE__ */ new Set([
|
|
302
|
+
"namespace",
|
|
303
|
+
"type",
|
|
304
|
+
"id",
|
|
305
|
+
"body",
|
|
306
|
+
"deleted_at",
|
|
307
|
+
"created_at",
|
|
308
|
+
"updated_at",
|
|
309
|
+
"created_by_kind",
|
|
310
|
+
"created_by_id",
|
|
311
|
+
"updated_by_kind",
|
|
312
|
+
"updated_by_id",
|
|
313
|
+
"seq"
|
|
314
|
+
]);
|
|
315
|
+
/** The fields a target type table declares, orphaned columns excluded. */
|
|
316
|
+
function declaredFields(table) {
|
|
317
|
+
if (table === void 0) return [];
|
|
318
|
+
return [...table.columns().filter((c) => c.state !== "orphaned").map((c) => c.field), ...table.pending];
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* SQL for a source row's body as the old engine read it. A plugin migration could add a `rows`
|
|
322
|
+
* column mirroring a body field (cortext's `archived boolean NOT NULL DEFAULT false`), and old
|
|
323
|
+
* filters read that column, so a body lacking the key still matched `archived eq false`. A
|
|
324
|
+
* non-null mirror column named after a declared field fills that field when the body lacks it;
|
|
325
|
+
* where the body has the key, the body wins.
|
|
326
|
+
* shortcut: matches a mirror column to its field by name only (every known plugin uses the field
|
|
327
|
+
* name); a plugin that renamed its column would need its promotedColumns map read here.
|
|
328
|
+
*/
|
|
329
|
+
function sourceBodySql(rowsColumns, declared) {
|
|
330
|
+
const mirrored = rowsColumns.filter((c) => !ENGINE_ROWS_COLUMNS.has(c) && declared.includes(c));
|
|
331
|
+
if (mirrored.length === 0) return "body";
|
|
332
|
+
return `(jsonb_strip_nulls(jsonb_build_object(${mirrored.map((c) => `'${c.replace(/'/g, "''")}', "${c.replace(/"/g, "\"\"")}"`).join(", ")})) || body)`;
|
|
333
|
+
}
|
|
334
|
+
|
|
204
335
|
//#endregion
|
|
205
336
|
//#region src/admin/migrate-store/copy.ts
|
|
206
337
|
/**
|
|
@@ -552,7 +683,7 @@ async function convertRows(src, tsql, t, filter, tables, counter, batchRows, mis
|
|
|
552
683
|
const table = tables.get(key);
|
|
553
684
|
if (table === void 0) throw new Error(`internal: no table prepared for ${key}`);
|
|
554
685
|
const cursor = src`
|
|
555
|
-
SELECT id,
|
|
686
|
+
SELECT id, ${src.unsafe(sourceBodySql(t.columns, declaredFields(table)))}::text AS body, deleted_at::text, created_at::text, updated_at::text,
|
|
556
687
|
created_by_kind, created_by_id, updated_by_kind, updated_by_id,
|
|
557
688
|
${seq} AS seq
|
|
558
689
|
FROM rows WHERE namespace = ${namespace} AND type = ${type} ${where}
|
|
@@ -673,103 +804,6 @@ async function markStep(tsql, step) {
|
|
|
673
804
|
ON CONFLICT (step) DO UPDATE SET done_at = excluded.done_at`;
|
|
674
805
|
}
|
|
675
806
|
|
|
676
|
-
//#endregion
|
|
677
|
-
//#region src/admin/migrate-store/source.ts
|
|
678
|
-
/**
|
|
679
|
-
* Read-only inventory of a migrate-store source. Every read runs in one
|
|
680
|
-
* REPEATABLE READ, READ ONLY transaction, so the inventory is one snapshot and
|
|
681
|
-
* nothing here can write to the source. It never runs migrations and never
|
|
682
|
-
* goes through `assertServerVersion`: the source may be PG 17.
|
|
683
|
-
*/
|
|
684
|
-
async function inspectSource(sql) {
|
|
685
|
-
return await sql.begin("isolation level repeatable read read only", async (tx) => {
|
|
686
|
-
await assertStoreSchema(tx);
|
|
687
|
-
const layout = await detectLayout(tx);
|
|
688
|
-
if (layout === "absent") throw new Error("the source schema holds no rows table");
|
|
689
|
-
if (layout === "tables") throw new Error("the source is already in the tables layout; migrate-store copies a legacy or partitioned store");
|
|
690
|
-
const [version] = await tx`SELECT current_setting('server_version_num')::int AS v`;
|
|
691
|
-
const [ledger] = await tx`SELECT to_regclass('migrations') IS NOT NULL AS present`;
|
|
692
|
-
const appliedMigrations = ledger?.present ? (await tx`SELECT version FROM migrations ORDER BY version`).map((r) => r.version) : [];
|
|
693
|
-
const tableRows = await tx`
|
|
694
|
-
SELECT c.relname AS name,
|
|
695
|
-
-- pg_partition_tree is empty for an ordinary table.
|
|
696
|
-
(CASE WHEN c.relkind = 'p'
|
|
697
|
-
THEN (SELECT coalesce(sum(pg_table_size(t.relid)), 0) FROM pg_partition_tree(c.oid) t WHERE t.isleaf)
|
|
698
|
-
ELSE pg_table_size(c.oid) END)::text AS bytes
|
|
699
|
-
FROM pg_class c
|
|
700
|
-
WHERE c.relnamespace = current_schema()::regnamespace
|
|
701
|
-
AND c.relkind IN ('r', 'p') AND NOT c.relispartition
|
|
702
|
-
ORDER BY c.relname`;
|
|
703
|
-
const colRows = await tx`
|
|
704
|
-
SELECT c.relname AS "table", a.attname AS col
|
|
705
|
-
FROM pg_attribute a JOIN pg_class c ON c.oid = a.attrelid
|
|
706
|
-
WHERE c.relnamespace = current_schema()::regnamespace
|
|
707
|
-
AND c.relkind IN ('r', 'p') AND NOT c.relispartition
|
|
708
|
-
AND a.attnum > 0 AND NOT a.attisdropped AND a.attgenerated = ''
|
|
709
|
-
ORDER BY c.relname, a.attnum`;
|
|
710
|
-
const columns = {};
|
|
711
|
-
for (const r of colRows) {
|
|
712
|
-
const list = columns[r.table] ?? [];
|
|
713
|
-
list.push(r.col);
|
|
714
|
-
columns[r.table] = list;
|
|
715
|
-
}
|
|
716
|
-
const types = await tx`
|
|
717
|
-
SELECT namespace, type,
|
|
718
|
-
count(*) FILTER (WHERE deleted_at IS NULL)::text AS live,
|
|
719
|
-
count(*) FILTER (WHERE deleted_at IS NOT NULL)::text AS deleted,
|
|
720
|
-
coalesce(sum(pg_column_size(r.*)), 0)::text AS bytes
|
|
721
|
-
FROM rows r GROUP BY namespace, type ORDER BY namespace, type`;
|
|
722
|
-
const nonUuid = (table, column, nsCol, typeCol) => tx`
|
|
723
|
-
SELECT ${tx(nsCol)} AS namespace, ${tx(typeCol)} AS type, ${tx(column)} AS id
|
|
724
|
-
FROM ${tx(table)} WHERE ${tx(column)} !~ ${UUID_REGEX}
|
|
725
|
-
ORDER BY 1, 2, 3 LIMIT 20`.then((rs) => rs.map((r) => ({
|
|
726
|
-
table,
|
|
727
|
-
column,
|
|
728
|
-
...r
|
|
729
|
-
})));
|
|
730
|
-
const nonUuidIds = appliedMigrations.includes("0002_uuid_format_check") ? [] : [
|
|
731
|
-
...await nonUuid("rows", "id", "namespace", "type"),
|
|
732
|
-
...columns.short_ids ? await nonUuid("short_ids", "row_id", "namespace", "type") : [],
|
|
733
|
-
...columns.edges ? await nonUuid("edges", "from_id", "from_ns", "from_type") : [],
|
|
734
|
-
...columns.edges ? await nonUuid("edges", "to_id", "to_ns", "to_type") : []
|
|
735
|
-
];
|
|
736
|
-
const [dims] = columns.embeddings ? await tx`
|
|
737
|
-
SELECT a.atttypmod AS dims FROM pg_attribute a
|
|
738
|
-
WHERE a.attrelid = to_regclass('embeddings') AND a.attname = 'embedding' AND NOT a.attisdropped` : [];
|
|
739
|
-
const extensions = await tx`SELECT extname, extversion FROM pg_extension ORDER BY extname`;
|
|
740
|
-
const sessions = await tx`
|
|
741
|
-
SELECT pid, extract(epoch FROM backend_start)::text AS start, usename,
|
|
742
|
-
application_name AS "applicationName", client_addr::text AS "clientAddr",
|
|
743
|
-
backend_type AS "backendType", state
|
|
744
|
-
FROM pg_stat_activity
|
|
745
|
-
WHERE datname = current_database() AND pid <> pg_backend_pid()
|
|
746
|
-
-- Another role's session shows a NULL backend_type to a non-monitoring role.
|
|
747
|
-
AND (backend_type = 'client backend' OR (backend_type IS NULL AND usesysid IS NOT NULL))
|
|
748
|
-
ORDER BY pid`;
|
|
749
|
-
return {
|
|
750
|
-
serverVersionNum: version?.v ?? 0,
|
|
751
|
-
layout,
|
|
752
|
-
appliedMigrations,
|
|
753
|
-
hasSeq: columns.rows?.includes("seq") ?? false,
|
|
754
|
-
hasVisibleSeqs: columns.visible_seqs !== void 0,
|
|
755
|
-
types: types.map((t) => ({
|
|
756
|
-
...t,
|
|
757
|
-
live: Number(t.live),
|
|
758
|
-
deleted: Number(t.deleted),
|
|
759
|
-
bytes: Number(t.bytes)
|
|
760
|
-
})),
|
|
761
|
-
tables: tableRows.map((t) => t.name),
|
|
762
|
-
columns,
|
|
763
|
-
tableBytes: Object.fromEntries(tableRows.map((t) => [t.name, Number(t.bytes)])),
|
|
764
|
-
nonUuidIds,
|
|
765
|
-
vectorDims: dims !== void 0 && dims.dims > 0 ? dims.dims : null,
|
|
766
|
-
extensions: Object.fromEntries(extensions.map((e) => [e.extname, e.extversion])),
|
|
767
|
-
otherSessions: sessions.length,
|
|
768
|
-
sessions
|
|
769
|
-
};
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
|
|
773
807
|
//#endregion
|
|
774
808
|
//#region src/admin/migrate-store/preflight.ts
|
|
775
809
|
/** Pure preflight: turns a source inventory plus target facts into refusals, warnings and a copy plan. */
|
|
@@ -1152,13 +1186,15 @@ async function snapshot(tx, side, seeds, other, opts, types) {
|
|
|
1152
1186
|
}
|
|
1153
1187
|
const hasSeq = side === "source" ? (await colsOf("rows"))?.includes("seq") === true : other?.columns.get("rows")?.includes("seq") !== false;
|
|
1154
1188
|
const meta = `row(${META}, ${hasSeq ? "seq::text" : "NULL::text"})::text`;
|
|
1189
|
+
const rowsColumns = side === "source" ? (await tx`
|
|
1190
|
+
SELECT attname AS col FROM pg_attribute
|
|
1191
|
+
WHERE attrelid = to_regclass('rows') AND attnum > 0 AND NOT attisdropped AND attgenerated = ''`).map((r) => r.col) : [];
|
|
1155
1192
|
for (const { namespace, type } of counted) {
|
|
1156
1193
|
let rows;
|
|
1157
1194
|
let params;
|
|
1158
1195
|
if (side === "source") {
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1161
|
-
rows = `SELECT id || E'\n' || (SELECT coalesce(jsonb_object_agg(k, v), '{}'::jsonb) FROM jsonb_each(body) e(k, v)
|
|
1196
|
+
const declared = declaredFields(types.get(`${namespace}/${type}`));
|
|
1197
|
+
rows = `SELECT id || E'\n' || (SELECT coalesce(jsonb_object_agg(k, v), '{}'::jsonb) FROM jsonb_each(${sourceBodySql(rowsColumns, declared)}) e(k, v)
|
|
1162
1198
|
WHERE NOT (v = 'null'::jsonb AND k = ANY($3::text[])))::text || E'\n' || ${meta} AS h
|
|
1163
1199
|
FROM rows WHERE namespace = $1 AND type = $2 ORDER BY md5(id) COLLATE "C" LIMIT ${limit}`;
|
|
1164
1200
|
params = [
|
|
@@ -192,6 +192,47 @@ interface EdgesStore {
|
|
|
192
192
|
withTransaction<T>(fn: (tx: EdgesStore) => Promise<T>): Promise<T>;
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
|
+
//#region ../../packages/substrate-types/src/expression.d.ts
|
|
196
|
+
/**
|
|
197
|
+
* Typed expressions for the read grammar: the JSON form, the type lattice, the
|
|
198
|
+
* curated function catalogue and the size limits.
|
|
199
|
+
*
|
|
200
|
+
* An expression is a bare string (a field, or `_agg.<name>`), a number, boolean
|
|
201
|
+
* or `null` literal, `{ lit: "text" }` (string literal), `{ int64: "<decimal>" }`
|
|
202
|
+
* (exact int64 constant) or `{ <fn>: [args...] }` (a call, one key).
|
|
203
|
+
*/
|
|
204
|
+
type Expr = string | number | boolean | null | {
|
|
205
|
+
lit: string;
|
|
206
|
+
} | {
|
|
207
|
+
int64: string;
|
|
208
|
+
} | {
|
|
209
|
+
[fn: string]: Expr[];
|
|
210
|
+
};
|
|
211
|
+
type ExprType = 'number' | 'int64' | 'string' | 'boolean' | 'date';
|
|
212
|
+
/**
|
|
213
|
+
* An argument slot. `'any'` slots unify to one type (int64 and number compare
|
|
214
|
+
* as number); `'unit'` is a `{ lit }` date unit, `'pattern'` a `{ lit }`
|
|
215
|
+
* regex and `'likePattern'` a `{ lit }` LIKE pattern, all literal-only.
|
|
216
|
+
*/
|
|
217
|
+
type ArgType = ExprType | 'any' | 'unit' | 'pattern' | 'likePattern';
|
|
218
|
+
interface FunctionSig {
|
|
219
|
+
name: string;
|
|
220
|
+
/** Fixed argument slots, or `'variadic'` when the checker applies the function's own rules. */
|
|
221
|
+
args: ArgType[] | 'variadic';
|
|
222
|
+
/** `'any'` is the unified type of the `'any'` (and, for arithmetic, `'number'`) arguments. */
|
|
223
|
+
returns: ExprType | 'any';
|
|
224
|
+
description: string;
|
|
225
|
+
}
|
|
226
|
+
declare const EXPR_FUNCTIONS: readonly FunctionSig[];
|
|
227
|
+
declare const EXPR_LIMITS: {
|
|
228
|
+
maxDepth: number;
|
|
229
|
+
maxNodesPerExpr: number;
|
|
230
|
+
maxNodesPerFrame: number;
|
|
231
|
+
};
|
|
232
|
+
/** The aggregate names `_agg`, `having` and grouped reads accept. */
|
|
233
|
+
declare const EXPR_AGGREGATES: readonly ['count', 'countDistinct', 'sum', 'avg', 'min', 'max'];
|
|
234
|
+
declare const DATE_UNITS: readonly ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];
|
|
235
|
+
//#endregion
|
|
195
236
|
//#region ../../packages/substrate-types/src/runtime-metrics.d.ts
|
|
196
237
|
/** Per-key resolver latency and error counts, as served by GET /substrate/v1/metrics. */
|
|
197
238
|
interface ResolverStat {
|
|
@@ -413,20 +454,19 @@ type WalkAgg = {
|
|
|
413
454
|
out?: string;
|
|
414
455
|
where?: WhereClause;
|
|
415
456
|
} & AggFn;
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
/** `diff` is a − b, `ratio` a / b, and `value` one operand as it is (to order by a walked value). */
|
|
424
|
-
type DeriveSpec = {
|
|
425
|
-
diff: [string, string];
|
|
457
|
+
/** A frame aggregate: `count: true` counts rows; every other argument is an expression. */
|
|
458
|
+
type FrameAgg = {
|
|
459
|
+
count: Expr;
|
|
460
|
+
} | {
|
|
461
|
+
countDistinct: Expr;
|
|
462
|
+
} | {
|
|
463
|
+
avg: Expr;
|
|
426
464
|
} | {
|
|
427
|
-
|
|
465
|
+
sum: Expr;
|
|
428
466
|
} | {
|
|
429
|
-
|
|
467
|
+
min: Expr;
|
|
468
|
+
} | {
|
|
469
|
+
max: Expr;
|
|
430
470
|
};
|
|
431
471
|
interface NestedSelection {
|
|
432
472
|
_walk: {
|
|
@@ -463,7 +503,6 @@ type WalkAggPredicate = {
|
|
|
463
503
|
* deterministic tie-break is what makes cursor pagination stable across pages.
|
|
464
504
|
*/
|
|
465
505
|
interface OrderByClause {
|
|
466
|
-
/** A `$`-prefixed key orders by a `params.derive` entry. */
|
|
467
506
|
[field: string]: 'asc' | 'desc';
|
|
468
507
|
}
|
|
469
508
|
interface ReadParams {
|
|
@@ -478,8 +517,14 @@ interface ReadParams {
|
|
|
478
517
|
/** Return a match count (`ReadResult.count`). */
|
|
479
518
|
count?: boolean;
|
|
480
519
|
aggregate?: Record<string, FrameAgg>;
|
|
481
|
-
|
|
482
|
-
|
|
520
|
+
/** Group keys by output name; with `aggregate`, the read returns one group per distinct key tuple. */
|
|
521
|
+
groupBy?: Record<string, Expr>;
|
|
522
|
+
/** A boolean expression over group keys and aggregate names, applied before order and limit. */
|
|
523
|
+
having?: Expr;
|
|
524
|
+
/** Groups to skip, on a grouped read. */
|
|
525
|
+
offset?: number;
|
|
526
|
+
/** Computed per-row values by output name: each row gains one key per entry, which `orderBy` may use. */
|
|
527
|
+
select?: Record<string, Expr>;
|
|
483
528
|
/** Per-row walk aggregates, lifted out of `fields` by the list resolver. */
|
|
484
529
|
agg?: Record<string, WalkAgg>;
|
|
485
530
|
/** Per-row nested selections, lifted out of `fields` by the list resolver. */
|
|
@@ -604,7 +649,7 @@ interface DropResult {
|
|
|
604
649
|
* validates every where-clause leaf against `operators[fieldKind]` and rejects
|
|
605
650
|
* ops the dataset can't execute rather than returning a silently wrong result.
|
|
606
651
|
*/
|
|
607
|
-
type FieldKind = 'scalar.number' | 'scalar.string' | 'scalar.boolean' | 'scalar.date' | 'scalar.json' | 'crossRef' | 'list';
|
|
652
|
+
type FieldKind = 'scalar.number' | 'scalar.int16' | 'scalar.int32' | 'scalar.int64' | 'scalar.string' | 'scalar.boolean' | 'scalar.date' | 'scalar.json' | 'crossRef' | 'list';
|
|
608
653
|
interface FilterCapabilities {
|
|
609
654
|
operators: Record<FieldKind, string[]>;
|
|
610
655
|
/** Does the dataset honour `orderBy`? */
|
|
@@ -806,6 +851,13 @@ interface Dataset {
|
|
|
806
851
|
* OPTIONAL. Backends with no per-type tables omit it.
|
|
807
852
|
*/
|
|
808
853
|
fieldWarnings?(): Promise<string[]>;
|
|
854
|
+
/**
|
|
855
|
+
* The connection pool right now: connections open, opening, idle and leased,
|
|
856
|
+
* and requests waiting for one. Counts only; `/health` shows it unauthenticated.
|
|
857
|
+
*
|
|
858
|
+
* OPTIONAL. Backends with no connection pool omit it.
|
|
859
|
+
*/
|
|
860
|
+
poolStats?(): PoolStats;
|
|
809
861
|
/**
|
|
810
862
|
* The database-wide storage layout and what an operator should look at:
|
|
811
863
|
* indexes this process has yet to build or failed to build, fields whose
|
|
@@ -1124,6 +1176,14 @@ interface IndexPlan {
|
|
|
1124
1176
|
}>;
|
|
1125
1177
|
expectedSize?: 'small' | 'large';
|
|
1126
1178
|
}
|
|
1179
|
+
/** A connection pool's counts, as `Dataset.poolStats` reports them. */
|
|
1180
|
+
interface PoolStats {
|
|
1181
|
+
connections: number;
|
|
1182
|
+
opening: number;
|
|
1183
|
+
idle: number;
|
|
1184
|
+
leased: number;
|
|
1185
|
+
waiting: number;
|
|
1186
|
+
}
|
|
1127
1187
|
//#endregion
|
|
1128
1188
|
//#region ../../packages/substrate-types/src/policy.d.ts
|
|
1129
1189
|
interface Identity {
|
|
@@ -2408,7 +2468,7 @@ interface KernelLifecycleContext {
|
|
|
2408
2468
|
*/
|
|
2409
2469
|
interface PlanClause {
|
|
2410
2470
|
path: string[];
|
|
2411
|
-
kind: 'hop' | 'filter' | 'order' | 'ref' | '
|
|
2471
|
+
kind: 'hop' | 'filter' | 'order' | 'ref' | 'select' | 'group' | 'agg';
|
|
2412
2472
|
served: boolean;
|
|
2413
2473
|
recommend?: IndexDecl;
|
|
2414
2474
|
/**
|
|
@@ -2438,7 +2498,7 @@ interface FieldDefScalar {
|
|
|
2438
2498
|
* freeform payloads (audit details, debug bags). When you need filterable
|
|
2439
2499
|
* inner keys, use `field.struct` instead.
|
|
2440
2500
|
*/
|
|
2441
|
-
type: 'string' | 'number' | 'boolean' | 'date' | 'json';
|
|
2501
|
+
type: 'string' | 'number' | 'int16' | 'int32' | 'int64' | 'boolean' | 'date' | 'json';
|
|
2442
2502
|
/**
|
|
2443
2503
|
* Tri-state. `true` builds an index (a btree; a GIN for json). Unset means
|
|
2444
2504
|
* no index. `false` means no index AND not a search handle: long-form
|
|
@@ -2754,4 +2814,4 @@ type FieldInput = {
|
|
|
2754
2814
|
[field: string]: true | FieldInput;
|
|
2755
2815
|
};
|
|
2756
2816
|
//#endregion
|
|
2757
|
-
export { VirtualMutationDef as $,
|
|
2817
|
+
export { VirtualMutationDef as $, TypeStorageReport as $t, KernelLifecycleContext as A, EdgesStore as An, DEFAULT_FILTER_WRITE_LIMITS as At, NamespaceTypeDef as B, RowMetadata as Bn, FilterWriteResult as Bt, EmbedSourceContext as C, ExprType as Cn, ResolverArgs as Ct, FilterOperatorDef as D, EdgePatch as Dn, WriteEvent as Dt, EngineInput as E, Edge as En, TypedResolver as Et, KernelRouteClaim as F, ClientSuppliedServerFieldError as Fn, FieldKind as Ft, Registry as G, PoolStats as Gt, PluginRouteContext as H, WriteRow as Hn, IndexPlan as Ht, McpToolRegistration as I, Id as In, FieldPredicate as It, RegistryEntryInput as J, ReadResult as Jt, RegistryBase as K, PromotionEvent as Kt, NamespaceConfig as L, IdentityKind as Ln, FilterCapabilities as Lt, KernelMigrationContext as M, OnMissing as Mn, DatasetRegistry as Mt, KernelNamespaceContribution as N, ActorIdentity as Nn, DeleteResult as Nt, FrameEntry as O, EdgeRef as On, AggFn as Ot, KernelPlugin as P, CLIENT_SUPPLIED_SERVER_FIELD as Pn, DropResult as Pt, ScheduledTaskContext as Q, TypeIndexState as Qt, NamespaceDefinition as R, ROW_METADATA_FIELDS as Rn, FilterWriteLimits as Rt, DropParticipant as S, Expr as Sn, Resolver as St, EngineHandle as T, CanDeleteResult as Tn, RowFilterObligation as Tt, PostWriteHook as U, assertNoRepeatedIds as Un, NestedSelection as Ut, PluginLifecycleContext as V, RowMetadataField as Vn, FrameAgg as Vt, QualifiedFrame as W, OrderByClause as Wt, RegistryEntryResolver as X, StorageReport as Xt, RegistryEntryKind as Y, RefOperand as Yt, ScheduledTask as Z, TxScopeHandles as Zt, naturalOrderOf as _, ArgType as _n, Obligation as _t, FieldDefCrossRef as a, WalkPick as an, RequestObserver as at, CommittedWritesHook as b, EXPR_FUNCTIONS as bn, PolicyProbeContext as bt, FieldDefStruct as c, WriteResult as cn, SubstrateRequest as ct, OrderedBy as d, ResolverStat as dn, TlsConfig as dt, UpdateFieldRef as en, VirtualTypeDef as et, PackEnvelope as f, RuntimeErrorEntry as fn, WsConnection as ft, isColumnField as g, TypeStats as gn, Identity as gt, TypeSchema as h, SlowRequest as hn, AutoCrudVerb as ht, FieldDef as i, WalkNode as in, RequestObservation as it, KernelMigration as j, OnDelete as jn, Dataset as jt, IndexDecl as k, EdgeWriteInput as kn, ConditionalUpdateResult as kt, FieldInput as l, ProcessStat as ln, SubstrateResponse as lt, Schema as m, RuntimeMetrics as mn, AfterTxWork as mt, Dropped as n, WalkAggOperand as nn, HttpMethod as nt, FieldDefList as o, WhereClause as on, RuntimeOp as ot, PlanClause as p, RuntimeErrors as pn, WsHandler as pt, RegistryEntry as q, ReadParams as qt, EnvelopeShape as r, WalkAggPredicate as rn, PluginRouter as rt, FieldDefScalar as s, WriteOptions as sn, StartOpts as st, DEFAULT_ORDERED_BY as t, WalkAgg as tn, HttpHandler as tt, MutationSchema as u, ResolveObservation as un, SubstrateServer as ut, BatchResolver as v, DATE_UNITS as vn, Policy as vt, EncodeContext as w, FunctionSig as wn, ResolverReturn as wt, CoordinatorPlugin as x, EXPR_LIMITS as xn, RequestContext as xt, CommittedWriteBatch as y, EXPR_AGGREGATES as yn, PolicyDecision as yt, NamespaceInstallContext as z, Row as zn, FilterWriteOptions as zt };
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as VirtualMutationDef, $t as
|
|
2
|
-
import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-
|
|
3
|
-
import { S as isRestrictViolation, _ as
|
|
4
|
-
import { a as WsResponseFrame, c as ResolveTarget, d as TargetState, f as IdempotencyStore, i as WsRequestFrame, l as SweepDeps, n as WS_REASON_SERVER_RESTART, o as WsResponseKind, r as WS_REASON_SUBSCRIPTION_OVERLOADED, s as BridgeRegistry, t as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, u as SweepState } from "./ws-
|
|
5
|
-
import { $ as NlJudgeAction, A as and, B as SYSTEM_NAMESPACE, C as flattenGrant, D as parseGrantEntries, E as intersectGrants, F as TokenProviderOpts, G as resolveAdminCredential, H as isActiveAdminKeyRow, I as adminClaimCapabilities, J as NlAggregate, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlFieldPhrase, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlAskResult, Y as NlAskRequest, Z as NlEvidence, _ as newlyGrantedPairs, _t as NLVocabularyHint, a as denyAll, at as NlOutcome, b as capabilitiesFor, c as requireIdentity, ct as NlPackValueRef, d as KeyUpdateRefusal, dt as NlServedPack, et as NlJudgeChoice, f as checkRevocable, ft as NlTrailEvent, g as newlyGranted, gt as NLResult, h as grantEntriesConfer, ht as NLBase, i as allowVerbs, it as NlNamespaceRulings, j as not, k as encodeList, l as requireNamespace, lt as NlParseStatus, m as grantCovers, mt as NlWireEvent, n as row, nt as NlJudgedStatus, o as denyVerbs, ot as NlPackField, p as checkUpdatable, pt as NlValueAlias, q as resolveDefaultKidPath, r as allowAll, rt as NlNamespacePack, s as requireCapability, st as NlPackType, t as applyRowFilters, tt as NlJudgeStep, u as KeyMutationRefusal, ut as NlParsedData, v as revokedAtIso, vt as Query, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-
|
|
1
|
+
import { $ as VirtualMutationDef, $t as TypeStorageReport, A as KernelLifecycleContext, An as EdgesStore, At as DEFAULT_FILTER_WRITE_LIMITS, B as NamespaceTypeDef, Bn as RowMetadata, Bt as FilterWriteResult, C as EmbedSourceContext, Cn as ExprType, Ct as ResolverArgs, D as FilterOperatorDef, Dn as EdgePatch, Dt as WriteEvent, E as EngineInput, En as Edge, Et as TypedResolver, F as KernelRouteClaim, Fn as ClientSuppliedServerFieldError, Ft as FieldKind, G as Registry, Gt as PoolStats, H as PluginRouteContext, Hn as WriteRow, Ht as IndexPlan, I as McpToolRegistration, In as Id, It as FieldPredicate, J as RegistryEntryInput, Jt as ReadResult, K as RegistryBase, Kt as PromotionEvent, L as NamespaceConfig, Ln as IdentityKind, Lt as FilterCapabilities, M as KernelMigrationContext, Mn as OnMissing, Mt as DatasetRegistry, N as KernelNamespaceContribution, Nn as ActorIdentity, Nt as DeleteResult, O as FrameEntry, On as EdgeRef, Ot as AggFn, P as KernelPlugin, Pn as CLIENT_SUPPLIED_SERVER_FIELD, Pt as DropResult, Q as ScheduledTaskContext, Qt as TypeIndexState, R as NamespaceDefinition, Rn as ROW_METADATA_FIELDS, Rt as FilterWriteLimits, S as DropParticipant, Sn as Expr, St as Resolver, T as EngineHandle, Tn as CanDeleteResult, Tt as RowFilterObligation, U as PostWriteHook, Un as assertNoRepeatedIds, Ut as NestedSelection, V as PluginLifecycleContext, Vn as RowMetadataField, Vt as FrameAgg, W as QualifiedFrame, Wt as OrderByClause, X as RegistryEntryResolver, Xt as StorageReport, Y as RegistryEntryKind, Yt as RefOperand, Z as ScheduledTask, Zt as TxScopeHandles, _ as naturalOrderOf, _n as ArgType, _t as Obligation, a as FieldDefCrossRef, an as WalkPick, at as RequestObserver, b as CommittedWritesHook, bn as EXPR_FUNCTIONS, bt as PolicyProbeContext, c as FieldDefStruct, cn as WriteResult, ct as SubstrateRequest, d as OrderedBy, dn as ResolverStat, dt as TlsConfig, en as UpdateFieldRef, et as VirtualTypeDef, f as PackEnvelope, fn as RuntimeErrorEntry, ft as WsConnection, g as isColumnField, gn as TypeStats, gt as Identity, h as TypeSchema, hn as SlowRequest, ht as AutoCrudVerb, i as FieldDef, in as WalkNode, it as RequestObservation, j as KernelMigration, jn as OnDelete, jt as Dataset, k as IndexDecl, kn as EdgeWriteInput, kt as ConditionalUpdateResult, l as FieldInput, ln as ProcessStat, lt as SubstrateResponse, m as Schema, mn as RuntimeMetrics, mt as AfterTxWork, n as Dropped, nn as WalkAggOperand, nt as HttpMethod, o as FieldDefList, on as WhereClause, ot as RuntimeOp, p as PlanClause, pn as RuntimeErrors, pt as WsHandler, q as RegistryEntry, qt as ReadParams, r as EnvelopeShape, rn as WalkAggPredicate, rt as PluginRouter, s as FieldDefScalar, sn as WriteOptions, st as StartOpts, t as DEFAULT_ORDERED_BY, tn as WalkAgg, tt as HttpHandler, u as MutationSchema, un as ResolveObservation, ut as SubstrateServer, v as BatchResolver, vn as DATE_UNITS, vt as Policy, w as EncodeContext, wn as FunctionSig, wt as ResolverReturn, x as CoordinatorPlugin, xn as EXPR_LIMITS, xt as RequestContext, y as CommittedWriteBatch, yn as EXPR_AGGREGATES, yt as PolicyDecision, z as NamespaceInstallContext, zn as Row, zt as FilterWriteOptions } from "./schema-B5WBO8yh.js";
|
|
2
|
+
import { i as BridgeFrame, n as BridgeCredential, r as BridgeCredentialStore, t as BridgeClient } from "./bridge-5VHZiH9o.js";
|
|
3
|
+
import { C as isBatchElementError, S as isAuthCause, T as isRestrictViolation, _ as WALKS_NEED_PARTITIONED, a as NamespaceMismatch, b as WALK_UNSUPPORTED_REF, c as ROW_POLICY_BLOCKS_WALK, d as RestrictViolation, f as STORE_BUSY, g as WALKS_IN_SUBSCRIPTION, h as WALKS_IN_MUTATION, i as MissingReferentError, l as ReservedField, m as VALUE_OUT_OF_RANGE, n as BridgeUnreachableError, o as QUERY_TIMEOUT, p as UnsupportedFilterError, r as FILTER_TOO_BROAD, s as REGEX_BUDGET_EXCEEDED, t as BatchElementError, u as ResolverFrameError, v as WALKS_UNSUPPORTED_STORE, w as isResolverFrameError, x as filterTooBroad, y as WALK_BUDGET_EXCEEDED } from "./errors-DHgT7Fa8.js";
|
|
4
|
+
import { a as WsResponseFrame, c as ResolveTarget, d as TargetState, f as IdempotencyStore, i as WsRequestFrame, l as SweepDeps, n as WS_REASON_SERVER_RESTART, o as WsResponseKind, r as WS_REASON_SUBSCRIPTION_OVERLOADED, s as BridgeRegistry, t as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, u as SweepState } from "./ws-BL9nSELO.js";
|
|
5
|
+
import { $ as NlJudgeAction, A as and, B as SYSTEM_NAMESPACE, C as flattenGrant, D as parseGrantEntries, E as intersectGrants, F as TokenProviderOpts, G as resolveAdminCredential, H as isActiveAdminKeyRow, I as adminClaimCapabilities, J as NlAggregate, K as resolveDefaultKeyPath, L as isEncryptedKey, M as or, N as ADMIN_CAPABILITIES, O as decodeList, P as DEFAULT_CAPABILITIES, Q as NlFieldPhrase, R as makeAuthorizationProvider, S as expandFlat, T as grantIsUniform, U as AdminCredential, V as describeGrant, W as AdminEnv, X as NlAskResult, Y as NlAskRequest, Z as NlEvidence, _ as newlyGrantedPairs, _t as NLVocabularyHint, a as denyAll, at as NlOutcome, b as capabilitiesFor, c as requireIdentity, ct as NlPackValueRef, d as KeyUpdateRefusal, dt as NlServedPack, et as NlJudgeChoice, f as checkRevocable, ft as NlTrailEvent, g as newlyGranted, gt as NLResult, h as grantEntriesConfer, ht as NLBase, i as allowVerbs, it as NlNamespaceRulings, j as not, k as encodeList, l as requireNamespace, lt as NlParseStatus, m as grantCovers, mt as NlWireEvent, n as row, nt as NlJudgedStatus, o as denyVerbs, ot as NlPackField, p as checkUpdatable, pt as NlValueAlias, q as resolveDefaultKidPath, r as allowAll, rt as NlNamespacePack, s as requireCapability, st as NlPackType, t as applyRowFilters, tt as NlJudgeStep, u as KeyMutationRefusal, ut as NlParsedData, v as revokedAtIso, vt as Query, w as grantEntryError, x as encodeGrant, y as Grant, z as makeTokenProvider } from "./row-DHxnCnhA.js";
|
|
6
6
|
//#region ../../packages/substrate-types/src/assert-never.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Exhaustiveness guard for the `default:` arm of a `switch` over a
|
|
@@ -103,6 +103,31 @@ export declare function confersAnywhere(resolved: IdentityGrant | null, capabili
|
|
|
103
103
|
/** Every capability conferred anywhere — the union, for error messages only. */
|
|
104
104
|
export declare function allCapabilities(resolved: IdentityGrant | null): string[];
|
|
105
105
|
//#endregion
|
|
106
|
+
//#region ../../packages/substrate-types/src/int64.d.ts
|
|
107
|
+
/**
|
|
108
|
+
* An `int64` operand or write value as a bigint: a bigint, a safe-integer
|
|
109
|
+
* number, or a canonical decimal string, within the int64 range. Anything else
|
|
110
|
+
* (a float, a number past 2^53, `'007'`, `'1e3'`, an out-of-range value) is
|
|
111
|
+
* `undefined`.
|
|
112
|
+
*/
|
|
113
|
+
export declare function parseInt64(v: unknown): bigint | undefined;
|
|
114
|
+
/** Whether `v` is an `int16` value: an integer number within the int16 range. */
|
|
115
|
+
export declare function isInt16(v: unknown): v is number;
|
|
116
|
+
/** Whether `v` is an `int32` value: an integer number within the int32 range. */
|
|
117
|
+
export declare function isInt32(v: unknown): v is number;
|
|
118
|
+
/**
|
|
119
|
+
* `JSON.stringify` that writes a bigint as a decimal string, so an `int64`
|
|
120
|
+
* keeps every digit on the JSON wire. The plain call runs first, so a value
|
|
121
|
+
* with no bigint pays nothing for the replacer.
|
|
122
|
+
*/
|
|
123
|
+
export declare function stringifyJson(value: unknown): string;
|
|
124
|
+
/**
|
|
125
|
+
* Like {@link stringifyJson}, but a bigint is written as an exact JSON number
|
|
126
|
+
* (`9223372036854775807`, not a string), for a jsonb body that `substrate_num`
|
|
127
|
+
* reads back as the number it is.
|
|
128
|
+
*/
|
|
129
|
+
export declare function stringifyJsonExact(value: unknown): string;
|
|
130
|
+
//#endregion
|
|
106
131
|
//#region ../../packages/substrate-types/src/iso-timestamp.d.ts
|
|
107
132
|
/**
|
|
108
133
|
* `v` as `YYYY-MM-DDTHH:MM:SS[.ffffff](Z|±HH:MM)`, or `undefined` when it is
|
|
@@ -625,6 +650,10 @@ export declare function installAutoCrud(registry: AutoCrudRegistry, typeName: st
|
|
|
625
650
|
export declare const RESERVED_AUTOCRUD_FIELDS: Record<string, FieldDef>;
|
|
626
651
|
/** Is `def` a descriptor autoCRUD injected, rather than a body field of the same name? */
|
|
627
652
|
export declare function isReservedAutoCrudField(def: FieldDef): boolean;
|
|
653
|
+
/** The server metadata names a body field may not take: expressions, where and orderBy read them as metadata. */
|
|
654
|
+
export declare const RESERVED_METADATA_FIELD_NAMES: readonly string[];
|
|
655
|
+
/** Why a field of this name cannot be declared, or undefined when it can. */
|
|
656
|
+
export declare function reservedMetadataFieldMessage(name: string): string | undefined;
|
|
628
657
|
/** Reserved field names — useful for validation loops. */
|
|
629
658
|
export declare const RESERVED_AUTOCRUD_FIELD_NAMES: string[];
|
|
630
659
|
//#endregion
|
|
@@ -808,6 +837,19 @@ interface JsonFieldOptions {
|
|
|
808
837
|
export declare const field: {
|
|
809
838
|
string(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
810
839
|
number(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
840
|
+
/**
|
|
841
|
+
* Integers: pick the narrowest kind whose range holds every value the field
|
|
842
|
+
* will EVER take, because a kind cannot change once rows exist (moving means
|
|
843
|
+
* a new field and a backfill). All three filter, sort and sum as exact
|
|
844
|
+
* integers; they differ in storage width.
|
|
845
|
+
* int16 -32768 to 32767, 2 bytes: small codes, flags, ages, percentages.
|
|
846
|
+
* int32 about ±2.1 billion, 4 bytes: counts, durations, ids within one source.
|
|
847
|
+
* int64 about ±9.2e18, 8 bytes, a decimal string on the wire past 2^53: totals, epoch-ms, external ids.
|
|
848
|
+
* Use `number` for fractional values. When unsure, take the next width up.
|
|
849
|
+
*/
|
|
850
|
+
int16(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
851
|
+
int32(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
852
|
+
int64(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
811
853
|
boolean(opts?: ScalarFieldOptions): FieldDefScalar;
|
|
812
854
|
date(opts?: DateFieldOptions): FieldDefScalar;
|
|
813
855
|
enum(values: readonly string[], opts?: ScalarFieldOptions): FieldDefScalar;
|
|
@@ -843,4 +885,4 @@ export declare function resolveEntityId(dataset: Dataset, type: string, input: I
|
|
|
843
885
|
*/
|
|
844
886
|
export declare function resolveEntityRow(dataset: Dataset, type: string, input: Id): Promise<Row | null>;
|
|
845
887
|
//#endregion
|
|
846
|
-
export { ADMIN_CAPABILITIES, ActorIdentity, type AdminCredential, type AdminEnv, AfterTxWork, AggFn, AutoCrudVerb, BatchElementError, BatchResolver, BridgeClient, BridgeCredential, BridgeCredentialStore, BridgeFrame, BridgeRegistry, BridgeUnreachableError,
|
|
888
|
+
export { ADMIN_CAPABILITIES, ActorIdentity, type AdminCredential, type AdminEnv, AfterTxWork, AggFn, ArgType, AutoCrudVerb, BatchElementError, BatchResolver, BridgeClient, BridgeCredential, BridgeCredentialStore, BridgeFrame, BridgeRegistry, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, CanDeleteResult, ClientSuppliedServerFieldError, CommittedWriteBatch, CommittedWritesHook, ConditionalUpdateResult, CoordinatorPlugin, type CrossRefFieldOptions, DATE_UNITS, DEFAULT_CAPABILITIES, DEFAULT_FILTER_WRITE_LIMITS, DEFAULT_ORDERED_BY, Dataset, DatasetRegistry, type DateFieldOptions, type DefineNamespaceOptions, DeleteResult, type DeleteRowArgs, type DeleteRowResult, DropParticipant, DropResult, Dropped, EXPR_AGGREGATES, EXPR_FUNCTIONS, EXPR_LIMITS, Edge, EdgePatch, EdgeRef, EdgeWriteInput, EdgesStore, EmbedSourceContext, EncodeContext, EngineHandle, EngineInput, EnvelopeShape, Expr, ExprType, FILTER_TOO_BROAD, FieldDef, FieldDefCrossRef, FieldDefList, FieldDefScalar, FieldDefStruct, FieldInput, FieldKind, FieldPredicate, FilterCapabilities, FilterOperatorDef, FilterWriteLimits, type FilterWriteMutationResult, FilterWriteOptions, FilterWriteResult, FrameAgg, FrameEntry, FunctionSig, type Grant, HttpHandler, HttpMethod, Id, IdempotencyStore, Identity, IdentityKind, IndexDecl, IndexPlan, type JsonFieldOptions, KernelLifecycleContext, KernelMigration, KernelMigrationContext, KernelNamespaceContribution, KernelPlugin, KernelRouteClaim, type KeyMutationRefusal, type KeyUpdateRefusal, type ListFieldOptions, McpToolRegistration, MissingReferentError, MutationSchema, NLBase, NLResult, NLVocabularyHint, NamespaceConfig, NamespaceDefinition, NamespaceInstallContext, NamespaceMismatch, NamespaceTypeDef, NestedSelection, NlAggregate, NlAskRequest, NlAskResult, NlEvidence, NlFieldPhrase, NlJudgeAction, NlJudgeChoice, NlJudgeStep, NlJudgedStatus, NlNamespacePack, NlNamespaceRulings, NlOutcome, NlPackField, NlPackType, NlPackValueRef, NlParseStatus, NlParsedData, NlServedPack, NlTrailEvent, NlValueAlias, NlWireEvent, Obligation, OnDelete, OnMissing, OrderByClause, OrderedBy, PackEnvelope, PlanClause, PluginLifecycleContext, PluginRouteContext, PluginRouter, Policy, PolicyDecision, PolicyProbeContext, PoolStats, PostWriteHook, ProcessStat, PromotionEvent, QUERY_TIMEOUT, QualifiedFrame, Query, REGEX_BUDGET_EXCEEDED, ROW_METADATA_FIELDS, ROW_POLICY_BLOCKS_WALK, ReadParams, ReadResult, RefOperand, Registry, RegistryBase, RegistryEntry, RegistryEntryInput, RegistryEntryKind, RegistryEntryResolver, RequestContext, RequestObservation, RequestObserver, ReservedField, ResolveObservation, ResolveTarget, Resolver, ResolverArgs, ResolverFrameError, ResolverReturn, ResolverStat, RestrictViolation, Row, RowFilterObligation, RowMetadata, RowMetadataField, RuntimeErrorEntry, RuntimeErrors, RuntimeMetrics, RuntimeOp, STORE_BUSY, SYSTEM_NAMESPACE, type ScalarFieldOptions, ScheduledTask, ScheduledTaskContext, Schema, SlowRequest, StartOpts, StorageReport, type StructFieldOptions, SubstrateRequest, SubstrateResponse, SubstrateServer, SweepDeps, SweepState, TargetState, TlsConfig, type TokenProviderOpts, TxScopeHandles, TypeIndexState, type TypeInput, TypeSchema, TypeStats, TypeStorageReport, TypedResolver, UnsupportedFilterError, UpdateFieldRef, type UpdateResolverOptions, VALUE_OUT_OF_RANGE, VirtualMutationDef, VirtualTypeDef, WALKS_IN_MUTATION, WALKS_IN_SUBSCRIPTION, WALKS_NEED_PARTITIONED, WALKS_UNSUPPORTED_STORE, WALK_BUDGET_EXCEEDED, WALK_UNSUPPORTED_REF, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, WalkAgg, WalkAggOperand, WalkAggPredicate, WalkNode, WalkPick, WhereClause, WriteEvent, WriteOptions, WriteResult, WriteRow, WsConnection, WsHandler, WsRequestFrame, WsResponseFrame, WsResponseKind, adminClaimCapabilities, allowAll, allowVerbs, and, applyRowFilters, assertNoRepeatedIds, capabilitiesFor, checkRevocable, checkUpdatable, decodeList, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, expandFlat, filterTooBroad, flattenGrant, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, intersectGrants, isActiveAdminKeyRow, isAuthCause, isBatchElementError, isColumnField, isEncryptedKey, isResolverFrameError, isRestrictViolation, makeAuthorizationProvider, makeTokenProvider, naturalOrderOf, newlyGranted, newlyGrantedPairs, not, or, parseGrantEntries, requireCapability, requireIdentity, requireNamespace, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, revokedAtIso, row };
|
package/dist/sdk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __binCreateRequire } from 'node:module'; const require = __binCreateRequire(import.meta.url);
|
|
2
|
-
import { $t as
|
|
2
|
+
import { $t as METADATA_FILTER_FIELDS, A as isReservedAutoCrudField, An as isAuthCause, B as deleteResolver, Bt as parseJsonBody, C as makeCtx, Cn as WALKS_IN_MUTATION, D as RESERVED_AUTOCRUD_FIELDS, Dn as WALK_BUDGET_EXCEEDED, E as selectAll, En as WALKS_UNSUPPORTED_STORE, F as createResolverWithEdges, Fn as ROW_METADATA_FIELDS, G as listResolver, Gt as WS_REASON_SUBSCRIPTION_OVERLOADED, H as applyUpdatePatch, I as installAutoCrud, In as assertNoRepeatedIds, It as JSON_HEADERS, J as resolveIdentity, Jt as normaliseVocabWhere, K as getResolver, Kt as canonicalVocabValue, L as deleteManyResolver, Ln as canonicalize, M as field, Mn as isResolverFrameError, N as AutoCrudNameCollisionError, Nn as isRestrictViolation, O as RESERVED_AUTOCRUD_FIELD_NAMES, On as WALK_UNSUPPORTED_REF, P as autoCrudOptionsOf, Pn as CLIENT_SUPPLIED_SERVER_FIELD, Qt as METADATA_AUTHOR_FIELDS, R as updateManyResolver, Rn as BootstrapConfigError, Rt as error400, S as EngineQueryError, Sn as VALUE_OUT_OF_RANGE, T as queryOne, Tn as WALKS_NEED_PARTITIONED, U as deleteRow, Ut as WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, V as updateResolver, W as purgeResolver, Wt as WS_REASON_SERVER_RESTART, X as resolveEntityRow, Xt as vocabImplication, Y as resolveEntityId, Yt as storedVocabSpellings, Zt as RegistryBase, _n as ReservedField, an as isIsoTimestamp, b as assertOrderedBy, bn as STORE_BUSY, cn as validateHardDeleteEnv, dn as FILTER_TOO_BROAD, en as normaliseMetadataOrderBy, fn as MissingReferentError, gn as ROW_POLICY_BLOCKS_WALK, hn as REGEX_BUDGET_EXCEEDED, in as isImpossibleIsoTimestamp, j as reservedMetadataFieldMessage, jn as isBatchElementError, k as RESERVED_METADATA_FIELD_NAMES, kn as filterTooBroad, ln as BatchElementError, mn as QUERY_TIMEOUT, nn as normaliseWalkNode, on as normalizeIsoTimestamp, pn as NamespaceMismatch, q as UnattributedWriteError, qt as normaliseVocabValues, rn as createKeyedMutex, sn as assertHardDeleteAllowed, tn as normaliseMetadataWhere, un as BridgeUnreachableError, vn as ResolverFrameError, w as queryAll, wn as WALKS_IN_SUBSCRIPTION, x as defineNamespace, xn as UnsupportedFilterError, y as assertIndexDecl, yn as RestrictViolation, z as createResolver, zn as defineBootstrap, zt as jsonResponse } from "./src-BHh6UZ7L.js";
|
|
3
3
|
import { a as adminClaimCapabilities, c as makeTokenProvider, d as resolveDefaultKidPath, i as DEFAULT_CAPABILITIES, l as resolveAdminCredential, n as trimTrailingSlashes, o as isEncryptedKey, r as ADMIN_CAPABILITIES, s as makeAuthorizationProvider, t as parsePositiveInt, u as resolveDefaultKeyPath } from "./env-utils-CGNazUNt.js";
|
|
4
|
-
import { A as expandFlat, C as not, D as isActiveAdminKeyRow, E as describeGrant, F as parseGrantEntries, I as decodeList, L as encodeList, M as grantEntryError, N as grantIsUniform, O as capabilitiesFor, P as intersectGrants, S as and, T as SYSTEM_NAMESPACE, _ as grantCovers, a as denyAll, b as newlyGrantedPairs, c as requireIdentity, d as confersAnywhere, f as coversNamespace, g as checkUpdatable, h as checkRevocable, i as allowVerbs, j as flattenGrant, k as encodeGrant, l as requireNamespace, m as grantedIn, n as row, o as denyVerbs, p as grantOf, r as allowAll, s as requireCapability, t as applyRowFilters, u as allCapabilities, v as grantEntriesConfer, w as or, x as revokedAtIso, y as newlyGranted } from "./src-
|
|
5
|
-
import { C as
|
|
4
|
+
import { A as expandFlat, C as not, D as isActiveAdminKeyRow, E as describeGrant, F as parseGrantEntries, I as decodeList, L as encodeList, M as grantEntryError, N as grantIsUniform, O as capabilitiesFor, P as intersectGrants, S as and, T as SYSTEM_NAMESPACE, _ as grantCovers, a as denyAll, b as newlyGrantedPairs, c as requireIdentity, d as confersAnywhere, f as coversNamespace, g as checkUpdatable, h as checkRevocable, i as allowVerbs, j as flattenGrant, k as encodeGrant, l as requireNamespace, m as grantedIn, n as row, o as denyVerbs, p as grantOf, r as allowAll, s as requireCapability, t as applyRowFilters, u as allCapabilities, v as grantEntriesConfer, w as or, x as revokedAtIso, y as newlyGranted } from "./src-DR_hUj2p.js";
|
|
5
|
+
import { A as parseInt64, C as DEFAULT_ORDERED_BY, D as parseQualifiedKey, E as formatQualifiedKey, F as EXPR_FUNCTIONS, I as EXPR_LIMITS, L as DEFAULT_FILTER_WRITE_LIMITS, M as stringifyJsonExact, N as DATE_UNITS, O as isInt16, P as EXPR_AGGREGATES, R as assertNever, T as naturalOrderOf, j as stringifyJson, k as isInt32, w as isColumnField } from "./src-CdbUzLhB.js";
|
|
6
6
|
|
|
7
|
-
export { ADMIN_CAPABILITIES, AutoCrudNameCollisionError, BatchElementError, BootstrapConfigError, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, DEFAULT_CAPABILITIES, DEFAULT_FILTER_WRITE_LIMITS, DEFAULT_ORDERED_BY, EngineQueryError, FILTER_TOO_BROAD, JSON_HEADERS, METADATA_AUTHOR_FIELDS, METADATA_FILTER_FIELDS, MissingReferentError, NamespaceMismatch, QUERY_TIMEOUT, RESERVED_AUTOCRUD_FIELDS, RESERVED_AUTOCRUD_FIELD_NAMES, ROW_METADATA_FIELDS, ROW_POLICY_BLOCKS_WALK, RegistryBase, ReservedField, ResolverFrameError, RestrictViolation, SYSTEM_NAMESPACE, UnattributedWriteError, UnsupportedFilterError, WALKS_IN_MUTATION, WALKS_IN_SUBSCRIPTION, WALKS_NEED_PARTITIONED, WALKS_UNSUPPORTED_STORE, WALK_BUDGET_EXCEEDED, WALK_UNSUPPORTED_REF, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, adminClaimCapabilities, allCapabilities, allowAll, allowVerbs, and, applyRowFilters, applyUpdatePatch, assertHardDeleteAllowed, assertIndexDecl, assertNever, assertNoRepeatedIds, assertOrderedBy, autoCrudOptionsOf, canonicalVocabValue, canonicalize, capabilitiesFor, checkRevocable, checkUpdatable, confersAnywhere, coversNamespace, createKeyedMutex, createResolver, createResolverWithEdges, decodeList, defineBootstrap, defineNamespace, deleteManyResolver, deleteResolver, deleteRow, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, error400, expandFlat, field, filterTooBroad, flattenGrant, formatQualifiedKey, getResolver, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, grantOf, grantedIn, installAutoCrud, intersectGrants, isActiveAdminKeyRow, isAuthCause, isBatchElementError, isColumnField, isEncryptedKey, isImpossibleIsoTimestamp, isIsoTimestamp, isReservedAutoCrudField, isResolverFrameError, isRestrictViolation, jsonResponse, listResolver, makeAuthorizationProvider, makeCtx, makeTokenProvider, naturalOrderOf, newlyGranted, newlyGrantedPairs, normaliseMetadataOrderBy, normaliseMetadataWhere, normaliseVocabValues, normaliseVocabWhere, normaliseWalkNode, normalizeIsoTimestamp, not, or, parseGrantEntries, parseJsonBody, parsePositiveInt, parseQualifiedKey, purgeResolver, queryAll, queryOne, requireCapability, requireIdentity, requireNamespace, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, resolveEntityId, resolveEntityRow, resolveIdentity, revokedAtIso, row, selectAll, storedVocabSpellings, trimTrailingSlashes, updateManyResolver, updateResolver, validateHardDeleteEnv, vocabImplication };
|
|
7
|
+
export { ADMIN_CAPABILITIES, AutoCrudNameCollisionError, BatchElementError, BootstrapConfigError, BridgeUnreachableError, CLIENT_SUPPLIED_SERVER_FIELD, DATE_UNITS, DEFAULT_CAPABILITIES, DEFAULT_FILTER_WRITE_LIMITS, DEFAULT_ORDERED_BY, EXPR_AGGREGATES, EXPR_FUNCTIONS, EXPR_LIMITS, EngineQueryError, FILTER_TOO_BROAD, JSON_HEADERS, METADATA_AUTHOR_FIELDS, METADATA_FILTER_FIELDS, MissingReferentError, NamespaceMismatch, QUERY_TIMEOUT, REGEX_BUDGET_EXCEEDED, RESERVED_AUTOCRUD_FIELDS, RESERVED_AUTOCRUD_FIELD_NAMES, RESERVED_METADATA_FIELD_NAMES, ROW_METADATA_FIELDS, ROW_POLICY_BLOCKS_WALK, RegistryBase, ReservedField, ResolverFrameError, RestrictViolation, STORE_BUSY, SYSTEM_NAMESPACE, UnattributedWriteError, UnsupportedFilterError, VALUE_OUT_OF_RANGE, WALKS_IN_MUTATION, WALKS_IN_SUBSCRIPTION, WALKS_NEED_PARTITIONED, WALKS_UNSUPPORTED_STORE, WALK_BUDGET_EXCEEDED, WALK_UNSUPPORTED_REF, WS_CODE_SUBSCRIPTION_UNSUPPORTED_FRAME, WS_REASON_SERVER_RESTART, WS_REASON_SUBSCRIPTION_OVERLOADED, adminClaimCapabilities, allCapabilities, allowAll, allowVerbs, and, applyRowFilters, applyUpdatePatch, assertHardDeleteAllowed, assertIndexDecl, assertNever, assertNoRepeatedIds, assertOrderedBy, autoCrudOptionsOf, canonicalVocabValue, canonicalize, capabilitiesFor, checkRevocable, checkUpdatable, confersAnywhere, coversNamespace, createKeyedMutex, createResolver, createResolverWithEdges, decodeList, defineBootstrap, defineNamespace, deleteManyResolver, deleteResolver, deleteRow, denyAll, denyVerbs, describeGrant, encodeGrant, encodeList, error400, expandFlat, field, filterTooBroad, flattenGrant, formatQualifiedKey, getResolver, grantCovers, grantEntriesConfer, grantEntryError, grantIsUniform, grantOf, grantedIn, installAutoCrud, intersectGrants, isActiveAdminKeyRow, isAuthCause, isBatchElementError, isColumnField, isEncryptedKey, isImpossibleIsoTimestamp, isInt16, isInt32, isIsoTimestamp, isReservedAutoCrudField, isResolverFrameError, isRestrictViolation, jsonResponse, listResolver, makeAuthorizationProvider, makeCtx, makeTokenProvider, naturalOrderOf, newlyGranted, newlyGrantedPairs, normaliseMetadataOrderBy, normaliseMetadataWhere, normaliseVocabValues, normaliseVocabWhere, normaliseWalkNode, normalizeIsoTimestamp, not, or, parseGrantEntries, parseInt64, parseJsonBody, parsePositiveInt, parseQualifiedKey, purgeResolver, queryAll, queryOne, requireCapability, requireIdentity, requireNamespace, reservedMetadataFieldMessage, resolveAdminCredential, resolveDefaultKeyPath, resolveDefaultKidPath, resolveEntityId, resolveEntityRow, resolveIdentity, revokedAtIso, row, selectAll, storedVocabSpellings, stringifyJson, stringifyJsonExact, trimTrailingSlashes, updateManyResolver, updateResolver, validateHardDeleteEnv, vocabImplication };
|