import { Client, AuthenticationType } from '@vonage/server-client'; import { UserListParameters } from './types/parameters/userListParameters.js'; import { UserPageResponse } from './types/responses/userPageResponse.js'; import { UserType } from './types/userType.js'; import './enums/userSort.js'; import './types/responses/userResponse.js'; import './types/requests/userRequest.js'; import './types/requests/websocketChannelRequest.js'; import './types/websocketChannel.js'; import './types/viberChannel.js'; import './types/whatsappChannel.js'; import './types/mmsChannel.js'; import './types/smsChannel.js'; import './types/vbcChannel.js'; import './types/messengerChannel.js'; import './types/pstnChannel.js'; import './types/sipChannel.js'; /** * The `Users` class provides methods for managing user data through API requests. * * Vonage API responses and requests use `snake_case` for property names, but * this class performs the necessary key transformations to work with * `camelCase` property names in your application. */ declare class Users extends Client { protected authType: AuthenticationType; /** * Retrieves a list of users, optionally paginated, based on the provided parameters. * * @param {UserListParameters} params - Optional parameters to filter and paginate the list of users. * @return {AsyncGenerator} An async generator that yields user objects. */ listAllUsers(params?: UserListParameters): AsyncGenerator; /** * Retrieves a page of users based on the provided parameters, such as pagination and filtering. * * @param {UserListParameters} [params={}] - Optional parameters to filter and paginate the list of users. * @param {number} [params.pageSize] - The number of users to include per page. * @param {SortOrder} [params.order] - The sorting order for the list (ASC or DESC). * @param {string} [params.cursor] - A cursor for paginating through the user list. * @param {string} [params.name] - A name to filter users by. * * @return {Promise} A Promise that resolves to a UserPageResponse object containing the user page data. * * @throws {Error} If there is an issue with the request or response. */ getUserPage(params?: UserListParameters): Promise; /** * Creates a new user with the provided user data. * * @param {UserType} user - The user data to create a new user. * @return {Promise} A Promise that resolves to the newly created user. * @throws {Error} If there is an issue with the request or response. */ createUser(user: UserType): Promise; /** * Retrieves user information for the specified user ID. * * @param {string} userId - The unique identifier of the user to retrieve. * @return {Promise} A Promise that resolves to the user information for the specified user ID. * @throws {Error} If there is an issue with the request or response, or if the user with the specified ID is not found. */ getUser(userId: string): Promise; /** * Updates the user information for the specified user. * * @param {UserType} user - The user object containing the updated information. * @return {Promise} A Promise that resolves to the updated user information. * @throws {Error} If there is an issue with the request or response, or if the user with the specified ID is not found. */ updateUser(user: UserType): Promise; /** * Deletes the user with the specified user ID. * * @param {string} userId - The unique ID of the user to be deleted. * @return {Promise} A Promise that resolves once the user is successfully deleted. * @throws {Error} If there is an issue with the request or response, or if the user with the specified ID is not found. */ deleteUser(userId: string): Promise; } export { Users };