FastAPI backend (Python 3.11, MSSQL ODBC for SambaPOS, Azure DI OCR),
kitchen_db on central PG. React/TS/Vite frontend with navy sidebar layout.
Backend: auth.py (APP_SLUG=kitchen, SimpleNamespace — archive routes use
.kitchen_id/.is_admin without modification), main.py (51 migrations, scheduler,
internal router for KDS bookings feed), api/internal.py, full archive API
(31 routers: invoices, recipes, menus, sambapos, resos, newbook, disputes,
purchase_orders, etc.), models, migrations, OCR pipeline.
kitchen_id pinned to 1 (B1 — single hotel).
Frontend: AuthGate (app=kitchen, token shim for archive compat — B5b pending),
Layout (navy sidebar, 6 sections, Lucide icons, teal --app-primary),
App.tsx (Outlet pattern, UploadApp outside Layout), index.css (full :root block).
strict: false — archive components have type issues; build clean.
Note: 45 archive components call fetch('/api/...') without /kitchen/ prefix
(B5b). Runtime 404s; deferred until after initial testing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
46 lines
2 KiB
TypeScript
46 lines
2 KiB
TypeScript
// Type definitions for browser-image-compression 2.0
|
|
// Project: https://github.com/Donaldcwl/browser-image-compression
|
|
// Definitions by: Donald <https://github.com/Donaldcwl> & Jamie Haywood <https://github.com/jamiehaywood>
|
|
|
|
export interface Options {
|
|
/** @default Number.POSITIVE_INFINITY */
|
|
maxSizeMB?: number;
|
|
/** @default undefined */
|
|
maxWidthOrHeight?: number;
|
|
/** @default true */
|
|
useWebWorker?: boolean;
|
|
/** @default 10 */
|
|
maxIteration?: number;
|
|
/** Default to be the exif orientation from the image file */
|
|
exifOrientation?: number;
|
|
/** A function takes one progress argument (progress from 0 to 100) */
|
|
onProgress?: (progress: number) => void;
|
|
/** Default to be the original mime type from the image file */
|
|
fileType?: string;
|
|
/** @default 1.0 */
|
|
initialQuality?: number;
|
|
/** @default false */
|
|
alwaysKeepResolution?: boolean;
|
|
/** @default undefined */
|
|
signal?: AbortSignal;
|
|
/** @default false */
|
|
preserveExif?: boolean;
|
|
/** @default https://cdn.jsdelivr.net/npm/browser-image-compression/dist/browser-image-compression.js */
|
|
libURL?: string;
|
|
}
|
|
|
|
declare function imageCompression(image: File, options: Options): Promise<File>;
|
|
|
|
declare namespace imageCompression {
|
|
function getDataUrlFromFile(file: File): Promise<string>;
|
|
function getFilefromDataUrl(dataUrl: string, filename: string, lastModified?: number): Promise<File>;
|
|
function loadImage(src: string): Promise<HTMLImageElement>;
|
|
function drawImageInCanvas(img: HTMLImageElement, fileType?: string): HTMLCanvasElement;
|
|
function drawFileInCanvas(file: File, options?: Options): Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement]>;
|
|
function canvasToFile(canvas: HTMLCanvasElement, fileType: string, fileName: string, fileLastModified: number, quality?: number): Promise<File>;
|
|
function getExifOrientation(file: File): Promise<number>;
|
|
}
|
|
|
|
export as namespace imageCompression;
|
|
|
|
export default imageCompression;
|