Wire#
@palmyralabs/palmyra-wire — the HTTP layer that connects the React frontend to any backend. One factory, a set of per-purpose stores, and a small contract surface. The default PalmyraStoreFactory targets the Palmyra API shape, but you can implement the same interfaces against any REST, GraphQL, Firebase, or legacy backend — see Connecting to a custom backend.
| Page | Role |
|---|---|
| AsyncStore contracts | The TypeScript interfaces every concrete store implements |
| PalmyraStoreFactory | Entry point — emits stores against a shared baseUrl and error handler |
| PalmyraAbstractStore | HTTP base class (axios, URLs, error handling) |
| PalmyraGridStore | Paged reads + schema + export |
| PalmyraDataStore | CRUD — extends grid with POST / PUT / DELETE / save |
| PalmyraLookupStore | Query-only store for autocomplete / pickers |
| PalmyraChartStore | One-shot chart data fetch |
| PalmyraTreeStore | Hierarchical getRoot / getChildren |
| Auth | AuthDecorator interface + built-in decorators (NOOPDecorator, BasicAuthProvider, OauthProvider) |
| Connecting to a custom backend | Implement the store interfaces + StoreFactory for a non-Palmyra API |
Typical flow: create one PalmyraStoreFactory (or your own StoreFactory implementation) at app startup, inject it via StoreFactoryContext, then let grid and form templates ask the factory for a store keyed on the endpoint path.