import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import type { CallContext, CallOptions } from "nice-grpc-common";
import type { FileDescriptorProto as FileDescriptorProto1 } from "ts-proto-descriptors";
import { Subject } from "./auth";
import { OperationStatus, Status } from "./status";
export declare const protobufPackage = "io.restorecommerce.payment";
/** Possible service providers. Provider names must be exactly as in config.yml. */
export declare enum Provider {
    NO_PROVIDER = "NO_PROVIDER",
    Adyen = "Adyen",
    AuthorizeNetCIM = "AuthorizeNetCIM",
    AuthorizeNet = "AuthorizeNet",
    AxcessMS = "AxcessMS",
    Balanced = "Balanced",
    BamboraAsiaPacific = "BamboraAsiaPacific",
    BankFrick = "BankFrick",
    Banwire = "Banwire",
    BarclaysePDQExtraPlus = "BarclaysePDQExtraPlus",
    Be2Bill = "Be2Bill",
    Beanstreamcom = "Beanstreamcom",
    BluePay = "BluePay",
    Borgun = "Borgun",
    Braintree = "Braintree",
    BridgePay = "BridgePay",
    Cardknox = "Cardknox",
    CardSave = "CardSave",
    CardStream = "CardStream",
    Cashnet = "Cashnet",
    Cecabank = "Cecabank",
    Cenpos = "Cenpos",
    CAMSCentralAccountManagementSystem = "CAMSCentralAccountManagementSystem",
    Checkoutcom = "Checkoutcom",
    Clearhaus = "Clearhaus",
    Commercegate = "Commercegate",
    Conekta = "Conekta",
    CyberSource = "CyberSource",
    DIBS = "DIBS",
    DataCash = "DataCash",
    Efsnet = "Efsnet",
    ElavonMyVirtualMerchant = "ElavonMyVirtualMerchant",
    ePay = "ePay",
    EVOCanada = "EVOCanada",
    eWAY = "eWAY",
    eWAYRapid = "eWAYRapid",
    Exact = "Exact",
    Ezic = "Ezic",
    FatZebra = "FatZebra",
    FederatedCanada = "FederatedCanada",
    FinansbankWebPOS = "FinansbankWebPOS",
    Flo2Cash = "Flo2Cash",
    stPayGatewayNet = "stPayGatewayNet",
    FirstDataGlobalGatewaye4 = "FirstDataGlobalGatewaye4",
    FirstGiving = "FirstGiving",
    GarantiSanalPOS = "GarantiSanalPOS",
    GlobalTransport = "GlobalTransport",
    HDFC = "HDFC",
    HeartlandPaymentSystems = "HeartlandPaymentSystems",
    iATSPayments = "iATSPayments",
    InspireCommerce = "InspireCommerce",
    InstaPay = "InstaPay",
    IPP = "IPP",
    Iridium = "Iridium",
    iTransact = "iTransact",
    JetPay = "JetPay",
    Komoju = "Komoju",
    LinkPoint = "LinkPoint",
    LitleCo = "LitleCo",
    maxiPago = "maxiPago",
    MerchanteSolutions = "MerchanteSolutions",
    MerchantOneGateway = "MerchantOneGateway",
    MerchantWARE = "MerchantWARE",
    MerchantWarrior = "MerchantWarrior",
    Mercury = "Mercury",
    MetricsGlobal = "MetricsGlobal",
    MasterCardInternetGatewayServiceMiGS = "MasterCardInternetGatewayServiceMiGS",
    ModernPayments = "ModernPayments",
    MONEI = "MONEI",
    Moneris = "Moneris",
    MoneyMovers = "MoneyMovers",
    NABTransact = "NABTransact",
    NELiXTransaX = "NELiXTransaX",
    NetRegistry = "NetRegistry",
    BBSNetaxept = "BBSNetaxept",
    NETbilling = "NETbilling",
    NETPAYGateway = "NETPAYGateway",
    NMI = "NMI",
    Ogone = "Ogone",
    Omise = "Omise",
    Openpay = "Openpay",
    OptimalPayments = "OptimalPayments",
    OrbitalPaymentech = "OrbitalPaymentech",
    Pagarme = "Pagarme",
    PagoFacil = "PagoFacil",
    PayConex = "PayConex",
    PayGatePayXML = "PayGatePayXML",
    PayHub = "PayHub",
    PayJunction = "PayJunction",
    PaySecure = "PaySecure",
    PayboxDirect = "PayboxDirect",
    Payeezy = "Payeezy",
    Payex = "Payex",
    PaymentExpress = "PaymentExpress",
    PAYMILL = "PAYMILL",
    PayPalExpressCheckout = "PayPalExpressCheckout",
    PayPalExpressCheckoutUK = "PayPalExpressCheckoutUK",
    PayPalPayflowPro = "PayPalPayflowPro",
    PayPalPaymentsProUS = "PayPalPaymentsProUS",
    PayPalPaymentsProUK = "PayPalPaymentsProUK",
    PayPalWebsitePaymentsProCA = "PayPalWebsitePaymentsProCA",
    PayPalExpressCheckoutforDigitalGoods = "PayPalExpressCheckoutforDigitalGoods",
    Payscout = "Payscout",
    Paystation = "Paystation",
    PayWay = "PayWay",
    PayUIndia = "PayUIndia",
    PinPayments = "PinPayments",
    PlugnPay = "PlugnPay",
    Psigate = "Psigate",
    PSLPaymentSolutions = "PSLPaymentSolutions",
    QuickBooksMerchantServices = "QuickBooksMerchantServices",
    QuickBooksPayments = "QuickBooksPayments",
    QuantumGateway = "QuantumGateway",
    QuickPay = "QuickPay",
    Qvalent = "Qvalent",
    Raven = "Raven",
    Realex = "Realex",
    Redsys = "Redsys",
    S5 = "S5",
    SagePay = "SagePay",
    SagePaymentSolutions = "SagePaymentSolutions",
    SallieMae = "SallieMae",
    SecureNet = "SecureNet",
    SecurePay = "SecurePay",
    SecurePayTech = "SecurePayTech",
    SecurionPay = "SecurionPay",
    SkipJack = "SkipJack",
    SoEasyPay = "SoEasyPay",
    Spreedly = "Spreedly",
    Stripe = "Stripe",
    Swipe = "Swipe",
    TNS = "TNS",
    TransactPro = "TransactPro",
    TransFirst = "TransFirst",
    Transnational = "Transnational",
    Trexle = "Trexle",
    TrustCommerce = "TrustCommerce",
    USAePay = "USAePay",
    VancoPaymentSolutions = "VancoPaymentSolutions",
    Verifi = "Verifi",
    ViaKLIX = "ViaKLIX",
    WebPay = "WebPay",
    WePay = "WePay",
    Wirecard = "Wirecard",
    WorldpayGlobal = "WorldpayGlobal",
    WorldpayOnline = "WorldpayOnline",
    WorldpayUS = "WorldpayUS",
    UNRECOGNIZED = "UNRECOGNIZED"
}
export declare function providerFromJSON(object: any): Provider;
export declare function providerToJSON(object: Provider): string;
export declare function providerToNumber(object: Provider): number;
/** Possible payment identifiers. */
export declare enum PaymentIdType {
    NO_IDENTIFIER_TYPE = "NO_IDENTIFIER_TYPE",
    TOKEN = "TOKEN",
    TRANSACTION_ID = "TRANSACTION_ID",
    UNRECOGNIZED = "UNRECOGNIZED"
}
export declare function paymentIdTypeFromJSON(object: any): PaymentIdType;
export declare function paymentIdTypeToJSON(object: PaymentIdType): string;
export declare function paymentIdTypeToNumber(object: PaymentIdType): number;
/** Request object for setup calls */
export interface SetupRequest {
    ip?: string | undefined;
    items?: Item[] | undefined;
    subtotal?: number | undefined;
    shipping?: number | undefined;
    handling?: number | undefined;
    tax?: number | undefined;
    currency?: string | undefined;
    return_url?: string | undefined;
    cancel_return_url?: string | undefined;
    allow_guest_checkout?: boolean | undefined;
    provider?: Provider | undefined;
    subject?: Subject | undefined;
}
export interface SetupPayload {
    token?: string | undefined;
    confirm_initiation_url?: string | undefined;
    initiated_on?: string | undefined;
}
export interface SetupPayloadStatus {
    payload?: SetupPayload | undefined;
    status?: Status | undefined;
}
/** Response object for setup calls. */
export interface SetupResponse {
    item?: SetupPayloadStatus | undefined;
    operation_status?: OperationStatus | undefined;
}
/** Request object for authorization or purchase call for cardless payment. */
export interface PaymentRequest {
    provider?: Provider | undefined;
    payment_sum?: number | undefined;
    currency?: string | undefined;
    payment_id?: string | undefined;
    payer_id?: string | undefined;
    token?: string | undefined;
    subject?: Subject | undefined;
}
/** Request object for capture call for both standard and cardless payments. */
export interface CaptureRequest {
    provider?: Provider | undefined;
    payment_sum?: number | undefined;
    currency?: string | undefined;
    payment_id?: string | undefined;
    subject?: Subject | undefined;
}
export interface PaymentPayload {
    payment_id?: string | undefined;
    executed_on?: string | undefined;
}
export interface PaymentPayloadStatus {
    payload?: PaymentPayload | undefined;
    status?: Status | undefined;
}
/**
 * Unified response object for authorization, purchase and capture calls
 * for both standard and cardless payments.
 */
export interface PaymentResponse {
    item?: PaymentPayloadStatus | undefined;
    operation_status?: OperationStatus | undefined;
}
/** Used for building ActiveMerchant::Billing::CreditCard instance. */
export interface PaymentCard {
    primary_number?: string | undefined;
    first_name?: string | undefined;
    last_name?: string | undefined;
    month?: string | undefined;
    year?: number | undefined;
    verification_value?: string | undefined;
}
/** Represents purchased item. Not all providers support this. */
export interface Item {
    name?: string | undefined;
    description?: string | undefined;
    quantity?: number | undefined;
    amount?: number | undefined;
}
export declare const SetupRequest: MessageFns<SetupRequest>;
export declare const SetupPayload: MessageFns<SetupPayload>;
export declare const SetupPayloadStatus: MessageFns<SetupPayloadStatus>;
export declare const SetupResponse: MessageFns<SetupResponse>;
export declare const PaymentRequest: MessageFns<PaymentRequest>;
export declare const CaptureRequest: MessageFns<CaptureRequest>;
export declare const PaymentPayload: MessageFns<PaymentPayload>;
export declare const PaymentPayloadStatus: MessageFns<PaymentPayloadStatus>;
export declare const PaymentResponse: MessageFns<PaymentResponse>;
export declare const PaymentCard: MessageFns<PaymentCard>;
export declare const Item: MessageFns<Item>;
export type PaymentServiceDefinition = typeof PaymentServiceDefinition;
export declare const PaymentServiceDefinition: {
    readonly name: "PaymentService";
    readonly fullName: "io.restorecommerce.payment.PaymentService";
    readonly methods: {
        /** Wrapper for setup_authorization in ActiveMerchant */
        readonly setupAuthorization: {
            readonly name: "SetupAuthorization";
            readonly requestType: typeof SetupRequest;
            readonly requestStream: false;
            readonly responseType: typeof SetupResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Wrapper for setup_purchase in ActiveMerchant */
        readonly setupPurchase: {
            readonly name: "SetupPurchase";
            readonly requestType: typeof SetupRequest;
            readonly requestStream: false;
            readonly responseType: typeof SetupResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Gets payment details by token or transaction. Only supported by PayPal Express Checkout. */
        readonly authorize: {
            readonly name: "Authorize";
            readonly requestType: typeof PaymentRequest;
            readonly requestStream: false;
            readonly responseType: typeof PaymentResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Gets payment details by token or transaction. Only supported by PayPal Express Checkout. */
        readonly purchase: {
            readonly name: "Purchase";
            readonly requestType: typeof PaymentRequest;
            readonly requestStream: false;
            readonly responseType: typeof PaymentResponse;
            readonly responseStream: false;
            readonly options: {};
        };
        /** Can capture both cardless and standard authorization. */
        readonly capture: {
            readonly name: "Capture";
            readonly requestType: typeof CaptureRequest;
            readonly requestStream: false;
            readonly responseType: typeof PaymentResponse;
            readonly responseStream: false;
            readonly options: {};
        };
    };
};
export interface PaymentServiceImplementation<CallContextExt = {}> {
    /** Wrapper for setup_authorization in ActiveMerchant */
    setupAuthorization(request: SetupRequest, context: CallContext & CallContextExt): Promise<DeepPartial<SetupResponse>>;
    /** Wrapper for setup_purchase in ActiveMerchant */
    setupPurchase(request: SetupRequest, context: CallContext & CallContextExt): Promise<DeepPartial<SetupResponse>>;
    /** Gets payment details by token or transaction. Only supported by PayPal Express Checkout. */
    authorize(request: PaymentRequest, context: CallContext & CallContextExt): Promise<DeepPartial<PaymentResponse>>;
    /** Gets payment details by token or transaction. Only supported by PayPal Express Checkout. */
    purchase(request: PaymentRequest, context: CallContext & CallContextExt): Promise<DeepPartial<PaymentResponse>>;
    /** Can capture both cardless and standard authorization. */
    capture(request: CaptureRequest, context: CallContext & CallContextExt): Promise<DeepPartial<PaymentResponse>>;
}
export interface PaymentServiceClient<CallOptionsExt = {}> {
    /** Wrapper for setup_authorization in ActiveMerchant */
    setupAuthorization(request: DeepPartial<SetupRequest>, options?: CallOptions & CallOptionsExt): Promise<SetupResponse>;
    /** Wrapper for setup_purchase in ActiveMerchant */
    setupPurchase(request: DeepPartial<SetupRequest>, options?: CallOptions & CallOptionsExt): Promise<SetupResponse>;
    /** Gets payment details by token or transaction. Only supported by PayPal Express Checkout. */
    authorize(request: DeepPartial<PaymentRequest>, options?: CallOptions & CallOptionsExt): Promise<PaymentResponse>;
    /** Gets payment details by token or transaction. Only supported by PayPal Express Checkout. */
    purchase(request: DeepPartial<PaymentRequest>, options?: CallOptions & CallOptionsExt): Promise<PaymentResponse>;
    /** Can capture both cardless and standard authorization. */
    capture(request: DeepPartial<CaptureRequest>, options?: CallOptions & CallOptionsExt): Promise<PaymentResponse>;
}
type ProtoMetaMessageOptions = {
    options?: {
        [key: string]: any;
    };
    fields?: {
        [key: string]: {
            [key: string]: any;
        };
    };
    oneof?: {
        [key: string]: {
            [key: string]: any;
        };
    };
    nested?: {
        [key: string]: ProtoMetaMessageOptions;
    };
};
export interface ProtoMetadata {
    fileDescriptor: FileDescriptorProto1;
    references: {
        [key: string]: any;
    };
    dependencies?: ProtoMetadata[];
    options?: {
        options?: {
            [key: string]: any;
        };
        services?: {
            [key: string]: {
                options?: {
                    [key: string]: any;
                };
                methods?: {
                    [key: string]: {
                        [key: string]: any;
                    };
                };
            };
        };
        messages?: {
            [key: string]: ProtoMetaMessageOptions;
        };
        enums?: {
            [key: string]: {
                options?: {
                    [key: string]: any;
                };
                values?: {
                    [key: string]: {
                        [key: string]: any;
                    };
                };
            };
        };
    };
}
export declare const protoMetadata: ProtoMetadata;
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export interface MessageFns<T> {
    encode(message: T, writer?: BinaryWriter): BinaryWriter;
    decode(input: BinaryReader | Uint8Array, length?: number): T;
    fromJSON(object: any): T;
    toJSON(message: T): unknown;
    create(base?: DeepPartial<T>): T;
    fromPartial(object: DeepPartial<T>): T;
}
export {};
//# sourceMappingURL=payment.d.ts.map