Files
wehub-resource-sync 4ce4204b6c
CI / Lint (push) Failing after 2s
CI / Build (push) Has been skipped
SDK CI / PHP SDK (push) Failing after 1s
Split PHP SDK / PHP SDK tests (push) Failing after 1s
CI / Test (push) Failing after 1s
CI / Dashboard (push) Failing after 0s
SDK CI / JavaScript SDK (push) Failing after 0s
SDK CI / Python SDK (push) Failing after 2s
SDK CI / Java SDK (push) Failing after 1s
Split PHP SDK / Mirror sdk/php -> rmyndharis/openwa-php (push) Has been skipped
CI / Test (PostgreSQL migrations) (push) Failing after 7m47s
CI / Docker Build (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:24:08 +08:00

25 lines
775 B
Python

"""Search resource — full-text message search across sessions.
Backed by ``src/modules/search/search.controller.ts`` (``GET /search``).
The active search provider (built-in DB full-text or a plugin) answers; if none
is configured the server returns 501.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from ..types import SearchQueryParams, SearchResults
if TYPE_CHECKING:
from .._http import HttpExecutor
class SearchResource:
def __init__(self, http: "HttpExecutor") -> None:
self._http = http
def search(self, params: SearchQueryParams) -> SearchResults:
"""Search messages across sessions. ``q`` is required; all other fields optional."""
return self._http.request("GET", "/api/search", query=params)