fix: preserve value types in extraFields (no string coercion)
CI / typecheck + build (turbo) (push) Canceled after 0s
CI / typecheck + build (turbo) (push) Canceled after 0s
- DocumentMeta.extraFields type -> Record<string, unknown> - API routes pass extraFields through without JSON.stringify coercion - CustomFieldBadges auto-styles by value type/content (number->purple, boolean->green/red, etc.) - DocForm help text: generic (no hardcoded field examples)
This commit is contained in:
@@ -128,7 +128,7 @@ export interface CreateDocInput {
|
||||
status?: DocStatus;
|
||||
author?: string;
|
||||
tags?: string[];
|
||||
extraFields?: Record<string, string>;
|
||||
extraFields?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface UpdateDocInput {
|
||||
@@ -138,7 +138,7 @@ export interface UpdateDocInput {
|
||||
status?: DocStatus;
|
||||
tags?: string[];
|
||||
author?: string;
|
||||
extraFields?: Record<string, string>;
|
||||
extraFields?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/** Validate that a slug is safe (no path traversal, only [a-z0-9/_-]). */
|
||||
|
||||
Reference in New Issue
Block a user