lansenger-cli 1.0.2 → 1.0.4

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.
@@ -12,8 +12,8 @@ function registerGroupCommands(program) {
12
12
  .option("--owner <ownerId>", "Owner staff ID", "")
13
13
  .option("-d, --desc <desc>", "Group description", "")
14
14
  .option("--avatar <avatarId>", "Avatar ID", "")
15
- .option("--staff <ids...>", "Staff IDs to add, space-separated")
16
- .option("--dept <ids...>", "Department IDs to add, space-separated")
15
+ .option("-S, --staff <ids...>", "Staff IDs to add (space-separated)")
16
+ .option("-D, --dept <ids...>", "Department IDs to add (space-separated)")
17
17
  .option("--user-token <token>", "User token", "")
18
18
  .action(async (name, orgId, opts) => {
19
19
  const client = (0, utils_1.getClient)();
@@ -110,9 +110,9 @@ function registerGroupCommands(program) {
110
110
  .command("update-members")
111
111
  .description("Add or remove group members")
112
112
  .argument("<groupId>", "Group ID")
113
- .option("--add <ids...>", "Staff IDs to add, space-separated")
114
- .option("--remove <ids...>", "Staff IDs to remove, space-separated")
115
- .option("--add-dept <ids...>", "Department IDs to add, space-separated")
113
+ .option("-A, --add <ids...>", "Staff IDs to add (space-separated)")
114
+ .option("-X, --remove <ids...>", "Staff IDs to remove (space-separated)")
115
+ .option("-D, --add-dept <ids...>", "Department IDs to add (space-separated)")
116
116
  .option("--user-token <token>", "User token", "")
117
117
  .action(async (groupId, opts) => {
118
118
  const client = (0, utils_1.getClient)();
@@ -14,7 +14,7 @@ function registerMessageCommands(program) {
14
14
  .option("--cover-image <path>", "Cover image path for video attachments", "")
15
15
  .option("-g, --group", "Send as group message", false)
16
16
  .option("--mention-all", "@all in group", false)
17
- .option("--mention <ids...>", "User IDs to @mention (space-separated, e.g. --mention id1 id2)")
17
+ .option("-m, --mention <ids...>", "User IDs to @mention (space-separated)")
18
18
  .option("--user-token <token>", "User token for private channel", "")
19
19
  .option("--sender-id <senderId>", "Sender staff ID for group message", "")
20
20
  .action(async (chatId, content, opts) => {
@@ -38,7 +38,7 @@ function registerMessageCommands(program) {
38
38
  .argument("<chatId>", "Chat ID")
39
39
  .argument("<content>", "Markdown content")
40
40
  .option("--mention-all", "@all in group", false)
41
- .option("--mention <ids...>", "User IDs to @mention (space-separated, e.g. --mention id1 id2)")
41
+ .option("-m, --mention <ids...>", "User IDs to @mention (space-separated)")
42
42
  .option("-g, --group", "Send as group message", false)
43
43
  .option("--user-token <token>", "User token for private channel", "")
44
44
  .option("--sender-id <senderId>", "Sender staff ID for group message", "")
@@ -165,8 +165,8 @@ function registerMessageCommands(program) {
165
165
  .option("--head-icon <url>", "Head icon URL", "")
166
166
  .option("--status-desc <desc>", "Head status description (div-style HTML, max 30 bytes)", "")
167
167
  .option("--status-colour <colour>", "Head status DOT colour (hex, e.g. #FFB116)", "")
168
- .option("--field <json...>", "Card field as JSON, space-separated, e.g. --field '{\"key\":\"k\",\"value\":\"v\"}' '{\"key\":\"k2\",\"value\":\"v2\"}'")
169
- .option("--link <json...>", "Card link as JSON, space-separated, e.g. --link '{\"title\":\"T\",\"url\":\"U\"}' '{\"title\":\"T2\",\"url\":\"U2\"}'")
168
+ .option("-F, --field <json...>", "Card fields as JSON dicts (space-separated)")
169
+ .option("-L, --link <json...>", "Card links as JSON dicts (space-separated)")
170
170
  .option("-g, --group", "Send as group message", false)
171
171
  .option("--user-token <token>", "User token for private channel", "")
172
172
  .option("--sender-id <senderId>", "Sender staff ID for group message", "")
@@ -209,7 +209,7 @@ function registerMessageCommands(program) {
209
209
  .option("--last", "Mark as last update", false)
210
210
  .option("--status-desc <desc>", "New status description (div-style HTML, max 30 bytes)", "")
211
211
  .option("--status-colour <colour>", "New status DOT colour (hex)", "")
212
- .option("--link <json...>", "Updated link as JSON, space-separated")
212
+ .option("-L, --link <json...>", "Updated links as JSON dicts (space-separated)")
213
213
  .action(async (msgId, opts) => {
214
214
  const client = (0, utils_1.getClient)();
215
215
  let headStatusInfo = undefined;
@@ -248,8 +248,8 @@ function registerMessageCommands(program) {
248
248
  .description("Send a bot notification message")
249
249
  .argument("<msgType>", "Message type")
250
250
  .argument("<msgData>", "Message data as JSON")
251
- .option("--chat-id <ids...>", "Chat IDs, space-separated (or group IDs if --group)")
252
- .option("--dept <ids...>", "Department IDs, space-separated (bot channel only)")
251
+ .option("-C, --chat-id <ids...>", "Chat IDs (space-separated, or group IDs if --group)")
252
+ .option("-D, --dept <ids...>", "Department IDs (space-separated, bot channel only)")
253
253
  .option("--user-token <token>", "User token", "")
254
254
  .option("--entry-id <entryId>", "App entry selector", "")
255
255
  .option("-g, --group", "Send to groups instead of users", false)
@@ -273,7 +273,7 @@ function registerMessageCommands(program) {
273
273
  .option("--user-token <token>", "User token", "")
274
274
  .option("--sender-id <senderId>", "Sender staff ID", "")
275
275
  .option("--mention-all", "@all (text/formatText only)", false)
276
- .option("--mention <ids...>", "User IDs to @mention, space-separated (text/formatText only)")
276
+ .option("-m, --mention <ids...>", "User IDs to @mention (space-separated, text/formatText only)")
277
277
  .option("--outlines <outlines>", "Group notification digest", "")
278
278
  .option("--entry-id <entryId>", "App entry selector", "")
279
279
  .action(async (groupId, msgType, msgData, opts) => {
@@ -312,7 +312,7 @@ function registerMessageCommands(program) {
312
312
  .option("--head <head>", "OA card head title", "")
313
313
  .option("--sub-title <sub>", "OA card sub title", "")
314
314
  .option("--staff-id <id>", "Staff ID", "")
315
- .option("--field <json...>", "Card field as JSON, space-separated, e.g. --field '{\"key\":\"k\",\"value\":\"v\"}'")
315
+ .option("-F, --field <json...>", "Card fields as JSON dicts (space-separated)")
316
316
  .option("--link <url>", "Card click link URL", "")
317
317
  .option("--pc-link <url>", "PC link URL", "")
318
318
  .option("--pad-link <url>", "Pad link URL", "")
@@ -345,8 +345,8 @@ function registerMessageCommands(program) {
345
345
  .description("Send a public account message")
346
346
  .argument("<msgType>", "Message type")
347
347
  .argument("<msgData>", "Message data as JSON")
348
- .option("--chat-id <ids...>", "Chat IDs, space-separated")
349
- .option("--dept <ids...>", "Department IDs, space-separated")
348
+ .option("-C, --chat-id <ids...>", "Chat IDs (space-separated)")
349
+ .option("-D, --dept <ids...>", "Department IDs (space-separated)")
350
350
  .option("--account-id <id>", "Account ID", "")
351
351
  .option("--entry-id <entryId>", "App entry selector", "")
352
352
  .option("--attach <attach>", "Attach info", "")
@@ -388,8 +388,8 @@ function registerMessageCommands(program) {
388
388
  .command("send-reminder")
389
389
  .description("Send a reminder for a message")
390
390
  .argument("<msgId>", "Message ID to remind about")
391
- .option("-t, --type <types...>", "Reminder types, space-separated: 1=popup, 2=SMS, 3=phone call")
392
- .option("-u, --user <ids...>", "User IDs to remind, space-separated (staff openIds)")
391
+ .option("-t, --type <types...>", "Reminder types (space-separated): 1=popup, 2=SMS, 3=phone call")
392
+ .option("-u, --user <ids...>", "User IDs to remind (space-separated, staff openIds)")
393
393
  .action(async (msgId, opts) => {
394
394
  const client = (0, utils_1.getClient)();
395
395
  const reminderTypes = opts.type ? opts.type.map(Number) : [];
@@ -73,8 +73,8 @@ function registerStaffCommands(program) {
73
73
  .argument("<keyword>", "Search keyword")
74
74
  .option("--user-token <token>", "User token", "")
75
75
  .option("--user-id <userId>", "User ID context", "")
76
- .option("--recursive/--no-recursive", "Recursive search", true)
77
- .option("--sector <ids...>", "Sector IDs, space-separated")
76
+ .option("-R, --recursive", "Recursive search", true)
77
+ .option("-S, --sector <ids...>", "Sector IDs (space-separated)")
78
78
  .option("-p, --page <page>", "Page number")
79
79
  .option("-s, --size <size>", "Page size")
80
80
  .action(async (keyword, opts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lansenger-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "CLI for Lansenger (蓝信) — send messages, manage groups, staff, departments, calendars, todos, and more",
5
5
  "main": "dist/main.js",
6
6
  "bin": {