import { AnyClass, AnyObject, ObjectOf } from 'tn-typescript'; import { ExoDecor } from '../../../ExoTypeScripts/ExoDecor'; import { ExoGeoClass, ExoGeoType } from '../../../accessories/ExoGeo'; import { ExoConstructor, ExoSelects, ExoTyping } from '../../../accessories/ExoTypings'; import { ExoGetter, ExoValidator } from '../../accessories/ExoRouteTypings'; import { ExoBodyInfo } from './accessories/ExoBodyInfo'; type Typer = SingleType | [SingleType] | (() => SingleType | SingleType[]); type SingleType = ExoConstructor | AnyClass | ExoSelects | ExoGeoClass; type Explicit = () => SingleType | [SingleType] | ExoGeoType | undefined; export type ExoBodyTypeNest = { clsname: string; bodies: ObjectOf; }; export type ExoBodyTypeSingle = ExoBodyTypeNest | ExoTyping | ExoGeoType | 'Date'; export type ExoBodyTypeArr = ExoBodyTypeSingle | [ExoBodyTypeSingle]; export interface ExoBodyOpts { optional?: boolean; getter?: ExoGetter; validator?: ExoValidator; } export declare function ExoBody(): ExoDecor; export declare function ExoBody(opts: ExoBodyOpts): ExoDecor; export declare function ExoBody(typer: Typer): ExoDecor; export declare function ExoBody(typer: Typer, opts: ExoBodyOpts): ExoDecor; export declare class ExoBodyField { clsid: string; name: string; optional: boolean; private design; private explicit; getter: ExoGetter; validator: ExoValidator | null; trace: string[]; constructor(name: string, design: any, explicit: Explicit, trace: string[], opts?: ExoBodyOpts); private getRawType; private getMainType; private getBodyType; private $type?; get type(): ExoBodyTypeArr; private $selects?; get selects(): readonly string[] | readonly number[] | undefined; private bodyparser; enableFormParse(): string; parse(bodyjson: AnyObject, dev: boolean): { value: any; raw: any; }; parseAsJson(bodyjson: AnyObject, dev: boolean): { value: any; raw: any; }; private getJsonRaw; private parseAsForm; private getFormRaw; private getValue; throwpath: (string | number)[]; private throw; get info(): ExoBodyInfo; } export {};