import { BillingKeyError } from "./BillingKeyError.js";
import type { Unrecognized } from "./../../../utils/unrecognized.js";
import { type PortOneClientInit } from "../../../client.js";
import type { BillingKeyAlreadyDeletedError } from "../../../generated/common/BillingKeyAlreadyDeletedError.js";
import type { BillingKeyAlreadyIssuedError } from "../../../generated/payment/billingKey/BillingKeyAlreadyIssuedError.js";
import type { BillingKeyDeleteRequester } from "../../../generated/payment/billingKey/BillingKeyDeleteRequester.js";
import type { BillingKeyFilterInput } from "../../../generated/payment/billingKey/BillingKeyFilterInput.js";
import type { BillingKeyInfo } from "../../../generated/payment/billingKey/BillingKeyInfo.js";
import type { BillingKeyNotFoundError } from "../../../generated/common/BillingKeyNotFoundError.js";
import type { BillingKeyNotIssuedError } from "../../../generated/payment/billingKey/BillingKeyNotIssuedError.js";
import type { BillingKeySortInput } from "../../../generated/payment/billingKey/BillingKeySortInput.js";
import type { ChannelNotFoundError } from "../../../generated/common/ChannelNotFoundError.js";
import type { ChannelSpecificError } from "../../../generated/payment/billingKey/ChannelSpecificError.js";
import type { ConfirmedBillingKeyIssueAndPaySummary } from "../../../generated/payment/billingKey/ConfirmedBillingKeyIssueAndPaySummary.js";
import type { ConfirmedBillingKeySummary } from "../../../generated/payment/billingKey/ConfirmedBillingKeySummary.js";
import type { Currency } from "../../../generated/common/Currency.js";
import type { CustomerInput } from "../../../generated/common/CustomerInput.js";
import type { DeleteBillingKeyResponse } from "../../../generated/payment/billingKey/DeleteBillingKeyResponse.js";
import type { ForbiddenError } from "../../../generated/common/ForbiddenError.js";
import type { GetBillingKeyInfosResponse } from "../../../generated/payment/billingKey/GetBillingKeyInfosResponse.js";
import type { InformationMismatchError } from "../../../generated/common/InformationMismatchError.js";
import type { InstantBillingKeyPaymentMethodInput } from "../../../generated/payment/billingKey/InstantBillingKeyPaymentMethodInput.js";
import type { InvalidRequestError } from "../../../generated/common/InvalidRequestError.js";
import type { IssueBillingKeyResponse } from "../../../generated/payment/billingKey/IssueBillingKeyResponse.js";
import type { PageInput } from "../../../generated/common/PageInput.js";
import type { PaymentScheduleAlreadyExistsError } from "../../../generated/common/PaymentScheduleAlreadyExistsError.js";
import type { PgProviderError } from "../../../generated/common/PgProviderError.js";
import type { UnauthorizedError } from "../../../generated/common/UnauthorizedError.js";
/**
 * 포트원 API 클라이언트를 생성합니다.
 */
export declare function BillingKeyClient(init: PortOneClientInit): BillingKeyClient;
export type BillingKeyClient = {
    /**
     * 빌링키 다건 조회
     *
     * 주어진 조건에 맞는 빌링키들을 페이지 기반으로 조회합니다.
     *
     * @throws {@link GetBillingKeyInfosError}
     */
    getBillingKeyInfos: (options?: {
        /**
         * 요청할 페이지 정보
         *
         * 미 입력 시 number: 0, size: 10 으로 기본값이 적용됩니다.
         */
        page?: PageInput;
        /**
         * 정렬 조건
         *
         * 미 입력 시 sortBy: TIME_TO_PAY, sortOrder: DESC 으로 기본값이 적용됩니다.
         */
        sort?: BillingKeySortInput;
        /**
         * 조회할 빌링키 조건 필터
         *
         * V1 빌링키 건의 경우 일부 필드에 대해 필터가 적용되지 않을 수 있습니다.
         */
        filter?: BillingKeyFilterInput;
    }) => Promise<GetBillingKeyInfosResponse>;
    /**
     * 빌링키 발급
     *
     * 빌링키 발급을 요청합니다.
     *
     * @throws {@link IssueBillingKeyError}
     */
    issueBillingKey: (options: {
        /**
         * 상점 아이디
         *
         * 접근 권한이 있는 상점 아이디만 입력 가능하며, 미입력시 인증 정보의 상점 아이디를 사용합니다.
         */
        storeId?: string;
        /** 빌링키 결제 수단 정보 */
        method: InstantBillingKeyPaymentMethodInput;
        /**
         * 채널 키
         *
         * 채널 키 또는 채널 그룹 ID 필수
         */
        channelKey?: string;
        /**
         * 채널 그룹 ID
         *
         * 채널 키 또는 채널 그룹 ID 필수
         */
        channelGroupId?: string;
        /** 고객 정보 */
        customer?: CustomerInput;
        /** 사용자 지정 데이터 */
        customData?: string;
        /** PG사별 추가 파라미터 ("PG사별 연동 가이드" 참고) */
        bypass?: object;
        /**
         * 웹훅 주소
         *
         * 빌링키 발급 시 요청을 받을 웹훅 주소입니다.
         * 상점에 설정되어 있는 값보다 우선적으로 적용됩니다.
         * 입력된 값이 없을 경우에는 빈 배열로 해석됩니다.
         */
        noticeUrls?: string[];
    }) => Promise<IssueBillingKeyResponse>;
    /**
     * 빌링키 발급 수동 승인
     *
     * 수동 승인으로 설정된 빌링키 발급에 대해, 빌링키 발급을 완료 처리합니다.
     *
     * @throws {@link ConfirmBillingKeyError}
     */
    confirmBillingKey: (options: {
        /**
         * 상점 아이디
         *
         * 접근 권한이 있는 상점 아이디만 입력 가능하며, 미입력시 인증 정보의 상점 아이디를 사용합니다.
         */
        storeId?: string;
        /**
         * 빌링키 발급 토큰
         *
         * 빌링키 발급 요청 완료 시 발급된 토큰입니다.
         */
        billingIssueToken: string;
        /**
         * 테스트 결제 여부
         *
         * 검증용 파라미터로, 결제 건 테스트 여부와 일치하지 않을 경우 오류가 반환됩니다.
         */
        isTest?: boolean;
    }) => Promise<ConfirmedBillingKeySummary>;
    /**
     * 빌링키 발급 및 초회 결제 수동 승인
     *
     * 수동 승인으로 설정된 빌링키 발급 및 초회 결제에 대해, 빌링키 발급과 결제를 완료 처리합니다.
     *
     * @throws {@link ConfirmBillingKeyIssueAndPayError}
     */
    confirmBillingKeyIssueAndPay: (options: {
        /**
         * 상점 아이디
         *
         * 접근 권한이 있는 상점 아이디만 입력 가능하며, 미입력시 인증 정보의 상점 아이디를 사용합니다.
         */
        storeId?: string;
        /**
         * 빌링키 발급 토큰
         *
         * 빌링키 발급 및 초회 결제 요청 완료 시 발급된 토큰입니다.
         */
        billingIssueToken: string;
        /**
         * 결제 건 아이디
         *
         * 검증용 파라미터로, 결제 건 아이디와 일치하지 않을 경우 오류가 반환됩니다.
         */
        paymentId?: string;
        /**
         * 통화
         *
         * 검증용 파라미터로, 결제 건 화폐와 일치하지 않을 경우 오류가 반환됩니다.
         */
        currency?: Currency;
        /**
         * 결제 금액
         *
         * 검증용 파라미터로, 결제 건 총 금액과 일치하지 않을 경우 오류가 반환됩니다.
         * (int64)
         */
        totalAmount?: number;
        /**
         * 면세 금액
         *
         * 검증용 파라미터로, 결제 건 면세 금액과 일치하지 않을 경우 오류가 반환됩니다.
         * (int64)
         */
        taxFreeAmount?: number;
        /**
         * 테스트 결제 여부
         *
         * 검증용 파라미터로, 결제 건 테스트 여부와 일치하지 않을 경우 오류가 반환됩니다.
         */
        isTest?: boolean;
    }) => Promise<ConfirmedBillingKeyIssueAndPaySummary>;
    /**
     * 빌링키 단건 조회
     *
     * 주어진 빌링키에 대응되는 빌링키 정보를 조회합니다.
     *
     * @throws {@link GetBillingKeyInfoError}
     */
    getBillingKeyInfo: (options: {
        /** 조회할 빌링키 */
        billingKey: string;
        /**
         * 상점 아이디
         *
         * 접근 권한이 있는 상점 아이디만 입력 가능하며, 미입력시 인증 정보의 상점 아이디를 사용합니다.
         */
        storeId?: string;
    }) => Promise<BillingKeyInfo>;
    /**
     * 빌링키 삭제
     *
     * 빌링키를 삭제합니다.
     *
     * @throws {@link DeleteBillingKeyError}
     */
    deleteBillingKey: (options: {
        /** 삭제할 빌링키 */
        billingKey: string;
        /**
         * 상점 아이디
         *
         * 접근 권한이 있는 상점 아이디만 입력 가능하며, 미입력시 인증 정보의 상점 아이디를 사용합니다.
         */
        storeId?: string;
        /**
         * 사유
         *
         * 네이버페이: 자동결제 해지 사유입니다. 명시가 필요합니다.
         */
        reason?: string;
        /**
         * 요청 주체
         *
         * 네이버페이: 자동결제 해지 요청 주체입니다. 명시가 필요합니다.
         */
        requester?: BillingKeyDeleteRequester;
    }) => Promise<DeleteBillingKeyResponse>;
};
export declare class GetBillingKeyInfosError extends BillingKeyError {
    readonly data: ForbiddenError | InvalidRequestError | UnauthorizedError | {
        readonly type: Unrecognized;
    };
    /** @ignore */
    constructor(data: ForbiddenError | InvalidRequestError | UnauthorizedError | {
        readonly type: Unrecognized;
    });
}
export declare class IssueBillingKeyError extends BillingKeyError {
    readonly data: ChannelNotFoundError | ChannelSpecificError | ForbiddenError | InvalidRequestError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    };
    /** @ignore */
    constructor(data: ChannelNotFoundError | ChannelSpecificError | ForbiddenError | InvalidRequestError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    });
}
export declare class ConfirmBillingKeyError extends BillingKeyError {
    readonly data: BillingKeyAlreadyIssuedError | BillingKeyNotFoundError | ForbiddenError | InformationMismatchError | InvalidRequestError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    };
    /** @ignore */
    constructor(data: BillingKeyAlreadyIssuedError | BillingKeyNotFoundError | ForbiddenError | InformationMismatchError | InvalidRequestError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    });
}
export declare class ConfirmBillingKeyIssueAndPayError extends BillingKeyError {
    readonly data: BillingKeyAlreadyIssuedError | BillingKeyNotFoundError | ForbiddenError | InformationMismatchError | InvalidRequestError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    };
    /** @ignore */
    constructor(data: BillingKeyAlreadyIssuedError | BillingKeyNotFoundError | ForbiddenError | InformationMismatchError | InvalidRequestError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    });
}
export declare class GetBillingKeyInfoError extends BillingKeyError {
    readonly data: BillingKeyNotFoundError | ForbiddenError | InvalidRequestError | UnauthorizedError | {
        readonly type: Unrecognized;
    };
    /** @ignore */
    constructor(data: BillingKeyNotFoundError | ForbiddenError | InvalidRequestError | UnauthorizedError | {
        readonly type: Unrecognized;
    });
}
export declare class DeleteBillingKeyError extends BillingKeyError {
    readonly data: BillingKeyAlreadyDeletedError | BillingKeyNotFoundError | BillingKeyNotIssuedError | ChannelSpecificError | ForbiddenError | InvalidRequestError | PaymentScheduleAlreadyExistsError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    };
    /** @ignore */
    constructor(data: BillingKeyAlreadyDeletedError | BillingKeyNotFoundError | BillingKeyNotIssuedError | ChannelSpecificError | ForbiddenError | InvalidRequestError | PaymentScheduleAlreadyExistsError | PgProviderError | UnauthorizedError | {
        readonly type: Unrecognized;
    });
}
