import { WebexSDK } from '../types'; import type { AddressBookEntriesResponse, AddressBookEntrySearchParams } from '../types'; /** * AddressBook API class for managing Webex Contact Center address book entries. * Provides functionality to fetch address book entries using the entry API. * * @class AddressBook * @public * @example * ```typescript * import Webex from 'webex'; * * const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' }); * const cc = webex.cc; * * // Register and login first * await cc.register(); * await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' }); * * // Get AddressBook API instance from ContactCenter * const addressBookAPI = cc.addressBook; * * // Get entries from agent's default address book * const entries = await addressBookAPI.getEntries(); * * // Get entries from a specific address book with pagination * const entries = await addressBookAPI.getEntries({ * addressBookId: 'addressBookId123', * page: 0, * pageSize: 50 * }); * * // Search for specific entries * const searchResults = await addressBook.getEntries({ * search: 'john', * filter: 'name=="John Doe"' * }); * ``` */ export declare class AddressBook { private webexRequest; private webex; private getAddressBookId; private metricsManager; private pageCache; /** * Creates an instance of AddressBook * @param {WebexSDK} webex - The Webex SDK instance * @param {() => string} getAddressBookId - Function to get the addressBookId from agent profile * @public */ constructor(webex: WebexSDK, getAddressBookId: () => string); /** * Fetches address book entries for a specific address book using the entry API * @param {AddressBookEntrySearchParams} [params] - Search and pagination parameters including addressBookId * @returns {Promise} Promise resolving to address book entries * @throws {Error} If the API call fails * @public * @example * ```typescript * // Get entries from agent's default address book * const response = await addressBookAPI.getEntries(); * * // Get entries from a specific address book with pagination * const response = await addressBookAPI.getEntries({ * addressBookId: 'addressBookId123', * page: 0, * pageSize: 25 * }); * ``` */ getEntries(params?: AddressBookEntrySearchParams): Promise; } export default AddressBook;