@pachca/cli 2026.6.2 → 2026.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +26 -17
- package/dist/commands/bots/create.js +25 -1
- package/dist/commands/bots/delete.js +46 -0
- package/dist/commands/bots/get.js +2 -1
- package/dist/commands/bots/list.js +99 -0
- package/dist/commands/bots/recreate-token-self.js +26 -0
- package/dist/commands/bots/recreate-token.js +33 -0
- package/dist/commands/bots/update.js +20 -1
- package/dist/commands/{common/get-exports.js → chats/download-export.js} +5 -4
- package/dist/commands/{common → chats}/request-export.js +5 -4
- package/dist/commands/{common/custom-properties.js → custom-properties/list.js} +5 -4
- package/dist/commands/{common → files}/direct-url.js +4 -3
- package/dist/commands/{common → files}/uploads.js +4 -3
- package/dist/commands/{link-previews/add.js → messages/unfurl.js} +6 -5
- package/dist/commands/{profile/get-info.js → oauth/token-info.js} +4 -3
- package/dist/commands/search/list-users.js +1 -1
- package/dist/commands/security/list.js +1 -1
- package/dist/data/alternatives.json +13 -8
- package/dist/data/changelog.json +62 -0
- package/dist/data/endpoints.json +1 -1
- package/dist/data/workflows.json +34 -6
- package/dist/lib/manifest.js +10 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/data/workflows.json
CHANGED
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"description": "Если нужно добавить новый файл — загрузи его",
|
|
206
|
-
"command": "pachca
|
|
206
|
+
"command": "pachca files uploads"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"description": "Обнови сообщение с новым массивом `files`",
|
|
@@ -339,12 +339,12 @@
|
|
|
339
339
|
"steps": [
|
|
340
340
|
{
|
|
341
341
|
"description": "Запроси экспорт",
|
|
342
|
-
"command": "pachca
|
|
342
|
+
"command": "pachca chats request-export --start-at=<YYYY-MM-DD> --end-at=<YYYY-MM-DD> --webhook-url=<URL>",
|
|
343
343
|
"notes": "`start_at`, `end_at` (YYYY-MM-DD), `webhook_url` обязателен — запрос асинхронный"
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
"description": "Скачай файл экспорта",
|
|
347
|
-
"command": "pachca
|
|
347
|
+
"command": "pachca chats download-export <export_id>",
|
|
348
348
|
"notes": "Сервер вернёт 302, HTTP-клиент скачает файл автоматически"
|
|
349
349
|
}
|
|
350
350
|
]
|
|
@@ -410,6 +410,34 @@
|
|
|
410
410
|
}
|
|
411
411
|
]
|
|
412
412
|
},
|
|
413
|
+
{
|
|
414
|
+
"title": "Ротация токена бота",
|
|
415
|
+
"skill": "pachca-bots",
|
|
416
|
+
"steps": [
|
|
417
|
+
{
|
|
418
|
+
"description": "Пользовательским токеном (администратор, владелец компании или создатель бота) — перевыпусти токен по `id` бота. Прежний токен инвалидируется сразу",
|
|
419
|
+
"command": "pachca bots recreate-token <bot_id>"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"description": "Или: бот перевыпускает собственный токен своим же токеном (скоуп `bot_self:write`). Токен, которым выполнен запрос, инвалидируется сразу — обязательно сохрани новый `access_token` из ответа, иначе бот потеряет доступ к API",
|
|
423
|
+
"command": "pachca bots recreate-token-self"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"title": "Найти и удалить бота",
|
|
429
|
+
"skill": "pachca-bots",
|
|
430
|
+
"steps": [
|
|
431
|
+
{
|
|
432
|
+
"description": "Пользовательским токеном (скоуп `bots:read`) получи список ботов, доступных тебе для редактирования: созданных тобой и тех, чьи настройки открывают тебе доступ. Фильтруй по имени параметром `query`, следующую страницу бери из `meta.paginate.next_page`",
|
|
433
|
+
"command": "pachca bots list --query=\"задач\""
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"description": "Возьми `id` нужного бота из списка и удали его (скоуп `bots:write`). Доступно администратору, владельцу компании или создателю бота — владельцы чатов удалять бота не могут. Прежний токен инвалидируется сразу, бот исключается из всех чатов, его исходящий вебхук удаляется",
|
|
437
|
+
"command": "pachca bots delete <bot_id>"
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
},
|
|
413
441
|
{
|
|
414
442
|
"title": "Обработать входящий вебхук-событие",
|
|
415
443
|
"skill": "pachca-bots",
|
|
@@ -427,7 +455,7 @@
|
|
|
427
455
|
"steps": [
|
|
428
456
|
{
|
|
429
457
|
"description": "Отправь превью-данные",
|
|
430
|
-
"command": "pachca
|
|
458
|
+
"command": "pachca messages unfurl <message_id> --link-previews='{\"https://example.com\":{\"title\":\"Example\",\"description\":\"Description\"}}'"
|
|
431
459
|
}
|
|
432
460
|
]
|
|
433
461
|
},
|
|
@@ -764,7 +792,7 @@
|
|
|
764
792
|
"steps": [
|
|
765
793
|
{
|
|
766
794
|
"description": "Получи информацию о токене: скоупы, дату создания, срок жизни",
|
|
767
|
-
"command": "pachca
|
|
795
|
+
"command": "pachca oauth token-info"
|
|
768
796
|
}
|
|
769
797
|
]
|
|
770
798
|
},
|
|
@@ -795,7 +823,7 @@
|
|
|
795
823
|
"steps": [
|
|
796
824
|
{
|
|
797
825
|
"description": "Получи список дополнительных полей для сотрудников",
|
|
798
|
-
"command": "pachca
|
|
826
|
+
"command": "pachca custom-properties list --entity-type=User",
|
|
799
827
|
"notes": "Добавь `entity_type=User` для фильтрации"
|
|
800
828
|
},
|
|
801
829
|
{
|
package/dist/lib/manifest.js
CHANGED
|
@@ -58,8 +58,18 @@ export function normalizeCommand(commandId, cmdMeta, baseFlagNames) {
|
|
|
58
58
|
* build-time emitter for the docs Commands page.
|
|
59
59
|
*/
|
|
60
60
|
export function groupCommandsBySection(commands, baseFlagNames) {
|
|
61
|
+
// Collect backward-compat hidden aliases (old command ids kept working after an IA rename).
|
|
62
|
+
// oclif registers them as resolvable command entries, but they must NOT appear in docs/help —
|
|
63
|
+
// only the new canonical command names are shown.
|
|
64
|
+
const hiddenAliasIds = new Set();
|
|
65
|
+
for (const meta of Object.values(commands)) {
|
|
66
|
+
for (const a of meta.hiddenAliases ?? [])
|
|
67
|
+
hiddenAliasIds.add(a);
|
|
68
|
+
}
|
|
61
69
|
const bySection = new Map();
|
|
62
70
|
for (const [id, meta] of Object.entries(commands)) {
|
|
71
|
+
if (hiddenAliasIds.has(id))
|
|
72
|
+
continue; // hidden backward-compat alias — keep it out of docs/help
|
|
63
73
|
const section = id.includes(':') ? id.split(':')[0] : id;
|
|
64
74
|
const normalized = normalizeCommand(id, meta, baseFlagNames);
|
|
65
75
|
if (!bySection.has(section))
|