import { Response } from 'express';
import { BootstrapTableRequestDto } from 'src/commons/dto/bootstrap-table-request.dto';
import { ExportService } from 'src/export/export.service';
import { ExportQueryDto } from 'src/export/export.types';
import { CancelTransactionDto } from './dto/cancel-transaction.dto';
import { CreatePaymentDto } from './dto/create-payment.dto';
import { CreateTransactionDto } from './dto/create-transaction.dto';
import { TransactionChartQueryDto } from './dto/transaction-chart-query.dto';
import { TransactionPerformanceQueryDto } from './dto/transaction-performance-query.dto';
import { TransactionSummaryQueryDto } from './dto/transaction-summary-query.dto';
import { UpdateTransactionDto } from './dto/update-transaction.dto';
import { TransactionsService } from './transactions.service';
export declare class TransactionsController {
    private readonly transactionsService;
    private readonly exportService;
    constructor(transactionsService: TransactionsService, exportService: ExportService);
    generateItemId(): Promise<{
        message: string;
        data: string;
    }>;
    create(req: any, dto: CreateTransactionDto): Promise<{
        message: string;
        data: ({
            branch: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                address: string;
                name: string;
                beginEffective: Date;
                endEffective: Date | null;
            };
            bank: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                name: string;
                status: import("../../generated/prisma/enums").SettingStatus;
            } | null;
            customer: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                fullName: string;
                phoneNumber: string;
                ktpNumber: string | null;
                ktpPhotoUrl: string | null;
                address: string;
            };
            docs: {
                url: string;
                id: string;
                createdAt: Date;
                filename: string;
                mimetype: string;
                size: number;
                transactionId: string;
                order: number;
                type: import("../../generated/prisma/enums").TransactionDocType;
            }[];
            createdByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            items: ({
                docs: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    type: string;
                    transactionItemId: string;
                }[];
                images: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    itemId: string;
                }[];
            } & {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                itemCode: string | null;
                grossWeight: import("@prisma/client/runtime/client").Decimal;
                netWeight: import("@prisma/client/runtime/client").Decimal;
                caratId: string;
                pricePerGram: import("@prisma/client/runtime/client").Decimal;
                pricePerGramAt: Date;
                purityPercent: import("@prisma/client/runtime/client").Decimal;
                totalPrice: import("@prisma/client/runtime/client").Decimal;
                isAdjusted: boolean;
                itemTypeId: string;
                transactionId: string;
            })[];
            payments: ({
                transferUser: {
                    email: string;
                    id: string;
                    firstName: string | null;
                    lastName: string | null;
                };
            } & {
                id: string;
                createdAt: Date;
                transferDate: Date;
                proofUrl: string;
                filename: string;
                mimetype: string;
                size: number;
                transactionId: string;
                transferBy: string;
            })[];
            completedByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            headStoreUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
        } & {
            id: string;
            createdAt: Date;
            modifiedAt: Date | null;
            status: import("../../generated/prisma/enums").TransactionStatus;
            branchId: string;
            trxCode: string;
            totalGrossWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalNetWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalAmount: import("@prisma/client/runtime/client").Decimal | null;
            bankAccountNo: string | null;
            bankAccountName: string | null;
            referralSource: string | null;
            knowsFounder: boolean | null;
            cancellationReason: string | null;
            cancelledBy: string | null;
            cancelledAt: Date | null;
            completedAt: Date | null;
            customerId: string;
            bankId: string | null;
            createdBy: string | null;
            modifiedBy: string | null;
            completedBy: string | null;
            headStoreId: string | null;
        }) | null;
    }>;
    getSummary(filter?: {
        branchId?: string;
    }): Promise<{
        message: string;
        data: Record<string, number>;
    }>;
    findAll(req: any, query: BootstrapTableRequestDto): Promise<{
        message: string;
        data: import("../commons/dto/bootstrap-table-response.dto").BootstrapTableResponseDto<{
            branch: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                address: string;
                name: string;
                beginEffective: Date;
                endEffective: Date | null;
            };
            bank: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                name: string;
                status: import("../../generated/prisma/enums").SettingStatus;
            } | null;
            customer: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                fullName: string;
                phoneNumber: string;
                ktpNumber: string | null;
                ktpPhotoUrl: string | null;
                address: string;
            };
            docs: {
                url: string;
                id: string;
                createdAt: Date;
                filename: string;
                mimetype: string;
                size: number;
                transactionId: string;
                order: number;
                type: import("../../generated/prisma/enums").TransactionDocType;
            }[];
            createdByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            items: ({
                docs: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    type: string;
                    transactionItemId: string;
                }[];
                images: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    itemId: string;
                }[];
            } & {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                itemCode: string | null;
                grossWeight: import("@prisma/client/runtime/client").Decimal;
                netWeight: import("@prisma/client/runtime/client").Decimal;
                caratId: string;
                pricePerGram: import("@prisma/client/runtime/client").Decimal;
                pricePerGramAt: Date;
                purityPercent: import("@prisma/client/runtime/client").Decimal;
                totalPrice: import("@prisma/client/runtime/client").Decimal;
                isAdjusted: boolean;
                itemTypeId: string;
                transactionId: string;
            })[];
            payments: ({
                transferUser: {
                    email: string;
                    id: string;
                    firstName: string | null;
                    lastName: string | null;
                };
            } & {
                id: string;
                createdAt: Date;
                transferDate: Date;
                proofUrl: string;
                filename: string;
                mimetype: string;
                size: number;
                transactionId: string;
                transferBy: string;
            })[];
            completedByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            headStoreUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
        } & {
            id: string;
            createdAt: Date;
            modifiedAt: Date | null;
            status: import("../../generated/prisma/enums").TransactionStatus;
            branchId: string;
            trxCode: string;
            totalGrossWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalNetWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalAmount: import("@prisma/client/runtime/client").Decimal | null;
            bankAccountNo: string | null;
            bankAccountName: string | null;
            referralSource: string | null;
            knowsFounder: boolean | null;
            cancellationReason: string | null;
            cancelledBy: string | null;
            cancelledAt: Date | null;
            completedAt: Date | null;
            customerId: string;
            bankId: string | null;
            createdBy: string | null;
            modifiedBy: string | null;
            completedBy: string | null;
            headStoreId: string | null;
        }>;
    }>;
    export(query: ExportQueryDto, req: any, res: Response): Promise<void>;
    findOne(id: string): Promise<{
        message: string;
        data: {
            notes: {
                id: string;
                createdAt: Date;
                createdBy: string;
                entityId: string;
                type: import("../../generated/prisma/enums").NoteType;
                content: string;
                entityType: import("../../generated/prisma/enums").NoteEntityType;
            }[];
            branch: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                address: string;
                name: string;
                beginEffective: Date;
                endEffective: Date | null;
            };
            bank: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                name: string;
                status: import("../../generated/prisma/enums").SettingStatus;
            } | null;
            customer: {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                code: string;
                fullName: string;
                phoneNumber: string;
                ktpNumber: string | null;
                ktpPhotoUrl: string | null;
                address: string;
            };
            docs: {
                url: string;
                id: string;
                createdAt: Date;
                filename: string;
                mimetype: string;
                size: number;
                transactionId: string;
                order: number;
                type: import("../../generated/prisma/enums").TransactionDocType;
            }[];
            createdByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            items: ({
                docs: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    type: string;
                    transactionItemId: string;
                }[];
                images: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    itemId: string;
                }[];
            } & {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                itemCode: string | null;
                grossWeight: import("@prisma/client/runtime/client").Decimal;
                netWeight: import("@prisma/client/runtime/client").Decimal;
                caratId: string;
                pricePerGram: import("@prisma/client/runtime/client").Decimal;
                pricePerGramAt: Date;
                purityPercent: import("@prisma/client/runtime/client").Decimal;
                totalPrice: import("@prisma/client/runtime/client").Decimal;
                isAdjusted: boolean;
                itemTypeId: string;
                transactionId: string;
            })[];
            payments: ({
                transferUser: {
                    email: string;
                    id: string;
                    firstName: string | null;
                    lastName: string | null;
                };
            } & {
                id: string;
                createdAt: Date;
                transferDate: Date;
                proofUrl: string;
                filename: string;
                mimetype: string;
                size: number;
                transactionId: string;
                transferBy: string;
            })[];
            completedByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            headStoreUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            } | null;
            id: string;
            createdAt: Date;
            modifiedAt: Date | null;
            status: import("../../generated/prisma/enums").TransactionStatus;
            branchId: string;
            trxCode: string;
            totalGrossWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalNetWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalAmount: import("@prisma/client/runtime/client").Decimal | null;
            bankAccountNo: string | null;
            bankAccountName: string | null;
            referralSource: string | null;
            knowsFounder: boolean | null;
            cancellationReason: string | null;
            cancelledBy: string | null;
            cancelledAt: Date | null;
            completedAt: Date | null;
            customerId: string;
            bankId: string | null;
            createdBy: string | null;
            modifiedBy: string | null;
            completedBy: string | null;
            headStoreId: string | null;
        };
    }>;
    getAuditLogs(id: string, query: BootstrapTableRequestDto): Promise<{
        message: string;
        data: import("../commons/dto/bootstrap-table-response.dto").BootstrapTableResponseDto<{
            changedByUser: {
                email: string;
                id: string;
                firstName: string | null;
                lastName: string | null;
            };
        } & {
            id: string;
            entityId: string;
            entityType: string;
            changedAt: Date;
            fieldName: string;
            oldValue: string | null;
            newValue: string | null;
            headerEntityType: string | null;
            headerEntityId: string | null;
            changedBy: string;
        }>;
    }>;
    complete(id: string, dto: {
        note: string;
    }, req: any): Promise<{
        message: string;
        data: {
            id: string;
            createdAt: Date;
            modifiedAt: Date | null;
            status: import("../../generated/prisma/enums").TransactionStatus;
            branchId: string;
            trxCode: string;
            totalGrossWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalNetWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalAmount: import("@prisma/client/runtime/client").Decimal | null;
            bankAccountNo: string | null;
            bankAccountName: string | null;
            referralSource: string | null;
            knowsFounder: boolean | null;
            cancellationReason: string | null;
            cancelledBy: string | null;
            cancelledAt: Date | null;
            completedAt: Date | null;
            customerId: string;
            bankId: string | null;
            createdBy: string | null;
            modifiedBy: string | null;
            completedBy: string | null;
            headStoreId: string | null;
        };
    }>;
    addPayment(id: string, dto: CreatePaymentDto, req: any): Promise<{
        message: string;
        data: {
            id: string;
            createdAt: Date;
            transferDate: Date;
            proofUrl: string;
            filename: string;
            mimetype: string;
            size: number;
            transactionId: string;
            transferBy: string;
        };
    }>;
    cancel(id: string, dto: CancelTransactionDto, req: any): Promise<{
        message: string;
        data: {
            items: ({
                images: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    itemId: string;
                }[];
            } & {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                itemCode: string | null;
                grossWeight: import("@prisma/client/runtime/client").Decimal;
                netWeight: import("@prisma/client/runtime/client").Decimal;
                caratId: string;
                pricePerGram: import("@prisma/client/runtime/client").Decimal;
                pricePerGramAt: Date;
                purityPercent: import("@prisma/client/runtime/client").Decimal;
                totalPrice: import("@prisma/client/runtime/client").Decimal;
                isAdjusted: boolean;
                itemTypeId: string;
                transactionId: string;
            })[];
        } & {
            id: string;
            createdAt: Date;
            modifiedAt: Date | null;
            status: import("../../generated/prisma/enums").TransactionStatus;
            branchId: string;
            trxCode: string;
            totalGrossWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalNetWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalAmount: import("@prisma/client/runtime/client").Decimal | null;
            bankAccountNo: string | null;
            bankAccountName: string | null;
            referralSource: string | null;
            knowsFounder: boolean | null;
            cancellationReason: string | null;
            cancelledBy: string | null;
            cancelledAt: Date | null;
            completedAt: Date | null;
            customerId: string;
            bankId: string | null;
            createdBy: string | null;
            modifiedBy: string | null;
            completedBy: string | null;
            headStoreId: string | null;
        };
    }>;
    update(id: string, dto: UpdateTransactionDto, req: any): Promise<{
        message: string;
        data: ({
            items: ({
                images: {
                    url: string;
                    id: string;
                    createdAt: Date;
                    filename: string;
                    mimetype: string;
                    size: number;
                    order: number;
                    itemId: string;
                }[];
            } & {
                id: string;
                createdAt: Date;
                modifiedAt: Date;
                itemCode: string | null;
                grossWeight: import("@prisma/client/runtime/client").Decimal;
                netWeight: import("@prisma/client/runtime/client").Decimal;
                caratId: string;
                pricePerGram: import("@prisma/client/runtime/client").Decimal;
                pricePerGramAt: Date;
                purityPercent: import("@prisma/client/runtime/client").Decimal;
                totalPrice: import("@prisma/client/runtime/client").Decimal;
                isAdjusted: boolean;
                itemTypeId: string;
                transactionId: string;
            })[];
        } & {
            id: string;
            createdAt: Date;
            modifiedAt: Date | null;
            status: import("../../generated/prisma/enums").TransactionStatus;
            branchId: string;
            trxCode: string;
            totalGrossWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalNetWeight: import("@prisma/client/runtime/client").Decimal | null;
            totalAmount: import("@prisma/client/runtime/client").Decimal | null;
            bankAccountNo: string | null;
            bankAccountName: string | null;
            referralSource: string | null;
            knowsFounder: boolean | null;
            cancellationReason: string | null;
            cancelledBy: string | null;
            cancelledAt: Date | null;
            completedAt: Date | null;
            customerId: string;
            bankId: string | null;
            createdBy: string | null;
            modifiedBy: string | null;
            completedBy: string | null;
            headStoreId: string | null;
        }) | null;
    }>;
    getChart(query: TransactionChartQueryDto, req: any): Promise<{
        message: string;
        data: {
            labels: string[];
            series: {
                transactionCount: {
                    success: number[];
                    bounce: number[];
                };
                totalAmount: {
                    success: number[];
                    bounce: number[];
                };
                totalNetWeight: {
                    success: number[];
                    bounce: number[];
                };
            };
        };
    }>;
    getAnalyticsSummary(query: TransactionSummaryQueryDto, req: any): Promise<{
        message: string;
        data: {
            transactionCount: {
                currentPeriod: {
                    start: Date;
                    end: Date;
                    success: number;
                    bounce: number;
                };
                previousPeriod: {
                    start: Date;
                    end: Date;
                    success: number;
                    bounce: number;
                };
                changes: {
                    success: {
                        value: number;
                        percent: number | null;
                        trend: "flat" | "up" | "down";
                    };
                    bounce: {
                        value: number;
                        percent: number | null;
                        trend: "flat" | "up" | "down";
                    };
                };
            };
            totalAmount: {
                currentPeriod: {
                    start: Date;
                    end: Date;
                    success: number;
                    bounce: number;
                };
                previousPeriod: {
                    start: Date;
                    end: Date;
                    success: number;
                    bounce: number;
                };
                changes: {
                    success: {
                        value: number;
                        percent: number | null;
                        trend: "flat" | "up" | "down";
                    };
                    bounce: {
                        value: number;
                        percent: number | null;
                        trend: "flat" | "up" | "down";
                    };
                };
            };
            totalNetWeight: {
                currentPeriod: {
                    start: Date;
                    end: Date;
                    success: number;
                    bounce: number;
                };
                previousPeriod: {
                    start: Date;
                    end: Date;
                    success: number;
                    bounce: number;
                };
                changes: {
                    success: {
                        value: number;
                        percent: number | null;
                        trend: "flat" | "up" | "down";
                    };
                    bounce: {
                        value: number;
                        percent: number | null;
                        trend: "flat" | "up" | "down";
                    };
                };
            };
        };
    }>;
    getPerformanceSummary(query: TransactionPerformanceQueryDto, req: any): Promise<{
        message: string;
        data: {
            transactionCount: {
                created: number;
                completed: number;
                canceled: number;
                rejected: number;
            };
            totalGrossWeight: {
                created: number;
                completed: number;
                canceled: number;
                rejected: number;
            };
            totalAmount: {
                created: number;
                completed: number;
                canceled: number;
                rejected: number;
            };
        };
    }>;
    getCancellationReasons(query: TransactionPerformanceQueryDto, req: any): Promise<{
        message: string;
        data: {
            reason: string;
            count: number;
        }[];
    }>;
    getPerformanceChart(query: TransactionChartQueryDto, req: any): Promise<{
        labels: number[];
        series: {
            transactionCount: {
                created: number[];
                success: number[];
                canceled: number[];
            };
            totalGrossWeight: {
                created: number[];
                success: number[];
                canceled: number[];
            };
            totalAmount: {
                created: number[];
                success: number[];
                canceled: number[];
            };
            sla: {
                open: number[];
                waitingPayment: number[];
                paidWaitingHsReview: number[];
                completed: number[];
            };
        };
    }>;
}
