// src/index.ts

import { AxiosRequestConfig } from "axios";

declare module "quick-phonepe" {
  export default class QuickPhonePe {
    constructor(config: {
      merchantId: string;
      saltKey: string;
      keyIndex?: number;
      mode?: "DEV" | "PROD";
    });

    createTransaction(data: TransactionData): Promise<object>;
    verifyTransaction(merchantTransactionId: string): Promise<object>;
  }

  export interface PaymentInstrument {
    type: string;
  }

  export interface TransactionData {
    merchantTransactionId: string;
    merchantUserId: string;
    name: string;
    amount: number;
    redirectUrl: string;
    redirectMode: string;
    mobileNumber: string;
    paymentInstrument: PaymentInstrument;
  }
}
