@indigoai-us/hq-cli 5.78.0 → 5.79.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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.79.0]
6
+
7
+ ### Added
8
+
9
+ - Meeting commands now print a friendly `Meeting notetaker bots require the
10
+ $500/mo HQ Team plan` upgrade message instead of raw `API error (402)`;
11
+ `--json` continues to emit the raw body. (#281)
12
+
5
13
  ## [5.78.0]
6
14
 
7
15
  ### Added
@@ -95,9 +95,12 @@ async function resolveShortId(token, prefix, query) {
95
95
  console.error(chalk.red(`No meeting matches ID "${prefix}". It may be older than the meetings shown by \`hq meetings list\`, still processing, or attributed to a different company. Pass the full meeting id, add --company <slug>, or widen the list with \`hq meetings list --limit <n>\`.`));
96
96
  process.exit(1);
97
97
  }
98
- async function handleApiError(res) {
98
+ async function handleApiError(res, json = false) {
99
99
  const body = (await res.json().catch(() => ({})));
100
- if (res.status === 401) {
100
+ if (json) {
101
+ console.log(JSON.stringify(body, null, 2));
102
+ }
103
+ else if (res.status === 401) {
101
104
  console.error(chalk.red("Not authenticated — run `hq login` first"));
102
105
  }
103
106
  else if (res.status === 403) {
@@ -106,6 +109,10 @@ async function handleApiError(res) {
106
109
  else if (res.status === 404) {
107
110
  console.error(chalk.red(body.error ?? "Not found"));
108
111
  }
112
+ else if (res.status === 402) {
113
+ console.error(chalk.red("Meeting notetaker bots require the $500/mo HQ Team plan."));
114
+ console.error(chalk.dim(body.message ?? body.error ?? "Upgrade your company to HQ Team to record meetings."));
115
+ }
109
116
  else {
110
117
  console.error(chalk.red(`API error (${res.status}): ${body.error ?? res.statusText}`));
111
118
  }
@@ -190,7 +197,7 @@ export function registerMeetingsCommand(program) {
190
197
  query.companyId = await getCompanyUid(token, companySlug);
191
198
  const res = await vaultApiFetch({ token, path: "/v1/meetings", query });
192
199
  if (!res.ok)
193
- await handleApiError(res);
200
+ await handleApiError(res, meetings.opts().json);
194
201
  const data = (await res.json());
195
202
  if (meetings.opts().json) {
196
203
  console.log(JSON.stringify(data, null, 2));
@@ -227,7 +234,7 @@ export function registerMeetingsCommand(program) {
227
234
  body: { meetingUrl },
228
235
  });
229
236
  if (!res.ok)
230
- await handleApiError(res);
237
+ await handleApiError(res, meetings.opts().json);
231
238
  const data = (await res.json());
232
239
  if (meetings.opts().json) {
233
240
  console.log(JSON.stringify(data, null, 2));
@@ -263,7 +270,7 @@ export function registerMeetingsCommand(program) {
263
270
  query,
264
271
  });
265
272
  if (!res.ok)
266
- await handleApiError(res);
273
+ await handleApiError(res, meetings.opts().json);
267
274
  const detail = (await res.json());
268
275
  if (meetings.opts().json) {
269
276
  console.log(JSON.stringify(detail, null, 2));
@@ -348,7 +355,7 @@ export function registerMeetingsCommand(program) {
348
355
  body: { companyId, applyToSeries },
349
356
  });
350
357
  if (!res.ok)
351
- await handleApiError(res);
358
+ await handleApiError(res, meetings.opts().json);
352
359
  const data = (await res.json());
353
360
  if (meetings.opts().json) {
354
361
  console.log(JSON.stringify(data, null, 2));
@@ -389,7 +396,7 @@ export function registerMeetingsCommand(program) {
389
396
  query: params,
390
397
  });
391
398
  if (!res.ok)
392
- await handleApiError(res);
399
+ await handleApiError(res, meetings.opts().json);
393
400
  const data = (await res.json());
394
401
  if (meetings.opts().json) {
395
402
  console.log(JSON.stringify(data, null, 2));
@@ -422,7 +429,7 @@ export function registerMeetingsCommand(program) {
422
429
  query,
423
430
  });
424
431
  if (!res.ok)
425
- await handleApiError(res);
432
+ await handleApiError(res, meetings.opts().json);
426
433
  const detail = (await res.json());
427
434
  if (isMarkdownShape(detail)) {
428
435
  const documentUrl = detail.source.presigned_url;
@@ -492,7 +499,7 @@ export function registerMeetingsCommand(program) {
492
499
  query,
493
500
  });
494
501
  if (!res.ok)
495
- await handleApiError(res);
502
+ await handleApiError(res, meetings.opts().json);
496
503
  const detail = (await res.json());
497
504
  if (isMarkdownShape(detail)) {
498
505
  if (hasSignals(detail.signals)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.78.0",
3
+ "version": "5.79.0",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {