import { ClassRenderResult, JsFormats, MethodArgumentsTypeMap, MethodArgumentsDescriptionMap, UtamBasicElementTypeLiteral, UtamElementType, UtamPageObject, UtamSelector, UtamMethod, MobileContextType, UtamRootDescription, UtamMethodDescription, CommentsOptions, TypeNamesTracker } from '@utam/types'; export interface ElementMethodConfig { name: string; type: UtamElementType; nullable?: boolean; hoistedFunctionIdentifier: string; filterFunctionIdentifier?: string; appliedFunctionApplicationIdentifier?: string; filterFunctionArgs?: string[]; filterReturnsList: boolean; args?: string[]; parentArgs?: string[]; parentNullable?: boolean; argsTypeMap?: MethodArgumentsTypeMap; argsDescriptionMap?: MethodArgumentsDescriptionMap; hasSelector: boolean; selectorReturnsList: boolean; isPublic: boolean; description?: string | UtamMethodDescription; } export interface ClassBodyOptions { skipCodeGen: boolean; skipTypeGen: boolean; format: JsFormats; isInterface?: boolean; isRoot?: boolean; platform?: MobileContextType; description?: string | UtamRootDescription; commentsOptions: CommentsOptions; } interface ImportOptions { /** import object reference (imports, typedImports, sharedImports, utilityImports) */ importDestination: Map>; /** indicates if the import is a default import */ defaultImport?: boolean; } export type RootElementOptions = Pick; export declare function getBasicElementTypeCtor(type: UtamBasicElementTypeLiteral): string; export declare class ClassBody { /** * page objects imports * key is full module name "my/page/Object", value is pairs of name "Object" and import identifier "_Object" */ imports: Map>; /** * page objects type declarations imports (d.ts file) * key is full module name "my/page/Object", value is pairs of name "Object" and import identifier "_Object" */ typedImports: Map>; /** * page objects extensions imports: used to import exposed extensions functions * key is full module name "my/utility/Object", value is pairs of name "Object" and import identifier "_Object" */ utilityImports: Map>; /** * shared paged objects and page objects type declarations imports * key is full module name "my/page/Object", value is pairs of name "Object" and import identifier "_Object" */ sharedImports: Map>; /** * map to track custom types collisions * key - identifier like "_MyType", value - full module names like "pack1/full/MyType", "pack2/full/MyType" */ typeNamesTracker: TypeNamesTracker; private _className; private _isInterface; private _platform; private _options; private _elementMethodsAst; private _composeMethodsAst; private _interfaceMethodAst; private _isRootPageObject; private _rootSelector?; private _rootMethod; private _beforeLoadMethod; private _extendsClassNameIdentifier; private _webdriverTypeIdentifier; private _webelementTypeIdentifier; private _locatorTypeIdentifier; private _byIdentifier?; private _typeIdentifiers; private _description; constructor(className: string, rootSelector?: UtamSelector, options?: Partial); initializeDocumentElement(): void; initializeNavigationElement(): void; addImport(module: string, name: string, options: ImportOptions): string; addElementMethod(config: ElementMethodConfig): string; /** * Add imports for basic elements as basic elements are now declared as a list of 1..N interfaces to satisfy * @param type type of the element parsed from the declaration in the JSON file * @param isPublic indicates that the function is a public PO API */ private _addBasicElementsTypesImports; addCustomMethod(method: UtamMethod): string; private getPageObjectOrFrameReturnTypeImport; private addReturnTypeImportsForComposeMethod; private addReturnTypeImportsForAbstractMethod; private addComposeStatements; applyRootOptions({ type, exposeRootElement, beforeLoad }: RootElementOptions): string; private generateCode; private generateTypeDefinition; render(): ClassRenderResult; } export {}; //# sourceMappingURL=class-body.d.ts.map