diff --git a/src/commands/feed/summary.ts b/src/commands/feed/summary.ts index 1c9c905..80cd662 100644 --- a/src/commands/feed/summary.ts +++ b/src/commands/feed/summary.ts @@ -22,8 +22,7 @@ export const feedSummaryCommand: Command = { const toMs = getArgNumber(args, 'to'); const api = new PolylaneAPI(config); - const result = await api.feedSummary({ - workspaceId, + const result = await api.feedSummary(workspaceId, { ...(fromMs !== undefined ? { from: fromMs } : {}), ...(toMs !== undefined ? { to: toMs } : {}), }); diff --git a/src/commands/issue/timeline.ts b/src/commands/issue/timeline.ts index 5e5e800..5a0eb01 100644 --- a/src/commands/issue/timeline.ts +++ b/src/commands/issue/timeline.ts @@ -33,9 +33,7 @@ export const issueTimelineCommand: Command = { const to = getArgNumber(args, 'to'); const api = new PolylaneAPI(config); - const result = await api.issuesTimelineList({ - workspaceId, - issueId, + const result = await api.issuesTimelineList(workspaceId, issueId, { perPage: limit, ...(types ? { types } : {}), ...(from !== undefined ? { from } : {}), diff --git a/src/commands/workspace/create.ts b/src/commands/workspace/create.ts index f6d19b3..8629bb4 100644 --- a/src/commands/workspace/create.ts +++ b/src/commands/workspace/create.ts @@ -25,7 +25,17 @@ export const workspaceCreateCommand: Command = { const slug = getArgString(args, 'slug'); const noDefault = args.noDefault === true; - const body: Parameters[0] = { name }; + // Workspace creation accepts the terms on the user's behalf, so say so + // out loud first — on stderr, like every other notice, so piped stdout + // stays pure data. Printed before the call and regardless of --quiet. + process.stderr.write( + 'By creating a workspace you accept the Polylane Terms of Service: https://console.polylane.com/terms\n', + ); + + // The non-literal assignment keeps typecheck green on spec versions from + // before acceptTerms existed. + const withTerms = { name, acceptTerms: true as const }; + const body: Parameters[0] = withTerms; if (description !== undefined) body.description = description; if (slug !== undefined) body.slug = slug;