@pachca/cli 2026.3.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/README.md +352 -0
- package/README.template.md +190 -0
- package/bin/dev.js +5 -0
- package/bin/run.js +5 -0
- package/dist/base-command.d.ts +74 -0
- package/dist/base-command.d.ts.map +1 -0
- package/dist/base-command.js +242 -0
- package/dist/base-command.js.map +1 -0
- package/dist/client.d.ts +45 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +258 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/api.d.ts +38 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +212 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/auth/list.d.ts +23 -0
- package/dist/commands/auth/list.d.ts.map +1 -0
- package/dist/commands/auth/list.js +39 -0
- package/dist/commands/auth/list.js.map +1 -0
- package/dist/commands/auth/login.d.ts +23 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +140 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +26 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +81 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/refresh.d.ts +26 -0
- package/dist/commands/auth/refresh.d.ts.map +1 -0
- package/dist/commands/auth/refresh.js +68 -0
- package/dist/commands/auth/refresh.js.map +1 -0
- package/dist/commands/auth/status.d.ts +23 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +51 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/switch.d.ts +26 -0
- package/dist/commands/auth/switch.d.ts.map +1 -0
- package/dist/commands/auth/switch.js +37 -0
- package/dist/commands/auth/switch.js.map +1 -0
- package/dist/commands/bots/list-events.d.ts +31 -0
- package/dist/commands/bots/list-events.d.ts.map +1 -0
- package/dist/commands/bots/list-events.js +85 -0
- package/dist/commands/bots/list-events.js.map +1 -0
- package/dist/commands/bots/remove-event.d.ts +30 -0
- package/dist/commands/bots/remove-event.d.ts.map +1 -0
- package/dist/commands/bots/remove-event.js +48 -0
- package/dist/commands/bots/remove-event.js.map +1 -0
- package/dist/commands/bots/update.d.ts +34 -0
- package/dist/commands/bots/update.d.ts.map +1 -0
- package/dist/commands/bots/update.js +78 -0
- package/dist/commands/bots/update.js.map +1 -0
- package/dist/commands/changelog.d.ts +23 -0
- package/dist/commands/changelog.d.ts.map +1 -0
- package/dist/commands/changelog.js +40 -0
- package/dist/commands/changelog.js.map +1 -0
- package/dist/commands/chats/archive.d.ts +32 -0
- package/dist/commands/chats/archive.d.ts.map +1 -0
- package/dist/commands/chats/archive.js +35 -0
- package/dist/commands/chats/archive.js.map +1 -0
- package/dist/commands/chats/create.d.ts +33 -0
- package/dist/commands/chats/create.d.ts.map +1 -0
- package/dist/commands/chats/create.js +91 -0
- package/dist/commands/chats/create.js.map +1 -0
- package/dist/commands/chats/get.d.ts +33 -0
- package/dist/commands/chats/get.d.ts.map +1 -0
- package/dist/commands/chats/get.js +35 -0
- package/dist/commands/chats/get.js.map +1 -0
- package/dist/commands/chats/list.d.ts +37 -0
- package/dist/commands/chats/list.d.ts.map +1 -0
- package/dist/commands/chats/list.js +117 -0
- package/dist/commands/chats/list.js.map +1 -0
- package/dist/commands/chats/unarchive.d.ts +32 -0
- package/dist/commands/chats/unarchive.d.ts.map +1 -0
- package/dist/commands/chats/unarchive.js +34 -0
- package/dist/commands/chats/unarchive.js.map +1 -0
- package/dist/commands/chats/update.d.ts +35 -0
- package/dist/commands/chats/update.d.ts.map +1 -0
- package/dist/commands/chats/update.js +52 -0
- package/dist/commands/chats/update.js.map +1 -0
- package/dist/commands/commands.d.ts +24 -0
- package/dist/commands/commands.d.ts.map +1 -0
- package/dist/commands/commands.js +71 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/commands/common/custom-properties.d.ts +29 -0
- package/dist/commands/common/custom-properties.d.ts.map +1 -0
- package/dist/commands/common/custom-properties.js +68 -0
- package/dist/commands/common/custom-properties.js.map +1 -0
- package/dist/commands/common/direct-url.d.ts +35 -0
- package/dist/commands/common/direct-url.d.ts.map +1 -0
- package/dist/commands/common/direct-url.js +123 -0
- package/dist/commands/common/direct-url.js.map +1 -0
- package/dist/commands/common/get-exports.d.ts +34 -0
- package/dist/commands/common/get-exports.d.ts.map +1 -0
- package/dist/commands/common/get-exports.js +47 -0
- package/dist/commands/common/get-exports.js.map +1 -0
- package/dist/commands/common/request-export.d.ts +33 -0
- package/dist/commands/common/request-export.d.ts.map +1 -0
- package/dist/commands/common/request-export.js +90 -0
- package/dist/commands/common/request-export.js.map +1 -0
- package/dist/commands/common/uploads.d.ts +28 -0
- package/dist/commands/common/uploads.d.ts.map +1 -0
- package/dist/commands/common/uploads.js +29 -0
- package/dist/commands/common/uploads.js.map +1 -0
- package/dist/commands/config/get.d.ts +26 -0
- package/dist/commands/config/get.d.ts.map +1 -0
- package/dist/commands/config/get.js +28 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/list.d.ts +23 -0
- package/dist/commands/config/list.d.ts.map +1 -0
- package/dist/commands/config/list.js +49 -0
- package/dist/commands/config/list.js.map +1 -0
- package/dist/commands/config/set.d.ts +27 -0
- package/dist/commands/config/set.d.ts.map +1 -0
- package/dist/commands/config/set.js +30 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/doctor.d.ts +24 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +175 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/group-tags/create.d.ts +29 -0
- package/dist/commands/group-tags/create.d.ts.map +1 -0
- package/dist/commands/group-tags/create.js +74 -0
- package/dist/commands/group-tags/create.js.map +1 -0
- package/dist/commands/group-tags/delete.d.ts +32 -0
- package/dist/commands/group-tags/delete.d.ts.map +1 -0
- package/dist/commands/group-tags/delete.js +45 -0
- package/dist/commands/group-tags/delete.js.map +1 -0
- package/dist/commands/group-tags/get.d.ts +32 -0
- package/dist/commands/group-tags/get.d.ts.map +1 -0
- package/dist/commands/group-tags/get.js +32 -0
- package/dist/commands/group-tags/get.js.map +1 -0
- package/dist/commands/group-tags/list-users.d.ts +36 -0
- package/dist/commands/group-tags/list-users.d.ts.map +1 -0
- package/dist/commands/group-tags/list-users.js +90 -0
- package/dist/commands/group-tags/list-users.js.map +1 -0
- package/dist/commands/group-tags/list.d.ts +32 -0
- package/dist/commands/group-tags/list.d.ts.map +1 -0
- package/dist/commands/group-tags/list.js +91 -0
- package/dist/commands/group-tags/list.js.map +1 -0
- package/dist/commands/group-tags/update.d.ts +33 -0
- package/dist/commands/group-tags/update.d.ts.map +1 -0
- package/dist/commands/group-tags/update.js +75 -0
- package/dist/commands/group-tags/update.js.map +1 -0
- package/dist/commands/guide.d.ts +26 -0
- package/dist/commands/guide.d.ts.map +1 -0
- package/dist/commands/guide.js +86 -0
- package/dist/commands/guide.js.map +1 -0
- package/dist/commands/introspect.d.ts +27 -0
- package/dist/commands/introspect.d.ts.map +1 -0
- package/dist/commands/introspect.js +82 -0
- package/dist/commands/introspect.js.map +1 -0
- package/dist/commands/link-previews/add.d.ts +33 -0
- package/dist/commands/link-previews/add.d.ts.map +1 -0
- package/dist/commands/link-previews/add.js +76 -0
- package/dist/commands/link-previews/add.js.map +1 -0
- package/dist/commands/members/add-group-tags.d.ts +32 -0
- package/dist/commands/members/add-group-tags.d.ts.map +1 -0
- package/dist/commands/members/add-group-tags.js +73 -0
- package/dist/commands/members/add-group-tags.js.map +1 -0
- package/dist/commands/members/add.d.ts +34 -0
- package/dist/commands/members/add.d.ts.map +1 -0
- package/dist/commands/members/add.js +82 -0
- package/dist/commands/members/add.js.map +1 -0
- package/dist/commands/members/leave.d.ts +33 -0
- package/dist/commands/members/leave.d.ts.map +1 -0
- package/dist/commands/members/leave.js +48 -0
- package/dist/commands/members/leave.js.map +1 -0
- package/dist/commands/members/list.d.ts +37 -0
- package/dist/commands/members/list.d.ts.map +1 -0
- package/dist/commands/members/list.js +97 -0
- package/dist/commands/members/list.js.map +1 -0
- package/dist/commands/members/remove-group-tag.d.ts +36 -0
- package/dist/commands/members/remove-group-tag.d.ts.map +1 -0
- package/dist/commands/members/remove-group-tag.js +49 -0
- package/dist/commands/members/remove-group-tag.js.map +1 -0
- package/dist/commands/members/remove.d.ts +37 -0
- package/dist/commands/members/remove.d.ts.map +1 -0
- package/dist/commands/members/remove.js +53 -0
- package/dist/commands/members/remove.js.map +1 -0
- package/dist/commands/members/update.d.ts +36 -0
- package/dist/commands/members/update.d.ts.map +1 -0
- package/dist/commands/members/update.js +39 -0
- package/dist/commands/members/update.js.map +1 -0
- package/dist/commands/messages/create.d.ts +38 -0
- package/dist/commands/messages/create.d.ts.map +1 -0
- package/dist/commands/messages/create.js +128 -0
- package/dist/commands/messages/create.js.map +1 -0
- package/dist/commands/messages/delete.d.ts +33 -0
- package/dist/commands/messages/delete.d.ts.map +1 -0
- package/dist/commands/messages/delete.js +50 -0
- package/dist/commands/messages/delete.js.map +1 -0
- package/dist/commands/messages/get.d.ts +33 -0
- package/dist/commands/messages/get.d.ts.map +1 -0
- package/dist/commands/messages/get.js +37 -0
- package/dist/commands/messages/get.js.map +1 -0
- package/dist/commands/messages/list.d.ts +33 -0
- package/dist/commands/messages/list.d.ts.map +1 -0
- package/dist/commands/messages/list.js +127 -0
- package/dist/commands/messages/list.js.map +1 -0
- package/dist/commands/messages/pin.d.ts +32 -0
- package/dist/commands/messages/pin.d.ts.map +1 -0
- package/dist/commands/messages/pin.js +35 -0
- package/dist/commands/messages/pin.js.map +1 -0
- package/dist/commands/messages/unpin.d.ts +33 -0
- package/dist/commands/messages/unpin.d.ts.map +1 -0
- package/dist/commands/messages/unpin.js +49 -0
- package/dist/commands/messages/unpin.js.map +1 -0
- package/dist/commands/messages/update.d.ts +38 -0
- package/dist/commands/messages/update.d.ts.map +1 -0
- package/dist/commands/messages/update.js +74 -0
- package/dist/commands/messages/update.js.map +1 -0
- package/dist/commands/profile/delete-status.d.ts +28 -0
- package/dist/commands/profile/delete-status.d.ts.map +1 -0
- package/dist/commands/profile/delete-status.js +44 -0
- package/dist/commands/profile/delete-status.js.map +1 -0
- package/dist/commands/profile/get-info.d.ts +27 -0
- package/dist/commands/profile/get-info.d.ts.map +1 -0
- package/dist/commands/profile/get-info.js +26 -0
- package/dist/commands/profile/get-info.js.map +1 -0
- package/dist/commands/profile/get-status.d.ts +28 -0
- package/dist/commands/profile/get-status.d.ts.map +1 -0
- package/dist/commands/profile/get-status.js +29 -0
- package/dist/commands/profile/get-status.js.map +1 -0
- package/dist/commands/profile/get.d.ts +28 -0
- package/dist/commands/profile/get.d.ts.map +1 -0
- package/dist/commands/profile/get.js +29 -0
- package/dist/commands/profile/get.js.map +1 -0
- package/dist/commands/profile/update-status.d.ts +33 -0
- package/dist/commands/profile/update-status.d.ts.map +1 -0
- package/dist/commands/profile/update-status.js +95 -0
- package/dist/commands/profile/update-status.js.map +1 -0
- package/dist/commands/reactions/add.d.ts +35 -0
- package/dist/commands/reactions/add.d.ts.map +1 -0
- package/dist/commands/reactions/add.js +82 -0
- package/dist/commands/reactions/add.js.map +1 -0
- package/dist/commands/reactions/list.d.ts +36 -0
- package/dist/commands/reactions/list.d.ts.map +1 -0
- package/dist/commands/reactions/list.js +91 -0
- package/dist/commands/reactions/list.js.map +1 -0
- package/dist/commands/reactions/remove.d.ts +35 -0
- package/dist/commands/reactions/remove.d.ts.map +1 -0
- package/dist/commands/reactions/remove.js +88 -0
- package/dist/commands/reactions/remove.js.map +1 -0
- package/dist/commands/read-member/list-readers.d.ts +35 -0
- package/dist/commands/read-member/list-readers.d.ts.map +1 -0
- package/dist/commands/read-member/list-readers.js +89 -0
- package/dist/commands/read-member/list-readers.js.map +1 -0
- package/dist/commands/search/list-chats.d.ts +38 -0
- package/dist/commands/search/list-chats.d.ts.map +1 -0
- package/dist/commands/search/list-chats.js +122 -0
- package/dist/commands/search/list-chats.js.map +1 -0
- package/dist/commands/search/list-messages.d.ts +38 -0
- package/dist/commands/search/list-messages.d.ts.map +1 -0
- package/dist/commands/search/list-messages.js +121 -0
- package/dist/commands/search/list-messages.js.map +1 -0
- package/dist/commands/search/list-users.d.ts +37 -0
- package/dist/commands/search/list-users.d.ts.map +1 -0
- package/dist/commands/search/list-users.js +117 -0
- package/dist/commands/search/list-users.js.map +1 -0
- package/dist/commands/security/list.d.ts +39 -0
- package/dist/commands/security/list.d.ts.map +1 -0
- package/dist/commands/security/list.js +155 -0
- package/dist/commands/security/list.js.map +1 -0
- package/dist/commands/tasks/create.d.ts +36 -0
- package/dist/commands/tasks/create.d.ts.map +1 -0
- package/dist/commands/tasks/create.js +111 -0
- package/dist/commands/tasks/create.js.map +1 -0
- package/dist/commands/tasks/delete.d.ts +33 -0
- package/dist/commands/tasks/delete.d.ts.map +1 -0
- package/dist/commands/tasks/delete.js +50 -0
- package/dist/commands/tasks/delete.js.map +1 -0
- package/dist/commands/tasks/get.d.ts +33 -0
- package/dist/commands/tasks/get.d.ts.map +1 -0
- package/dist/commands/tasks/get.js +37 -0
- package/dist/commands/tasks/get.js.map +1 -0
- package/dist/commands/tasks/list.d.ts +31 -0
- package/dist/commands/tasks/list.d.ts.map +1 -0
- package/dist/commands/tasks/list.js +87 -0
- package/dist/commands/tasks/list.js.map +1 -0
- package/dist/commands/tasks/update.d.ts +42 -0
- package/dist/commands/tasks/update.d.ts.map +1 -0
- package/dist/commands/tasks/update.js +90 -0
- package/dist/commands/tasks/update.js.map +1 -0
- package/dist/commands/thread/add.d.ts +33 -0
- package/dist/commands/thread/add.d.ts.map +1 -0
- package/dist/commands/thread/add.js +36 -0
- package/dist/commands/thread/add.js.map +1 -0
- package/dist/commands/thread/get.d.ts +32 -0
- package/dist/commands/thread/get.d.ts.map +1 -0
- package/dist/commands/thread/get.js +32 -0
- package/dist/commands/thread/get.js.map +1 -0
- package/dist/commands/users/create.d.ts +30 -0
- package/dist/commands/users/create.d.ts.map +1 -0
- package/dist/commands/users/create.js +78 -0
- package/dist/commands/users/create.js.map +1 -0
- package/dist/commands/users/delete.d.ts +33 -0
- package/dist/commands/users/delete.d.ts.map +1 -0
- package/dist/commands/users/delete.js +50 -0
- package/dist/commands/users/delete.js.map +1 -0
- package/dist/commands/users/get-status.d.ts +33 -0
- package/dist/commands/users/get-status.d.ts.map +1 -0
- package/dist/commands/users/get-status.js +37 -0
- package/dist/commands/users/get-status.js.map +1 -0
- package/dist/commands/users/get.d.ts +33 -0
- package/dist/commands/users/get.d.ts.map +1 -0
- package/dist/commands/users/get.js +37 -0
- package/dist/commands/users/get.js.map +1 -0
- package/dist/commands/users/list.d.ts +32 -0
- package/dist/commands/users/list.d.ts.map +1 -0
- package/dist/commands/users/list.js +92 -0
- package/dist/commands/users/list.js.map +1 -0
- package/dist/commands/users/remove-status.d.ts +33 -0
- package/dist/commands/users/remove-status.d.ts.map +1 -0
- package/dist/commands/users/remove-status.js +50 -0
- package/dist/commands/users/remove-status.js.map +1 -0
- package/dist/commands/users/update-status.d.ts +38 -0
- package/dist/commands/users/update-status.d.ts.map +1 -0
- package/dist/commands/users/update-status.js +101 -0
- package/dist/commands/users/update-status.js.map +1 -0
- package/dist/commands/users/update.d.ts +44 -0
- package/dist/commands/users/update.d.ts.map +1 -0
- package/dist/commands/users/update.js +90 -0
- package/dist/commands/users/update.js.map +1 -0
- package/dist/commands/version.d.ts +23 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +23 -0
- package/dist/commands/version.js.map +1 -0
- package/dist/commands/views/open.d.ts +32 -0
- package/dist/commands/views/open.d.ts.map +1 -0
- package/dist/commands/views/open.js +103 -0
- package/dist/commands/views/open.js.map +1 -0
- package/dist/data/alternatives.json +73 -0
- package/dist/data/changelog.json +328 -0
- package/dist/data/workflows.json +990 -0
- package/dist/get-version.d.ts +7 -0
- package/dist/get-version.d.ts.map +1 -0
- package/dist/get-version.js +23 -0
- package/dist/get-version.js.map +1 -0
- package/dist/hooks/command-not-found.d.ts +4 -0
- package/dist/hooks/command-not-found.d.ts.map +1 -0
- package/dist/hooks/command-not-found.js +51 -0
- package/dist/hooks/command-not-found.js.map +1 -0
- package/dist/hooks/init.d.ts +4 -0
- package/dist/hooks/init.d.ts.map +1 -0
- package/dist/hooks/init.js +95 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/hooks/postrun.d.ts +4 -0
- package/dist/hooks/postrun.d.ts.map +1 -0
- package/dist/hooks/postrun.js +67 -0
- package/dist/hooks/postrun.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +26 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +175 -0
- package/dist/output.js.map +1 -0
- package/dist/profiles.d.ts +52 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +192 -0
- package/dist/profiles.js.map +1 -0
- package/dist/utils.d.ts +21 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +62 -0
- package/dist/utils.js.map +1 -0
- package/oclif.manifest.json +12266 -0
- package/package.json +73 -0
package/README.md
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# @pachca/cli
|
|
2
|
+
|
|
3
|
+
Официальный CLI для [Пачки](https://pachca.com).
|
|
4
|
+
|
|
5
|
+
## Установка
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install -g @pachca/cli
|
|
9
|
+
|
|
10
|
+
# Или без установки:
|
|
11
|
+
npx @pachca/cli users list
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Быстрый старт
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
pachca auth login # сохранить токен
|
|
18
|
+
pachca users list # список сотрудников
|
|
19
|
+
pachca messages create --entity-id 123 --content "Привет!"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Получить токен: https://dev.pachca.com/guides/authorization
|
|
23
|
+
|
|
24
|
+
## Использование в агентах (Claude, Cursor и др.)
|
|
25
|
+
|
|
26
|
+
Если агент устанавливает CLI по просьбе пользователя и токена ещё нет — агент должен запросить его у пользователя:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
# Агент спрашивает: "Нужен API-токен Пачки."
|
|
30
|
+
# "Получите его на https://dev.pachca.com/guides/authorization"
|
|
31
|
+
pachca auth login --token <токен от пользователя>
|
|
32
|
+
|
|
33
|
+
# Дальше команды работают без токена в каждой строке
|
|
34
|
+
pachca users list
|
|
35
|
+
pachca messages create --entity-id 123 --content "Привет!"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Если токен уже есть в окружении — `auth login` не нужен:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
PACHCA_TOKEN=$TOKEN pachca users list
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Профили (несколько токенов)
|
|
45
|
+
|
|
46
|
+
Храните несколько токенов под именами — личный, боты:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
pachca auth login --profile personal
|
|
50
|
+
pachca auth login --profile bot-notify
|
|
51
|
+
pachca auth list
|
|
52
|
+
pachca auth switch bot-notify
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Токены хранятся в `~/.config/pachca/config.toml` (chmod 600).
|
|
56
|
+
В CI — через переменную окружения PACHCA_TOKEN.
|
|
57
|
+
|
|
58
|
+
## Поиск по сценариям
|
|
59
|
+
|
|
60
|
+
Не знаете какую команду использовать? Поищите по задаче:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
pachca guide "отправить файл"
|
|
64
|
+
pachca guide "создать беседу и добавить участников"
|
|
65
|
+
pachca guide # список всех сценариев
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
<!-- AUTO:COMMANDS -->
|
|
69
|
+
## Команды
|
|
70
|
+
|
|
71
|
+
### security
|
|
72
|
+
|
|
73
|
+
| Команда | Описание |
|
|
74
|
+
|---------|---------|
|
|
75
|
+
| `pachca security list` | Журнал аудита событий |
|
|
76
|
+
|
|
77
|
+
### bots
|
|
78
|
+
|
|
79
|
+
| Команда | Описание |
|
|
80
|
+
|---------|---------|
|
|
81
|
+
| `pachca bots update` | Редактирование бота |
|
|
82
|
+
| `pachca bots list-events` | История событий |
|
|
83
|
+
| `pachca bots remove-event` | Удаление события |
|
|
84
|
+
|
|
85
|
+
### chats
|
|
86
|
+
|
|
87
|
+
| Команда | Описание |
|
|
88
|
+
|---------|---------|
|
|
89
|
+
| `pachca chats create` | Новый чат |
|
|
90
|
+
| `pachca chats list` | Список чатов |
|
|
91
|
+
| `pachca chats get` | Информация о чате |
|
|
92
|
+
| `pachca chats update` | Обновление чата |
|
|
93
|
+
| `pachca chats archive` | Архивация чата |
|
|
94
|
+
| `pachca chats unarchive` | Разархивация чата |
|
|
95
|
+
|
|
96
|
+
### common
|
|
97
|
+
|
|
98
|
+
| Команда | Описание |
|
|
99
|
+
|---------|---------|
|
|
100
|
+
| `pachca common request-export` | Экспорт сообщений |
|
|
101
|
+
| `pachca common get-exports` | Скачать архив экспорта |
|
|
102
|
+
| `pachca common custom-properties` | Список дополнительных полей |
|
|
103
|
+
| `pachca common direct-url` | Загрузка файла |
|
|
104
|
+
| `pachca common uploads` | Получение подписи, ключа и других параметров |
|
|
105
|
+
|
|
106
|
+
### members
|
|
107
|
+
|
|
108
|
+
| Команда | Описание |
|
|
109
|
+
|---------|---------|
|
|
110
|
+
| `pachca members add-group-tags` | Добавление тегов |
|
|
111
|
+
| `pachca members remove-group-tag` | Исключение тега |
|
|
112
|
+
| `pachca members leave` | Выход из беседы или канала |
|
|
113
|
+
| `pachca members list` | Список участников чата |
|
|
114
|
+
| `pachca members add` | Добавление пользователей |
|
|
115
|
+
| `pachca members remove` | Исключение пользователя |
|
|
116
|
+
| `pachca members update` | Редактирование роли |
|
|
117
|
+
|
|
118
|
+
### group-tags
|
|
119
|
+
|
|
120
|
+
| Команда | Описание |
|
|
121
|
+
|---------|---------|
|
|
122
|
+
| `pachca group-tags create` | Новый тег |
|
|
123
|
+
| `pachca group-tags list` | Список тегов сотрудников |
|
|
124
|
+
| `pachca group-tags get` | Информация о теге |
|
|
125
|
+
| `pachca group-tags update` | Редактирование тега |
|
|
126
|
+
| `pachca group-tags delete` | Удаление тега |
|
|
127
|
+
| `pachca group-tags list-users` | Список сотрудников тега |
|
|
128
|
+
|
|
129
|
+
### messages
|
|
130
|
+
|
|
131
|
+
| Команда | Описание |
|
|
132
|
+
|---------|---------|
|
|
133
|
+
| `pachca messages create` | Новое сообщение |
|
|
134
|
+
| `pachca messages list` | Список сообщений чата |
|
|
135
|
+
| `pachca messages get` | Информация о сообщении |
|
|
136
|
+
| `pachca messages update` | Редактирование сообщения |
|
|
137
|
+
| `pachca messages delete` | Удаление сообщения |
|
|
138
|
+
| `pachca messages pin` | Закрепление сообщения |
|
|
139
|
+
| `pachca messages unpin` | Открепление сообщения |
|
|
140
|
+
|
|
141
|
+
### link-previews
|
|
142
|
+
|
|
143
|
+
| Команда | Описание |
|
|
144
|
+
|---------|---------|
|
|
145
|
+
| `pachca link-previews add` | Unfurl (разворачивание ссылок) |
|
|
146
|
+
|
|
147
|
+
### reactions
|
|
148
|
+
|
|
149
|
+
| Команда | Описание |
|
|
150
|
+
|---------|---------|
|
|
151
|
+
| `pachca reactions add` | Добавление реакции |
|
|
152
|
+
| `pachca reactions remove` | Удаление реакции |
|
|
153
|
+
| `pachca reactions list` | Список реакций |
|
|
154
|
+
|
|
155
|
+
### read-member
|
|
156
|
+
|
|
157
|
+
| Команда | Описание |
|
|
158
|
+
|---------|---------|
|
|
159
|
+
| `pachca read-member list-readers` | Список прочитавших сообщение |
|
|
160
|
+
|
|
161
|
+
### thread
|
|
162
|
+
|
|
163
|
+
| Команда | Описание |
|
|
164
|
+
|---------|---------|
|
|
165
|
+
| `pachca thread add` | Новый тред |
|
|
166
|
+
| `pachca thread get` | Информация о треде |
|
|
167
|
+
|
|
168
|
+
### profile
|
|
169
|
+
|
|
170
|
+
| Команда | Описание |
|
|
171
|
+
|---------|---------|
|
|
172
|
+
| `pachca profile get-info` | Информация о токене |
|
|
173
|
+
| `pachca profile get` | Информация о профиле |
|
|
174
|
+
| `pachca profile get-status` | Текущий статус |
|
|
175
|
+
| `pachca profile update-status` | Новый статус |
|
|
176
|
+
| `pachca profile delete-status` | Удаление статуса |
|
|
177
|
+
|
|
178
|
+
### search
|
|
179
|
+
|
|
180
|
+
| Команда | Описание |
|
|
181
|
+
|---------|---------|
|
|
182
|
+
| `pachca search list-chats` | Поиск чатов |
|
|
183
|
+
| `pachca search list-messages` | Поиск сообщений |
|
|
184
|
+
| `pachca search list-users` | Поиск сотрудников |
|
|
185
|
+
|
|
186
|
+
### tasks
|
|
187
|
+
|
|
188
|
+
| Команда | Описание |
|
|
189
|
+
|---------|---------|
|
|
190
|
+
| `pachca tasks create` | Новое напоминание |
|
|
191
|
+
| `pachca tasks list` | Список напоминаний |
|
|
192
|
+
| `pachca tasks get` | Информация о напоминании |
|
|
193
|
+
| `pachca tasks update` | Редактирование напоминания |
|
|
194
|
+
| `pachca tasks delete` | Удаление напоминания |
|
|
195
|
+
|
|
196
|
+
### users
|
|
197
|
+
|
|
198
|
+
| Команда | Описание |
|
|
199
|
+
|---------|---------|
|
|
200
|
+
| `pachca users create` | Создать сотрудника |
|
|
201
|
+
| `pachca users list` | Список сотрудников |
|
|
202
|
+
| `pachca users get` | Информация о сотруднике |
|
|
203
|
+
| `pachca users update` | Редактирование сотрудника |
|
|
204
|
+
| `pachca users delete` | Удаление сотрудника |
|
|
205
|
+
| `pachca users get-status` | Статус сотрудника |
|
|
206
|
+
| `pachca users update-status` | Новый статус сотрудника |
|
|
207
|
+
| `pachca users remove-status` | Удаление статуса сотрудника |
|
|
208
|
+
|
|
209
|
+
### views
|
|
210
|
+
|
|
211
|
+
| Команда | Описание |
|
|
212
|
+
|---------|---------|
|
|
213
|
+
| `pachca views open` | Открытие представления |
|
|
214
|
+
|
|
215
|
+
<!-- AUTO:COMMANDS:END -->
|
|
216
|
+
|
|
217
|
+
<!-- AUTO:FLAGS -->
|
|
218
|
+
## Глобальные флаги
|
|
219
|
+
|
|
220
|
+
| Флаг | Короткий | Описание |
|
|
221
|
+
|------|----------|----------|
|
|
222
|
+
| `--output <format>` | `-o` | Формат вывода: table, json, yaml, csv |
|
|
223
|
+
| `--columns <list>` | `-c` | Колонки для table-вывода |
|
|
224
|
+
| `--no-header` | | Скрыть заголовок таблицы |
|
|
225
|
+
| `--profile <name>` | `-p` | Профиль для этой команды |
|
|
226
|
+
| `--token <value>` | | Bearer-токен для этого вызова |
|
|
227
|
+
| `--quiet` | `-q` | Подавить вывод кроме ошибок |
|
|
228
|
+
| `--verbose` | `-v` | Показывать HTTP-детали |
|
|
229
|
+
| `--no-input` | | Отключить промпты |
|
|
230
|
+
| `--dry-run` | | Показать запрос без отправки |
|
|
231
|
+
| `--timeout <seconds>` | | Таймаут запроса |
|
|
232
|
+
| `--no-retry` | | Отключить авто-retry |
|
|
233
|
+
|
|
234
|
+
<!-- AUTO:FLAGS:END -->
|
|
235
|
+
|
|
236
|
+
## Пагинация
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
# Первая страница (по умолчанию)
|
|
240
|
+
pachca users list --limit 20
|
|
241
|
+
|
|
242
|
+
# Следующая страница вручную
|
|
243
|
+
pachca users list --cursor eyJpZCI6NTB9
|
|
244
|
+
|
|
245
|
+
# Загрузить все страницы автоматически
|
|
246
|
+
pachca users list --all
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Вывод и скрипты
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
# JSON вместо таблицы
|
|
253
|
+
pachca users list -o json
|
|
254
|
+
|
|
255
|
+
# YAML
|
|
256
|
+
pachca users list -o yaml
|
|
257
|
+
|
|
258
|
+
# CSV (для Excel / Google Sheets)
|
|
259
|
+
pachca users list -o csv
|
|
260
|
+
|
|
261
|
+
# Выбрать колонки
|
|
262
|
+
pachca users list --columns id,email,role
|
|
263
|
+
|
|
264
|
+
# Только значения без заголовка (для скриптов)
|
|
265
|
+
pachca users list --columns email --no-header
|
|
266
|
+
|
|
267
|
+
# Пайп — цвет отключается автоматически
|
|
268
|
+
pachca users list -o json | jq '.[].name'
|
|
269
|
+
|
|
270
|
+
# Текст из файла или pipe
|
|
271
|
+
pachca messages create --entity-id 123 < message.txt
|
|
272
|
+
echo "Деплой завершён" | pachca messages create --entity-id 123
|
|
273
|
+
|
|
274
|
+
# Скачать файл (для команд с редиректом)
|
|
275
|
+
pachca common get-exports 123 --save ./export.zip
|
|
276
|
+
|
|
277
|
+
# Посмотреть запрос без отправки
|
|
278
|
+
pachca messages create --entity-id 123 --content "Привет" --dry-run
|
|
279
|
+
|
|
280
|
+
# Тихий режим — только exit code, без вывода
|
|
281
|
+
pachca messages create -q --entity-id 123 --content "Деплой завершён"
|
|
282
|
+
|
|
283
|
+
# CI / неинтерактивный режим
|
|
284
|
+
PACHCA_TOKEN=xxx pachca messages create --entity-id 123 --content "Деплой завершён" --no-input
|
|
285
|
+
|
|
286
|
+
# DELETE без подтверждения (в TTY)
|
|
287
|
+
pachca users delete 1234 --force
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Прямые API-запросы
|
|
291
|
+
|
|
292
|
+
Escape hatch для нестандартных запросов без сгенерированных команд:
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
pachca api GET /messages --query chat_id=123
|
|
296
|
+
pachca api POST /messages -F message[chat_id]=12345 -f message[content]="Привет"
|
|
297
|
+
pachca api POST /messages --input payload.json
|
|
298
|
+
pachca api GET /profile -o yaml --dry-run
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## Настройки
|
|
302
|
+
|
|
303
|
+
Установить постоянные дефолты:
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
pachca config set defaults.output json # всегда JSON
|
|
307
|
+
pachca config set defaults.timeout 60 # таймаут 60s
|
|
308
|
+
pachca config list # все настройки
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Диагностика
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
pachca doctor
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Доступные команды
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
pachca commands --available
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Changelog
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
pachca changelog
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Shell completion
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
pachca autocomplete zsh # zsh completion
|
|
333
|
+
pachca autocomplete bash # bash completion
|
|
334
|
+
pachca autocomplete fish # fish completion
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## Переменные окружения
|
|
338
|
+
|
|
339
|
+
| Переменная | Описание |
|
|
340
|
+
|-----------|---------|
|
|
341
|
+
| `PACHCA_TOKEN` | Bearer-токен (высший приоритет, удобно для CI) |
|
|
342
|
+
| `PACHCA_PROFILE` | Активный профиль для команды |
|
|
343
|
+
| `PACHCA_TIMEOUT` | Таймаут запроса в секундах (по умолчанию 30) |
|
|
344
|
+
| `PACHCA_PROMPT_DISABLED` | Отключить интерактивные промпты |
|
|
345
|
+
| `CI` | Стандартная переменная CI-окружений |
|
|
346
|
+
| `NO_COLOR` | Отключить цвет в выводе |
|
|
347
|
+
| `FORCE_COLOR` | Принудительно включить цвет |
|
|
348
|
+
| `PACHCA_SKIP_NEW_VERSION_CHECK` | Отключить проверку обновлений |
|
|
349
|
+
|
|
350
|
+
## Документация API
|
|
351
|
+
|
|
352
|
+
Полная документация: https://dev.pachca.com
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# @pachca/cli
|
|
2
|
+
|
|
3
|
+
Официальный CLI для [Пачки](https://pachca.com).
|
|
4
|
+
|
|
5
|
+
## Установка
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install -g @pachca/cli
|
|
9
|
+
|
|
10
|
+
# Или без установки:
|
|
11
|
+
npx @pachca/cli users list
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Быстрый старт
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
pachca auth login # сохранить токен
|
|
18
|
+
pachca users list # список сотрудников
|
|
19
|
+
pachca messages create --entity-id 123 --content "Привет!"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Получить токен: https://dev.pachca.com/guides/authorization
|
|
23
|
+
|
|
24
|
+
## Использование в агентах (Claude, Cursor и др.)
|
|
25
|
+
|
|
26
|
+
Если агент устанавливает CLI по просьбе пользователя и токена ещё нет — агент должен запросить его у пользователя:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
# Агент спрашивает: "Нужен API-токен Пачки."
|
|
30
|
+
# "Получите его на https://dev.pachca.com/guides/authorization"
|
|
31
|
+
pachca auth login --token <токен от пользователя>
|
|
32
|
+
|
|
33
|
+
# Дальше команды работают без токена в каждой строке
|
|
34
|
+
pachca users list
|
|
35
|
+
pachca messages create --entity-id 123 --content "Привет!"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Если токен уже есть в окружении — `auth login` не нужен:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
PACHCA_TOKEN=$TOKEN pachca users list
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Профили (несколько токенов)
|
|
45
|
+
|
|
46
|
+
Храните несколько токенов под именами — личный, боты:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
pachca auth login --profile personal
|
|
50
|
+
pachca auth login --profile bot-notify
|
|
51
|
+
pachca auth list
|
|
52
|
+
pachca auth switch bot-notify
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Токены хранятся в `~/.config/pachca/config.toml` (chmod 600).
|
|
56
|
+
В CI — через переменную окружения PACHCA_TOKEN.
|
|
57
|
+
|
|
58
|
+
## Поиск по сценариям
|
|
59
|
+
|
|
60
|
+
Не знаете какую команду использовать? Поищите по задаче:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
pachca guide "отправить файл"
|
|
64
|
+
pachca guide "создать беседу и добавить участников"
|
|
65
|
+
pachca guide # список всех сценариев
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
<!-- AUTO:COMMANDS -->
|
|
69
|
+
<!-- AUTO:COMMANDS:END -->
|
|
70
|
+
|
|
71
|
+
<!-- AUTO:FLAGS -->
|
|
72
|
+
<!-- AUTO:FLAGS:END -->
|
|
73
|
+
|
|
74
|
+
## Пагинация
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
# Первая страница (по умолчанию)
|
|
78
|
+
pachca users list --limit 20
|
|
79
|
+
|
|
80
|
+
# Следующая страница вручную
|
|
81
|
+
pachca users list --cursor eyJpZCI6NTB9
|
|
82
|
+
|
|
83
|
+
# Загрузить все страницы автоматически
|
|
84
|
+
pachca users list --all
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Вывод и скрипты
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
# JSON вместо таблицы
|
|
91
|
+
pachca users list -o json
|
|
92
|
+
|
|
93
|
+
# YAML
|
|
94
|
+
pachca users list -o yaml
|
|
95
|
+
|
|
96
|
+
# CSV (для Excel / Google Sheets)
|
|
97
|
+
pachca users list -o csv
|
|
98
|
+
|
|
99
|
+
# Выбрать колонки
|
|
100
|
+
pachca users list --columns id,email,role
|
|
101
|
+
|
|
102
|
+
# Только значения без заголовка (для скриптов)
|
|
103
|
+
pachca users list --columns email --no-header
|
|
104
|
+
|
|
105
|
+
# Пайп — цвет отключается автоматически
|
|
106
|
+
pachca users list -o json | jq '.[].name'
|
|
107
|
+
|
|
108
|
+
# Текст из файла или pipe
|
|
109
|
+
pachca messages create --entity-id 123 < message.txt
|
|
110
|
+
echo "Деплой завершён" | pachca messages create --entity-id 123
|
|
111
|
+
|
|
112
|
+
# Скачать файл (для команд с редиректом)
|
|
113
|
+
pachca common get-exports 123 --save ./export.zip
|
|
114
|
+
|
|
115
|
+
# Посмотреть запрос без отправки
|
|
116
|
+
pachca messages create --entity-id 123 --content "Привет" --dry-run
|
|
117
|
+
|
|
118
|
+
# Тихий режим — только exit code, без вывода
|
|
119
|
+
pachca messages create -q --entity-id 123 --content "Деплой завершён"
|
|
120
|
+
|
|
121
|
+
# CI / неинтерактивный режим
|
|
122
|
+
PACHCA_TOKEN=xxx pachca messages create --entity-id 123 --content "Деплой завершён" --no-input
|
|
123
|
+
|
|
124
|
+
# DELETE без подтверждения (в TTY)
|
|
125
|
+
pachca users delete 1234 --force
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Прямые API-запросы
|
|
129
|
+
|
|
130
|
+
Escape hatch для нестандартных запросов без сгенерированных команд:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
pachca api GET /messages --query chat_id=123
|
|
134
|
+
pachca api POST /messages -F message[chat_id]=12345 -f message[content]="Привет"
|
|
135
|
+
pachca api POST /messages --input payload.json
|
|
136
|
+
pachca api GET /profile -o yaml --dry-run
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Настройки
|
|
140
|
+
|
|
141
|
+
Установить постоянные дефолты:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
pachca config set defaults.output json # всегда JSON
|
|
145
|
+
pachca config set defaults.timeout 60 # таймаут 60s
|
|
146
|
+
pachca config list # все настройки
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Диагностика
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
pachca doctor
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Доступные команды
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
pachca commands --available
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Changelog
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
pachca changelog
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Shell completion
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
pachca autocomplete zsh # zsh completion
|
|
171
|
+
pachca autocomplete bash # bash completion
|
|
172
|
+
pachca autocomplete fish # fish completion
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Переменные окружения
|
|
176
|
+
|
|
177
|
+
| Переменная | Описание |
|
|
178
|
+
|-----------|---------|
|
|
179
|
+
| `PACHCA_TOKEN` | Bearer-токен (высший приоритет, удобно для CI) |
|
|
180
|
+
| `PACHCA_PROFILE` | Активный профиль для команды |
|
|
181
|
+
| `PACHCA_TIMEOUT` | Таймаут запроса в секундах (по умолчанию 30) |
|
|
182
|
+
| `PACHCA_PROMPT_DISABLED` | Отключить интерактивные промпты |
|
|
183
|
+
| `CI` | Стандартная переменная CI-окружений |
|
|
184
|
+
| `NO_COLOR` | Отключить цвет в выводе |
|
|
185
|
+
| `FORCE_COLOR` | Принудительно включить цвет |
|
|
186
|
+
| `PACHCA_SKIP_NEW_VERSION_CHECK` | Отключить проверку обновлений |
|
|
187
|
+
|
|
188
|
+
## Документация API
|
|
189
|
+
|
|
190
|
+
Полная документация: https://dev.pachca.com
|
package/bin/dev.js
ADDED
package/bin/run.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Command, type Interfaces } from '@oclif/core';
|
|
2
|
+
import { resolveToken } from './profiles.js';
|
|
3
|
+
import { type RequestOptions, type ClientFlags } from './client.js';
|
|
4
|
+
import { type OutputFormat, type OutputOptions } from './output.js';
|
|
5
|
+
export type BaseFlags = Interfaces.InferredFlags<typeof BaseCommand.baseFlags>;
|
|
6
|
+
export declare abstract class BaseCommand extends Command {
|
|
7
|
+
static baseFlags: {
|
|
8
|
+
output: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
9
|
+
columns: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
10
|
+
'no-header': Interfaces.BooleanFlag<boolean>;
|
|
11
|
+
'no-truncate': Interfaces.BooleanFlag<boolean>;
|
|
12
|
+
profile: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
13
|
+
token: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
14
|
+
quiet: Interfaces.BooleanFlag<boolean>;
|
|
15
|
+
'no-color': Interfaces.BooleanFlag<boolean>;
|
|
16
|
+
verbose: Interfaces.BooleanFlag<boolean>;
|
|
17
|
+
'no-input': Interfaces.BooleanFlag<boolean>;
|
|
18
|
+
'dry-run': Interfaces.BooleanFlag<boolean>;
|
|
19
|
+
timeout: Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>;
|
|
20
|
+
'no-retry': Interfaces.BooleanFlag<boolean>;
|
|
21
|
+
json: Interfaces.BooleanFlag<boolean>;
|
|
22
|
+
};
|
|
23
|
+
private _parsedFlags;
|
|
24
|
+
protected get parsedFlags(): BaseFlags;
|
|
25
|
+
protected set parsedFlags(flags: BaseFlags);
|
|
26
|
+
/**
|
|
27
|
+
* Get the resolved output format, respecting flag > config > TTY default.
|
|
28
|
+
*/
|
|
29
|
+
protected getOutputFormat(): OutputFormat;
|
|
30
|
+
/**
|
|
31
|
+
* Get output options from parsed flags.
|
|
32
|
+
*/
|
|
33
|
+
protected getOutputOptions(): OutputOptions;
|
|
34
|
+
/**
|
|
35
|
+
* Get client flags for the HTTP client.
|
|
36
|
+
*/
|
|
37
|
+
protected getClientFlags(): ClientFlags;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the CLI is in interactive mode for this command.
|
|
40
|
+
*/
|
|
41
|
+
protected isInteractive(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the auth token.
|
|
44
|
+
*/
|
|
45
|
+
protected resolveAuth(): ReturnType<typeof resolveToken>;
|
|
46
|
+
/**
|
|
47
|
+
* Check if the current profile has the required scope.
|
|
48
|
+
* Exits with error if scope is missing.
|
|
49
|
+
*/
|
|
50
|
+
protected checkScope(requiredScope: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Make an authenticated API request.
|
|
53
|
+
*/
|
|
54
|
+
protected apiRequest(opts: Omit<RequestOptions, 'token'>): Promise<{
|
|
55
|
+
data: unknown;
|
|
56
|
+
status: number;
|
|
57
|
+
headers: Headers;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Output data in the configured format.
|
|
61
|
+
*/
|
|
62
|
+
protected output(data: unknown): void;
|
|
63
|
+
/**
|
|
64
|
+
* Output a success message to stderr.
|
|
65
|
+
*/
|
|
66
|
+
protected success(message: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* Handle errors with structured output.
|
|
69
|
+
*/
|
|
70
|
+
protected catch(err: Error & {
|
|
71
|
+
exitCode?: number;
|
|
72
|
+
}): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=base-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,YAAY,EAMb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAgD,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAClH,OAAO,EAA0C,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5G,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;AAE/E,8BAAsB,WAAY,SAAQ,OAAO;IAC/C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;MA2Dd;IAEF,OAAO,CAAC,YAAY,CAAa;IACjC,SAAS,KAAK,WAAW,IAAI,SAAS,CAA8B;IACpE,SAAS,KAAK,WAAW,CAAC,KAAK,EAAE,SAAS,EAKzC;IAED;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,YAAY;IAQzC;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,aAAa;IAU3C;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,WAAW;IAYvC;;OAEG;IACH,SAAS,CAAC,aAAa,IAAI,OAAO;IAKlC;;OAEG;IACH,SAAS,CAAC,WAAW,IAAI,UAAU,CAAC,OAAO,YAAY,CAAC;IAOxD;;;OAGG;IACH,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IA+BjD;;OAEG;cACa,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAmB7H;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAUrC;;OAEG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIxC;;OAEG;cACsB,KAAK,CAAC,GAAG,EAAE,KAAK,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA6ClF"}
|