/*! * Copyright 2026 WPPConnect Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ export interface NewsletterSearchOptions { categories?: string[]; limit?: number; cursorToken?: string; } export interface NewsletterSearchResult { newsletters: Array<{ idJid: string; name: string; description: string; picture: string; subscribersCount: number; verification: string; handle: string | null; inviteCode: string; creationTime: number; _raw?: any; }>; pageInfo?: { hasNextPage?: boolean; endCursor?: string; }; } /** * Search for newsletters in the directory * * @example * ```javascript * // Basic search * const result = await WPP.newsletter.search('technology'); * * // Search with options * const result = await WPP.newsletter.search('news', { * limit: 10, * categories: ['TECHNOLOGY', 'NEWS'] * }); * * // Pagination * const firstPage = await WPP.newsletter.search('tech'); * if (firstPage.pageInfo?.hasNextPage) { * const nextPage = await WPP.newsletter.search('tech', { * cursorToken: firstPage.pageInfo.endCursor * }); * } * ``` * * @category Newsletter */ export declare function search(query: string, options?: NewsletterSearchOptions): Promise;