import { StandardResponse } from '@jolibox/types'; import type { IPlaceSubscriptionOrderResponse } from './type'; import { UserPaymentError, InternalPaymentError } from '@jolibox/common'; type SubscriptionStatus = 'INIT' | 'PENDING' | 'SUCCESS' | 'FAILED'; declare const createSubscriptionError: (errMsg: string, errNo: number, extra?: Record) => UserPaymentError | InternalPaymentError, createSubscriptionInternalError: (errMsg: string, errNo: number, extra?: Record) => UserPaymentError | InternalPaymentError; export { createSubscriptionError, createSubscriptionInternalError }; export declare abstract class BaseSubscriptionRegister, E extends Record, R = void> { private _orderId; private _orderStatus; startSubscription: (params: T) => Promise>; protected generateCallbackUrl: () => string; protected setOrderId(orderId: string): void; protected setOrderStatus(status: SubscriptionStatus): void; protected createSubscriptionError: (errMsg: string, errNo: number, extra?: Record) => UserPaymentError | InternalPaymentError; protected createSubscriptionInternalError: (errMsg: string, errNo: number, extra?: Record) => UserPaymentError | InternalPaymentError; abstract placeOrder(params: T): Promise>>; abstract cancelOrder(orderId: string): Promise>; abstract generateSubscriptionContext(): Record; abstract subscribe(params: T): Promise>; get orderId(): string | null; get status(): SubscriptionStatus; }