@fayz-ai/plugin-inventory 0.9.4 → 0.11.0
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/components/InventoryOnboarding.d.ts +1 -1
- package/dist/components/InventoryOnboarding.d.ts.map +1 -1
- package/dist/components/RecipeGapsPanel.d.ts +14 -0
- package/dist/components/RecipeGapsPanel.d.ts.map +1 -0
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/reference-data.d.ts +37 -0
- package/dist/data/reference-data.d.ts.map +1 -0
- package/dist/data/registries.d.ts.map +1 -1
- package/dist/data/supabase.d.ts.map +1 -1
- package/dist/data/tables.d.ts +6 -0
- package/dist/data/tables.d.ts.map +1 -1
- package/dist/data/types.d.ts +31 -1
- package/dist/data/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6919 -316
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-tools.d.ts +4 -0
- package/dist/lib/agent-tools.d.ts.map +1 -0
- package/dist/lib/movement-vocabulary.d.ts +30 -0
- package/dist/lib/movement-vocabulary.d.ts.map +1 -0
- package/dist/lib/recipe-cost.d.ts +22 -0
- package/dist/lib/recipe-cost.d.ts.map +1 -0
- package/dist/lib/stock-count.d.ts +19 -0
- package/dist/lib/stock-count.d.ts.map +1 -0
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/migrations/index.d.ts +21 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/types.d.ts +114 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/views/InventoryPage.d.ts.map +1 -1
- package/dist/views/MovementHistoryView.d.ts +4 -1
- package/dist/views/MovementHistoryView.d.ts.map +1 -1
- package/dist/views/ProductCrudForm.d.ts.map +1 -1
- package/dist/views/ProductDetailView.d.ts +9 -0
- package/dist/views/ProductDetailView.d.ts.map +1 -0
- package/dist/views/ProductListView.d.ts +3 -2
- package/dist/views/ProductListView.d.ts.map +1 -1
- package/dist/views/ProductStockTab.d.ts +11 -0
- package/dist/views/ProductStockTab.d.ts.map +1 -0
- package/dist/views/RecipeDetailView.d.ts.map +1 -1
- package/dist/views/RecipeFormView.d.ts +3 -1
- package/dist/views/RecipeFormView.d.ts.map +1 -1
- package/dist/views/RecipesView.d.ts +3 -1
- package/dist/views/RecipesView.d.ts.map +1 -1
- package/dist/views/StockCountFormView.d.ts +7 -0
- package/dist/views/StockCountFormView.d.ts.map +1 -0
- package/dist/views/StockCountSessionView.d.ts +15 -0
- package/dist/views/StockCountSessionView.d.ts.map +1 -0
- package/dist/views/StockCountsView.d.ts +7 -0
- package/dist/views/StockCountsView.d.ts.map +1 -0
- package/dist/views/StockMovementView.d.ts.map +1 -1
- package/dist/views/productEntity.d.ts +7 -1
- package/dist/views/productEntity.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/lib/agent-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAuBjD,eAAO,MAAM,gBAAgB,EAAE,YAuC9B,CAAA;AAED,eAAO,MAAM,2BAA2B,QAK7B,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MovementType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* The one list of stock movement types.
|
|
4
|
+
*
|
|
5
|
+
* This used to be spelled out in three places — the MovementType union, the
|
|
6
|
+
* form's picker and the history's icon/colour maps — which is three chances to
|
|
7
|
+
* disagree. Importers make it four. Everything reads from here.
|
|
8
|
+
*/
|
|
9
|
+
export interface MovementTypeSpec {
|
|
10
|
+
value: MovementType;
|
|
11
|
+
/** i18n key under the plugin's `inventory.movementType` namespace. */
|
|
12
|
+
labelKey: string;
|
|
13
|
+
/** lucide icon name, resolved by the host's icon map. */
|
|
14
|
+
icon: string;
|
|
15
|
+
/** Direction on stock: what the quantity does to the on-hand total. */
|
|
16
|
+
effect: 'increase' | 'decrease' | 'set' | 'move';
|
|
17
|
+
}
|
|
18
|
+
export declare const MOVEMENT_TYPES: readonly MovementTypeSpec[];
|
|
19
|
+
export declare const MOVEMENT_TYPE_VALUES: readonly MovementType[];
|
|
20
|
+
export declare function movementTypeSpec(value: string): MovementTypeSpec | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Portuguese movement vocabulary used by pre-SDK apps (beautyplace and its
|
|
23
|
+
* descendants). Lives next to the canonical list so a data import cannot drift
|
|
24
|
+
* from what the UI can render — that is the whole reason it is here and not in
|
|
25
|
+
* the importer.
|
|
26
|
+
*/
|
|
27
|
+
export declare const LEGACY_PT_MOVEMENT_TYPE: Readonly<Record<string, MovementType>>;
|
|
28
|
+
/** Normalise any known spelling to a MovementType; undefined when unrecognised. */
|
|
29
|
+
export declare function normalizeMovementType(raw: string): MovementType | undefined;
|
|
30
|
+
//# sourceMappingURL=movement-vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"movement-vocabulary.d.ts","sourceRoot":"","sources":["../../src/lib/movement-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,YAAY,CAAA;IACnB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAA;IAChB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,uEAAuE;IACvE,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAA;CACjD;AAED,eAAO,MAAM,cAAc,EAAE,SAAS,gBAAgB,EAM5C,CAAA;AAEV,eAAO,MAAM,oBAAoB,EAAE,SAAS,YAAY,EAAuC,CAAA;AAE/F,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE5E;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAQjE,CAAA;AAEV,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAI3E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IngredientCostBasis } from '../types';
|
|
2
|
+
/** Above this the dish eats the margin — the line the legacy app drew. */
|
|
3
|
+
export declare const CMV_ALERT_THRESHOLD = 35;
|
|
4
|
+
export interface CostableLine {
|
|
5
|
+
quantity: number;
|
|
6
|
+
costBasis?: IngredientCostBasis | null;
|
|
7
|
+
}
|
|
8
|
+
export interface CostedLine<T> {
|
|
9
|
+
line: T;
|
|
10
|
+
/** Cost of one unit as the recipe counts it. */
|
|
11
|
+
unitCost: number;
|
|
12
|
+
/** unitCost × quantity. */
|
|
13
|
+
cost: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function ingredientUnitCost(basis?: IngredientCostBasis | null): number;
|
|
16
|
+
export declare function lineCost(line: CostableLine): number;
|
|
17
|
+
export declare function costLines<T extends CostableLine>(lines: T[]): CostedLine<T>[];
|
|
18
|
+
export declare function recipeCost(lines: CostableLine[]): number;
|
|
19
|
+
/** Cost as a percentage of the sale price. Null when there is no price to divide by. */
|
|
20
|
+
export declare function cmvPercent(cost: number, salePrice?: number | null): number | null;
|
|
21
|
+
export declare function isCmvHigh(cmv: number | null | undefined): boolean;
|
|
22
|
+
//# sourceMappingURL=recipe-cost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe-cost.d.ts","sourceRoot":"","sources":["../../src/lib/recipe-cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAwBnD,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACvC;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAA;IACP,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,MAAM,CAM7E;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAEnD;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAK7E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,CAExD;AAED,wFAAwF;AACxF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAIjF;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StockCountItem } from '../types';
|
|
2
|
+
export declare function isCounted(item: Pick<StockCountItem, 'countedQuantity'>): boolean;
|
|
3
|
+
/** counted − system, or null when the line was never counted. */
|
|
4
|
+
export declare function lineVariance(item: Pick<StockCountItem, 'systemQuantity' | 'countedQuantity'>): number | null;
|
|
5
|
+
export declare function isDivergent(item: Pick<StockCountItem, 'systemQuantity' | 'countedQuantity'>): boolean;
|
|
6
|
+
export interface CountSummary {
|
|
7
|
+
total: number;
|
|
8
|
+
counted: number;
|
|
9
|
+
uncounted: number;
|
|
10
|
+
divergent: number;
|
|
11
|
+
/** Net units gained or lost across the divergent lines. */
|
|
12
|
+
variance: number;
|
|
13
|
+
/** The same, valued at each line's unit cost — what the close costs. */
|
|
14
|
+
varianceValue: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function summarizeCount(items: StockCountItem[]): CountSummary;
|
|
17
|
+
/** The lines the close will act on, in the order it will act on them. */
|
|
18
|
+
export declare function divergentLines(items: StockCountItem[]): StockCountItem[];
|
|
19
|
+
//# sourceMappingURL=stock-count.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stock-count.d.ts","sourceRoot":"","sources":["../../src/lib/stock-count.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAW9C,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,OAAO,CAEhF;AAED,iEAAiE;AACjE,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,GAC/D,MAAM,GAAG,IAAI,CAGf;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,GAC/D,OAAO,CAGT;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,YAAY,CAsBpE;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAExE"}
|
package/dist/locales/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoZrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoZvC,CAAA"}
|