@byline/core 3.10.1 → 3.11.1
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/@types/db-types.d.ts +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -323,6 +323,43 @@ export interface IAuditQueries {
|
|
|
323
323
|
page?: number;
|
|
324
324
|
page_size?: number;
|
|
325
325
|
}): Promise<AuditLogPage>;
|
|
326
|
+
/**
|
|
327
|
+
* The system-wide activity feed (docs/AUDIT.md — Workstream 4), newest
|
|
328
|
+
* first, paged and filterable. A read-time **union** of two disjoint event
|
|
329
|
+
* sources, normalised onto the `AuditLogEntry` shape:
|
|
330
|
+
*
|
|
331
|
+
* - the **version stream** (`byline_document_versions`) — content saves,
|
|
332
|
+
* surfaced as `document.created` / `document.updated` (from `event_type`)
|
|
333
|
+
* and attributed via Workstream 1's `created_by`; `field` / `before` /
|
|
334
|
+
* `after` are null (no per-field diff is captured at save time);
|
|
335
|
+
* - the **audit log** (`byline_audit_log`) — everything the version stream
|
|
336
|
+
* does not attribute: path / locale / status changes and deletions, plus
|
|
337
|
+
* future admin-realm events (`document_id` NULL).
|
|
338
|
+
*
|
|
339
|
+
* The two sources never overlap (a delete mints no version; a status change
|
|
340
|
+
* mutates the version row in place), so the union double-counts nothing.
|
|
341
|
+
* Ordered by the normalised `occurredAt` (version `created_at` / audit
|
|
342
|
+
* `occurred_at`) — the per-source UUIDv7 ids are separate sequences and
|
|
343
|
+
* cannot order across the union.
|
|
344
|
+
*
|
|
345
|
+
* Unlike `getDocumentAuditLog`, this is **not** document- or
|
|
346
|
+
* collection-scoped and is gated system-wide by `admin.activity.read` at the
|
|
347
|
+
* transport layer — it does no scoping of its own.
|
|
348
|
+
*/
|
|
349
|
+
findAuditLog(params: {
|
|
350
|
+
/** Restrict to one acting user (matches version `created_by` / audit `actor_id`). */
|
|
351
|
+
actorId?: string;
|
|
352
|
+
/** Restrict to one collection. */
|
|
353
|
+
collectionId?: string;
|
|
354
|
+
/** Exact action match, e.g. `document.updated` or `document.status.changed`. */
|
|
355
|
+
action?: string;
|
|
356
|
+
/** Inclusive lower bound on `occurredAt`. */
|
|
357
|
+
from?: Date;
|
|
358
|
+
/** Inclusive upper bound on `occurredAt`. */
|
|
359
|
+
to?: Date;
|
|
360
|
+
page?: number;
|
|
361
|
+
page_size?: number;
|
|
362
|
+
}): Promise<AuditLogPage>;
|
|
326
363
|
}
|
|
327
364
|
/**
|
|
328
365
|
* Adapter capability for the shared-pool counter mechanism backing the
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { validateAdminConfigs } from './config/validate-admin-configs.js';
|
|
|
6
6
|
export { RESERVED_FIELD_NAMES } from './config/validate-collections.js';
|
|
7
7
|
export { type BylineCore, getBylineCore, initBylineCore } from './core.js';
|
|
8
8
|
export * from './defaults/default-values.js';
|
|
9
|
-
export { BylineError, ERR_DATABASE, ERR_NOT_FOUND, ERR_READ_BUDGET_EXCEEDED, ERR_STORAGE, ERR_UNHANDLED, ERR_VALIDATION, ErrorCodes, type ErrorReport, } from './lib/errors.js';
|
|
9
|
+
export { BylineError, ERR_AUDIT_UNSUPPORTED, ERR_DATABASE, ERR_NOT_FOUND, ERR_READ_BUDGET_EXCEEDED, ERR_STORAGE, ERR_UNHANDLED, ERR_VALIDATION, ErrorCodes, type ErrorReport, } from './lib/errors.js';
|
|
10
10
|
export { generateKeyBetween, generateNKeysBetween, validateOrderKey, } from './lib/fractional-index.js';
|
|
11
11
|
export { type BylineLogger, getLogger } from './lib/logger.js';
|
|
12
12
|
export { AsyncRegistry, type RegisteredServices, Registry } from './lib/registry.js';
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { validateAdminConfigs } from './config/validate-admin-configs.js';
|
|
|
22
22
|
export { RESERVED_FIELD_NAMES } from './config/validate-collections.js';
|
|
23
23
|
export { getBylineCore, initBylineCore } from './core.js';
|
|
24
24
|
export * from './defaults/default-values.js';
|
|
25
|
-
export { BylineError, ERR_DATABASE, ERR_NOT_FOUND, ERR_READ_BUDGET_EXCEEDED, ERR_STORAGE, ERR_UNHANDLED, ERR_VALIDATION, ErrorCodes, } from './lib/errors.js';
|
|
25
|
+
export { BylineError, ERR_AUDIT_UNSUPPORTED, ERR_DATABASE, ERR_NOT_FOUND, ERR_READ_BUDGET_EXCEEDED, ERR_STORAGE, ERR_UNHANDLED, ERR_VALIDATION, ErrorCodes, } from './lib/errors.js';
|
|
26
26
|
export { generateKeyBetween, generateNKeysBetween, validateOrderKey, } from './lib/fractional-index.js';
|
|
27
27
|
export { getLogger } from './lib/logger.js';
|
|
28
28
|
export { AsyncRegistry, Registry } from './lib/registry.js';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@byline/core",
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.11.1",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.9.0"
|
|
8
8
|
},
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"sharp": "^0.34.5",
|
|
80
80
|
"uuid": "^14.0.0",
|
|
81
81
|
"zod": "^4.4.3",
|
|
82
|
-
"@byline/auth": "3.
|
|
82
|
+
"@byline/auth": "3.11.1"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@biomejs/biome": "2.4.15",
|