dorfteich/packages/shared/src/index.ts
Claude Fable 5 eb6b0d5d02
Some checks failed
CI / Import/export fidelity gate (push) Blocked by required conditions
CD / Build and push images (push) Successful in 3m53s
CD / Deploy to Test (push) Successful in 12s
CI / Lint, typecheck, test (push) Successful in 4m16s
CI / Build container images (push) Has been skipped
CD / Smoke tests against Test (push) Successful in 1m19s
CD / Promote to Int (push) Successful in 14s
CI / Auth e2e pack (push) Has been cancelled
Page hierarchy: parentId, create-under-parent, reparent (#106)
Pages form a tree via a nullable parent_id self-relation (SetNull
backstop; the real trash/purge semantics follow with #107). Slugs and
URLs stay flat and pond-unique, so moving a page never breaks links.

- Shared: generic parent-id tree helpers in tree.ts (labels re-export
  them; buildLabelTree keeps its name-sorted behavior), MAX_PAGE_DEPTH=6,
  parentId on PageView, createPageInputSchema.parentId (nullish),
  repositionPageInputSchema.parentId (optional; absent = keep parent).
- API: create validates the parent (same pond, live, depth);
  PATCH /pages/:id/position reparents atomically with the placement,
  rejecting cycles (page_cycle) and depth violations
  (page_depth_exceeded); GET /ponds/:id/pages nulls parentId when the
  caller may not read the parent, so hidden page ids never leak.
- New error codes translated de+en; hierarchy.db.test.ts covers create,
  404s, depth, cycle, atomic reparent, and the permission nulling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 09:57:47 +02:00

35 lines
942 B
TypeScript

export * from './admin-users';
export * from './api-tokens';
export * from './api-error';
export * from './auth';
export * from './backup-set';
export * from './backup-status';
export * from './collab-token';
export * from './comments';
export * from './editor-schema';
export * from './env';
export * from './conversion';
export * from './files';
export * from './fonts';
export * from './health';
export * from './home';
export * from './i18n-tools';
export * from './labels';
export * from './legal';
export * from './links';
export * from './members';
export * from './notifications';
export * from './pages';
export * from './permissions';
export * from './plugins';
export * from './search';
export * from './secret-store';
export * from './setup';
export * from './system';
export * from './ponds';
export * from './public-api';
export * from './quotas';
export * from './text-diff';
export * from './tree';
export * from './watches';