mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(api): add resize, crop, rotate, convert, compress, metadata, and color tool routes
Seven tool route files using the createToolRoute factory, registering 10 API endpoints total (color adjustments covers 4 tool IDs). Also fixes the tool factory generic to properly infer Zod output types and clamps the compress binary-search quality to 1-100.
This commit is contained in:
@@ -10,7 +10,7 @@ export interface ToolRouteConfig<T> {
|
||||
/** Unique tool identifier, used as the URL path segment. */
|
||||
toolId: string;
|
||||
/** Zod schema that validates the settings JSON from the request. */
|
||||
settingsSchema: z.ZodSchema<T>;
|
||||
settingsSchema: z.ZodType<T, z.ZodTypeDef, unknown>;
|
||||
/** The processing function: takes input buffer + validated settings, returns output. */
|
||||
process: (
|
||||
inputBuffer: Buffer,
|
||||
|
||||
Reference in New Issue
Block a user