Core now exposes mappings from the mappings/ folder via the mappings API method, in addition to the DB mappings the app already shows. They're returned as read-only entries when the client opts in. The app should surface them so users can see file mappings (not just app-created ones), with editing disabled.
Core change: ZaparooProject/zaparoo-core#973 (Refs zaparoo-core#244).
API contract:
mappings accepts an optional includeReadOnly boolean param (default false). When true, the response also includes file mappings.
- Each
MappingResponse now has source ("database" or "file") and readOnly (bool). File mappings have readOnly: true, an empty id, and an empty added.
App work:
src/lib/models.ts — add source and readOnly to MappingResponse; pass includeReadOnly: true in CoreAPI.mappings().
src/components/MappingRow.tsx — render the read-only state (e.g. a badge/lock, disable tap-to-edit, hide delete) and optionally show the source.
src/routes/create.mappings.tsx — ensure read-only rows aren't navigable to the edit route.
Note: editing file mappings (writing back to TOML) is out of scope; this is display only.
Core now exposes mappings from the
mappings/folder via themappingsAPI method, in addition to the DB mappings the app already shows. They're returned as read-only entries when the client opts in. The app should surface them so users can see file mappings (not just app-created ones), with editing disabled.Core change: ZaparooProject/zaparoo-core#973 (Refs zaparoo-core#244).
API contract:
mappingsaccepts an optionalincludeReadOnlyboolean param (default false). When true, the response also includes file mappings.MappingResponsenow hassource("database"or"file") andreadOnly(bool). File mappings havereadOnly: true, an emptyid, and an emptyadded.App work:
src/lib/models.ts— addsourceandreadOnlytoMappingResponse; passincludeReadOnly: trueinCoreAPI.mappings().src/components/MappingRow.tsx— render the read-only state (e.g. a badge/lock, disable tap-to-edit, hide delete) and optionally show the source.src/routes/create.mappings.tsx— ensure read-only rows aren't navigable to the edit route.Note: editing file mappings (writing back to TOML) is out of scope; this is display only.