import type { WalletApiOptions } from "./wallet.options"; import { WalletBillsApi } from "./bills.api"; import { WalletCardsApi } from "./cards.api"; import { WalletFundingSourcesApi } from "./funding-sources.api"; import { WalletIdentificationApi } from "./identification.api"; import { WalletLimitsApi } from "./limits.api"; import { WalletPaymentHistoryApi } from "./payment-history.api"; import { WalletPaymentsApi } from "./payments.api"; import { WalletPersonProfileApi } from "./person-profile.api"; import { WalletRestrictionsApi } from "./restrictions.api"; import { WalletWebhooksApi } from "./webhooks.api"; import { PersonIdentificationLevel, TransactionType, TransactionStatus, Currency, ChequeFormat, Recipients, PaymentHistorySource, LimitType, CardStatus, CardActionStatus, PrettyTokenResponse } from "./wallet.types"; import { ApiClass } from "../api"; import { WalletProvidersApi } from "./providers.api"; import { SimpleJsonHttp } from "../shared/http"; import { WalletNicknameApi } from "./nickname.api"; import { WalletOauthApi } from "./oauth.api"; /** * @callback SetupHttp * @param {SimpleJsonHttp} http * @return {void} nothing */ type SetupHttp = (http: SimpleJsonHttp) => void; type CreateAndFetchWalletIdParameters = { setupHttp?: SetupHttp; }; /** * # API Кошелька * [Документация QIWI](https://developer.qiwi.com/ru/qiwi-wallet-personal/) * * @export * @class Wallet */ export declare class Wallet extends ApiClass { static readonly PersonIdentificationLevel: typeof PersonIdentificationLevel; static readonly TransactionType: typeof TransactionType; static readonly TransactionStatus: typeof TransactionStatus; static readonly Currency: typeof Currency; static readonly ChequeFormat: typeof ChequeFormat; static readonly Recipients: typeof Recipients; static readonly PaymentHistorySource: typeof PaymentHistorySource; static readonly LimitType: typeof LimitType; static readonly CardStatus: typeof CardStatus; static readonly CardActionStatus: typeof CardActionStatus; static readonly IdentificationLevel: typeof PersonIdentificationLevel; static readonly ReceiptFormat: typeof ChequeFormat; static readonly PersonProfileApi: typeof WalletPersonProfileApi; static readonly IdentificationApi: typeof WalletIdentificationApi; static readonly LimitsApi: typeof WalletLimitsApi; static readonly RestrictionsApi: typeof WalletRestrictionsApi; static readonly PaymentHistoryApi: typeof WalletPaymentHistoryApi; static readonly FundingSourcesApi: typeof WalletFundingSourcesApi; static readonly CardsApi: typeof WalletCardsApi; static readonly PaymentsApi: typeof WalletPaymentsApi; static readonly BillsApi: typeof WalletBillsApi; static readonly WebhooksApi: typeof WalletWebhooksApi; static readonly ProvidersApi: typeof WalletProvidersApi; static readonly NicknameApi: typeof WalletNicknameApi; static readonly OauthApi: typeof WalletOauthApi; /** * * * @static * @param {string} token * @return {SimpleJsonHttp} SimpleJsonHttp * @memberof Wallet */ static httpClientFactory: (token: string) => SimpleJsonHttp; /** * Создаёт экземпляр класса. * * Если используете с переменными окружения, то: * - Переименуйте переменную с токеном в `QIWI_TOKEN` * - Переименуйте переменную с номером кошелька (если есть) в `QIWI_WALLET` * - Используйте статический метод {@link Wallet.env} вместо этого * * * @static * @param {string} token * @param {string} [walletId=""] * @return {Wallet} Wallet * @memberof Wallet */ static create(token: string, walletId?: string): Wallet; /** * Подхватывает токен из переменной окружения `QIWI_TOKEN` и * номер телефона из переменной `QIWI_WALLET` и использует их * для создания экземпляра * * @static * @param {string} [token=process.env.QIWI_TOKEN] * @param {string} [walletId=process.env.QIWI_WALLET] * @return {Wallet} Wallet * @memberof Wallet */ static env(token?: string, walletId?: string): Wallet; /** * Автоматически подтягивает номер телефона из API QIWI. * Номер телефона требуется для вызова большинства методов из * классов API: * * - {@link Wallet.IdentificationApi} * - {@link Wallet.LimitsApi} * - {@link Wallet.RestrictionsApi} * - {@link Wallet.PaymentHistoryApi} * - {@link Wallet.FundingSourcesApi} * - {@link Wallet.CardsApi} * * @static * @param {string} token * @return {Promise} Promise * @memberof Wallet */ static createAndFetchWalletId(token: string, { setupHttp }?: CreateAndFetchWalletIdParameters): Promise; /** * Creates an instance of Wallet. * @param {WalletApiOptions} [options] * @memberof Wallet */ constructor({ token, walletId, http }?: Partial); readonly personProfile: WalletPersonProfileApi; readonly identification: WalletIdentificationApi; readonly limits: WalletLimitsApi; readonly restrictions: WalletRestrictionsApi; readonly paymentHistory: WalletPaymentHistoryApi; readonly fundingSources: WalletFundingSourcesApi; readonly cards: WalletCardsApi; readonly payments: WalletPaymentsApi; readonly bills: WalletBillsApi; readonly webhooks: WalletWebhooksApi; readonly providers: WalletProvidersApi; readonly nickname: WalletNicknameApi; readonly oauth: WalletOauthApi; /** * Создаёт токен с увеличенным сроком действия (10 лет) * * [Документация](https://developer.qiwi.com/ru/qiwi-wallet-personal-advanced/) */ createOauthToken(): Promise>; } export {};