import { BaseApi, ClientParams } from './baseApi';
import { PluggyPaymentsClient } from './paymentsClient';
import { Account, AccountType, Category, Connector, ConnectorFilters, ConnectTokenOptions, Consent, ConsentFilters, CreateItemOptions, CreateWebhook, IdentityResponse, Investment, InvestmentTransaction, InvestmentType, Item, ItemResource, ItemResourceFilters, ItemCursorFilters, CursorPageResponse, PageResponse, Parameters, Transaction, TransactionCursorFilters, TransactionFilters, UpdateWebhook, Webhook, Loan, PageFilters, InvestmentsFilters, AccountStatement, ScrFilters, ScrResponse, MerchantsResponse, ClientCategoryRule, CreateClientCategoryRule, BoletoConnection, CreateBoletoConnection, CreateBoletoConnectionFromItem, CreateBoleto, IssuedBoleto } from './types';
import { CreditCardBills } from './types/creditCardBills';
import { ValidationResult } from './types/validation';
/**
 * Creates a new client instance for interacting with Pluggy API
 * @constructor
 * @param API_KEY for authenticating to the API
 * @returns {PluggyClient} a client for making requests
 */
export declare class PluggyClient extends BaseApi {
    payments: PluggyPaymentsClient;
    constructor(params: ClientParams);
    /**
     * Fetch all available connectors
     * @returns {PageResponse<Connector>} paged response of connectors
     */
    fetchConnectors(options?: ConnectorFilters): Promise<PageResponse<Connector>>;
    /**
     * Fetch a single Connector
     * @param id The Connector ID
     * @returns {Connector} a connector object
     */
    fetchConnector(id: number): Promise<Connector>;
    /**
     * Fetch a single item
     * @param id The Item ID
     * @returns {Item} a item object
     */
    fetchItem(id: string): Promise<Item>;
    /**
     * Fetch a single page of the team's items using cursor-based pagination (`GET /v2/items`),
     * newest first.
     *
     * ⚠️ Opt-in, paid plans only. Listing items is disabled by default and is only available to
     * paid-plan teams that have explicitly requested it from Pluggy support. Teams without it
     * enabled get `403 LIST_ITEMS_FEATURE_NOT_ENABLED`. For most integrations, store each `itemId`
     * when it is created (Pluggy Connect `onSuccess` or the `item/created` webhook) and use
     * {@link fetchItem} instead.
     *
     * @param {ItemCursorFilters} options Optional filters (clientUserId, connectorId, after cursor)
     * @returns {CursorPageResponse<Item>} object with results and the `next` page query string
     *   (e.g. `?connectorId=1&after=<cursor>`), or null on the last page
     */
    fetchItemsCursor(options?: ItemCursorFilters): Promise<CursorPageResponse<Item>>;
    /**
     * Fetch all of the team's items, following the cursor across every page (`GET /v2/items`),
     * newest first.
     *
     * ⚠️ Opt-in, paid plans only. Listing items is disabled by default and is only available to
     * paid-plan teams that have explicitly requested it from Pluggy support. Teams without it
     * enabled get `403 LIST_ITEMS_FEATURE_NOT_ENABLED`. For most integrations, store each `itemId`
     * when it is created (Pluggy Connect `onSuccess` or the `item/created` webhook) and use
     * {@link fetchItem} instead.
     *
     * @param {ItemCursorFilters} options Optional filters (clientUserId, connectorId)
     * @returns {Item[]} an array of all matching items
     */
    fetchAllItems(options?: Omit<ItemCursorFilters, 'after'>): Promise<Item[]>;
    /**
     * Check that connector parameters are valid
     * @param id The Connector ID
     * @param parameters A map of name and value for the credentials to be validated
     * @returns {ValidationResult} an object with the info of which parameters are wrong
     */
    validateParameters(id: number, parameters: Parameters): Promise<ValidationResult>;
    /**
     * Creates an item
     * @param connectorId The Connector's id
     * @param parameters A map of name and value for the needed credentials
     * @param options Options available to set to the item
     * @returns {Item} a item object
     */
    createItem(connectorId: number, parameters: Record<string, string>, options?: CreateItemOptions): Promise<Item>;
    /**
     * Updates an item
     * @param id The Item ID
     * @param parameters A map of name and value for the credentials to be updated.
     *                   Optional; if none submitted, an Item update will be attempted with the latest used credentials.
     * @returns {Item} a item object
     */
    updateItem(id: string, parameters?: Parameters, options?: CreateItemOptions): Promise<Item>;
    /**
     * Send MFA for item execution
     * @param id The Item ID
     * @param parameters A map of name and value for the mfa requested
     * @returns {Item} a item object
     */
    updateItemMFA(id: string, parameters?: Parameters): Promise<Item>;
    /**
     * Deletes an item
     */
    deleteItem(id: string): Promise<void>;
    /**
     * Fetch the resources the financial institution declared for an Item's Open Finance consent.
     * Items on non Open Finance connectors return an empty page.
     * An empty list means the institution declared nothing only when the Item's
     * `resourcesCollectedAt` is set; when it is null, the list was never obtained.
     * @param itemId The Item id
     * @param {ItemResourceFilters} options - request search filters (page size defaults to 500)
     * @returns {PageResponse<ItemResource>} paged response of item resources
     */
    fetchItemResources(itemId: string, options?: ItemResourceFilters): Promise<PageResponse<ItemResource>>;
    /**
     * Fetch the SCR (Bacen's Sistema de Informações de Crédito) for the document behind an Item.
     *
     * Opt-in: requires the SCR feature to be enabled for your team (ask Pluggy support); otherwise
     * 403 SCR_FEATURE_NOT_ENABLED. Only available for Open Finance items with a known CPF/CNPJ
     * (otherwise 422 SCR_ITEM_NOT_SUPPORTED).
     *
     * The response is Bacen's own payload, forwarded unchanged. Base dates are months (YYYYMM) and
     * Bacen consolidates each one with a few months of delay: when `from` and `to` are omitted the
     * last 4 available base dates are consulted, ending 2 months before the current one.
     * @param itemId The Item id
     * @param {ScrFilters} options - optional `from` / `to` base dates, as YYYYMM
     * @returns {ScrResponse} the SCR data for the Item's document
     */
    fetchItemScr(itemId: string, options?: ScrFilters): Promise<ScrResponse>;
    /**
     * Fetch accounts from an Item
     * @param itemId The Item id
     * @returns {PageResponse<Account>} paged response of accounts
     */
    fetchAccounts(itemId: string, type?: AccountType): Promise<PageResponse<Account>>;
    /**
     * Fetch a single account
     * @returns {Account} an account object
     */
    fetchAccount(id: string): Promise<Account>;
    /**
     * Fetch transactions from an account using page-based pagination.
     *
     * @deprecated Use {@link fetchTransactionsCursor} (single page) or
     * {@link fetchAllTransactions} (full sweep) instead. Both rely on the
     * `GET /v2/transactions` endpoint with cursor-based pagination, which
     * is more stable for long lists and supports the full filter set
     * (`dateTo`, `ids`, etc.). This page-based method is kept for
     * backward compatibility and will be removed in a future major
     * release.
     *
     * @param accountId The account id
     * @param {TransactionFilters} options Transaction options to filter
     * @returns {PageResponse<Transaction[]>} object which contains the transactions list and related paging data
     */
    fetchTransactions(accountId: string, options?: TransactionFilters): Promise<PageResponse<Transaction>>;
    /**
     * Fetch transactions from an account using cursor-based pagination
     * @param accountId The account id
     * @param {TransactionCursorFilters} options Optional filters (dateFrom, createdAtFrom, after cursor)
     * @returns {CursorPageResponse<Transaction>} object with results and next cursor link
     */
    fetchTransactionsCursor(accountId: string, options?: TransactionCursorFilters): Promise<CursorPageResponse<Transaction>>;
    /**
     * Fetch all transactions from an account using cursor-based pagination
     * @param accountId The account id
     * @param {TransactionCursorFilters} options Optional filters (dateFrom, createdAtFrom)
     * @returns {Transaction[]} an array of all transactions
     */
    fetchAllTransactions(accountId: string, options?: Omit<TransactionCursorFilters, 'after'>): Promise<Transaction[]>;
    /**
     * Fetch account statements from an account
     * @param accountId The account id
     * @returns {PageResponse<AccountStatement[]>} object which contains the Account statements list and related paging data
     */
    fetchAccountStatements(accountId: string): Promise<PageResponse<AccountStatement>>;
    /**
     * Post transaction user category for transactin
     * @param id The Transaction id
     *
     * @returns {Transaction} updated transaction object
     */
    updateTransactionCategory(id: string, categoryId: string): Promise<Transaction>;
    /**
     * Fetch a single transaction
     *
     * @returns {Transaction} an transaction object
     */
    fetchTransaction(id: string): Promise<Transaction>;
    /**
     * Fetch investments from an Item
     *
     * @param itemId The Item id
     * @returns {PageResponse<Investment>} paged response of investments
     */
    fetchInvestments(itemId: string, type?: InvestmentType, options?: InvestmentsFilters): Promise<PageResponse<Investment>>;
    /**
     * Fetch a single investment
     *
     * @returns {Investment} an investment object
     */
    fetchInvestment(id: string): Promise<Investment>;
    /**
     * Fetch transactions from an investment
     *
     * @param investmentId The investment id
     * @param {TransactionFilters} options Transaction options to filter
     * @returns {PageResponse<InvestmentTransaction[]>} object which contains the transactions list and related paging data
     */
    fetchInvestmentTransactions(investmentId: string, options?: TransactionFilters): Promise<PageResponse<InvestmentTransaction>>;
    /**
     * Fetch all investment transactions from an investment
     * @param investmentId The investment id
     * @returns {InvestmentTransaction[]} an array of investment transactions
     */
    fetchAllInvestmentTransactions(investmentId: string): Promise<InvestmentTransaction[]>;
    /**
     * Fetch loans from an Item
     *
     * @param {string} itemId
     * @param {PageFilters} options - request search filters
     * @returns {Promise<PageResponse<Loan>>} - paged response of loans
     */
    fetchLoans(itemId: string, options?: PageFilters): Promise<PageResponse<Loan>>;
    /**
     * Fetch loan by id
     *
     * @param {string} id - the loan id
     * @returns {Promise<Loan>} - loan object, if found
     */
    fetchLoan(id: string): Promise<Loan>;
    /**
     * Fetch consents from an Item
     *
     * @param {string} itemId - the item id
     * @param {ConsentFilters} options - request search filters
     * @returns {Promise<PageResponse<Consent>>} - paged response of consents
     */
    fetchConsents(itemId: string, options?: ConsentFilters): Promise<PageResponse<Consent>>;
    /**
     * Fetch consent by id
     *
     * @param {string} id - the consent id
     * @returns {Promise<Consent>} - consent object, if found
     */
    fetchConsent(id: string): Promise<Consent>;
    /**
     * Fetch the identity resource
     * @returns {IdentityResponse} an identity object
     */
    fetchIdentity(id: string): Promise<IdentityResponse>;
    /**
     * Fetch the identity resource by it's Item ID
     * @returns {IdentityResponse} an identity object
     */
    fetchIdentityByItemId(itemId: string): Promise<IdentityResponse>;
    /**
     * Fetch credit card bills from an accountId
     * @returns {PageResponse<CreditCardBills>} an credit card bills object
     */
    fetchCreditCardBills(accountId: string, options?: PageFilters): Promise<PageResponse<CreditCardBills>>;
    /**
     * Fetch a single credit card bill by its id
     * @param {string} id - the credit card bill id
     * @returns {Promise<CreditCardBills>} - credit card bill object, if found
     */
    fetchCreditCardBill(id: string): Promise<CreditCardBills>;
    /**
     * Fetch all available categories
     * @returns {Categories[]} an paging response of categories
     */
    fetchCategories(): Promise<PageResponse<Category>>;
    /**
     * Fetch a single category
     * @returns {Category} a category object
     */
    fetchCategory(id: string): Promise<Category>;
    /**
     * Fetch the category rules of your client
     * @returns {PageResponse<ClientCategoryRule>} paged response of category rules
     */
    fetchCategoryRules(): Promise<PageResponse<ClientCategoryRule>>;
    /**
     * Create a category rule: transactions matching the description are assigned the given category
     * @param rule - the rule to create
     * @returns {ClientCategoryRule} the created category rule
     */
    createCategoryRule(rule: CreateClientCategoryRule): Promise<ClientCategoryRule>;
    /**
     * Delete a category rule. Clients can only delete their own rules.
     * @param id - the category rule id
     */
    deleteCategoryRule(id: string): Promise<void>;
    /**
     * Fetch merchant information for a list of CNPJs
     * @param cnpjs - list of CNPJs to look up (sent as a comma-separated list)
     * @returns {MerchantsResponse} found merchants, valid CNPJs that were not found, and invalid CNPJs
     */
    fetchMerchants(cnpjs: string[]): Promise<MerchantsResponse>;
    /**
     * BETA: Boleto Management is in beta and may change.
     *
     * Create a boleto connection from the institution's credentials
     * @param payload - the connector id (with `supportsBoletoManagement`) and its credentials
     * @returns {BoletoConnection} the created boleto connection
     */
    createBoletoConnection(payload: CreateBoletoConnection): Promise<BoletoConnection>;
    /**
     * BETA: Boleto Management is in beta and may change.
     *
     * Create a boleto connection from an existing Item
     * @param payload - the Item id
     * @returns {BoletoConnection} the created boleto connection
     */
    createBoletoConnectionFromItem(payload: CreateBoletoConnectionFromItem): Promise<BoletoConnection>;
    /**
     * BETA: Boleto Management is in beta and may change.
     *
     * Issue a boleto through a boleto connection
     * @param payload - the boleto connection id and the boleto data
     * @returns {IssuedBoleto} the issued boleto
     */
    createBoleto(payload: CreateBoleto): Promise<IssuedBoleto>;
    /**
     * BETA: Boleto Management is in beta and may change.
     *
     * Fetch a single issued boleto
     * @param id - the boleto id
     * @returns {IssuedBoleto} the issued boleto
     */
    fetchBoleto(id: string): Promise<IssuedBoleto>;
    /**
     * BETA: Boleto Management is in beta and may change.
     *
     * Cancel an issued boleto
     * @param id - the boleto id
     * @returns {IssuedBoleto} the cancelled boleto
     */
    cancelBoleto(id: string): Promise<IssuedBoleto>;
    /**
     * Fetch a single webhook
     * @returns {Webhook} a webhook object
     */
    fetchWebhook(id: string): Promise<Webhook>;
    /**
     * Fetch all available webhooks
     * @returns {Webhook[]} a paging response of webhooks
     */
    fetchWebhooks(): Promise<PageResponse<Webhook>>;
    /**
     * Creates a Webhook
     * @param webhookParams - The webhook params to create, this includes:
     * - url: The url where will receive notifications
     * - event: The event to listen for
     * - headers (optional): The headers to send with the webhook
     * @returns {Webhook} the created webhook object
     */
    createWebhook(event: CreateWebhook['event'], url: CreateWebhook['url'], headers?: CreateWebhook['headers']): Promise<Webhook>;
    /**
     * Updates a Webhook
     * @param id - The Webhook ID
     * @param updatedWebhookParams - The webhook params to update
     * @returns {Webhook} The webhook updated
     */
    updateWebhook(id: string, updatedWebhookParams: UpdateWebhook): Promise<Webhook>;
    /**
     * Deletes a Webhook
     */
    deleteWebhook(id: string): Promise<void>;
    /**
     * Creates a connect token that can be used as API KEY to connect items from the Frontend
     * @returns {string} Access token to connect items with restrict access
     */
    createConnectToken(itemId?: string, options?: ConnectTokenOptions): Promise<{
        accessToken: string;
    }>;
}
