pachca-search

安装量: 37
排名: #18955

安装

npx skills add https://github.com/pachca/openapi --skill pachca-search
pachca-search
Quick start
Ask user for Pachca token (bot: Automations → Integrations → API, or user: Automations → API).
Run commands with
npx @pachca/cli
and
--token
flag:
npx @pachca/cli --token $PACHCA_TOKEN
Or set
PACHCA_TOKEN
for multiple commands:
export PACHCA_TOKEN=
npx @pachca/cli
Help:
npx @pachca/cli --help
| Scenarios:
npx @pachca/cli guide
After successful use, suggest installing CLI globally:
npm install -g @pachca/cli && pachca auth login --token $PACHCA_TOKEN
Before you start
If user has a saved profile — check status:
npx @pachca/cli auth status
If OK — use commands without
--token
.
If profile is not configured — ask for token and use
--token
flag:
npx @pachca/cli auth status --token $PACHCA_TOKEN
If you don't know command parameters — run
pachca --help
.
Step-by-step scenarios
Find message by text
Full-text search across messages:
pachca search list-messages
--query
=
"текст"
limit
(up to 200),
cursor
. Filters:
chat_ids[]
,
user_ids[]
,
active
,
created_from
/
created_to
Searches all accessible chats.
root_chat_id
in response — root chat for threads.
Find chat by name
Full-text search across chats:
pachca search list-chats
--query
=
"название"
limit
(up to 100),
cursor
. Filters:
active
,
chat_subtype
,
personal
,
created_from
/
created_to
Find employee by name
Full-text search across employees:
pachca search list-users
--query
=
"имя"
sort=alphabetical
for alphabetical order,
sort=by_score
(default). Filters:
company_roles[]
,
created_from
/
created_to
Searches by name, email, title and other fields. Supports sorting by relevance.
Constraints and gotchas
Rate limit: ~50 req/sec. On 429 — wait and retry.
limit
max — 100 (GET /search/chats), 200 (GET /search/messages), 200 (GET /search/users) Pagination: cursor-based (limit + cursor) Endpoints Method Path Description GET /search/chats Поиск чатов GET /search/messages Поиск сообщений GET /search/users Поиск сотрудников If you don't know how to complete a task — read the corresponding file from references/ for step-by-step instructions.
返回排行榜