@lambda-development/erp-core 0.8.11 → 0.8.13

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.
@@ -130,6 +130,7 @@ export declare const api: {
130
130
  }>;
131
131
  createMaster: (type: string, data: any) => Promise<any>;
132
132
  updateMaster: (type: string, name: string, data: any) => Promise<any>;
133
+ runAction: (action: string, data: Record<string, any>) => Promise<any>;
133
134
  deleteMaster: (type: string, name: string) => Promise<any>;
134
135
  trialBalance: (params?: Record<string, string>) => Promise<{
135
136
  rows: any[];
@@ -1,3 +1,9 @@
1
1
  export declare function ProtectedRoute({ children }: {
2
2
  children: React.ReactNode;
3
3
  }): import("react/jsx-runtime").JSX.Element;
4
+ /** Like ProtectedRoute, but also requires an admin — non-admins are sent home.
5
+ * Used for admin-only pages (e.g. Opening Balances) so the URL can't be reached
6
+ * directly, not just hidden from the menu. */
7
+ export declare function AdminRoute({ children }: {
8
+ children: React.ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ export { AppShell } from './components/layout/app-shell';
19
19
  export { buildRoutes, registerRoute } from './routes';
20
20
  export { registerDoctype, getDoctypeConfig, getAllDoctypeConfigs, } from './lib/doctypes';
21
21
  export type { DoctypeConfig, FieldDef, ChildTableDef, ConversionDef, } from './lib/doctypes';
22
+ export { registerMaster, getMasterConfig, getAllMasterConfigs } from './lib/masters';
23
+ export type { MasterConfig, MasterFilterDef, MasterActionDef } from './lib/masters';
22
24
  export { getNavGroups, registerNavGroup, registerNavItem } from './lib/nav';
23
25
  export type { NavGroup, NavItem } from './lib/nav';
24
26
  export { registerComponent, getComponent } from './lib/component-registry';