@firefliesai/schema-forge
Version:
Transform TypeScript classes into JSON Schema definitions with automatic support for OpenAI, Anthropic, and Google Gemini function calling (tool) formats
28 lines (27 loc) • 1.06 kB
TypeScript
/**
* Decorators for schema-forge
*/
import { PropertyOptions, PropertyPath } from './types';
/**
* Applies property updates for a given property path
*/
export declare function applyPropertyUpdates(properties: any, paths: string[], updates: Partial<PropertyOptions>, target: any): void;
/**
* Decorator for adding schema metadata to a class property
*/
export declare function ToolProp(options?: PropertyOptions): (target: any, propertyKey: string) => void;
/**
* Decorator for adding schema metadata to a class
*/
export declare function ToolMeta(options?: {
name?: string;
description?: string;
}): (target: any) => void;
/**
* Updates a property in a schema with new options
*/
export declare function updateSchemaProperty<T extends object>(target: new (...args: any[]) => T, propertyPath: PropertyPath<T>, updates: Partial<PropertyOptions>): void;
/**
* Adds a new property to a schema
*/
export declare function addSchemaProperty<T extends object>(target: new (...args: any[]) => T, propertyPath: string, options: PropertyOptions): void;