from typing import Any, List, Optional, Self

class Point:
	def tryFrom(value, class_) -> Optional[Self]: ...
	def __init__(self, x, y) -> Self: ...
	def tryInto(self, class_) -> Any: ...
	@property
	def y(self) -> float: ...
	@property
	def x(self) -> float: ...

class Size:
	def tryFrom(value, class_) -> Optional[Self]: ...
	def __init__(self, width, height) -> Self: ...
	def tryInto(self, class_) -> Any: ...
	@property
	def height(self) -> float: ...
	@property
	def width(self) -> float: ...

class ControlInstance:
	@property
	def print(self) -> bool: ...
	@property
	def page(self) -> int: ...
	@property
	def value(self) -> str: ...
	@property
	def y(self) -> int: ...
	@property
	def source(self) -> str: ...
	@property
	def x(self) -> int: ...
	@property
	def id(self) -> int: ...
	@property
	def font(self) -> str: ...
	@property
	def cursorPosition(self) -> int: ...

class Column:
	@property
	def index(self) -> int: ...
	@property
	def empty(self) -> bool: ...

class DataSourceCursor:
	def columnIndex(self, name) -> int: ...
	def columnDataSize(self, column) -> int: ...
	def columnValue(self, column) -> Any: ...
	def columnName(self, index) -> str: ...
	def firstRecord(self) -> bool: ...
	def nextRecord(self) -> bool: ...
	def readColumnData(self, column, count) -> bytes: ...
	@property
	def recordCount(self) -> int: ...
	@property
	def query(self) -> str: ...
	@property
	def position(self) -> int: ...
	@property
	def columnCount(self) -> int: ...

class WatermarkPicture:
	def load(self, uri) -> bool: ...
	def loadData(self, data) -> bool: ...

class Control:
	@property
	def y(self) -> float: ...
	@property
	def x(self) -> float: ...
	@property
	def width(self) -> float: ...
	@property
	def size(self) -> Size: ...
	@property
	def position(self) -> Point: ...
	@property
	def height(self) -> float: ...

class Controls:
	pass

class Cursor:
	def close(self) -> None: ...
	def next(self) -> Optional[dict]: ...

class Page:
	def newColumn(self) -> bool: ...
	@property
	def index(self) -> int: ...
	@property
	def empty(self) -> bool: ...

class DataSource:
	def sqlSelect(self, query) -> DataSourceCursor: ...
	@property
	def quoteChar(self) -> str: ...
	@property
	def databaseName(self) -> str: ...

class Collection:
	def listIndexes(self, options) -> Cursor: ...
	def insertOne(self, document, options) -> bool: ...
	def insertMany(self, documents) -> dict: ...
	def findOne(self, filter, options) -> Optional[dict]: ...
	def dropIndex(self, name, options) -> bool: ...
	def drop(self, options) -> bool: ...
	def find(self, filter, options) -> Cursor: ...
	def deleteOne(self, filter, options) -> dict: ...
	def countEstimated(self, options) -> int: ...
	def countDocuments(self, filter, options) -> int: ...
	def deleteMany(self, filter, options) -> dict: ...
	def rename(self, newDb, newName) -> bool: ...
	def replaceOne(self, filter, update, options) -> dict: ...
	def createIndex(self, name, keys) -> bool: ...
	def aggregate(self, pipeline, options) -> Cursor: ...
	def updateMany(self, filter, update, options) -> dict: ...
	def updateOne(self, filter, update, options) -> dict: ...
	def stats(self, scale) -> dict: ...
	def validate(self, full, repair, metadata) -> dict: ...
	@property
	def name(self) -> str: ...

class Db:
	def currentOp(self, operations) -> dict: ...
	def drop(self, name, options) -> bool: ...
	def commandHelp(self, name) -> str: ...
	def command(self, command, options) -> dict: ...
	def collections(self, options) -> List[Collection]: ...
	def create(self, name, options) -> Collection: ...
	def listCommands(self) -> dict: ...
	def createCollection(self, name, options) -> Collection: ...
	def aggregate(self, pipeline, options) -> Cursor: ...
	def addUser(self, name, password, roles) -> dict: ...
	def adminCommand(self, command, options) -> dict: ...
	def admin(self) -> Self: ...
	def dropCollection(self, name, options) -> bool: ...
	def dropDatabase(self) -> bool: ...
	def createIndex(self, collection, name, keys) -> bool: ...
	def createView(self, name, source, pipeline, collation) -> Collection: ...
	def collection(self, name, opts) -> Collection: ...
	def dropUser(self, name) -> dict: ...
	def renameCollection(self, name, newDb, newName) -> bool: ...
	def hasCollection(self, name) -> bool: ...
	def removeUser(self, name) -> dict: ...
	def listCollections(self, options) -> List[Collection]: ...
	def runCommand(self, command, options) -> dict: ...
	@property
	def name(self) -> str: ...

class ContentsControlInstance:
	@property
	def page(self) -> int: ...
	@property
	def y(self) -> int: ...
	@property
	def x(self) -> int: ...
	@property
	def id(self) -> int: ...
	@property
	def cursorPosition(self) -> int: ...

class Watermark:
	@property
	def text(self) -> str: ...
	@property
	def picture(self) -> WatermarkPicture: ...
	@property
	def rotate(self) -> int: ...
	@property
	def over(self) -> bool: ...
	@property
	def opacity(self) -> int: ...
	@property
	def multiply(self) -> bool: ...
	@property
	def enabled(self) -> bool: ...
	@property
	def color(self) -> str: ...

class Project:
	def loadModule(self, path) -> Any: ...

class Report:
	def log(self, message) -> None: ...
	def printToDisk(self, path, type_, start, end) -> None: ...
	def takeLogs(self) -> str: ...
	def printToLocalPrinter(self, printer, options, start, end) -> None: ...
	def printToServerPrinter(self, printer, options, start, end) -> None: ...
	def logError(self, message) -> None: ...
	def logWarning(self, message) -> None: ...
	def parameterValue(self, name) -> Any: ...
	def newPage(self) -> None: ...
	def addMetadata(self, key, value) -> None: ...
	def setParameterValue(self, name, value) -> None: ...
	def instances(self, names) -> List[ControlInstance]: ...
	def instancesForContents(self, names) -> List[ContentsControlInstance]: ...
	@property
	def watermark(self) -> Watermark: ...
	@property
	def topReport(self) -> Self: ...
	@property
	def parentReport(self) -> Optional[Self]: ...
	@property
	def datasource(self) -> Optional[DataSource]: ...
	@property
	def mainReport(self) -> Optional[Self]: ...
	@property
	def cursor(self) -> Optional[DataSourceCursor]: ...
	@property
	def sortFields(self) -> List[tuple[str, Optional[bool]]]: ...
	@property
	def generationDate(self) -> str: ...
	@property
	def printZoom(self) -> int: ...
	@property
	def name(self) -> str: ...
	@property
	def previewWidth(self) -> int: ...
	@property
	def previewHeight(self) -> int: ...
	@property
	def paperSize(self) -> List[int]: ...
	@property
	def paperOrientationLandscape(self) -> bool: ...
	@property
	def pageCount(self) -> int: ...
	@property
	def designPaperFormat(self) -> str: ...
	@property
	def column(self) -> Column: ...
	@property
	def controls(self) -> Controls: ...
	@property
	def pageNumber(self) -> int: ...
	@property
	def columnCount(self) -> int: ...
	@property
	def columnNumber(self) -> int: ...
	@property
	def previewZoom(self) -> int: ...
	@property
	def generationDateTime(self) -> str: ...
	@property
	def generationDay(self) -> int: ...
	@property
	def generationWeekDay(self) -> str: ...
	@property
	def parts(self) -> List[Self]: ...
	@property
	def generationHour(self) -> int: ...
	@property
	def generationMinute(self) -> int: ...
	@property
	def generationMonth(self) -> int: ...
	@property
	def generationMonthName(self) -> str: ...
	@property
	def generationTime(self) -> str: ...
	@property
	def page(self) -> Page: ...
	@property
	def generationYear(self) -> int: ...
	@property
	def localPrinters(self) -> List[str]: ...
	@property
	def serverPrinters(self) -> List[str]: ...
	@property
	def bottomMargin(self) -> int: ...
	@property
	def leftMargin(self) -> int: ...
	@property
	def rightMargin(self) -> int: ...
	@property
	def topMargin(self) -> int: ...
