@pachca/cli 2026.6.1 → 2026.6.3

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.
@@ -203,7 +203,7 @@
203
203
  },
204
204
  {
205
205
  "description": "Если нужно добавить новый файл — загрузи его",
206
- "command": "pachca common uploads"
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 common request-export --start-at=<YYYY-MM-DD> --end-at=<YYYY-MM-DD> --webhook-url=<URL>",
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 common get-exports <export_id>",
347
+ "command": "pachca chats download-export <export_id>",
348
348
  "notes": "Сервер вернёт 302, HTTP-клиент скачает файл автоматически"
349
349
  }
350
350
  ]
@@ -410,6 +410,20 @@
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
+ },
413
427
  {
414
428
  "title": "Обработать входящий вебхук-событие",
415
429
  "skill": "pachca-bots",
@@ -427,7 +441,7 @@
427
441
  "steps": [
428
442
  {
429
443
  "description": "Отправь превью-данные",
430
- "command": "pachca link-previews add <message_id> --link-previews='{\"https://example.com\":{\"title\":\"Example\",\"description\":\"Description\"}}'"
444
+ "command": "pachca messages unfurl <message_id> --link-previews='{\"https://example.com\":{\"title\":\"Example\",\"description\":\"Description\"}}'"
431
445
  }
432
446
  ]
433
447
  },
@@ -764,7 +778,7 @@
764
778
  "steps": [
765
779
  {
766
780
  "description": "Получи информацию о токене: скоупы, дату создания, срок жизни",
767
- "command": "pachca profile get-info"
781
+ "command": "pachca oauth token-info"
768
782
  }
769
783
  ]
770
784
  },
@@ -795,7 +809,7 @@
795
809
  "steps": [
796
810
  {
797
811
  "description": "Получи список дополнительных полей для сотрудников",
798
- "command": "pachca common custom-properties --entity-type=User",
812
+ "command": "pachca custom-properties list --entity-type=User",
799
813
  "notes": "Добавь `entity_type=User` для фильтрации"
800
814
  },
801
815
  {
@@ -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))