diff --git a/.changeset/tugasna-help-fixes.md b/.changeset/tugasna-help-fixes.md new file mode 100644 index 0000000..762b70a --- /dev/null +++ b/.changeset/tugasna-help-fixes.md @@ -0,0 +1,11 @@ +--- +"@sawala/cli": patch +--- + +Correct the `sawala tugasna` command help text to match the Tugasna API. +`comment create`/`comment update` now document the body field as `{ text }` +(it was mislabeled `{ body }`); `item move` documents `{ statusId, position }` +as both required; `backlog place` documents `statusId` as required; and the +`item create`/`item update` help notes that `startDate`/`dueDate` are epoch-ms +numbers, not date strings. Help text only — the requests the CLI sends are +unchanged (it passes your `--data`/`--file` body through verbatim). diff --git a/packages/sawala/src/commands/tugasna.ts b/packages/sawala/src/commands/tugasna.ts index b5687d2..2581e47 100644 --- a/packages/sawala/src/commands/tugasna.ts +++ b/packages/sawala/src/commands/tugasna.ts @@ -314,7 +314,7 @@ export function createTugasnaCommand(): Command { item .command('create ') - .description('Create an item on a board. Body: { title, description?, statusId?, assignees?, startDate?, dueDate? }.') + .description('Create an item on a board. Body: { title, description?, statusId?, assignees?, startDate?, dueDate? }. Dates are epoch-ms numbers, not date strings.') .option('-f, --file ', "Read JSON body from path. Use '-' for stdin.") .option('-d, --data ', 'Inline JSON body.') .option('--dry-run', 'Validate and print the payload without writing.') @@ -330,7 +330,7 @@ export function createTugasnaCommand(): Command { item .command('update ') - .description('Update an item (PATCH). Body: any subset of the item fields.') + .description('Update an item (PATCH). Body: any subset of { title, description, startDate, dueDate }. Dates are epoch-ms numbers (or null to clear).') .option('-f, --file ', "Read JSON body from path. Use '-' for stdin.") .option('-d, --data ', 'Inline JSON body.') .option('--dry-run', 'Validate and print the payload without writing.') @@ -370,7 +370,7 @@ export function createTugasnaCommand(): Command { item .command('move ') - .description('Move/reorder an item within or across statuses. Body: { statusId?, position? }.') + .description('Move/reorder an item within or across statuses. Body: { statusId, position } (both required; position is a 0-based index).') .option('-f, --file ', "Read JSON body from path. Use '-' for stdin.") .option('-d, --data ', 'Inline JSON body.') .option('--dry-run', 'Validate and print the payload without writing.') @@ -467,7 +467,7 @@ export function createTugasnaCommand(): Command { backlog .command('place ') - .description('Place a backlog item onto a board. Body: { boardId, statusId?, position? }.') + .description('Place a backlog item onto a board. Body: { boardId, statusId, position? } (boardId and statusId required).') .option('-f, --file ', "Read JSON body from path. Use '-' for stdin.") .option('-d, --data ', 'Inline JSON body.') .option('--dry-run', 'Validate and print the payload without writing.') @@ -518,7 +518,7 @@ export function createTugasnaCommand(): Command { comment .command('create ') - .description('Add a comment to an item. Body: { body } (the comment text).') + .description('Add a comment to an item. Body: { text } (the comment text; add { parentId } to reply).') .option('-f, --file ', "Read JSON body from path. Use '-' for stdin.") .option('-d, --data ', 'Inline JSON body.') .option('--dry-run', 'Validate and print the payload without writing.') @@ -534,7 +534,7 @@ export function createTugasnaCommand(): Command { comment .command('update ') - .description('Edit a comment (PATCH). Body: { body }.') + .description('Edit a comment (PATCH). Body: { text }.') .option('-f, --file ', "Read JSON body from path. Use '-' for stdin.") .option('-d, --data ', 'Inline JSON body.') .option('--dry-run', 'Validate and print the payload without writing.')