@basementuniverse/kanbn 0.9.0 → 1.0.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.
Files changed (46) hide show
  1. package/docs/commands/burndown.txt +7 -1
  2. package/docs/commands/gantt.txt +36 -0
  3. package/docs/commands/help.txt +1 -0
  4. package/docs/index-structure.md +20 -1
  5. package/docs/quick-start.md +1 -1
  6. package/docs/task-structure.md +47 -0
  7. package/example/.kanbn/index.md +63 -0
  8. package/example/.kanbn/tasks/add-basic-activity-feed.md +53 -0
  9. package/example/.kanbn/tasks/add-passwordless-login-option.md +34 -0
  10. package/example/.kanbn/tasks/add-usage-alert-email-thresholds.md +35 -0
  11. package/example/.kanbn/tasks/build-email-template-system.md +30 -0
  12. package/example/.kanbn/tasks/build-invoice-download-endpoint.md +43 -0
  13. package/example/.kanbn/tasks/build-tenant-settings-page.md +48 -0
  14. package/example/.kanbn/tasks/create-organization-switcher.md +53 -0
  15. package/example/.kanbn/tasks/create-sandbox-environment-provisioner.md +36 -0
  16. package/example/.kanbn/tasks/create-self-serve-cancellation-flow.md +38 -0
  17. package/example/.kanbn/tasks/define-product-pricing-strategy.md +37 -0
  18. package/example/.kanbn/tasks/design-onboarding-checklist.md +30 -0
  19. package/example/.kanbn/tasks/design-team-invite-expiry-flow.md +33 -0
  20. package/example/.kanbn/tasks/implement-data-retention-policy-jobs.md +30 -0
  21. package/example/.kanbn/tasks/implement-feature-flags-foundation.md +36 -0
  22. package/example/.kanbn/tasks/implement-project-creation-wizard.md +44 -0
  23. package/example/.kanbn/tasks/implement-stripe-webhook-signature-check.md +54 -0
  24. package/example/.kanbn/tasks/implement-team-permissions-ui.md +57 -0
  25. package/example/.kanbn/tasks/implement-user-signup-and-login.md +62 -0
  26. package/example/.kanbn/tasks/integrate-crm-lead-sync.md +35 -0
  27. package/example/.kanbn/tasks/legal-review-terms-and-privacy.md +30 -0
  28. package/example/.kanbn/tasks/migrate-legacy-events-to-new-schema.md +48 -0
  29. package/example/.kanbn/tasks/optimize-dashboard-first-load.md +52 -0
  30. package/example/.kanbn/tasks/prototype-report-export-scheduler.md +34 -0
  31. package/example/.kanbn/tasks/publish-internal-qa-checklist.md +53 -0
  32. package/example/.kanbn/tasks/setup-ci-pipeline.md +53 -0
  33. package/package.json +3 -2
  34. package/routes/gantt.json +27 -0
  35. package/skills/kanbn-plan/SKILL.md +0 -0
  36. package/src/board.js +21 -2
  37. package/src/controller/add.js +33 -1
  38. package/src/controller/burndown.js +72 -5
  39. package/src/controller/edit.js +68 -1
  40. package/src/controller/find.js +5 -0
  41. package/src/controller/gantt.js +375 -0
  42. package/src/controller/init.js +2 -1
  43. package/src/controller/sort.js +8 -0
  44. package/src/main.d.ts +295 -340
  45. package/src/main.js +2591 -2050
  46. package/src/parse-task.js +211 -3
package/src/main.d.ts CHANGED
@@ -58,343 +58,298 @@ declare type sprint = {
58
58
  description?: string
59
59
  };
60
60
 
61
- /**
62
- * Get configuration settings from the config file if it exists, otherwise return null
63
- * @return {Promise<config|null>} Configuration settings or null if there is no separate config file
64
- */
65
- export function getConfig(): Promise<config|null>;
66
-
67
- /**
68
- * Clear cached config
69
- */
70
- export function clearConfigCache(): void;
71
-
72
- /**
73
- * Get the name of the folder where the index and tasks are stored
74
- * @return {Promise<string>} The kanbn folder name
75
- */
76
- export function getFolderName(): Promise<string>;
77
-
78
- /**
79
- * Get the index filename
80
- * @return {Promise<string>} The index filename
81
- */
82
- export function getIndexFileName(): Promise<string>;
83
-
84
- /**
85
- * Get the name of the folder where tasks are stored
86
- * @return {Promise<string>} The task folder name
87
- */
88
- export function getTaskFolderName(): Promise<string>;
89
-
90
- /**
91
- * Get the name of the archive folder
92
- * @return {Promise<string>} The archive folder name
93
- */
94
- export function getArchiveFolderName(): Promise<string>;
95
-
96
- /**
97
- * Get the kanbn folder location for the current working directory
98
- * @return {Promise<string>} The kanbn folder path
99
- */
100
- export function getMainFolder(): Promise<string>;
101
-
102
- /**
103
- * Get the index path
104
- * @return {Promise<string>} The kanbn index path
105
- */
106
- export function getIndexPath(): Promise<string>;
107
-
108
- /**
109
- * Get the task folder path
110
- * @return {Promise<string>} The kanbn task folder path
111
- */
112
- export function getTaskFolderPath(): Promise<string>;
113
-
114
- /**
115
- * Get the archive folder path
116
- * @return {Promise<string>} The kanbn archive folder path
117
- */
118
- export function getArchiveFolderPath(): Promise<string>;
119
-
120
- /**
121
- * Get the index as an object
122
- * @return {Promise<index>} The index
123
- */
124
- export function getIndex(): Promise<index>;
125
-
126
- /**
127
- * Get a task as an object
128
- * @param {string} taskId The task id to get
129
- * @return {Promise<task>} The task
130
- */
131
- export function getTask(taskId: string): Promise<task>;
132
-
133
- /**
134
- * Add additional index-based information to a task
135
- * @param {index} index The index object
136
- * @param {task} task The task object
137
- * @return {task} The hydrated task
138
- */
139
- export function hydrateTask(index: index, task: task): task;
140
-
141
- /**
142
- * Return a filtered and sorted list of tasks
143
- * @param {index} index The index object
144
- * @param {task[]} tasks A list of task objects
145
- * @param {object} filters A list of task filters
146
- * @param {object[]} sorters A list of task sorters
147
- * @return {task[]}
148
- */
149
- export function filterAndSortTasks(index: index, tasks: task[], filters: object, sorters: object[]): task[];
150
-
151
- /**
152
- * Overwrite the index file with the specified data
153
- * @param {object} indexData Index data to save
154
- * @return {Promise<void>}
155
- */
156
- export function saveIndex(indexData: object): Promise<void>;
157
-
158
- /**
159
- * Load the index file and parse it to an object
160
- * @return {Promise<index>} The index object
161
- */
162
- export function loadIndex(): Promise<index>;
163
-
164
- /**
165
- * Overwrite a task file with the specified data
166
- * @param {string} path The task path
167
- * @param {object} taskData The task data
168
- */
169
- export function saveTask(path: string, taskData: object): Promise<void>;
170
-
171
- /**
172
- * Load a task file and parse it to an object
173
- * @param {string} taskId The task id
174
- * @return {Promise<task>} The task object
175
- */
176
- export function loadTask(taskId: string): Promise<task>;
177
-
178
- /**
179
- * Load all tracked tasks and return an array of task objects
180
- * @param {index} index The index object
181
- * @param {?string} [columnName=null] The optional column name to filter tasks by
182
- * @return {Promise<task[]>} All tracked tasks
183
- */
184
- export function loadAllTrackedTasks(index: index, columnName?: string|null): Promise<task[]>;
185
-
186
- /**
187
- * Load a task file from the archive and parse it to an object
188
- * @param {string} taskId The task id
189
- * @return {object} The task object
190
- */
191
- export function loadArchivedTask(taskId: string): Promise<task>;
192
-
193
- /**
194
- * Get the date format defined in the index, or the default date format
195
- * @param {index} index The index object
196
- * @return {string} The date format
197
- */
198
- export function getDateFormat(index: index): string;
199
-
200
- /**
201
- * Get the task template for displaying tasks on the kanbn board from the index, or the default task template
202
- * @param {index} index The index object
203
- * @return {string} The task template
204
- */
205
- export function getTaskTemplate(index: index): string;
206
-
207
- /**
208
- * Check if the current working directory has been initialised
209
- * @return {Promise<boolean>} True if the current working directory has been initialised, otherwise false
210
- */
211
- export function initialised(): Promise<boolean>;
212
-
213
- /**
214
- * Initialise a kanbn board in the current working directory
215
- * @param {object} [options={}] Initial columns and other config options
216
- * @return {Promise<void>}
217
- */
218
- export function initialise(options?: object): Promise<void>;
219
-
220
- /**
221
- * Check if a task file exists and is in the index, otherwise throw an error
222
- * @param {string} taskId The task id to check
223
- * @return {Promise<void>}
224
- */
225
- export function taskExists(taskId: string): Promise<void>;
226
-
227
- /**
228
- * Get the column that a task is in or throw an error if the task doesn't exist or isn't indexed
229
- * @param {string} taskId The task id to find
230
- * @return {Promise<string>} The name of the column the task is in
231
- */
232
- export function findTaskColumn(taskId: string): Promise<string>;
233
-
234
- /**
235
- * Create a task file and add the task to the index
236
- * @param {object} taskData The task object
237
- * @param {string} columnName The name of the column to add the task to
238
- * @return {Promise<string>} The id of the task that was created
239
- */
240
- export function createTask(taskData: object, columnName: string): Promise<string>;
241
-
242
- /**
243
- * Add an untracked task to the specified column in the index
244
- * @param {string} taskId The untracked task id
245
- * @param {string} columnName The column to add the task to
246
- * @return {Promise<string>} The id of the task that was added
247
- */
248
- export function addUntrackedTaskToIndex(taskId: string, columnName: string): Promise<string>;
249
-
250
- /**
251
- * Get a list of tracked tasks (i.e. tasks that are listed in the index)
252
- * @param {?string} [columnName=null] The optional column name to filter tasks by
253
- * @return {Promise<Set>} A set of task ids
254
- */
255
- export function findTrackedTasks(columnName?: string|null): Promise<Set<string>>;
256
-
257
- /**
258
- * Get a list of untracked tasks (i.e. markdown files in the tasks folder that aren't listed in the index)
259
- * @return {Promise<Set>} A set of untracked task ids
260
- */
261
- export function findUntrackedTasks(): Promise<Set<string>>;
262
-
263
- /**
264
- * Update an existing task
265
- * @param {string} taskId The id of the task to update
266
- * @param {object} taskData The new task data
267
- * @param {?string} [columnName=null] The column name to move this task to, or null if not moving this task
268
- * @return {Promise<string>} The id of the task that was updated
269
- */
270
- export function updateTask(taskId: string, taskData: object, columnName?: string|null): Promise<string>;
271
-
272
- /**
273
- * Change a task name, rename the task file and update the task id in the index
274
- * @param {string} taskId The id of the task to rename
275
- * @param {string} newTaskName The new task name
276
- * @return {Promise<string>} The new id of the task that was renamed
277
- */
278
- export function renameTask(taskId: string, newTaskName: string): Promise<string>;
279
-
280
- /**
281
- * Move a task from one column to another column
282
- * @param {string} taskId The task id to move
283
- * @param {string} columnName The name of the column that the task will be moved to
284
- * @param {?number} [position=null] The position to move the task to within the target column
285
- * @param {boolean} [relative=false] Treat the position argument as relative instead of absolute
286
- * @return {Promise<string>} The id of the task that was moved
287
- */
288
- export function moveTask(taskId: string, columnName: string, position?: number|null, relative?: boolean): Promise<string>;
289
-
290
- /**
291
- * Remove a task from the index and optionally delete the task file as well
292
- * @param {string} taskId The id of the task to remove
293
- * @param {boolean} [removeFile=false] True if the task file should be removed
294
- * @return {string} The id of the task that was deleted
295
- */
296
- export function deleteTask(taskId: string, removeFile?: boolean): Promise<string>;
297
-
298
- /**
299
- * Search for indexed tasks
300
- * @param {object} [filters={}] The filters to apply
301
- * @param {boolean} [quiet=false] Only return task ids if true, otherwise return full task details
302
- * @return {Promise<object[]>} A list of tasks that match the filters
303
- */
304
- export function search(filters?: object, quiet?: boolean): Promise<object[]>;
305
-
306
- /**
307
- * Output project status information
308
- * @param {boolean} [quiet=false] Output full or partial status information
309
- * @param {boolean} [untracked=false] Show a list of untracked tasks
310
- * @param {boolean} [due=false] Show information about overdue tasks and time remaining
311
- * @param {?string|?number} [sprint=null] The sprint name or number to show stats for, or null for current sprint
312
- * @param {?Date[]} [dates=null] The date(s) to show stats for, or null for no date filter
313
- * @return {Promise<status|string[]>} Project status information as an object, or an array of untracked task filenames
314
- */
315
- export function status(
316
- quiet?: boolean,
317
- untracked?: boolean,
318
- due?: boolean,
319
- sprint?: string|number|null,
320
- dates?: Date[]|null
321
- ): Promise<status|string[]>;
322
-
323
- /**
324
- * Validate the index and task files
325
- * @param {boolean} [save=false] Re-save all files
326
- * @return {Promise<boolean>} True if everything validated, otherwise an array of parsing errors
327
- */
328
- export function validate(save?: boolean): Promise<boolean>;
329
-
330
- /**
331
- * Sort a column in the index
332
- * @param {string} columnName The column name to sort
333
- * @param {object[]} sorters A list of objects containing the field to sort by, filters and sort order
334
- * @param {boolean} [save=false] True if the settings should be saved in index
335
- * @return {Promise<void>}
336
- */
337
- export function sort(columnName: string, sorters: object[], save?: boolean): Promise<void>;
338
-
339
- /**
340
- * Start a sprint
341
- * @param {string} name Sprint name
342
- * @param {string} description Sprint description
343
- * @param {Date} start Sprint start date
344
- * @return {Promise<sprint>} The sprint object
345
- */
346
- export function sprint(name: string, description: string, start: Date): Promise<sprint>;
347
-
348
- /**
349
- * Output burndown chart data
350
- * @param {?string[]} [sprints=null] The sprint names or numbers to show a chart for, or null for
351
- * the current sprint
352
- * @param {?Date[]} [dates=null] The dates to show a chart for, or null for no date filter
353
- * @param {?string} [assigned=null] The assigned user to filter for, or null for no assigned filter
354
- * @param {?string[]} [columns=null] The columns to filter for, or null for no column filter
355
- * @param {?string} [normalise=null] The date normalisation mode
356
- * @return {Promise<object>} Burndown chart data as an object
357
- */
358
- export function burndown(
359
- sprints?: string[]|null,
360
- dates?: Date[]|null,
361
- assigned?: string|null,
362
- columns?: string[]|null,
363
- normalise?: string|null
364
- ): Promise<object>;
365
-
366
- /**
367
- * Add a comment to a task
368
- * @param {string} taskId The task id
369
- * @param {string} text The comment text
370
- * @param {string} author The comment author
371
- * @return {Promise<string>} The task id
372
- */
373
- export function comment(taskId: string, text: string, author: string): Promise<string>;
374
-
375
- /**
376
- * Return a list of archived tasks
377
- * @return {Promise<string[]>} A list of archived task ids
378
- */
379
- export function listArchivedTasks(): Promise<string[]>;
380
-
381
- /**
382
- * Move a task to the archive
383
- * @param {string} taskId The task id
384
- * @return {Promise<string>} The task id
385
- */
386
- export function archiveTask(taskId: string): Promise<string>;
387
-
388
- /**
389
- * Restore a task from the archive
390
- * @param {string} taskId The task id
391
- * @param {?string} [columnName=null] The column to restore the task to
392
- * @return {Promise<string>} The task id
393
- */
394
- export function restoreTask(taskId: string, columnName?: string|null): Promise<string>;
395
-
396
- /**
397
- * Nuke it from orbit, it's the only way to be sure
398
- * @return {Promise<void>}
399
- */
400
- export function removeAll(): Promise<void>;
61
+ export class Kanbn {
62
+ constructor(root?: any);
63
+ ROOT: string;
64
+ CONFIG_YAML: string;
65
+ CONFIG_JSON: string;
66
+ configMemo: any;
67
+ /**
68
+ * Check if a separate config file exists
69
+ * @returns {Promise<boolean>} True if a config file exists
70
+ */
71
+ configExists(): Promise<boolean>;
72
+ /**
73
+ * Save configuration data to a separate config file
74
+ */
75
+ saveConfig(config: any): Promise<void>;
76
+ /**
77
+ * Get configuration settings from the config file if it exists, otherwise return null
78
+ * @return {Promise<Object|null>} Configuration settings or null if there is no separate config file
79
+ */
80
+ getConfig(): Promise<any | null>;
81
+ /**
82
+ * Clear cached config
83
+ */
84
+ clearConfigCache(): void;
85
+ /**
86
+ * Get the name of the folder where the index and tasks are stored
87
+ * @return {Promise<string>} The kanbn folder name
88
+ */
89
+ getFolderName(): Promise<string>;
90
+ /**
91
+ * Get the index filename
92
+ * @return {Promise<string>} The index filename
93
+ */
94
+ getIndexFileName(): Promise<string>;
95
+ /**
96
+ * Get the name of the folder where tasks are stored
97
+ * @return {Promise<string>} The task folder name
98
+ */
99
+ getTaskFolderName(): Promise<string>;
100
+ /**
101
+ * Get the name of the archive folder
102
+ * @return {Promise<string>} The archive folder name
103
+ */
104
+ getArchiveFolderName(): Promise<string>;
105
+ /**
106
+ * Get the kanbn folder location for the current working directory
107
+ * @return {Promise<string>} The kanbn folder path
108
+ */
109
+ getMainFolder(): Promise<string>;
110
+ /**
111
+ * Get the index path
112
+ * @return {Promise<string>} The kanbn index path
113
+ */
114
+ getIndexPath(): Promise<string>;
115
+ /**
116
+ * Get the task folder path
117
+ * @return {Promise<string>} The kanbn task folder path
118
+ */
119
+ getTaskFolderPath(): Promise<string>;
120
+ /**
121
+ * Get the archive folder path
122
+ * @return {Promise<string>} The kanbn archive folder path
123
+ */
124
+ getArchiveFolderPath(): Promise<string>;
125
+ /**
126
+ * Get the index as an object
127
+ * @return {Promise<index>} The index
128
+ */
129
+ getIndex(): Promise<index>;
130
+ /**
131
+ * Get a task as an object
132
+ * @param {string} taskId The task id to get
133
+ * @return {Promise<task>} The task
134
+ */
135
+ getTask(taskId: string): Promise<task>;
136
+ /**
137
+ * Add additional index-based information to a task
138
+ * @param {index} index The index object
139
+ * @param {task} task The task object
140
+ * @return {task} The hydrated task
141
+ */
142
+ hydrateTask(index: any, task: any): any;
143
+ /**
144
+ * Return a filtered and sorted list of tasks
145
+ * @param {index} index The index object
146
+ * @param {task[]} tasks A list of task objects
147
+ * @param {object} filters A list of task filters
148
+ * @param {object[]} sorters A list of task sorters
149
+ * @return {object[]} A filtered and sorted list of tasks
150
+ */
151
+ filterAndSortTasks(index: any, tasks: task[], filters: object, sorters: object[]): object[];
152
+ /**
153
+ * Overwrite the index file with the specified data
154
+ * @param {object} indexData Index data to save
155
+ */
156
+ saveIndex(indexData: object): Promise<void>;
157
+ /**
158
+ * Load the index file and parse it to an object
159
+ * @return {Promise<object>} The index object
160
+ */
161
+ loadIndex(): Promise<object>;
162
+ /**
163
+ * Overwrite a task file with the specified data
164
+ * @param {string} path The task path
165
+ * @param {object} taskData The task data
166
+ */
167
+ saveTask(path: string, taskData: object): Promise<void>;
168
+ /**
169
+ * Load a task file and parse it to an object
170
+ * @param {string} taskId The task id
171
+ * @return {Promise<object>} The task object
172
+ */
173
+ loadTask(taskId: string): Promise<object>;
174
+ /**
175
+ * Load all tracked tasks and return an array of task objects
176
+ * @param {object} index The index object
177
+ * @param {?string} [columnName=null] The optional column name to filter tasks by
178
+ * @return {Promise<object[]>} All tracked tasks
179
+ */
180
+ loadAllTrackedTasks(index: object, columnName?: string | null): Promise<object[]>;
181
+ /**
182
+ * Load a task file from the archive and parse it to an object
183
+ * @param {string} taskId The task id
184
+ * @return {Promise<object>} The task object
185
+ */
186
+ loadArchivedTask(taskId: string): Promise<object>;
187
+ /**
188
+ * Get the date format defined in the index, or the default date format
189
+ * @param {object} index The index object
190
+ * @return {string} The date format
191
+ */
192
+ getDateFormat(index: object): string;
193
+ /**
194
+ * Get the task template for displaying tasks on the kanbn board from the index, or the default task template
195
+ * @param {object} index The index object
196
+ * @return {string} The task template
197
+ */
198
+ getTaskTemplate(index: object): string;
199
+ /**
200
+ * Check if the current working directory has been initialised
201
+ * @return {Promise<boolean>} True if the current working directory has been initialised, otherwise false
202
+ */
203
+ initialised(): Promise<boolean>;
204
+ /**
205
+ * Initialise a kanbn board in the current working directory
206
+ * @param {object} [options={}] Initial columns and other config options
207
+ */
208
+ initialise(options?: object): Promise<void>;
209
+ /**
210
+ * Check if a task file exists and is in the index, otherwise throw an error
211
+ * @param {string} taskId The task id to check
212
+ */
213
+ taskExists(taskId: string): Promise<void>;
214
+ /**
215
+ * Get the column that a task is in or throw an error if the task doesn't exist or isn't indexed
216
+ * @param {string} taskId The task id to find
217
+ * @return {Promise<string>} The name of the column the task is in
218
+ */
219
+ findTaskColumn(taskId: string): Promise<string>;
220
+ /**
221
+ * Create a task file and add the task to the index
222
+ * @param {object} taskData The task object
223
+ * @param {string} columnName The name of the column to add the task to
224
+ * @return {Promise<string>} The id of the task that was created
225
+ */
226
+ createTask(taskData: object, columnName: string): Promise<string>;
227
+ /**
228
+ * Add an untracked task to the specified column in the index
229
+ * @param {string} taskId The untracked task id
230
+ * @param {string} columnName The column to add the task to
231
+ * @return {Promise<string>} The id of the task that was added
232
+ */
233
+ addUntrackedTaskToIndex(taskId: string, columnName: string): Promise<string>;
234
+ /**
235
+ * Get a list of tracked tasks (i.e. tasks that are listed in the index)
236
+ * @param {?string} [columnName=null] The optional column name to filter tasks by
237
+ * @return {Promise<Set>} A set of task ids
238
+ */
239
+ findTrackedTasks(columnName?: string | null): Promise<Set<any>>;
240
+ /**
241
+ * Get a list of untracked tasks (i.e. markdown files in the tasks folder that aren't listed in the index)
242
+ * @return {Promise<Set>} A set of untracked task ids
243
+ */
244
+ findUntrackedTasks(): Promise<Set<any>>;
245
+ /**
246
+ * Update an existing task
247
+ * @param {string} taskId The id of the task to update
248
+ * @param {object} taskData The new task data
249
+ * @param {?string} [columnName=null] The column name to move this task to, or null if not moving this task
250
+ * @return {Promise<string>} The id of the task that was updated
251
+ */
252
+ updateTask(taskId: string, taskData: object, columnName?: string | null): Promise<string>;
253
+ /**
254
+ * Change a task name, rename the task file and update the task id in the index
255
+ * @param {string} taskId The id of the task to rename
256
+ * @param {string} newTaskName The new task name
257
+ * @return {Promise<string>} The new id of the task that was renamed
258
+ */
259
+ renameTask(taskId: string, newTaskName: string): Promise<string>;
260
+ /**
261
+ * Move a task from one column to another column
262
+ * @param {string} taskId The task id to move
263
+ * @param {string} columnName The name of the column that the task will be moved to
264
+ * @param {?number} [position=null] The position to move the task to within the target column
265
+ * @param {boolean} [relative=false] Treat the position argument as relative instead of absolute
266
+ * @return {Promise<string>} The id of the task that was moved
267
+ */
268
+ moveTask(taskId: string, columnName: string, position?: number | null, relative?: boolean): Promise<string>;
269
+ /**
270
+ * Remove a task from the index and optionally delete the task file as well
271
+ * @param {string} taskId The id of the task to remove
272
+ * @param {boolean} [removeFile=false] True if the task file should be removed
273
+ * @return {Promise<string>} The id of the task that was deleted
274
+ */
275
+ deleteTask(taskId: string, removeFile?: boolean): Promise<string>;
276
+ /**
277
+ * Search for indexed tasks
278
+ * @param {object} [filters={}] The filters to apply
279
+ * @param {boolean} [quiet=false] Only return task ids if true, otherwise return full task details
280
+ * @return {Promise<object[]>} A list of tasks that match the filters
281
+ */
282
+ search(filters?: object, quiet?: boolean): Promise<object[]>;
283
+ /**
284
+ * Output project status information
285
+ * @param {boolean} [quiet=false] Output full or partial status information
286
+ * @param {boolean} [untracked=false] Show a list of untracked tasks
287
+ * @param {boolean} [due=false] Show information about overdue tasks and time remaining
288
+ * @param {?string|?number} [sprint=null] The sprint name or number to show stats for, or null for current sprint
289
+ * @param {?Date[]} [dates=null] The date(s) to show stats for, or null for no date filter
290
+ * @return {Promise<object|string[]>} Project status information as an object, or an array of untracked task filenames
291
+ */
292
+ status(quiet?: boolean, untracked?: boolean, due?: boolean, sprint?: (string | (number | null)) | null, dates?: Date[] | null): Promise<object | string[]>;
293
+ /**
294
+ * Validate the index and task files
295
+ * @param {boolean} [save=false] Re-save all files
296
+ * @return {Promise<boolean>} True if everything validated, otherwise an array of parsing errors
297
+ */
298
+ validate(save?: boolean): Promise<boolean>;
299
+ /**
300
+ * Sort a column in the index
301
+ * @param {string} columnName The column name to sort
302
+ * @param {object[]} sorters A list of objects containing the field to sort by, filters and sort order
303
+ * @param {boolean} [save=false] True if the settings should be saved in index
304
+ */
305
+ sort(columnName: string, sorters: object[], save?: boolean): Promise<void>;
306
+ /**
307
+ * Start a sprint
308
+ * @param {string} name Sprint name
309
+ * @param {string} description Sprint description
310
+ * @param {Date} start Sprint start date
311
+ * @return {Promise<object>} The sprint object
312
+ */
313
+ sprint(name: string, description: string, start: Date): Promise<object>;
314
+ /**
315
+ * Output burndown chart data
316
+ * @param {?string[]} [sprints=null] The sprint names or numbers to show a chart for, or null for
317
+ * the current sprint
318
+ * @param {?Date[]} [dates=null] The dates to show a chart for, or null for no date filter
319
+ * @param {?string} [assigned=null] The assigned user to filter for, or null for no assigned filter
320
+ * @param {?string[]} [columns=null] The columns to filter for, or null for no column filter
321
+ * @param {?string} [normalise=null] The date normalisation mode
322
+ * @return {Promise<object>} Burndown chart data as an object
323
+ */
324
+ burndown(sprints?: string[] | null, dates?: Date[] | null, assigned?: string | null, columns?: string[] | null, normalise?: string | null): Promise<object>;
325
+ /**
326
+ * Add a comment to a task
327
+ * @param {string} taskId The task id
328
+ * @param {string} text The comment text
329
+ * @param {string} author The comment author
330
+ * @return {Promise<string>} The task id
331
+ */
332
+ comment(taskId: string, text: string, author: string): Promise<string>;
333
+ /**
334
+ * Return a list of archived tasks
335
+ * @return {Promise<string[]>} A list of archived task ids
336
+ */
337
+ listArchivedTasks(): Promise<string[]>;
338
+ /**
339
+ * Move a task to the archive
340
+ * @param {string} taskId The task id
341
+ * @return {Promise<string>} The task id
342
+ */
343
+ archiveTask(taskId: string): Promise<string>;
344
+ /**
345
+ * Restore a task from the archive
346
+ * @param {string} taskId The task id
347
+ * @param {?string} [columnName=null] The column to restore the task to
348
+ * @return {Promise<string>} The task id
349
+ */
350
+ restoreTask(taskId: string, columnName?: string | null): Promise<string>;
351
+ /**
352
+ * Nuke it from orbit, it's the only way to be sure
353
+ */
354
+ removeAll(): Promise<void>;
355
+ }