api-core
Version:
Model-based dynamic multi-level APIs for any provider, plus multiple consumption channels
41 lines (40 loc) • 1.46 kB
TypeScript
declare const SimpleSchema: any;
export declare class Mixed {
}
export declare const SchemaReference: any;
export declare const JSONDate: any;
export declare class SubSchema extends SimpleSchema {
private readonly _apiCoreOriginal;
constructor(schema: any, options?: any, ...args: any[]);
get original(): any;
}
export declare class ApiEdgeSchemaTransformation {
applyToInput: (schema: any, model: any) => void;
applyToOutput: (mode: any, schema: any) => void;
affectedSchemaField: string;
affectedModelFields: string[];
parsedField: any;
schemaType: any;
constructor(input: (schema: any, model: any) => void, output: (model: any, schema: any) => void, modelFields: string[], schemaType: any, schemaField?: string);
setSchemaField(field: string): void;
}
export declare class ApiEdgeSchema {
fields: string[];
schema: any | null;
originalSchema: any | null;
transformations: ApiEdgeSchemaTransformation[];
private fieldMatrix;
private renameMatrix;
transformField: (field: string) => string;
transformFields: (fields: string[]) => string[];
cleanAndValidateModel: (model: any, modifier?: boolean) => {
valid: boolean;
errors?: any[];
};
private createInputTransformer;
private static createOutputTransformer;
private createTransformation;
private fixFields;
constructor(schema: any, typedSchema?: any, fields?: string[]);
}
export {};