import { Model } from 'mongoose';
import { TransportRoute, TransportRouteDocument } from './schemas/transport-route.schema';
import { TransportAssignmentDocument } from './schemas/transport-assignment.schema';
import { StudentDocument } from '../students/schemas/student.schema';
import { AcademicYearDocument } from '../academic-year/academic-year.schema';
import { AuditService } from '../audit/audit.service';
import { RequestContext } from '../common/context/request-context';
import { CreateRouteDto } from './dto/create-route.dto';
import { UpdateRouteDto } from './dto/update-route.dto';
import { AssignTransportDto } from './dto/assign-transport.dto';
import { RecordTransportPaymentDto } from './dto/record-transport-payment.dto';
import { FilterTransportAssignmentsDto } from './dto/filter-transport-assignments.dto';
import { ToggleTransportDto } from './dto/toggle-transport.dto';
export declare class TransportService {
    private routeModel;
    private assignmentModel;
    private studentModel;
    private academicYearModel;
    private readonly auditService;
    private razor;
    private razorpayKeyId;
    private razorpayKeySecret;
    private razorpayWebhookSecret;
    constructor(routeModel: Model<TransportRouteDocument>, assignmentModel: Model<TransportAssignmentDocument>, studentModel: Model<StudentDocument>, academicYearModel: Model<AcademicYearDocument>, auditService: AuditService);
    private getRazorpay;
    createRoute(dto: CreateRouteDto, ctx?: RequestContext): Promise<TransportRoute & import("mongoose").Document<unknown, any, any, Record<string, any>> & Required<{
        _id: string;
    }>>;
    getRoutes(academicYearId?: string, activeOnly?: boolean): Promise<(import("mongoose").FlattenMaps<TransportRouteDocument> & Required<{
        _id: string;
    }>)[]>;
    getRoute(id: string): Promise<import("mongoose").FlattenMaps<TransportRouteDocument> & Required<{
        _id: string;
    }>>;
    updateRoute(id: string, dto: UpdateRouteDto, ctx?: RequestContext): Promise<(import("mongoose").FlattenMaps<TransportRouteDocument> & Required<{
        _id: string;
    }>) | null>;
    deleteRoute(id: string, ctx?: RequestContext): Promise<{
        deleted: boolean;
    }>;
    assignStudents(dto: AssignTransportDto, ctx?: RequestContext): Promise<{
        created: number;
    }>;
    getAssignments(filter: FilterTransportAssignmentsDto): Promise<any[]>;
    syncAssignments(routeId?: string): Promise<{
        synced: number;
    }>;
    toggleTransport(studentId: string, dto: ToggleTransportDto, ctx?: RequestContext): Promise<{
        updated: number;
        isActive: boolean;
    }>;
    removeTransport(studentId: string, routeId: string, academicYearId: string, ctx?: RequestContext): Promise<{
        deleted: number;
        kept: number;
    }>;
    getStudentTransportStatus(studentId: string, academicYearId?: string): Promise<{
        routeId: string;
        routeName: string;
        isActive: boolean;
        pendingCount: number;
        paidCount: number;
        pickupPoint?: string;
        monthlyFee: number;
    }[]>;
    getStudentDashboard(studentId: string, academicYearId?: string): Promise<{
        student: import("mongoose").FlattenMaps<StudentDocument> & Required<{
            _id: string;
        }>;
        summary: {
            totalFee: any;
            paidAmount: any;
            dueAmount: number;
            nextDueDate: string | null;
        };
        assignments: any[];
    }>;
    createRazorpayOrder(assignmentId: string, studentId: string): Promise<{
        orderId: string;
        amount: string | number;
        currency: string;
        keyId: string;
        assignmentId: string;
    }>;
    verifyRazorpayPayment(assignmentId: string, studentId: string, body: {
        razorpay_order_id: string;
        razorpay_payment_id: string;
        razorpay_signature: string;
    }): Promise<{
        status: string;
        receiptNumber: string | undefined;
    }>;
    recordOfflinePayment(assignmentId: string, dto: RecordTransportPaymentDto, adminId: string): Promise<{
        receiptNumber: string;
        studentId: string;
        routeId: string;
        academicYearId: string;
        routeName: string;
        installment: string;
        amount: number;
        fineAmount: number;
        dueDate: Date;
        status: "pending" | "paid";
        paidAt?: Date | undefined;
        paymentMethod?: "razorpay" | "cash" | "cheque" | "bank_transfer" | undefined;
        razorpayOrderId?: string | undefined;
        razorpayPaymentId?: string | undefined;
        razorpaySignature?: string | undefined;
        collectedBy?: string | undefined;
        notes?: string | undefined;
        pickupPoint?: string | undefined;
        isActive: boolean;
        _id: string;
        __v: number;
        createdAt?: Date | undefined;
        updatedAt?: Date | undefined;
        $assertPopulated: <Paths = {}>(path: string | string[], values?: Partial<Paths> | undefined) => Omit<TransportAssignmentDocument, keyof Paths> & Paths;
        $clearModifiedPaths: () => TransportAssignmentDocument;
        $clone: () => TransportAssignmentDocument;
        $createModifiedPathsSnapshot: () => import("mongoose").ModifiedPathsSnapshot;
        $getAllSubdocs: () => import("mongoose").Document[];
        $ignore: (path: string) => void;
        $isDefault: (path: string) => boolean;
        $isDeleted: (val?: boolean) => boolean;
        $getPopulatedDocs: () => import("mongoose").Document[];
        $inc: (path: string | string[], val?: number) => TransportAssignmentDocument;
        $isEmpty: (path: string) => boolean;
        $isValid: (path: string) => boolean;
        $locals: import("mongoose").FlattenMaps<Record<string, unknown>>;
        $markValid: (path: string) => void;
        $model: {
            <ModelType = Model<unknown, {}, {}, {}, import("mongoose").Document<unknown, {}, unknown, {}> & {
                _id: import("mongoose").Types.ObjectId;
            } & {
                __v: number;
            }, any>>(name: string): ModelType;
            <ModelType = Model<any, {}, {}, {}, any, any>>(): ModelType;
        };
        $op: "save" | "validate" | "remove" | null;
        $restoreModifiedPathsSnapshot: (snapshot: import("mongoose").ModifiedPathsSnapshot) => TransportAssignmentDocument;
        $session: (session?: import("mongoose").ClientSession | null) => import("mongoose").ClientSession | null;
        $set: {
            (path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): TransportAssignmentDocument;
            (path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): TransportAssignmentDocument;
            (value: string | Record<string, any>): TransportAssignmentDocument;
        };
        $where: import("mongoose").FlattenMaps<Record<string, unknown>>;
        baseModelName?: string | undefined;
        collection: import("mongoose").Collection;
        db: import("mongoose").FlattenMaps<import("mongoose").Connection>;
        deleteOne: (options?: import("mongoose").QueryOptions) => any;
        depopulate: <Paths = {}>(path?: string | string[]) => import("mongoose").MergeType<TransportAssignmentDocument, Paths>;
        directModifiedPaths: () => Array<string>;
        equals: (doc: import("mongoose").Document<unknown, any, any, Record<string, any>>) => boolean;
        errors?: import("mongoose").Error.ValidationError | undefined;
        get: {
            <T extends string | number | symbol>(path: T, type?: any, options?: any): any;
            (path: string, type?: any, options?: any): any;
        };
        getChanges: () => import("mongoose").UpdateQuery<TransportAssignmentDocument>;
        id?: any;
        increment: () => TransportAssignmentDocument;
        init: (obj: import("mongoose").AnyObject, opts?: import("mongoose").AnyObject) => TransportAssignmentDocument;
        invalidate: {
            <T extends string | number | symbol>(path: T, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
            (path: string, errorMsg: string | NativeError, value?: any, kind?: string): NativeError | null;
        };
        isDirectModified: {
            <T extends string | number | symbol>(path: T | T[]): boolean;
            (path: string | Array<string>): boolean;
        };
        isDirectSelected: {
            <T extends string | number | symbol>(path: T): boolean;
            (path: string): boolean;
        };
        isInit: {
            <T extends string | number | symbol>(path: T): boolean;
            (path: string): boolean;
        };
        isModified: {
            <T extends string | number | symbol>(path?: T | T[] | undefined, options?: {
                ignoreAtomics?: boolean;
            } | null): boolean;
            (path?: string | Array<string>, options?: {
                ignoreAtomics?: boolean;
            } | null): boolean;
        };
        isNew: boolean;
        isSelected: {
            <T extends string | number | symbol>(path: T): boolean;
            (path: string): boolean;
        };
        markModified: {
            <T extends string | number | symbol>(path: T, scope?: any): void;
            (path: string, scope?: any): void;
        };
        model: {
            <ModelType = Model<unknown, {}, {}, {}, import("mongoose").Document<unknown, {}, unknown, {}> & {
                _id: import("mongoose").Types.ObjectId;
            } & {
                __v: number;
            }, any>>(name: string): ModelType;
            <ModelType = Model<any, {}, {}, {}, any, any>>(): ModelType;
        };
        modifiedPaths: (options?: {
            includeChildren?: boolean;
        }) => Array<string>;
        overwrite: (obj: import("mongoose").AnyObject) => TransportAssignmentDocument;
        $parent: () => import("mongoose").Document | undefined;
        populate: {
            <Paths = {}>(path: string | import("mongoose").PopulateOptions | (string | import("mongoose").PopulateOptions)[]): Promise<import("mongoose").MergeType<TransportAssignmentDocument, Paths>>;
            <Paths = {}>(path: string, select?: string | import("mongoose").AnyObject, model?: Model<any>, match?: import("mongoose").AnyObject, options?: import("mongoose").PopulateOptions): Promise<import("mongoose").MergeType<TransportAssignmentDocument, Paths>>;
        };
        populated: (path: string) => any;
        replaceOne: (replacement?: import("mongoose").AnyObject, options?: import("mongoose").QueryOptions | null) => import("mongoose").Query<any, TransportAssignmentDocument, {}, unknown, "find", Record<string, never>>;
        save: (options?: import("mongoose").SaveOptions) => Promise<TransportAssignmentDocument>;
        schema: import("mongoose").FlattenMaps<import("mongoose").Schema<any, Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
            [x: string]: unknown;
        }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
            [x: string]: unknown;
        }>, {}> & import("mongoose").FlatRecord<{
            [x: string]: unknown;
        }> & Required<{
            _id: unknown;
        }> & {
            __v: number;
        }>>;
        set: {
            <T extends string | number | symbol>(path: T, val: any, type: any, options?: import("mongoose").DocumentSetOptions): TransportAssignmentDocument;
            (path: string | Record<string, any>, val: any, type: any, options?: import("mongoose").DocumentSetOptions): TransportAssignmentDocument;
            (path: string | Record<string, any>, val: any, options?: import("mongoose").DocumentSetOptions): TransportAssignmentDocument;
            (value: string | Record<string, any>): TransportAssignmentDocument;
        };
        toJSON: {
            (options: import("mongoose").ToObjectOptions & {
                virtuals: true;
            }): any;
            (options?: import("mongoose").ToObjectOptions & {
                flattenMaps?: true;
                flattenObjectIds?: false;
            }): import("mongoose").FlattenMaps<any>;
            (options: import("mongoose").ToObjectOptions & {
                flattenObjectIds: false;
            }): import("mongoose").FlattenMaps<any>;
            (options: import("mongoose").ToObjectOptions & {
                flattenObjectIds: true;
            }): {
                [x: string]: any;
            };
            (options: import("mongoose").ToObjectOptions & {
                flattenMaps: false;
            }): any;
            (options: import("mongoose").ToObjectOptions & {
                flattenMaps: false;
                flattenObjectIds: true;
            }): any;
            <T = any>(options?: import("mongoose").ToObjectOptions & {
                flattenMaps?: true;
                flattenObjectIds?: false;
            }): import("mongoose").FlattenMaps<T>;
            <T = any>(options: import("mongoose").ToObjectOptions & {
                flattenObjectIds: false;
            }): import("mongoose").FlattenMaps<T>;
            <T = any>(options: import("mongoose").ToObjectOptions & {
                flattenObjectIds: true;
            }): import("mongoose").ObjectIdToString<import("mongoose").FlattenMaps<T>>;
            <T = any>(options: import("mongoose").ToObjectOptions & {
                flattenMaps: false;
            }): T;
            <T = any>(options: import("mongoose").ToObjectOptions & {
                flattenMaps: false;
                flattenObjectIds: true;
            }): import("mongoose").ObjectIdToString<T>;
        };
        toObject: {
            (options: import("mongoose").ToObjectOptions & {
                virtuals: true;
            }): any;
            (options?: import("mongoose").ToObjectOptions): any;
            <T>(options?: import("mongoose").ToObjectOptions): import("mongoose").Default__v<import("mongoose").Require_id<T>>;
        };
        unmarkModified: {
            <T extends string | number | symbol>(path: T): void;
            (path: string): void;
        };
        updateOne: (update?: import("mongoose").UpdateWithAggregationPipeline | import("mongoose").UpdateQuery<TransportAssignmentDocument> | undefined, options?: import("mongoose").QueryOptions | null) => import("mongoose").Query<any, TransportAssignmentDocument, {}, unknown, "find", Record<string, never>>;
        validate: {
            <T extends string | number | symbol>(pathsToValidate?: T | T[] | undefined, options?: import("mongoose").AnyObject): Promise<void>;
            (pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): Promise<void>;
            (options: {
                pathsToSkip?: import("mongoose").pathsToSkip;
            }): Promise<void>;
        };
        validateSync: {
            (options: {
                pathsToSkip?: import("mongoose").pathsToSkip;
                [k: string]: any;
            }): import("mongoose").Error.ValidationError | null;
            <T extends string | number | symbol>(pathsToValidate?: T | T[] | undefined, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
            (pathsToValidate?: import("mongoose").pathsToValidate, options?: import("mongoose").AnyObject): import("mongoose").Error.ValidationError | null;
        };
    }>;
    handleWebhook(signature: string | undefined, rawBody: Buffer, jsonBody: any): Promise<{
        received: boolean;
    }>;
    verifyReceipt(receiptNumber: string): Promise<{
        receiptNumber: string | undefined;
        studentName: string;
        studentId: any;
        rollNumber: string;
        feeName: string;
        installment: string;
        amount: number;
        fineAmount: number;
        totalPaid: number;
        status: "pending" | "paid";
        paidAt: Date | undefined;
        paymentMethod: "razorpay" | "cash" | "cheque" | "bank_transfer" | undefined;
    } | null>;
    private computeFine;
    private calculateFineFromRoute;
    private recalculateFinesWithRoutes;
    private generateReceiptNumber;
}
