import { AccountHolderDTO, BigNumberInput, CaptureDTO, Context, CreateAccountHolderDTO, CreateCaptureDTO, CreatePaymentCollectionDTO, CreatePaymentMethodDTO, CreatePaymentSessionDTO, CreateRefundDTO, DAL, FilterablePaymentCollectionProps, FilterablePaymentMethodProps, FilterablePaymentProviderProps, FindConfig, InferEntityType, InternalModuleDeclaration, IPaymentModuleService, Logger, ModuleJoinerConfig, ModulesSdkTypes, PaymentCollectionDTO, PaymentCollectionUpdatableFields, PaymentDTO, PaymentMethodDTO, PaymentProviderDTO, PaymentSessionDTO, ProviderWebhookPayload, RefundDTO, RefundReasonDTO, UpdateAccountHolderDTO, UpdatePaymentCollectionDTO, UpdatePaymentDTO, UpdatePaymentSessionDTO, UpsertPaymentCollectionDTO, WebhookActionResult } from "@medusajs/framework/types";
import { ModulesSdkUtils, PaymentCollectionStatus, PaymentSessionStatus } from "@medusajs/framework/utils";
import { AccountHolder, Capture, Payment, PaymentCollection, PaymentSession, Refund } from "../models";
import PaymentProviderService from "./payment-provider";
type InjectedDependencies = {
    logger?: Logger;
    baseRepository: DAL.RepositoryService;
    paymentService: ModulesSdkTypes.IMedusaInternalService<any>;
    captureService: ModulesSdkTypes.IMedusaInternalService<any>;
    refundService: ModulesSdkTypes.IMedusaInternalService<any>;
    paymentSessionService: ModulesSdkTypes.IMedusaInternalService<any>;
    paymentCollectionService: ModulesSdkTypes.IMedusaInternalService<any>;
    accountHolderService: ModulesSdkTypes.IMedusaInternalService<any>;
    paymentProviderService: PaymentProviderService;
};
declare const PaymentModuleService_base: ModulesSdkUtils.MedusaServiceReturnType<{
    PaymentCollection: {
        dto: PaymentCollectionDTO;
    };
    PaymentSession: {
        dto: PaymentSessionDTO;
    };
    Payment: {
        dto: PaymentDTO;
    };
    Capture: {
        dto: CaptureDTO;
    };
    Refund: {
        dto: RefundDTO;
    };
    RefundReason: {
        dto: RefundReasonDTO;
    };
    AccountHolder: {
        dto: AccountHolderDTO;
    };
}>;
export default class PaymentModuleService extends PaymentModuleService_base implements IPaymentModuleService {
    protected readonly moduleDeclaration: InternalModuleDeclaration;
    protected baseRepository_: DAL.RepositoryService;
    protected paymentService_: ModulesSdkTypes.IMedusaInternalService<typeof Payment>;
    protected captureService_: ModulesSdkTypes.IMedusaInternalService<typeof Capture>;
    protected refundService_: ModulesSdkTypes.IMedusaInternalService<typeof Refund>;
    protected paymentSessionService_: ModulesSdkTypes.IMedusaInternalService<typeof PaymentSession>;
    protected paymentCollectionService_: ModulesSdkTypes.IMedusaInternalService<typeof PaymentCollection>;
    protected paymentProviderService_: PaymentProviderService;
    protected accountHolderService_: ModulesSdkTypes.IMedusaInternalService<typeof AccountHolder>;
    constructor({ baseRepository, paymentService, captureService, refundService, paymentSessionService, paymentProviderService, paymentCollectionService, accountHolderService, }: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
    __joinerConfig(): ModuleJoinerConfig;
    protected roundToCurrencyPrecision(amount: BigNumberInput, currencyCode: string): BigNumberInput;
    createPaymentCollections(data: CreatePaymentCollectionDTO, sharedContext?: Context): Promise<PaymentCollectionDTO>;
    createPaymentCollections(data: CreatePaymentCollectionDTO[], sharedContext?: Context): Promise<PaymentCollectionDTO[]>;
    createPaymentCollections_(data: CreatePaymentCollectionDTO[], sharedContext?: Context): Promise<InferEntityType<typeof PaymentCollection>[]>;
    updatePaymentCollections(paymentCollectionId: string, data: PaymentCollectionUpdatableFields, sharedContext?: Context): Promise<PaymentCollectionDTO>;
    updatePaymentCollections(selector: FilterablePaymentCollectionProps, data: PaymentCollectionUpdatableFields, sharedContext?: Context): Promise<PaymentCollectionDTO[]>;
    updatePaymentCollections_(data: UpdatePaymentCollectionDTO[], sharedContext?: Context): Promise<InferEntityType<typeof PaymentCollection>[]>;
    upsertPaymentCollections(data: UpsertPaymentCollectionDTO[], sharedContext?: Context): Promise<PaymentCollectionDTO[]>;
    upsertPaymentCollections(data: UpsertPaymentCollectionDTO, sharedContext?: Context): Promise<PaymentCollectionDTO>;
    protected upsertPaymentCollections_(data: UpsertPaymentCollectionDTO | UpsertPaymentCollectionDTO[], sharedContext?: Context): Promise<InferEntityType<typeof PaymentCollection>[]>;
    completePaymentCollections(paymentCollectionId: string, sharedContext?: Context): Promise<PaymentCollectionDTO>;
    completePaymentCollections(paymentCollectionId: string[], sharedContext?: Context): Promise<PaymentCollectionDTO[]>;
    createPaymentSession(paymentCollectionId: string, input: CreatePaymentSessionDTO, sharedContext?: Context): Promise<PaymentSessionDTO>;
    createPaymentSession_(paymentCollectionId: string, data: CreatePaymentSessionDTO, sharedContext?: Context): Promise<InferEntityType<typeof PaymentSession>>;
    updatePaymentSession(data: UpdatePaymentSessionDTO, sharedContext?: Context): Promise<PaymentSessionDTO>;
    deletePaymentSession(id: string, sharedContext?: Context): Promise<void>;
    authorizePaymentSession(id: string, context: Record<string, unknown>, sharedContext?: Context): Promise<PaymentDTO>;
    protected authorizePaymentSession_(session: InferEntityType<typeof PaymentSession>, data: Record<string, unknown> | undefined, status: PaymentSessionStatus, sharedContext?: Context): Promise<InferEntityType<typeof Payment>>;
    updatePayment(data: UpdatePaymentDTO, sharedContext?: Context): Promise<PaymentDTO>;
    capturePayment(data: CreateCaptureDTO, sharedContext?: Context): Promise<PaymentDTO>;
    protected capturePayment_(data: CreateCaptureDTO, payment: InferEntityType<typeof Payment>, sharedContext?: Context): Promise<{
        isFullyCaptured: boolean;
        capture?: InferEntityType<typeof Capture>;
    }>;
    protected capturePaymentFromProvider_(payment: InferEntityType<typeof Payment>, capture: InferEntityType<typeof Capture> | undefined, options?: {
        isFullyCaptured?: boolean;
        isCaptured?: boolean;
    }, sharedContext?: Context): Promise<{
        id: string;
        amount: number;
        currency_code: string;
        provider_id: string;
        data: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        captured_at: Date | null;
        canceled_at: Date | null;
        payment_collection: {
            id: string;
            currency_code: string;
            amount: number;
            authorized_amount: number | null;
            captured_amount: number | null;
            refunded_amount: number | null;
            completed_at: Date | null;
            status: PaymentCollectionStatus;
            metadata: Record<string, unknown> | null;
            payment_providers: {
                id: string;
                is_enabled: boolean;
                payment_collections: /*elided*/ any[];
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
            }[];
            payment_sessions: {
                id: string;
                currency_code: string;
                amount: number;
                provider_id: string;
                data: Record<string, unknown>;
                context: Record<string, unknown> | null;
                status: PaymentSessionStatus;
                authorized_at: Date | null;
                payment_collection: /*elided*/ any;
                payment: /*elided*/ any;
                metadata: Record<string, unknown> | null;
                raw_amount: Record<string, unknown>;
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
                payment_collection_id: string;
            }[];
            payments: /*elided*/ any[];
            raw_amount: Record<string, unknown>;
            raw_authorized_amount: Record<string, unknown> | null;
            raw_captured_amount: Record<string, unknown> | null;
            raw_refunded_amount: Record<string, unknown> | null;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
        };
        payment_session: {
            id: string;
            currency_code: string;
            amount: number;
            provider_id: string;
            data: Record<string, unknown>;
            context: Record<string, unknown> | null;
            status: PaymentSessionStatus;
            authorized_at: Date | null;
            payment_collection: {
                id: string;
                currency_code: string;
                amount: number;
                authorized_amount: number | null;
                captured_amount: number | null;
                refunded_amount: number | null;
                completed_at: Date | null;
                status: PaymentCollectionStatus;
                metadata: Record<string, unknown> | null;
                payment_providers: {
                    id: string;
                    is_enabled: boolean;
                    payment_collections: /*elided*/ any[];
                    created_at: Date;
                    updated_at: Date;
                    deleted_at: Date | null;
                }[];
                payment_sessions: /*elided*/ any[];
                payments: /*elided*/ any[];
                raw_amount: Record<string, unknown>;
                raw_authorized_amount: Record<string, unknown> | null;
                raw_captured_amount: Record<string, unknown> | null;
                raw_refunded_amount: Record<string, unknown> | null;
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
            };
            payment: /*elided*/ any;
            metadata: Record<string, unknown> | null;
            raw_amount: Record<string, unknown>;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
            payment_collection_id: string;
        };
        refunds: {
            id: string;
            amount: number;
            payment: /*elided*/ any;
            refund_reason: {
                id: string;
                label: string;
                code: string;
                description: string | null;
                metadata: Record<string, unknown> | null;
                refunds: /*elided*/ any[];
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
            };
            note: string | null;
            created_by: string | null;
            metadata: Record<string, unknown> | null;
            raw_amount: Record<string, unknown>;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
            payment_id: string;
            refund_reason_id: string | null;
        }[];
        captures: {
            id: string;
            amount: number;
            payment: /*elided*/ any;
            metadata: Record<string, unknown> | null;
            created_by: string | null;
            raw_amount: Record<string, unknown>;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
            payment_id: string;
        }[];
        raw_amount: Record<string, unknown>;
        created_at: Date;
        updated_at: Date;
        deleted_at: Date | null;
        payment_collection_id: string;
        payment_session_id: string;
    }>;
    refundPayment(data: CreateRefundDTO, sharedContext?: Context): Promise<PaymentDTO>;
    private refundPayment_;
    protected refundPaymentFromProvider_(payment: InferEntityType<typeof Payment>, refund: InferEntityType<typeof Refund>, sharedContext?: Context): Promise<{
        id: string;
        amount: number;
        currency_code: string;
        provider_id: string;
        data: Record<string, unknown> | null;
        metadata: Record<string, unknown> | null;
        captured_at: Date | null;
        canceled_at: Date | null;
        payment_collection: {
            id: string;
            currency_code: string;
            amount: number;
            authorized_amount: number | null;
            captured_amount: number | null;
            refunded_amount: number | null;
            completed_at: Date | null;
            status: PaymentCollectionStatus;
            metadata: Record<string, unknown> | null;
            payment_providers: {
                id: string;
                is_enabled: boolean;
                payment_collections: /*elided*/ any[];
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
            }[];
            payment_sessions: {
                id: string;
                currency_code: string;
                amount: number;
                provider_id: string;
                data: Record<string, unknown>;
                context: Record<string, unknown> | null;
                status: PaymentSessionStatus;
                authorized_at: Date | null;
                payment_collection: /*elided*/ any;
                payment: /*elided*/ any;
                metadata: Record<string, unknown> | null;
                raw_amount: Record<string, unknown>;
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
                payment_collection_id: string;
            }[];
            payments: /*elided*/ any[];
            raw_amount: Record<string, unknown>;
            raw_authorized_amount: Record<string, unknown> | null;
            raw_captured_amount: Record<string, unknown> | null;
            raw_refunded_amount: Record<string, unknown> | null;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
        };
        payment_session: {
            id: string;
            currency_code: string;
            amount: number;
            provider_id: string;
            data: Record<string, unknown>;
            context: Record<string, unknown> | null;
            status: PaymentSessionStatus;
            authorized_at: Date | null;
            payment_collection: {
                id: string;
                currency_code: string;
                amount: number;
                authorized_amount: number | null;
                captured_amount: number | null;
                refunded_amount: number | null;
                completed_at: Date | null;
                status: PaymentCollectionStatus;
                metadata: Record<string, unknown> | null;
                payment_providers: {
                    id: string;
                    is_enabled: boolean;
                    payment_collections: /*elided*/ any[];
                    created_at: Date;
                    updated_at: Date;
                    deleted_at: Date | null;
                }[];
                payment_sessions: /*elided*/ any[];
                payments: /*elided*/ any[];
                raw_amount: Record<string, unknown>;
                raw_authorized_amount: Record<string, unknown> | null;
                raw_captured_amount: Record<string, unknown> | null;
                raw_refunded_amount: Record<string, unknown> | null;
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
            };
            payment: /*elided*/ any;
            metadata: Record<string, unknown> | null;
            raw_amount: Record<string, unknown>;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
            payment_collection_id: string;
        };
        refunds: {
            id: string;
            amount: number;
            payment: /*elided*/ any;
            refund_reason: {
                id: string;
                label: string;
                code: string;
                description: string | null;
                metadata: Record<string, unknown> | null;
                refunds: /*elided*/ any[];
                created_at: Date;
                updated_at: Date;
                deleted_at: Date | null;
            };
            note: string | null;
            created_by: string | null;
            metadata: Record<string, unknown> | null;
            raw_amount: Record<string, unknown>;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
            payment_id: string;
            refund_reason_id: string | null;
        }[];
        captures: {
            id: string;
            amount: number;
            payment: /*elided*/ any;
            metadata: Record<string, unknown> | null;
            created_by: string | null;
            raw_amount: Record<string, unknown>;
            created_at: Date;
            updated_at: Date;
            deleted_at: Date | null;
            payment_id: string;
        }[];
        raw_amount: Record<string, unknown>;
        created_at: Date;
        updated_at: Date;
        deleted_at: Date | null;
        payment_collection_id: string;
        payment_session_id: string;
    }>;
    cancelPayment(paymentId: string, sharedContext?: Context): Promise<PaymentDTO>;
    protected maybeUpdatePaymentCollection_(paymentCollectionId: string, sharedContext?: Context): Promise<void>;
    listPaymentProviders(filters?: FilterablePaymentProviderProps, config?: FindConfig<PaymentProviderDTO>, sharedContext?: Context): Promise<PaymentProviderDTO[]>;
    listAndCountPaymentProviders(filters?: FilterablePaymentProviderProps, config?: FindConfig<PaymentProviderDTO>, sharedContext?: Context): Promise<[PaymentProviderDTO[], number]>;
    createAccountHolder(input: CreateAccountHolderDTO, sharedContext?: Context): Promise<AccountHolderDTO>;
    updateAccountHolder(input: UpdateAccountHolderDTO, sharedContext?: Context): Promise<AccountHolderDTO>;
    deleteAccountHolder(id: string, sharedContext?: Context): Promise<void>;
    listPaymentMethods(filters: FilterablePaymentMethodProps, config?: FindConfig<PaymentMethodDTO>, sharedContext?: Context): Promise<PaymentMethodDTO[]>;
    listAndCountPaymentMethods(filters: FilterablePaymentMethodProps, config?: FindConfig<PaymentMethodDTO>, sharedContext?: Context): Promise<[PaymentMethodDTO[], number]>;
    createPaymentMethods(data: CreatePaymentMethodDTO, sharedContext?: Context): Promise<PaymentMethodDTO>;
    createPaymentMethods(data: CreatePaymentMethodDTO[], sharedContext?: Context): Promise<PaymentMethodDTO[]>;
    getWebhookActionAndData(eventData: ProviderWebhookPayload, sharedContext?: Context): Promise<WebhookActionResult>;
}
export {};
//# sourceMappingURL=payment-module.d.ts.map