@protobase/server 0.42.0 → 0.43.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/dist/aggregate-groups.js +1 -1
- package/dist/aggregate-service.js +3 -3
- package/dist/aggregate-splits.js +1 -1
- package/dist/ai/generate-route.js +1 -1
- package/dist/assistant/batch-approval.js +55 -0
- package/dist/assistant/batch-write-args.js +63 -0
- package/dist/assistant/batch-write-tool.d.ts +7 -0
- package/dist/assistant/batch-write-tool.js +115 -0
- package/dist/assistant/record-tool-args.js +14 -1
- package/dist/assistant/record-tools.js +16 -8
- package/dist/assistant/records.d.ts +11 -1
- package/dist/assistant/records.js +8 -5
- package/dist/batch/reorder.js +1 -1
- package/dist/batch/run-batch.d.ts +26 -0
- package/dist/batch/run-batch.js +2 -2
- package/dist/batch/schema.d.ts +221 -0
- package/dist/comments/mentionable.js +1 -1
- package/dist/comments/read-comments.js +1 -1
- package/dist/create-admin.js +1 -1
- package/dist/error-handler.js +1 -1
- package/dist/files/download.js +4 -4
- package/dist/files/present.js +1 -1
- package/dist/functions/records.d.ts +1 -1
- package/dist/functions/records.js +5 -2
- package/dist/history/read-history.js +3 -3
- package/dist/index.d.ts +5 -2
- package/dist/index.js +3 -2
- package/dist/jobs/run-job.d.ts +1 -1
- package/dist/list-photos.js +2 -2
- package/dist/list-service.js +3 -3
- package/dist/map-service.js +1 -1
- package/dist/mcp/mcp-tools.d.ts +3 -6
- package/dist/mcp/mcp-tools.js +3 -1
- package/dist/package.js +1 -1
- package/dist/read-service.js +7 -4
- package/dist/realtime/change-checker.js +1 -1
- package/dist/records.d.ts +5 -0
- package/dist/rest/rest-context.js +1 -1
- package/dist/reveal-service.js +1 -1
- package/dist/routes/batch.js +1 -1
- package/dist/routes/collection.js +1 -1
- package/dist/routes/record.js +4 -5
- package/dist/row-permissions.js +1 -1
- package/dist/sql-parts.d.ts +4 -0
- package/dist/sql-parts.js +1 -1
- package/dist/write-pipeline.js +5 -5
- package/dist/write-shared.d.ts +13 -0
- package/dist/write-shared.js +2 -2
- package/dist/write-update.js +1 -1
- package/package.json +4 -4
package/dist/sql-parts.js
CHANGED
package/dist/write-pipeline.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HttpProblem, badRequest } from "./problem.js";
|
|
2
2
|
import { tenantScope } from "./tenant.js";
|
|
3
3
|
import { requestAccess, requireOperation, targetFilter, writableFields } from "./request-access.js";
|
|
4
|
+
import { actorSettings, wakeDispatch } from "./changes/actor.js";
|
|
5
|
+
import { isDatabaseError } from "./error-handler.js";
|
|
6
|
+
import { writeTransaction } from "./transactions.js";
|
|
4
7
|
import { bindingOf, pendingBinding } from "./encryption/binding.js";
|
|
5
8
|
import { deleteRecord, fetchRecord, insertRecord, restoreRecord, updateRecord } from "./records.js";
|
|
6
|
-
import { writeTransaction } from "./transactions.js";
|
|
7
|
-
import { blockedDelete } from "./blocked-delete.js";
|
|
8
|
-
import { isDatabaseError } from "./error-handler.js";
|
|
9
9
|
import { attachFiles } from "./files/attach.js";
|
|
10
|
+
import { assertWritten, checkParents, checkPrecondition, decide, denied, firstKeyField, keyOf, missing, notifier, shown } from "./write-shared.js";
|
|
11
|
+
import { blockedDelete } from "./blocked-delete.js";
|
|
10
12
|
import { encryptedValuesOf, hasEncryptedValues, sealValues } from "./encryption/seal-values.js";
|
|
11
|
-
import { actorSettings, wakeDispatch } from "./changes/actor.js";
|
|
12
13
|
import { validateBody } from "./validate-body.js";
|
|
13
|
-
import { assertWritten, checkParents, checkPrecondition, decide, denied, firstKeyField, keyOf, missing, notifier, shown } from "./write-shared.js";
|
|
14
14
|
import { applyUpdate, planUpdate } from "./write-update.js";
|
|
15
15
|
import { checkRankAfter } from "./rank-after.js";
|
|
16
16
|
//#region src/write-pipeline.ts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Row } from "./types.js";
|
|
2
|
+
import "./registry.js";
|
|
3
|
+
import "./deps.js";
|
|
4
|
+
import "./records.js";
|
|
5
|
+
import "./request-access.js";
|
|
6
|
+
import "@protobase/schema";
|
|
7
|
+
import { Db } from "@protobase/query";
|
|
8
|
+
//#region src/write-shared.d.ts
|
|
9
|
+
export type WriteResult = {
|
|
10
|
+
record: Row;
|
|
11
|
+
etag: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
package/dist/write-shared.js
CHANGED
|
@@ -3,11 +3,11 @@ import { forbidden, notFound, preconditionFailed, preconditionRequired } from ".
|
|
|
3
3
|
import { tenantScope } from "./tenant.js";
|
|
4
4
|
import { andFilters, recordDecision } from "./request-access.js";
|
|
5
5
|
import { ifMatchSatisfied } from "./etag.js";
|
|
6
|
-
import { presentFiles } from "./files/present.js";
|
|
7
6
|
import { pickFields } from "./rows.js";
|
|
8
7
|
import { fetchRecord } from "./records.js";
|
|
9
|
-
import { parentGuard } from "./parent-access.js";
|
|
10
8
|
import { scheduleRemovedFiles } from "./files/attach.js";
|
|
9
|
+
import { parentGuard } from "./parent-access.js";
|
|
10
|
+
import { presentFiles } from "./files/present.js";
|
|
11
11
|
//#region src/write-shared.ts
|
|
12
12
|
const missing = (entry) => notFound(`No ${entry.name} with this key`);
|
|
13
13
|
const checkPrecondition = (current, ifMatch, required) => {
|
package/dist/write-update.js
CHANGED
|
@@ -4,9 +4,9 @@ import { targetFilter } from "./request-access.js";
|
|
|
4
4
|
import { bindingOf } from "./encryption/binding.js";
|
|
5
5
|
import { fetchRecord, updateRecord } from "./records.js";
|
|
6
6
|
import { attachFiles } from "./files/attach.js";
|
|
7
|
+
import { assertWritten, checkParents, checkPrecondition, decide, denied, firstKeyField, missing, notifier } from "./write-shared.js";
|
|
7
8
|
import { sealValues } from "./encryption/seal-values.js";
|
|
8
9
|
import { validateBody } from "./validate-body.js";
|
|
9
|
-
import { assertWritten, checkParents, checkPrecondition, decide, denied, firstKeyField, missing, notifier } from "./write-shared.js";
|
|
10
10
|
//#region src/write-update.ts
|
|
11
11
|
/**
|
|
12
12
|
* Everything an update needs before it writes: the row (locked, inside the caller's tenant and row filters), the ETag
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@better-auth/passkey": "^1.7.12",
|
|
37
37
|
"@better-auth/sso": "^1.7.12",
|
|
38
38
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
39
|
-
"@protobase/layout": "0.
|
|
40
|
-
"@protobase/query": "0.
|
|
41
|
-
"@protobase/schema": "0.
|
|
39
|
+
"@protobase/layout": "0.43.0",
|
|
40
|
+
"@protobase/query": "0.43.0",
|
|
41
|
+
"@protobase/schema": "0.43.0",
|
|
42
42
|
"@react-email/render": "^2.1.0",
|
|
43
43
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
44
44
|
"@sentry/core": "^11.7.0",
|