@pachca/cli 2026.7.0 → 2026.7.2
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 +17 -0
- package/README.md +2 -1
- package/README.template.md +1 -1
- package/dist/base-command.js +2 -0
- package/dist/client.js +51 -17
- package/dist/commands/bots/create.js +17 -8
- package/dist/commands/bots/delete.js +1 -2
- package/dist/commands/bots/get.js +1 -5
- package/dist/commands/bots/list-events.js +2 -2
- package/dist/commands/bots/list.js +2 -4
- package/dist/commands/bots/recreate-token-self.js +2 -2
- package/dist/commands/bots/recreate-token.js +2 -2
- package/dist/commands/bots/remove-event.js +1 -1
- package/dist/commands/bots/update-webhook.js +2 -2
- package/dist/commands/bots/update.js +16 -7
- package/dist/commands/chats/archive.js +3 -3
- package/dist/commands/chats/create.js +11 -5
- package/dist/commands/chats/download-export.js +2 -2
- package/dist/commands/chats/get.js +1 -4
- package/dist/commands/chats/list.js +4 -4
- package/dist/commands/chats/request-export.js +2 -2
- package/dist/commands/chats/unarchive.js +2 -2
- package/dist/commands/chats/update.js +10 -3
- package/dist/commands/custom-properties/list.js +2 -2
- package/dist/commands/files/direct-url.js +12 -12
- package/dist/commands/files/uploads.js +2 -2
- package/dist/commands/group-tags/create.js +10 -4
- package/dist/commands/group-tags/get.js +1 -1
- package/dist/commands/group-tags/list-users.js +2 -2
- package/dist/commands/group-tags/list.js +2 -3
- package/dist/commands/group-tags/update.js +9 -2
- package/dist/commands/members/add-group-tags.js +1 -1
- package/dist/commands/members/add.js +4 -4
- package/dist/commands/members/leave.js +1 -1
- package/dist/commands/members/list.js +3 -4
- package/dist/commands/members/remove.js +1 -2
- package/dist/commands/members/update.js +2 -3
- package/dist/commands/messages/create.js +4 -4
- package/dist/commands/messages/delete.js +1 -3
- package/dist/commands/messages/get.js +4 -4
- package/dist/commands/messages/list.js +2 -4
- package/dist/commands/messages/pin.js +2 -3
- package/dist/commands/messages/unfurl.js +4 -4
- package/dist/commands/messages/unpin.js +1 -2
- package/dist/commands/messages/update.js +4 -4
- package/dist/commands/oauth/token-info.js +2 -2
- package/dist/commands/profile/delete-avatar.js +1 -2
- package/dist/commands/profile/delete-status.js +1 -2
- package/dist/commands/profile/get-status.js +1 -5
- package/dist/commands/profile/get.js +3 -3
- package/dist/commands/profile/update-avatar.js +2 -3
- package/dist/commands/profile/update-status.js +6 -4
- package/dist/commands/reactions/add.js +2 -3
- package/dist/commands/reactions/list.js +1 -5
- package/dist/commands/reactions/remove.js +1 -2
- package/dist/commands/read-member/list-readers.js +2 -2
- package/dist/commands/search/list-chats.js +3 -3
- package/dist/commands/search/list-messages.js +2 -2
- package/dist/commands/search/list-users.js +4 -4
- package/dist/commands/security/list.js +6 -6
- package/dist/commands/tasks/create.js +5 -5
- package/dist/commands/tasks/delete.js +1 -3
- package/dist/commands/tasks/get.js +2 -4
- package/dist/commands/tasks/list.js +2 -4
- package/dist/commands/tasks/update.js +4 -5
- package/dist/commands/threads/add.js +3 -3
- package/dist/commands/threads/create.js +23 -0
- package/dist/commands/threads/get.js +1 -1
- package/dist/commands/threads/list.js +3 -2
- package/dist/commands/users/create.js +32 -10
- package/dist/commands/users/delete.js +1 -3
- package/dist/commands/users/get-status.js +2 -4
- package/dist/commands/users/get.js +2 -4
- package/dist/commands/users/list.js +4 -4
- package/dist/commands/users/remove-avatar.js +1 -2
- package/dist/commands/users/remove-status.js +1 -3
- package/dist/commands/users/update-avatar.js +2 -3
- package/dist/commands/users/update-status.js +6 -5
- package/dist/commands/users/update.js +31 -10
- package/dist/commands/views/open.js +4 -4
- package/dist/data/alternatives.json +1 -0
- package/dist/data/changelog.json +67 -0
- package/dist/data/endpoints.json +1 -1
- package/dist/data/workflows.json +2 -2
- package/dist/output.js +10 -2
- package/dist/profiles.js +7 -3
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,7 @@ import * as clack from '@clack/prompts';
|
|
|
5
5
|
export default class UsersUpdateStatus extends BaseCommand {
|
|
6
6
|
static description = "Новый статус сотрудника";
|
|
7
7
|
static examples = [
|
|
8
|
-
"Управление статусом
|
|
9
|
-
"Управление статусом сотрудника:\n $ pachca users update-status",
|
|
10
|
-
"Управление статусом сотрудника:\n $ pachca users remove-status"
|
|
8
|
+
"Управление статусом сотрудника — Установить статус:\n $ pachca users update-status"
|
|
11
9
|
];
|
|
12
10
|
static scope = "user_status:write";
|
|
13
11
|
static apiMethod = "PUT";
|
|
@@ -26,7 +24,7 @@ export default class UsersUpdateStatus extends BaseCommand {
|
|
|
26
24
|
description: "Emoji символ статуса",
|
|
27
25
|
}),
|
|
28
26
|
'title': Flags.string({
|
|
29
|
-
description: "Текст статуса",
|
|
27
|
+
description: "Текст статуса (макс. 50 символов)",
|
|
30
28
|
}),
|
|
31
29
|
'expires-at': Flags.string({
|
|
32
30
|
description: "Срок жизни статуса (ISO-8601, UTC+0) в формате YYYY-MM-DDThh:mm:ss.sssZ",
|
|
@@ -70,6 +68,9 @@ export default class UsersUpdateStatus extends BaseCommand {
|
|
|
70
68
|
}
|
|
71
69
|
}
|
|
72
70
|
const validationErrors = [];
|
|
71
|
+
if (flags['title'] && String(flags['title']).length > 50) {
|
|
72
|
+
validationErrors.push({ message: `--title: максимум 50 символов (передано: ${String(flags['title']).length})`, flag: 'title' });
|
|
73
|
+
}
|
|
73
74
|
if (flags['away-message'] && String(flags['away-message']).length > 1024) {
|
|
74
75
|
validationErrors.push({ message: `--away-message: максимум 1024 символов (передано: ${String(flags['away-message']).length})`, flag: 'away-message' });
|
|
75
76
|
}
|
|
@@ -97,7 +98,7 @@ export default class UsersUpdateStatus extends BaseCommand {
|
|
|
97
98
|
path: `/users/${args.user_id}/status`,
|
|
98
99
|
body,
|
|
99
100
|
});
|
|
100
|
-
const responseBody = data;
|
|
101
|
+
const responseBody = (data ?? {});
|
|
101
102
|
const result = responseBody.data ?? responseBody;
|
|
102
103
|
this.output(result);
|
|
103
104
|
}
|
|
@@ -4,9 +4,8 @@ import { BaseCommand } from '../../base-command.js';
|
|
|
4
4
|
export default class UsersUpdate extends BaseCommand {
|
|
5
5
|
static description = "Редактирование сотрудника";
|
|
6
6
|
static examples = [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"Offboarding сотрудника:\n $ pachca users update"
|
|
7
|
+
"Массовое создание сотрудников с тегами — Или обнови существующего:\n $ pachca users update",
|
|
8
|
+
"Offboarding сотрудника — Заблокировать доступ:\n $ pachca users update"
|
|
10
9
|
];
|
|
11
10
|
static scope = "users:update";
|
|
12
11
|
static apiMethod = "PUT";
|
|
@@ -21,22 +20,22 @@ export default class UsersUpdate extends BaseCommand {
|
|
|
21
20
|
static flags = {
|
|
22
21
|
...BaseCommand.baseFlags,
|
|
23
22
|
'first-name': Flags.string({
|
|
24
|
-
description: "Имя",
|
|
23
|
+
description: "Имя (макс. 255 символов)",
|
|
25
24
|
}),
|
|
26
25
|
'last-name': Flags.string({
|
|
27
|
-
description: "Фамилия",
|
|
26
|
+
description: "Фамилия (макс. 255 символов)",
|
|
28
27
|
}),
|
|
29
28
|
'email': Flags.string({
|
|
30
|
-
description: "Электронная почта",
|
|
29
|
+
description: "Электронная почта (макс. 255 символов)",
|
|
31
30
|
}),
|
|
32
31
|
'phone-number': Flags.string({
|
|
33
|
-
description: "Телефон",
|
|
32
|
+
description: "Телефон (макс. 255 символов)",
|
|
34
33
|
}),
|
|
35
34
|
'nickname': Flags.string({
|
|
36
|
-
description: "Имя пользователя",
|
|
35
|
+
description: "Имя пользователя (макс. 255 символов)",
|
|
37
36
|
}),
|
|
38
37
|
'department': Flags.string({
|
|
39
|
-
description: "Департамент",
|
|
38
|
+
description: "Департамент (макс. 255 символов)",
|
|
40
39
|
}),
|
|
41
40
|
'title': Flags.string({
|
|
42
41
|
description: "Должность",
|
|
@@ -58,6 +57,28 @@ export default class UsersUpdate extends BaseCommand {
|
|
|
58
57
|
async run() {
|
|
59
58
|
const { args, flags } = await this.parse(UsersUpdate);
|
|
60
59
|
this.parsedFlags = flags;
|
|
60
|
+
const validationErrors = [];
|
|
61
|
+
if (flags['first-name'] && String(flags['first-name']).length > 255) {
|
|
62
|
+
validationErrors.push({ message: `--first-name: максимум 255 символов (передано: ${String(flags['first-name']).length})`, flag: 'first-name' });
|
|
63
|
+
}
|
|
64
|
+
if (flags['last-name'] && String(flags['last-name']).length > 255) {
|
|
65
|
+
validationErrors.push({ message: `--last-name: максимум 255 символов (передано: ${String(flags['last-name']).length})`, flag: 'last-name' });
|
|
66
|
+
}
|
|
67
|
+
if (flags['email'] && String(flags['email']).length > 255) {
|
|
68
|
+
validationErrors.push({ message: `--email: максимум 255 символов (передано: ${String(flags['email']).length})`, flag: 'email' });
|
|
69
|
+
}
|
|
70
|
+
if (flags['phone-number'] && String(flags['phone-number']).length > 255) {
|
|
71
|
+
validationErrors.push({ message: `--phone-number: максимум 255 символов (передано: ${String(flags['phone-number']).length})`, flag: 'phone-number' });
|
|
72
|
+
}
|
|
73
|
+
if (flags['nickname'] && String(flags['nickname']).length > 255) {
|
|
74
|
+
validationErrors.push({ message: `--nickname: максимум 255 символов (передано: ${String(flags['nickname']).length})`, flag: 'nickname' });
|
|
75
|
+
}
|
|
76
|
+
if (flags['department'] && String(flags['department']).length > 255) {
|
|
77
|
+
validationErrors.push({ message: `--department: максимум 255 символов (передано: ${String(flags['department']).length})`, flag: 'department' });
|
|
78
|
+
}
|
|
79
|
+
if (validationErrors.length > 0) {
|
|
80
|
+
this.validationError(validationErrors);
|
|
81
|
+
}
|
|
61
82
|
const body = { user: {
|
|
62
83
|
first_name: flags['first-name'],
|
|
63
84
|
last_name: flags['last-name'],
|
|
@@ -85,7 +106,7 @@ export default class UsersUpdate extends BaseCommand {
|
|
|
85
106
|
path: `/users/${args.id}`,
|
|
86
107
|
body,
|
|
87
108
|
});
|
|
88
|
-
const responseBody = data;
|
|
109
|
+
const responseBody = (data ?? {});
|
|
89
110
|
const result = responseBody.data ?? responseBody;
|
|
90
111
|
this.output(result);
|
|
91
112
|
}
|
|
@@ -5,9 +5,9 @@ import * as clack from '@clack/prompts';
|
|
|
5
5
|
export default class ViewsOpen extends BaseCommand {
|
|
6
6
|
static description = "Открытие представления";
|
|
7
7
|
static examples = [
|
|
8
|
-
"Показать интерактивную форму
|
|
9
|
-
"Опрос сотрудников через
|
|
10
|
-
"Форма
|
|
8
|
+
"Показать интерактивную форму пользователю — Немедленно открой форму:\n $ pachca views open",
|
|
9
|
+
"Опрос сотрудников через форму — Открой форму с полями опроса:\n $ pachca views open",
|
|
10
|
+
"Форма заявки/запроса — При нажатии открой форму с полями: тема, описание, приоритет:\n $ pachca views open"
|
|
11
11
|
];
|
|
12
12
|
static scope = "views:write";
|
|
13
13
|
static apiMethod = "POST";
|
|
@@ -123,7 +123,7 @@ export default class ViewsOpen extends BaseCommand {
|
|
|
123
123
|
path: '/views/open',
|
|
124
124
|
body,
|
|
125
125
|
});
|
|
126
|
-
const responseBody = data;
|
|
126
|
+
const responseBody = (data ?? {});
|
|
127
127
|
const result = responseBody.data ?? responseBody;
|
|
128
128
|
this.output(result);
|
|
129
129
|
}
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"tasks:get": "Информация о напоминании",
|
|
60
60
|
"tasks:update": "Редактирование напоминания",
|
|
61
61
|
"tasks:delete": "Удаление напоминания",
|
|
62
|
+
"threads:create": "Новый самостоятельный тред",
|
|
62
63
|
"threads:list": "Список тредов",
|
|
63
64
|
"threads:get": "Информация о треде",
|
|
64
65
|
"files:uploads": "Получение подписи, ключа и других параметров",
|
package/dist/data/changelog.json
CHANGED
|
@@ -1,4 +1,71 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "2026.7.2",
|
|
4
|
+
"date": "27 июля 2026",
|
|
5
|
+
"changes": [
|
|
6
|
+
{
|
|
7
|
+
"type": "-",
|
|
8
|
+
"command": "files direct-url",
|
|
9
|
+
"description": "Файл теперь добавляется в форму последним — S3 игнорирует поля после файла, из-за чего загрузка отклонялась с 400"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "-",
|
|
13
|
+
"command": "",
|
|
14
|
+
"description": "Явный `--profile` больше не перебивается переменной `PACHCA_TOKEN` — команда с указанным профилем не уйдёт в чужое пространство"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "-",
|
|
18
|
+
"command": "",
|
|
19
|
+
"description": "Запись (`POST`/`DELETE`/`PATCH`) больше не повторяется автоматически при 503 — повтор мог создать дубль сообщения"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "-",
|
|
23
|
+
"command": "",
|
|
24
|
+
"description": "`Retry-After` в формате даты больше не игнорируется, значение ограничено разумным пределом"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "-",
|
|
28
|
+
"command": "chats download-export",
|
|
29
|
+
"description": "Имя файла из `Content-Disposition` больше не может увести запись за пределы указанной папки"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "-",
|
|
33
|
+
"command": "",
|
|
34
|
+
"description": "Вывод `-o csv`: ячейки, начинающиеся с `=`, `+`, `-` или `@`, экранируются; объекты и массивы выводятся как JSON, а не `[object Object]`"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "-",
|
|
38
|
+
"command": "",
|
|
39
|
+
"description": "`--timeout` меньше 1 отклоняется, а не приводит к мгновенной отмене запроса"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "-",
|
|
43
|
+
"command": "",
|
|
44
|
+
"description": "Примеры в `--help` подписаны шагом сценария, а не общим заголовком (`reactions remove` больше не подписан «Добавить реакцию»)"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "-",
|
|
48
|
+
"command": "files direct-url",
|
|
49
|
+
"description": "Команда больше не падает с TypeError при успешной загрузке: S3 отвечает 204 с пустым телом, а команда пыталась прочитать из него поле"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"version": "2026.7.1",
|
|
55
|
+
"date": "24 июля 2026",
|
|
56
|
+
"changes": [
|
|
57
|
+
{
|
|
58
|
+
"type": "+",
|
|
59
|
+
"command": "threads create",
|
|
60
|
+
"description": "Новая команда — создание самостоятельного треда без привязки к сообщению"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "-",
|
|
64
|
+
"command": "",
|
|
65
|
+
"description": "Примеры в `--help` больше не смешиваются между командами с общим путём (например, create и list одного ресурса показывали примеры друг друга)"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
2
69
|
{
|
|
3
70
|
"version": "2026.7.0",
|
|
4
71
|
"date": "7 июля 2026",
|