@todoist/cli 0.0.1 → 6.0.1
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 +1393 -0
- package/LICENSE +9 -0
- package/README.md +192 -29
- package/dist/commands/activity.d.ts +3 -0
- package/dist/commands/activity.d.ts.map +1 -0
- package/dist/commands/activity.js +203 -0
- package/dist/commands/activity.js.map +1 -0
- package/dist/commands/add.d.ts +3 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +18 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/apps/delete.d.ts +6 -0
- package/dist/commands/apps/delete.d.ts.map +1 -0
- package/dist/commands/apps/delete.js +25 -0
- package/dist/commands/apps/delete.js.map +1 -0
- package/dist/commands/apps/helpers.d.ts +15 -0
- package/dist/commands/apps/helpers.d.ts.map +1 -0
- package/dist/commands/apps/helpers.js +122 -0
- package/dist/commands/apps/helpers.js.map +1 -0
- package/dist/commands/apps/index.d.ts +3 -0
- package/dist/commands/apps/index.d.ts.map +1 -0
- package/dist/commands/apps/index.js +89 -0
- package/dist/commands/apps/index.js.map +1 -0
- package/dist/commands/apps/list.d.ts +7 -0
- package/dist/commands/apps/list.d.ts.map +1 -0
- package/dist/commands/apps/list.js +30 -0
- package/dist/commands/apps/list.js.map +1 -0
- package/dist/commands/apps/update.d.ts +14 -0
- package/dist/commands/apps/update.d.ts.map +1 -0
- package/dist/commands/apps/update.js +262 -0
- package/dist/commands/apps/update.js.map +1 -0
- package/dist/commands/apps/view.d.ts +7 -0
- package/dist/commands/apps/view.d.ts.map +1 -0
- package/dist/commands/apps/view.js +125 -0
- package/dist/commands/apps/view.js.map +1 -0
- package/dist/commands/attachment.d.ts +3 -0
- package/dist/commands/attachment.d.ts.map +1 -0
- package/dist/commands/attachment.js +158 -0
- package/dist/commands/attachment.js.map +1 -0
- package/dist/commands/auth/helpers.d.ts +11 -0
- package/dist/commands/auth/helpers.d.ts.map +1 -0
- package/dist/commands/auth/helpers.js +38 -0
- package/dist/commands/auth/helpers.js.map +1 -0
- package/dist/commands/auth/index.d.ts +3 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +40 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +14 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +93 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +11 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +21 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +18 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +147 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/store-wrap.d.ts +26 -0
- package/dist/commands/auth/store-wrap.d.ts.map +1 -0
- package/dist/commands/auth/store-wrap.js +49 -0
- package/dist/commands/auth/store-wrap.js.map +1 -0
- package/dist/commands/auth/token.d.ts +5 -0
- package/dist/commands/auth/token.d.ts.map +1 -0
- package/dist/commands/auth/token.js +26 -0
- package/dist/commands/auth/token.js.map +1 -0
- package/dist/commands/backup/download.d.ts +6 -0
- package/dist/commands/backup/download.d.ts.map +1 -0
- package/dist/commands/backup/download.js +28 -0
- package/dist/commands/backup/download.js.map +1 -0
- package/dist/commands/backup/helpers.d.ts +3 -0
- package/dist/commands/backup/helpers.d.ts.map +1 -0
- package/dist/commands/backup/helpers.js +14 -0
- package/dist/commands/backup/helpers.js.map +1 -0
- package/dist/commands/backup/index.d.ts +3 -0
- package/dist/commands/backup/index.d.ts.map +1 -0
- package/dist/commands/backup/index.js +34 -0
- package/dist/commands/backup/index.js.map +1 -0
- package/dist/commands/backup/list.d.ts +7 -0
- package/dist/commands/backup/list.d.ts.map +1 -0
- package/dist/commands/backup/list.js +25 -0
- package/dist/commands/backup/list.js.map +1 -0
- package/dist/commands/billing/format.d.ts +28 -0
- package/dist/commands/billing/format.d.ts.map +1 -0
- package/dist/commands/billing/format.js +89 -0
- package/dist/commands/billing/format.js.map +1 -0
- package/dist/commands/billing/index.d.ts +3 -0
- package/dist/commands/billing/index.d.ts.map +1 -0
- package/dist/commands/billing/index.js +45 -0
- package/dist/commands/billing/index.js.map +1 -0
- package/dist/commands/billing/plan.d.ts +3 -0
- package/dist/commands/billing/plan.d.ts.map +1 -0
- package/dist/commands/billing/plan.js +22 -0
- package/dist/commands/billing/plan.js.map +1 -0
- package/dist/commands/billing/prices.d.ts +3 -0
- package/dist/commands/billing/prices.d.ts.map +1 -0
- package/dist/commands/billing/prices.js +22 -0
- package/dist/commands/billing/prices.js.map +1 -0
- package/dist/commands/billing/pricing.d.ts +7 -0
- package/dist/commands/billing/pricing.d.ts.map +1 -0
- package/dist/commands/billing/pricing.js +43 -0
- package/dist/commands/billing/pricing.js.map +1 -0
- package/dist/commands/billing/subscription.d.ts +3 -0
- package/dist/commands/billing/subscription.d.ts.map +1 -0
- package/dist/commands/billing/subscription.js +37 -0
- package/dist/commands/billing/subscription.js.map +1 -0
- package/dist/commands/changelog.d.ts +3 -0
- package/dist/commands/changelog.d.ts.map +1 -0
- package/dist/commands/changelog.js +13 -0
- package/dist/commands/changelog.js.map +1 -0
- package/dist/commands/comment/add.d.ts +13 -0
- package/dist/commands/comment/add.d.ts.map +1 -0
- package/dist/commands/comment/add.js +149 -0
- package/dist/commands/comment/add.js.map +1 -0
- package/dist/commands/comment/browse.d.ts +2 -0
- package/dist/commands/comment/browse.d.ts.map +1 -0
- package/dist/commands/comment/browse.js +20 -0
- package/dist/commands/comment/browse.js.map +1 -0
- package/dist/commands/comment/delete.d.ts +5 -0
- package/dist/commands/comment/delete.d.ts.map +1 -0
- package/dist/commands/comment/delete.js +24 -0
- package/dist/commands/comment/delete.js.map +1 -0
- package/dist/commands/comment/helpers.d.ts +2 -0
- package/dist/commands/comment/helpers.d.ts.map +1 -0
- package/dist/commands/comment/helpers.js +7 -0
- package/dist/commands/comment/helpers.js.map +1 -0
- package/dist/commands/comment/index.d.ts +3 -0
- package/dist/commands/comment/index.d.ts.map +1 -0
- package/dist/commands/comment/index.js +105 -0
- package/dist/commands/comment/index.js.map +1 -0
- package/dist/commands/comment/list.d.ts +8 -0
- package/dist/commands/comment/list.d.ts.map +1 -0
- package/dist/commands/comment/list.js +69 -0
- package/dist/commands/comment/list.js.map +1 -0
- package/dist/commands/comment/update.d.ts +6 -0
- package/dist/commands/comment/update.d.ts.map +1 -0
- package/dist/commands/comment/update.js +25 -0
- package/dist/commands/comment/update.js.map +1 -0
- package/dist/commands/comment/view.d.ts +3 -0
- package/dist/commands/comment/view.d.ts.map +1 -0
- package/dist/commands/comment/view.js +86 -0
- package/dist/commands/comment/view.js.map +1 -0
- package/dist/commands/completed/index.d.ts +3 -0
- package/dist/commands/completed/index.d.ts.map +1 -0
- package/dist/commands/completed/index.js +29 -0
- package/dist/commands/completed/index.js.map +1 -0
- package/dist/commands/completed/list.d.ts +10 -0
- package/dist/commands/completed/list.d.ts.map +1 -0
- package/dist/commands/completed/list.js +161 -0
- package/dist/commands/completed/list.js.map +1 -0
- package/dist/commands/completion/helpers.d.ts +13 -0
- package/dist/commands/completion/helpers.d.ts.map +1 -0
- package/dist/commands/completion/helpers.js +24 -0
- package/dist/commands/completion/helpers.js.map +1 -0
- package/dist/commands/completion/index.d.ts +3 -0
- package/dist/commands/completion/index.d.ts.map +1 -0
- package/dist/commands/completion/index.js +28 -0
- package/dist/commands/completion/index.js.map +1 -0
- package/dist/commands/completion/install.d.ts +2 -0
- package/dist/commands/completion/install.d.ts.map +1 -0
- package/dist/commands/completion/install.js +16 -0
- package/dist/commands/completion/install.js.map +1 -0
- package/dist/commands/completion/server.d.ts +3 -0
- package/dist/commands/completion/server.d.ts.map +1 -0
- package/dist/commands/completion/server.js +35 -0
- package/dist/commands/completion/server.js.map +1 -0
- package/dist/commands/completion/uninstall.d.ts +2 -0
- package/dist/commands/completion/uninstall.d.ts.map +1 -0
- package/dist/commands/completion/uninstall.js +19 -0
- package/dist/commands/completion/uninstall.js.map +1 -0
- package/dist/commands/config/index.d.ts +3 -0
- package/dist/commands/config/index.d.ts.map +1 -0
- package/dist/commands/config/index.js +16 -0
- package/dist/commands/config/index.js.map +1 -0
- package/dist/commands/config/view.d.ts +6 -0
- package/dist/commands/config/view.d.ts.map +1 -0
- package/dist/commands/config/view.js +180 -0
- package/dist/commands/config/view.js.map +1 -0
- package/dist/commands/doctor.d.ts +16 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +329 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/extension/dispatch.d.ts +22 -0
- package/dist/commands/extension/dispatch.d.ts.map +1 -0
- package/dist/commands/extension/dispatch.js +45 -0
- package/dist/commands/extension/dispatch.js.map +1 -0
- package/dist/commands/extension/doctor.d.ts +10 -0
- package/dist/commands/extension/doctor.d.ts.map +1 -0
- package/dist/commands/extension/doctor.js +110 -0
- package/dist/commands/extension/doctor.js.map +1 -0
- package/dist/commands/extension/index.d.ts +12 -0
- package/dist/commands/extension/index.d.ts.map +1 -0
- package/dist/commands/extension/index.js +80 -0
- package/dist/commands/extension/index.js.map +1 -0
- package/dist/commands/filter/browse.d.ts +2 -0
- package/dist/commands/filter/browse.d.ts.map +1 -0
- package/dist/commands/filter/browse.js +8 -0
- package/dist/commands/filter/browse.js.map +1 -0
- package/dist/commands/filter/create.d.ts +13 -0
- package/dist/commands/filter/create.d.ts.map +1 -0
- package/dist/commands/filter/create.js +77 -0
- package/dist/commands/filter/create.js.map +1 -0
- package/dist/commands/filter/delete.d.ts +5 -0
- package/dist/commands/filter/delete.d.ts.map +1 -0
- package/dist/commands/filter/delete.js +22 -0
- package/dist/commands/filter/delete.js.map +1 -0
- package/dist/commands/filter/helpers.d.ts +8 -0
- package/dist/commands/filter/helpers.d.ts.map +1 -0
- package/dist/commands/filter/helpers.js +42 -0
- package/dist/commands/filter/helpers.js.map +1 -0
- package/dist/commands/filter/index.d.ts +4 -0
- package/dist/commands/filter/index.d.ts.map +1 -0
- package/dist/commands/filter/index.js +104 -0
- package/dist/commands/filter/index.js.map +1 -0
- package/dist/commands/filter/list.d.ts +3 -0
- package/dist/commands/filter/list.d.ts.map +1 -0
- package/dist/commands/filter/list.js +38 -0
- package/dist/commands/filter/list.js.map +1 -0
- package/dist/commands/filter/update.d.ts +13 -0
- package/dist/commands/filter/update.d.ts.map +1 -0
- package/dist/commands/filter/update.js +73 -0
- package/dist/commands/filter/update.js.map +1 -0
- package/dist/commands/filter/view.d.ts +13 -0
- package/dist/commands/filter/view.d.ts.map +1 -0
- package/dist/commands/filter/view.js +293 -0
- package/dist/commands/filter/view.js.map +1 -0
- package/dist/commands/folder/create.d.ts +11 -0
- package/dist/commands/folder/create.d.ts.map +1 -0
- package/dist/commands/folder/create.js +37 -0
- package/dist/commands/folder/create.js.map +1 -0
- package/dist/commands/folder/delete.d.ts +6 -0
- package/dist/commands/folder/delete.d.ts.map +1 -0
- package/dist/commands/folder/delete.js +21 -0
- package/dist/commands/folder/delete.js.map +1 -0
- package/dist/commands/folder/helpers.d.ts +9 -0
- package/dist/commands/folder/helpers.d.ts.map +1 -0
- package/dist/commands/folder/helpers.js +36 -0
- package/dist/commands/folder/helpers.js.map +1 -0
- package/dist/commands/folder/index.d.ts +3 -0
- package/dist/commands/folder/index.d.ts.map +1 -0
- package/dist/commands/folder/index.js +97 -0
- package/dist/commands/folder/index.js.map +1 -0
- package/dist/commands/folder/list.d.ts +3 -0
- package/dist/commands/folder/list.d.ts.map +1 -0
- package/dist/commands/folder/list.js +48 -0
- package/dist/commands/folder/list.js.map +1 -0
- package/dist/commands/folder/update.d.ts +10 -0
- package/dist/commands/folder/update.d.ts.map +1 -0
- package/dist/commands/folder/update.js +33 -0
- package/dist/commands/folder/update.js.map +1 -0
- package/dist/commands/folder/view.d.ts +8 -0
- package/dist/commands/folder/view.d.ts.map +1 -0
- package/dist/commands/folder/view.js +52 -0
- package/dist/commands/folder/view.js.map +1 -0
- package/dist/commands/hc/index.d.ts +3 -0
- package/dist/commands/hc/index.d.ts.map +1 -0
- package/dist/commands/hc/index.js +70 -0
- package/dist/commands/hc/index.js.map +1 -0
- package/dist/commands/hc/locale.d.ts +3 -0
- package/dist/commands/hc/locale.d.ts.map +1 -0
- package/dist/commands/hc/locale.js +39 -0
- package/dist/commands/hc/locale.js.map +1 -0
- package/dist/commands/hc/locales.d.ts +5 -0
- package/dist/commands/hc/locales.d.ts.map +1 -0
- package/dist/commands/hc/locales.js +18 -0
- package/dist/commands/hc/locales.js.map +1 -0
- package/dist/commands/hc/search.d.ts +8 -0
- package/dist/commands/hc/search.d.ts.map +1 -0
- package/dist/commands/hc/search.js +34 -0
- package/dist/commands/hc/search.js.map +1 -0
- package/dist/commands/hc/view.d.ts +8 -0
- package/dist/commands/hc/view.d.ts.map +1 -0
- package/dist/commands/hc/view.js +49 -0
- package/dist/commands/hc/view.js.map +1 -0
- package/dist/commands/inbox.d.ts +3 -0
- package/dist/commands/inbox.d.ts.map +1 -0
- package/dist/commands/inbox.js +27 -0
- package/dist/commands/inbox.js.map +1 -0
- package/dist/commands/label/browse.d.ts +2 -0
- package/dist/commands/label/browse.d.ts.map +1 -0
- package/dist/commands/label/browse.js +8 -0
- package/dist/commands/label/browse.js.map +1 -0
- package/dist/commands/label/create.d.ts +10 -0
- package/dist/commands/label/create.d.ts.map +1 -0
- package/dist/commands/label/create.js +31 -0
- package/dist/commands/label/create.js.map +1 -0
- package/dist/commands/label/delete.d.ts +5 -0
- package/dist/commands/label/delete.d.ts.map +1 -0
- package/dist/commands/label/delete.js +21 -0
- package/dist/commands/label/delete.js.map +1 -0
- package/dist/commands/label/helpers.d.ts +9 -0
- package/dist/commands/label/helpers.d.ts.map +1 -0
- package/dist/commands/label/helpers.js +75 -0
- package/dist/commands/label/helpers.js.map +1 -0
- package/dist/commands/label/index.d.ts +4 -0
- package/dist/commands/label/index.d.ts.map +1 -0
- package/dist/commands/label/index.js +129 -0
- package/dist/commands/label/index.js.map +1 -0
- package/dist/commands/label/list.d.ts +6 -0
- package/dist/commands/label/list.d.ts.map +1 -0
- package/dist/commands/label/list.js +59 -0
- package/dist/commands/label/list.js.map +1 -0
- package/dist/commands/label/remove-shared.d.ts +5 -0
- package/dist/commands/label/remove-shared.d.ts.map +1 -0
- package/dist/commands/label/remove-shared.js +21 -0
- package/dist/commands/label/remove-shared.js.map +1 -0
- package/dist/commands/label/rename-shared.d.ts +5 -0
- package/dist/commands/label/rename-shared.d.ts.map +1 -0
- package/dist/commands/label/rename-shared.js +16 -0
- package/dist/commands/label/rename-shared.js.map +1 -0
- package/dist/commands/label/update.d.ts +10 -0
- package/dist/commands/label/update.d.ts.map +1 -0
- package/dist/commands/label/update.js +38 -0
- package/dist/commands/label/update.js.map +1 -0
- package/dist/commands/label/view.d.ts +3 -0
- package/dist/commands/label/view.d.ts.map +1 -0
- package/dist/commands/label/view.js +76 -0
- package/dist/commands/label/view.js.map +1 -0
- package/dist/commands/notification/accept.d.ts +4 -0
- package/dist/commands/notification/accept.d.ts.map +1 -0
- package/dist/commands/notification/accept.js +25 -0
- package/dist/commands/notification/accept.js.map +1 -0
- package/dist/commands/notification/helpers.d.ts +6 -0
- package/dist/commands/notification/helpers.d.ts.map +1 -0
- package/dist/commands/notification/helpers.js +77 -0
- package/dist/commands/notification/helpers.js.map +1 -0
- package/dist/commands/notification/index.d.ts +3 -0
- package/dist/commands/notification/index.d.ts.map +1 -0
- package/dist/commands/notification/index.js +75 -0
- package/dist/commands/notification/index.js.map +1 -0
- package/dist/commands/notification/list.d.ts +10 -0
- package/dist/commands/notification/list.d.ts.map +1 -0
- package/dist/commands/notification/list.js +71 -0
- package/dist/commands/notification/list.js.map +1 -0
- package/dist/commands/notification/read.d.ts +8 -0
- package/dist/commands/notification/read.d.ts.map +1 -0
- package/dist/commands/notification/read.js +37 -0
- package/dist/commands/notification/read.js.map +1 -0
- package/dist/commands/notification/reject.d.ts +4 -0
- package/dist/commands/notification/reject.d.ts.map +1 -0
- package/dist/commands/notification/reject.js +25 -0
- package/dist/commands/notification/reject.js.map +1 -0
- package/dist/commands/notification/unread.d.ts +4 -0
- package/dist/commands/notification/unread.d.ts.map +1 -0
- package/dist/commands/notification/unread.js +13 -0
- package/dist/commands/notification/unread.js.map +1 -0
- package/dist/commands/notification/view.d.ts +3 -0
- package/dist/commands/notification/view.d.ts.map +1 -0
- package/dist/commands/notification/view.js +30 -0
- package/dist/commands/notification/view.js.map +1 -0
- package/dist/commands/project/activity-stats.d.ts +6 -0
- package/dist/commands/project/activity-stats.d.ts.map +1 -0
- package/dist/commands/project/activity-stats.js +41 -0
- package/dist/commands/project/activity-stats.js.map +1 -0
- package/dist/commands/project/analyze-health.d.ts +5 -0
- package/dist/commands/project/analyze-health.d.ts.map +1 -0
- package/dist/commands/project/analyze-health.js +20 -0
- package/dist/commands/project/analyze-health.js.map +1 -0
- package/dist/commands/project/archive.d.ts +4 -0
- package/dist/commands/project/archive.d.ts.map +1 -0
- package/dist/commands/project/archive.js +20 -0
- package/dist/commands/project/archive.js.map +1 -0
- package/dist/commands/project/archived-count.d.ts +6 -0
- package/dist/commands/project/archived-count.d.ts.map +1 -0
- package/dist/commands/project/archived-count.js +26 -0
- package/dist/commands/project/archived-count.js.map +1 -0
- package/dist/commands/project/archived.d.ts +3 -0
- package/dist/commands/project/archived.d.ts.map +1 -0
- package/dist/commands/project/archived.js +100 -0
- package/dist/commands/project/archived.js.map +1 -0
- package/dist/commands/project/browse.d.ts +2 -0
- package/dist/commands/project/browse.d.ts.map +1 -0
- package/dist/commands/project/browse.js +10 -0
- package/dist/commands/project/browse.js.map +1 -0
- package/dist/commands/project/collaborators.d.ts +3 -0
- package/dist/commands/project/collaborators.d.ts.map +1 -0
- package/dist/commands/project/collaborators.js +109 -0
- package/dist/commands/project/collaborators.js.map +1 -0
- package/dist/commands/project/create.d.ts +14 -0
- package/dist/commands/project/create.d.ts.map +1 -0
- package/dist/commands/project/create.js +57 -0
- package/dist/commands/project/create.js.map +1 -0
- package/dist/commands/project/delete.d.ts +5 -0
- package/dist/commands/project/delete.d.ts.map +1 -0
- package/dist/commands/project/delete.js +30 -0
- package/dist/commands/project/delete.js.map +1 -0
- package/dist/commands/project/health-context.d.ts +4 -0
- package/dist/commands/project/health-context.d.ts.map +1 -0
- package/dist/commands/project/health-context.js +44 -0
- package/dist/commands/project/health-context.js.map +1 -0
- package/dist/commands/project/health.d.ts +4 -0
- package/dist/commands/project/health.d.ts.map +1 -0
- package/dist/commands/project/health.js +32 -0
- package/dist/commands/project/health.js.map +1 -0
- package/dist/commands/project/helpers.d.ts +29 -0
- package/dist/commands/project/helpers.d.ts.map +1 -0
- package/dist/commands/project/helpers.js +79 -0
- package/dist/commands/project/helpers.js.map +1 -0
- package/dist/commands/project/index.d.ts +4 -0
- package/dist/commands/project/index.d.ts.map +1 -0
- package/dist/commands/project/index.js +336 -0
- package/dist/commands/project/index.js.map +1 -0
- package/dist/commands/project/join.d.ts +5 -0
- package/dist/commands/project/join.d.ts.map +1 -0
- package/dist/commands/project/join.js +35 -0
- package/dist/commands/project/join.js.map +1 -0
- package/dist/commands/project/list.d.ts +8 -0
- package/dist/commands/project/list.d.ts.map +1 -0
- package/dist/commands/project/list.js +130 -0
- package/dist/commands/project/list.js.map +1 -0
- package/dist/commands/project/move.d.ts +10 -0
- package/dist/commands/project/move.d.ts.map +1 -0
- package/dist/commands/project/move.js +88 -0
- package/dist/commands/project/move.js.map +1 -0
- package/dist/commands/project/permissions.d.ts +4 -0
- package/dist/commands/project/permissions.d.ts.map +1 -0
- package/dist/commands/project/permissions.js +34 -0
- package/dist/commands/project/permissions.js.map +1 -0
- package/dist/commands/project/progress.d.ts +4 -0
- package/dist/commands/project/progress.d.ts.map +1 -0
- package/dist/commands/project/progress.js +20 -0
- package/dist/commands/project/progress.js.map +1 -0
- package/dist/commands/project/reorder.d.ts +9 -0
- package/dist/commands/project/reorder.d.ts.map +1 -0
- package/dist/commands/project/reorder.js +75 -0
- package/dist/commands/project/reorder.js.map +1 -0
- package/dist/commands/project/share.d.ts +9 -0
- package/dist/commands/project/share.d.ts.map +1 -0
- package/dist/commands/project/share.js +179 -0
- package/dist/commands/project/share.js.map +1 -0
- package/dist/commands/project/unarchive.d.ts +4 -0
- package/dist/commands/project/unarchive.d.ts.map +1 -0
- package/dist/commands/project/unarchive.js +25 -0
- package/dist/commands/project/unarchive.js.map +1 -0
- package/dist/commands/project/update.d.ts +15 -0
- package/dist/commands/project/update.d.ts.map +1 -0
- package/dist/commands/project/update.js +126 -0
- package/dist/commands/project/update.js.map +1 -0
- package/dist/commands/project/view.d.ts +6 -0
- package/dist/commands/project/view.d.ts.map +1 -0
- package/dist/commands/project/view.js +237 -0
- package/dist/commands/project/view.js.map +1 -0
- package/dist/commands/reminder/add.d.ts +10 -0
- package/dist/commands/reminder/add.d.ts.map +1 -0
- package/dist/commands/reminder/add.js +85 -0
- package/dist/commands/reminder/add.js.map +1 -0
- package/dist/commands/reminder/delete.d.ts +7 -0
- package/dist/commands/reminder/delete.d.ts.map +1 -0
- package/dist/commands/reminder/delete.js +28 -0
- package/dist/commands/reminder/delete.js.map +1 -0
- package/dist/commands/reminder/get.d.ts +7 -0
- package/dist/commands/reminder/get.d.ts.map +1 -0
- package/dist/commands/reminder/get.js +20 -0
- package/dist/commands/reminder/get.js.map +1 -0
- package/dist/commands/reminder/helpers.d.ts +24 -0
- package/dist/commands/reminder/helpers.d.ts.map +1 -0
- package/dist/commands/reminder/helpers.js +80 -0
- package/dist/commands/reminder/helpers.js.map +1 -0
- package/dist/commands/reminder/index.d.ts +3 -0
- package/dist/commands/reminder/index.d.ts.map +1 -0
- package/dist/commands/reminder/index.js +99 -0
- package/dist/commands/reminder/index.js.map +1 -0
- package/dist/commands/reminder/list.d.ts +9 -0
- package/dist/commands/reminder/list.d.ts.map +1 -0
- package/dist/commands/reminder/list.js +97 -0
- package/dist/commands/reminder/list.js.map +1 -0
- package/dist/commands/reminder/location/add.d.ts +12 -0
- package/dist/commands/reminder/location/add.d.ts.map +1 -0
- package/dist/commands/reminder/location/add.js +60 -0
- package/dist/commands/reminder/location/add.js.map +1 -0
- package/dist/commands/reminder/location/delete.d.ts +7 -0
- package/dist/commands/reminder/location/delete.d.ts.map +1 -0
- package/dist/commands/reminder/location/delete.js +23 -0
- package/dist/commands/reminder/location/delete.js.map +1 -0
- package/dist/commands/reminder/location/get.d.ts +7 -0
- package/dist/commands/reminder/location/get.d.ts.map +1 -0
- package/dist/commands/reminder/location/get.js +18 -0
- package/dist/commands/reminder/location/get.js.map +1 -0
- package/dist/commands/reminder/location/index.d.ts +3 -0
- package/dist/commands/reminder/location/index.d.ts.map +1 -0
- package/dist/commands/reminder/location/index.js +73 -0
- package/dist/commands/reminder/location/index.js.map +1 -0
- package/dist/commands/reminder/location/update.d.ts +12 -0
- package/dist/commands/reminder/location/update.d.ts.map +1 -0
- package/dist/commands/reminder/location/update.js +45 -0
- package/dist/commands/reminder/location/update.js.map +1 -0
- package/dist/commands/reminder/update.d.ts +10 -0
- package/dist/commands/reminder/update.d.ts.map +1 -0
- package/dist/commands/reminder/update.js +59 -0
- package/dist/commands/reminder/update.js.map +1 -0
- package/dist/commands/section/archive.d.ts +4 -0
- package/dist/commands/section/archive.d.ts.map +1 -0
- package/dist/commands/section/archive.js +21 -0
- package/dist/commands/section/archive.js.map +1 -0
- package/dist/commands/section/browse.d.ts +2 -0
- package/dist/commands/section/browse.d.ts.map +1 -0
- package/dist/commands/section/browse.js +8 -0
- package/dist/commands/section/browse.js.map +1 -0
- package/dist/commands/section/create.d.ts +11 -0
- package/dist/commands/section/create.d.ts.map +1 -0
- package/dist/commands/section/create.js +45 -0
- package/dist/commands/section/create.js.map +1 -0
- package/dist/commands/section/delete.d.ts +5 -0
- package/dist/commands/section/delete.d.ts.map +1 -0
- package/dist/commands/section/delete.js +27 -0
- package/dist/commands/section/delete.js.map +1 -0
- package/dist/commands/section/index.d.ts +3 -0
- package/dist/commands/section/index.d.ts.map +1 -0
- package/dist/commands/section/index.js +140 -0
- package/dist/commands/section/index.js.map +1 -0
- package/dist/commands/section/list.d.ts +8 -0
- package/dist/commands/section/list.d.ts.map +1 -0
- package/dist/commands/section/list.js +53 -0
- package/dist/commands/section/list.js.map +1 -0
- package/dist/commands/section/reorder.d.ts +11 -0
- package/dist/commands/section/reorder.d.ts.map +1 -0
- package/dist/commands/section/reorder.js +99 -0
- package/dist/commands/section/reorder.js.map +1 -0
- package/dist/commands/section/unarchive.d.ts +4 -0
- package/dist/commands/section/unarchive.d.ts.map +1 -0
- package/dist/commands/section/unarchive.js +21 -0
- package/dist/commands/section/unarchive.js.map +1 -0
- package/dist/commands/section/update.d.ts +10 -0
- package/dist/commands/section/update.d.ts.map +1 -0
- package/dist/commands/section/update.js +53 -0
- package/dist/commands/section/update.js.map +1 -0
- package/dist/commands/settings/helpers.d.ts +29 -0
- package/dist/commands/settings/helpers.d.ts.map +1 -0
- package/dist/commands/settings/helpers.js +184 -0
- package/dist/commands/settings/helpers.js.map +1 -0
- package/dist/commands/settings/index.d.ts +4 -0
- package/dist/commands/settings/index.d.ts.map +1 -0
- package/dist/commands/settings/index.js +48 -0
- package/dist/commands/settings/index.js.map +1 -0
- package/dist/commands/settings/update.d.ts +19 -0
- package/dist/commands/settings/update.d.ts.map +1 -0
- package/dist/commands/settings/update.js +57 -0
- package/dist/commands/settings/update.js.map +1 -0
- package/dist/commands/settings/view.d.ts +3 -0
- package/dist/commands/settings/view.d.ts.map +1 -0
- package/dist/commands/settings/view.js +44 -0
- package/dist/commands/settings/view.js.map +1 -0
- package/dist/commands/skill/index.d.ts +3 -0
- package/dist/commands/skill/index.d.ts.map +1 -0
- package/dist/commands/skill/index.js +47 -0
- package/dist/commands/skill/index.js.map +1 -0
- package/dist/commands/skill/install.d.ts +6 -0
- package/dist/commands/skill/install.d.ts.map +1 -0
- package/dist/commands/skill/install.js +24 -0
- package/dist/commands/skill/install.js.map +1 -0
- package/dist/commands/skill/list.d.ts +2 -0
- package/dist/commands/skill/list.d.ts.map +1 -0
- package/dist/commands/skill/list.js +23 -0
- package/dist/commands/skill/list.js.map +1 -0
- package/dist/commands/skill/uninstall.d.ts +5 -0
- package/dist/commands/skill/uninstall.d.ts.map +1 -0
- package/dist/commands/skill/uninstall.js +16 -0
- package/dist/commands/skill/uninstall.js.map +1 -0
- package/dist/commands/skill/update.d.ts +6 -0
- package/dist/commands/skill/update.d.ts.map +1 -0
- package/dist/commands/skill/update.js +44 -0
- package/dist/commands/skill/update.js.map +1 -0
- package/dist/commands/stats/goals.d.ts +9 -0
- package/dist/commands/stats/goals.d.ts.map +1 -0
- package/dist/commands/stats/goals.js +36 -0
- package/dist/commands/stats/goals.js.map +1 -0
- package/dist/commands/stats/helpers.d.ts +11 -0
- package/dist/commands/stats/helpers.d.ts.map +1 -0
- package/dist/commands/stats/helpers.js +88 -0
- package/dist/commands/stats/helpers.js.map +1 -0
- package/dist/commands/stats/index.d.ts +3 -0
- package/dist/commands/stats/index.d.ts.map +1 -0
- package/dist/commands/stats/index.js +26 -0
- package/dist/commands/stats/index.js.map +1 -0
- package/dist/commands/stats/vacation.d.ts +9 -0
- package/dist/commands/stats/vacation.d.ts.map +1 -0
- package/dist/commands/stats/vacation.js +20 -0
- package/dist/commands/stats/vacation.js.map +1 -0
- package/dist/commands/stats/view.d.ts +3 -0
- package/dist/commands/stats/view.d.ts.map +1 -0
- package/dist/commands/stats/view.js +11 -0
- package/dist/commands/stats/view.js.map +1 -0
- package/dist/commands/status/clear.d.ts +3 -0
- package/dist/commands/status/clear.d.ts.map +1 -0
- package/dist/commands/status/clear.js +21 -0
- package/dist/commands/status/clear.js.map +1 -0
- package/dist/commands/status/index.d.ts +3 -0
- package/dist/commands/status/index.d.ts.map +1 -0
- package/dist/commands/status/index.js +50 -0
- package/dist/commands/status/index.js.map +1 -0
- package/dist/commands/status/set.d.ts +12 -0
- package/dist/commands/status/set.d.ts.map +1 -0
- package/dist/commands/status/set.js +130 -0
- package/dist/commands/status/set.js.map +1 -0
- package/dist/commands/status/view.d.ts +3 -0
- package/dist/commands/status/view.d.ts.map +1 -0
- package/dist/commands/status/view.js +16 -0
- package/dist/commands/status/view.js.map +1 -0
- package/dist/commands/task/add-many-input.d.ts +30 -0
- package/dist/commands/task/add-many-input.d.ts.map +1 -0
- package/dist/commands/task/add-many-input.js +158 -0
- package/dist/commands/task/add-many-input.js.map +1 -0
- package/dist/commands/task/add-many.d.ts +9 -0
- package/dist/commands/task/add-many.d.ts.map +1 -0
- package/dist/commands/task/add-many.js +479 -0
- package/dist/commands/task/add-many.js.map +1 -0
- package/dist/commands/task/add.d.ts +20 -0
- package/dist/commands/task/add.d.ts.map +1 -0
- package/dist/commands/task/add.js +120 -0
- package/dist/commands/task/add.js.map +1 -0
- package/dist/commands/task/browse.d.ts +2 -0
- package/dist/commands/task/browse.d.ts.map +1 -0
- package/dist/commands/task/browse.js +10 -0
- package/dist/commands/task/browse.js.map +1 -0
- package/dist/commands/task/complete.d.ts +5 -0
- package/dist/commands/task/complete.d.ts.map +1 -0
- package/dist/commands/task/complete.js +37 -0
- package/dist/commands/task/complete.js.map +1 -0
- package/dist/commands/task/delete.d.ts +5 -0
- package/dist/commands/task/delete.d.ts.map +1 -0
- package/dist/commands/task/delete.js +21 -0
- package/dist/commands/task/delete.js.map +1 -0
- package/dist/commands/task/helpers.d.ts +8 -0
- package/dist/commands/task/helpers.d.ts.map +1 -0
- package/dist/commands/task/helpers.js +23 -0
- package/dist/commands/task/helpers.js.map +1 -0
- package/dist/commands/task/index.d.ts +4 -0
- package/dist/commands/task/index.d.ts.map +1 -0
- package/dist/commands/task/index.js +286 -0
- package/dist/commands/task/index.js.map +1 -0
- package/dist/commands/task/list.d.ts +6 -0
- package/dist/commands/task/list.d.ts.map +1 -0
- package/dist/commands/task/list.js +19 -0
- package/dist/commands/task/list.js.map +1 -0
- package/dist/commands/task/move.d.ts +8 -0
- package/dist/commands/task/move.d.ts.map +1 -0
- package/dist/commands/task/move.js +54 -0
- package/dist/commands/task/move.js.map +1 -0
- package/dist/commands/task/quickadd.d.ts +8 -0
- package/dist/commands/task/quickadd.d.ts.map +1 -0
- package/dist/commands/task/quickadd.js +37 -0
- package/dist/commands/task/quickadd.js.map +1 -0
- package/dist/commands/task/reschedule.d.ts +5 -0
- package/dist/commands/task/reschedule.d.ts.map +1 -0
- package/dist/commands/task/reschedule.js +40 -0
- package/dist/commands/task/reschedule.js.map +1 -0
- package/dist/commands/task/uncomplete.d.ts +4 -0
- package/dist/commands/task/uncomplete.d.ts.map +1 -0
- package/dist/commands/task/uncomplete.js +21 -0
- package/dist/commands/task/uncomplete.js.map +1 -0
- package/dist/commands/task/update.d.ts +19 -0
- package/dist/commands/task/update.d.ts.map +1 -0
- package/dist/commands/task/update.js +95 -0
- package/dist/commands/task/update.js.map +1 -0
- package/dist/commands/task/view.d.ts +5 -0
- package/dist/commands/task/view.d.ts.map +1 -0
- package/dist/commands/task/view.js +45 -0
- package/dist/commands/task/view.js.map +1 -0
- package/dist/commands/template/create.d.ts +10 -0
- package/dist/commands/template/create.d.ts.map +1 -0
- package/dist/commands/template/create.js +45 -0
- package/dist/commands/template/create.js.map +1 -0
- package/dist/commands/template/export-file.d.ts +8 -0
- package/dist/commands/template/export-file.d.ts.map +1 -0
- package/dist/commands/template/export-file.js +26 -0
- package/dist/commands/template/export-file.js.map +1 -0
- package/dist/commands/template/export-url.d.ts +7 -0
- package/dist/commands/template/export-url.d.ts.map +1 -0
- package/dist/commands/template/export-url.js +19 -0
- package/dist/commands/template/export-url.js.map +1 -0
- package/dist/commands/template/helpers.d.ts +3 -0
- package/dist/commands/template/helpers.d.ts.map +1 -0
- package/dist/commands/template/helpers.js +17 -0
- package/dist/commands/template/helpers.js.map +1 -0
- package/dist/commands/template/import-file.d.ts +9 -0
- package/dist/commands/template/import-file.d.ts.map +1 -0
- package/dist/commands/template/import-file.js +33 -0
- package/dist/commands/template/import-file.js.map +1 -0
- package/dist/commands/template/import-id.d.ts +9 -0
- package/dist/commands/template/import-id.d.ts.map +1 -0
- package/dist/commands/template/import-id.js +31 -0
- package/dist/commands/template/import-id.js.map +1 -0
- package/dist/commands/template/index.d.ts +3 -0
- package/dist/commands/template/index.d.ts.map +1 -0
- package/dist/commands/template/index.js +98 -0
- package/dist/commands/template/index.js.map +1 -0
- package/dist/commands/today.d.ts +11 -0
- package/dist/commands/today.d.ts.map +1 -0
- package/dist/commands/today.js +116 -0
- package/dist/commands/today.js.map +1 -0
- package/dist/commands/upcoming.d.ts +11 -0
- package/dist/commands/upcoming.d.ts.map +1 -0
- package/dist/commands/upcoming.js +138 -0
- package/dist/commands/upcoming.js.map +1 -0
- package/dist/commands/update/index.d.ts +3 -0
- package/dist/commands/update/index.d.ts.map +1 -0
- package/dist/commands/update/index.js +14 -0
- package/dist/commands/update/index.js.map +1 -0
- package/dist/commands/user/aliases.d.ts +11 -0
- package/dist/commands/user/aliases.d.ts.map +1 -0
- package/dist/commands/user/aliases.js +11 -0
- package/dist/commands/user/aliases.js.map +1 -0
- package/dist/commands/user/current.d.ts +16 -0
- package/dist/commands/user/current.d.ts.map +1 -0
- package/dist/commands/user/current.js +61 -0
- package/dist/commands/user/current.js.map +1 -0
- package/dist/commands/user/index.d.ts +3 -0
- package/dist/commands/user/index.d.ts.map +1 -0
- package/dist/commands/user/index.js +30 -0
- package/dist/commands/user/index.js.map +1 -0
- package/dist/commands/user/list.d.ts +15 -0
- package/dist/commands/user/list.d.ts.map +1 -0
- package/dist/commands/user/list.js +37 -0
- package/dist/commands/user/list.js.map +1 -0
- package/dist/commands/user/project-account.d.ts +17 -0
- package/dist/commands/user/project-account.d.ts.map +1 -0
- package/dist/commands/user/project-account.js +18 -0
- package/dist/commands/user/project-account.js.map +1 -0
- package/dist/commands/user/remove.d.ts +13 -0
- package/dist/commands/user/remove.d.ts.map +1 -0
- package/dist/commands/user/remove.js +31 -0
- package/dist/commands/user/remove.js.map +1 -0
- package/dist/commands/user/use.d.ts +11 -0
- package/dist/commands/user/use.d.ts.map +1 -0
- package/dist/commands/user/use.js +15 -0
- package/dist/commands/user/use.js.map +1 -0
- package/dist/commands/view.d.ts +3 -0
- package/dist/commands/view.d.ts.map +1 -0
- package/dist/commands/view.js +84 -0
- package/dist/commands/view.js.map +1 -0
- package/dist/commands/workspace/activity.d.ts +9 -0
- package/dist/commands/workspace/activity.d.ts.map +1 -0
- package/dist/commands/workspace/activity.js +93 -0
- package/dist/commands/workspace/activity.js.map +1 -0
- package/dist/commands/workspace/create.d.ts +14 -0
- package/dist/commands/workspace/create.d.ts.map +1 -0
- package/dist/commands/workspace/create.js +58 -0
- package/dist/commands/workspace/create.js.map +1 -0
- package/dist/commands/workspace/delete.d.ts +5 -0
- package/dist/commands/workspace/delete.d.ts.map +1 -0
- package/dist/commands/workspace/delete.js +31 -0
- package/dist/commands/workspace/delete.js.map +1 -0
- package/dist/commands/workspace/helpers.d.ts +30 -0
- package/dist/commands/workspace/helpers.d.ts.map +1 -0
- package/dist/commands/workspace/helpers.js +118 -0
- package/dist/commands/workspace/helpers.js.map +1 -0
- package/dist/commands/workspace/index.d.ts +3 -0
- package/dist/commands/workspace/index.d.ts.map +1 -0
- package/dist/commands/workspace/index.js +178 -0
- package/dist/commands/workspace/index.js.map +1 -0
- package/dist/commands/workspace/insights.d.ts +5 -0
- package/dist/commands/workspace/insights.d.ts.map +1 -0
- package/dist/commands/workspace/insights.js +54 -0
- package/dist/commands/workspace/insights.js.map +1 -0
- package/dist/commands/workspace/list.d.ts +3 -0
- package/dist/commands/workspace/list.d.ts.map +1 -0
- package/dist/commands/workspace/list.js +53 -0
- package/dist/commands/workspace/list.js.map +1 -0
- package/dist/commands/workspace/projects.d.ts +3 -0
- package/dist/commands/workspace/projects.d.ts.map +1 -0
- package/dist/commands/workspace/projects.js +105 -0
- package/dist/commands/workspace/projects.js.map +1 -0
- package/dist/commands/workspace/update.d.ts +15 -0
- package/dist/commands/workspace/update.d.ts.map +1 -0
- package/dist/commands/workspace/update.js +75 -0
- package/dist/commands/workspace/update.js.map +1 -0
- package/dist/commands/workspace/use.d.ts +5 -0
- package/dist/commands/workspace/use.d.ts.map +1 -0
- package/dist/commands/workspace/use.js +46 -0
- package/dist/commands/workspace/use.js.map +1 -0
- package/dist/commands/workspace/user-tasks.d.ts +10 -0
- package/dist/commands/workspace/user-tasks.d.ts.map +1 -0
- package/dist/commands/workspace/user-tasks.js +83 -0
- package/dist/commands/workspace/user-tasks.js.map +1 -0
- package/dist/commands/workspace/users.d.ts +5 -0
- package/dist/commands/workspace/users.d.ts.map +1 -0
- package/dist/commands/workspace/users.js +102 -0
- package/dist/commands/workspace/users.js.map +1 -0
- package/dist/commands/workspace/view.d.ts +5 -0
- package/dist/commands/workspace/view.d.ts.map +1 -0
- package/dist/commands/workspace/view.js +34 -0
- package/dist/commands/workspace/view.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +387 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api/core.d.ts +32 -0
- package/dist/lib/api/core.d.ts.map +1 -0
- package/dist/lib/api/core.js +461 -0
- package/dist/lib/api/core.js.map +1 -0
- package/dist/lib/api/filters.d.ts +59 -0
- package/dist/lib/api/filters.d.ts.map +1 -0
- package/dist/lib/api/filters.js +134 -0
- package/dist/lib/api/filters.js.map +1 -0
- package/dist/lib/api/notifications.d.ts +33 -0
- package/dist/lib/api/notifications.d.ts.map +1 -0
- package/dist/lib/api/notifications.js +92 -0
- package/dist/lib/api/notifications.js.map +1 -0
- package/dist/lib/api/projects-sync.d.ts +8 -0
- package/dist/lib/api/projects-sync.d.ts.map +1 -0
- package/dist/lib/api/projects-sync.js +21 -0
- package/dist/lib/api/projects-sync.js.map +1 -0
- package/dist/lib/api/reminders.d.ts +54 -0
- package/dist/lib/api/reminders.d.ts.map +1 -0
- package/dist/lib/api/reminders.js +120 -0
- package/dist/lib/api/reminders.js.map +1 -0
- package/dist/lib/api/sections-sync.d.ts +5 -0
- package/dist/lib/api/sections-sync.d.ts.map +1 -0
- package/dist/lib/api/sections-sync.js +9 -0
- package/dist/lib/api/sections-sync.js.map +1 -0
- package/dist/lib/api/stats.d.ts +10 -0
- package/dist/lib/api/stats.d.ts.map +1 -0
- package/dist/lib/api/stats.js +23 -0
- package/dist/lib/api/stats.js.map +1 -0
- package/dist/lib/api/user-settings.d.ts +34 -0
- package/dist/lib/api/user-settings.d.ts.map +1 -0
- package/dist/lib/api/user-settings.js +59 -0
- package/dist/lib/api/user-settings.js.map +1 -0
- package/dist/lib/api/user-status.d.ts +9 -0
- package/dist/lib/api/user-status.d.ts.map +1 -0
- package/dist/lib/api/user-status.js +28 -0
- package/dist/lib/api/user-status.js.map +1 -0
- package/dist/lib/api/workspaces.d.ts +23 -0
- package/dist/lib/api/workspaces.d.ts.map +1 -0
- package/dist/lib/api/workspaces.js +61 -0
- package/dist/lib/api/workspaces.js.map +1 -0
- package/dist/lib/app-name.d.ts +8 -0
- package/dist/lib/app-name.d.ts.map +1 -0
- package/dist/lib/app-name.js +8 -0
- package/dist/lib/app-name.js.map +1 -0
- package/dist/lib/auth-flags.d.ts +19 -0
- package/dist/lib/auth-flags.d.ts.map +1 -0
- package/dist/lib/auth-flags.js +33 -0
- package/dist/lib/auth-flags.js.map +1 -0
- package/dist/lib/auth-html.d.ts +11 -0
- package/dist/lib/auth-html.d.ts.map +1 -0
- package/dist/lib/auth-html.js +434 -0
- package/dist/lib/auth-html.js.map +1 -0
- package/dist/lib/auth-provider.d.ts +16 -0
- package/dist/lib/auth-provider.d.ts.map +1 -0
- package/dist/lib/auth-provider.js +59 -0
- package/dist/lib/auth-provider.js.map +1 -0
- package/dist/lib/auth-store.d.ts +82 -0
- package/dist/lib/auth-store.d.ts.map +1 -0
- package/dist/lib/auth-store.js +119 -0
- package/dist/lib/auth-store.js.map +1 -0
- package/dist/lib/auth.d.ts +52 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +106 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/browser.d.ts +11 -0
- package/dist/lib/browser.d.ts.map +1 -0
- package/dist/lib/browser.js +7 -0
- package/dist/lib/browser.js.map +1 -0
- package/dist/lib/children.d.ts +44 -0
- package/dist/lib/children.d.ts.map +1 -0
- package/dist/lib/children.js +78 -0
- package/dist/lib/children.js.map +1 -0
- package/dist/lib/collaborators.d.ts +57 -0
- package/dist/lib/collaborators.d.ts.map +1 -0
- package/dist/lib/collaborators.js +273 -0
- package/dist/lib/collaborators.js.map +1 -0
- package/dist/lib/command-schema.d.ts +6 -0
- package/dist/lib/command-schema.d.ts.map +1 -0
- package/dist/lib/command-schema.js +56 -0
- package/dist/lib/command-schema.js.map +1 -0
- package/dist/lib/comment-recipients.d.ts +24 -0
- package/dist/lib/comment-recipients.d.ts.map +1 -0
- package/dist/lib/comment-recipients.js +57 -0
- package/dist/lib/comment-recipients.js.map +1 -0
- package/dist/lib/completion.d.ts +41 -0
- package/dist/lib/completion.d.ts.map +1 -0
- package/dist/lib/completion.js +192 -0
- package/dist/lib/completion.js.map +1 -0
- package/dist/lib/config.d.ts +86 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +254 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/constants.d.ts +9 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +9 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/dates.d.ts +25 -0
- package/dist/lib/dates.d.ts.map +1 -0
- package/dist/lib/dates.js +106 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/duration.d.ts +19 -0
- package/dist/lib/duration.d.ts.map +1 -0
- package/dist/lib/duration.js +73 -0
- package/dist/lib/duration.js.map +1 -0
- package/dist/lib/errors.d.ts +41 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +37 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/global-args.d.ts +35 -0
- package/dist/lib/global-args.d.ts.map +1 -0
- package/dist/lib/global-args.js +127 -0
- package/dist/lib/global-args.js.map +1 -0
- package/dist/lib/help-center.d.ts +79 -0
- package/dist/lib/help-center.d.ts.map +1 -0
- package/dist/lib/help-center.js +485 -0
- package/dist/lib/help-center.js.map +1 -0
- package/dist/lib/labels.d.ts +2 -0
- package/dist/lib/labels.d.ts.map +1 -0
- package/dist/lib/labels.js +9 -0
- package/dist/lib/labels.js.map +1 -0
- package/dist/lib/local-file.d.ts +37 -0
- package/dist/lib/local-file.d.ts.map +1 -0
- package/dist/lib/local-file.js +59 -0
- package/dist/lib/local-file.js.map +1 -0
- package/dist/lib/logger.d.ts +53 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +233 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/markdown.d.ts +3 -0
- package/dist/lib/markdown.d.ts.map +1 -0
- package/dist/lib/markdown.js +16 -0
- package/dist/lib/markdown.js.map +1 -0
- package/dist/lib/migrate-auth.d.ts +27 -0
- package/dist/lib/migrate-auth.d.ts.map +1 -0
- package/dist/lib/migrate-auth.js +105 -0
- package/dist/lib/migrate-auth.js.map +1 -0
- package/dist/lib/missing-argument.d.ts +10 -0
- package/dist/lib/missing-argument.d.ts.map +1 -0
- package/dist/lib/missing-argument.js +27 -0
- package/dist/lib/missing-argument.js.map +1 -0
- package/dist/lib/mutation-json.d.ts +3 -0
- package/dist/lib/mutation-json.d.ts.map +1 -0
- package/dist/lib/mutation-json.js +83 -0
- package/dist/lib/mutation-json.js.map +1 -0
- package/dist/lib/oauth-scopes.d.ts +66 -0
- package/dist/lib/oauth-scopes.d.ts.map +1 -0
- package/dist/lib/oauth-scopes.js +112 -0
- package/dist/lib/oauth-scopes.js.map +1 -0
- package/dist/lib/options.d.ts +17 -0
- package/dist/lib/options.d.ts.map +1 -0
- package/dist/lib/options.js +2 -0
- package/dist/lib/options.js.map +1 -0
- package/dist/lib/order.d.ts +2 -0
- package/dist/lib/order.d.ts.map +1 -0
- package/dist/lib/order.js +11 -0
- package/dist/lib/order.js.map +1 -0
- package/dist/lib/output.d.ts +84 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +509 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/pagination.d.ts +23 -0
- package/dist/lib/pagination.d.ts.map +1 -0
- package/dist/lib/pagination.js +26 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/lib/permissions.d.ts +6 -0
- package/dist/lib/permissions.d.ts.map +1 -0
- package/dist/lib/permissions.js +113 -0
- package/dist/lib/permissions.js.map +1 -0
- package/dist/lib/progress.d.ts +29 -0
- package/dist/lib/progress.d.ts.map +1 -0
- package/dist/lib/progress.js +84 -0
- package/dist/lib/progress.js.map +1 -0
- package/dist/lib/project-limit.d.ts +13 -0
- package/dist/lib/project-limit.d.ts.map +1 -0
- package/dist/lib/project-limit.js +18 -0
- package/dist/lib/project-limit.js.map +1 -0
- package/dist/lib/refs.d.ts +86 -0
- package/dist/lib/refs.d.ts.map +1 -0
- package/dist/lib/refs.js +337 -0
- package/dist/lib/refs.js.map +1 -0
- package/dist/lib/reorder.d.ts +7 -0
- package/dist/lib/reorder.d.ts.map +1 -0
- package/dist/lib/reorder.js +11 -0
- package/dist/lib/reorder.js.map +1 -0
- package/dist/lib/root-options.d.ts +14 -0
- package/dist/lib/root-options.d.ts.map +1 -0
- package/dist/lib/root-options.js +14 -0
- package/dist/lib/root-options.js.map +1 -0
- package/dist/lib/skills/content.d.ts +5 -0
- package/dist/lib/skills/content.d.ts.map +1 -0
- package/dist/lib/skills/content.js +490 -0
- package/dist/lib/skills/content.js.map +1 -0
- package/dist/lib/skills/create-installer.d.ts +13 -0
- package/dist/lib/skills/create-installer.d.ts.map +1 -0
- package/dist/lib/skills/create-installer.js +139 -0
- package/dist/lib/skills/create-installer.js.map +1 -0
- package/dist/lib/skills/index.d.ts +6 -0
- package/dist/lib/skills/index.d.ts.map +1 -0
- package/dist/lib/skills/index.js +50 -0
- package/dist/lib/skills/index.js.map +1 -0
- package/dist/lib/skills/refresh-on-upgrade.d.ts +19 -0
- package/dist/lib/skills/refresh-on-upgrade.d.ts.map +1 -0
- package/dist/lib/skills/refresh-on-upgrade.js +67 -0
- package/dist/lib/skills/refresh-on-upgrade.js.map +1 -0
- package/dist/lib/skills/types.d.ts +14 -0
- package/dist/lib/skills/types.d.ts.map +1 -0
- package/dist/lib/skills/types.js +2 -0
- package/dist/lib/skills/types.js.map +1 -0
- package/dist/lib/skills/update-installed.d.ts +7 -0
- package/dist/lib/skills/update-installed.d.ts.map +1 -0
- package/dist/lib/skills/update-installed.js +23 -0
- package/dist/lib/skills/update-installed.js.map +1 -0
- package/dist/lib/spinner.d.ts +5 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +12 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/status.d.ts +4 -0
- package/dist/lib/status.d.ts.map +1 -0
- package/dist/lib/status.js +16 -0
- package/dist/lib/status.js.map +1 -0
- package/dist/lib/task-list.d.ts +39 -0
- package/dist/lib/task-list.d.ts.map +1 -0
- package/dist/lib/task-list.js +287 -0
- package/dist/lib/task-list.js.map +1 -0
- package/dist/lib/task-sort.d.ts +92 -0
- package/dist/lib/task-sort.d.ts.map +1 -0
- package/dist/lib/task-sort.js +248 -0
- package/dist/lib/task-sort.js.map +1 -0
- package/dist/lib/text.d.ts +33 -0
- package/dist/lib/text.d.ts.map +1 -0
- package/dist/lib/text.js +43 -0
- package/dist/lib/text.js.map +1 -0
- package/dist/lib/update.d.ts +11 -0
- package/dist/lib/update.d.ts.map +1 -0
- package/dist/lib/update.js +18 -0
- package/dist/lib/update.js.map +1 -0
- package/dist/lib/urls.d.ts +9 -0
- package/dist/lib/urls.d.ts.map +1 -0
- package/dist/lib/urls.js +34 -0
- package/dist/lib/urls.js.map +1 -0
- package/dist/lib/usage-tracking.d.ts +9 -0
- package/dist/lib/usage-tracking.d.ts.map +1 -0
- package/dist/lib/usage-tracking.js +95 -0
- package/dist/lib/usage-tracking.js.map +1 -0
- package/dist/lib/user-records.d.ts +17 -0
- package/dist/lib/user-records.d.ts.map +1 -0
- package/dist/lib/user-records.js +84 -0
- package/dist/lib/user-records.js.map +1 -0
- package/dist/lib/users.d.ts +54 -0
- package/dist/lib/users.d.ts.map +1 -0
- package/dist/lib/users.js +114 -0
- package/dist/lib/users.js.map +1 -0
- package/dist/lib/view-options.d.ts +30 -0
- package/dist/lib/view-options.d.ts.map +1 -0
- package/dist/lib/view-options.js +108 -0
- package/dist/lib/view-options.js.map +1 -0
- package/dist/postinstall.d.ts +2 -0
- package/dist/postinstall.d.ts.map +1 -0
- package/dist/postinstall.js +5 -0
- package/dist/postinstall.js.map +1 -0
- package/package.json +79 -6
- package/scripts/check-skill-sync.js +40 -0
- package/scripts/postinstall.js +12 -0
- package/scripts/sync-skill.js +28 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import { outputIds, readStdin } from '@todoist/cli-core';
|
|
2
|
+
import { createCommand, } from '@todoist/sdk';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { getApi } from '../../lib/api/core.js';
|
|
5
|
+
import { resolveAssigneeIds } from '../../lib/collaborators.js';
|
|
6
|
+
import { parseDuration } from '../../lib/duration.js';
|
|
7
|
+
import { CliError, SyncCommandError } from '../../lib/errors.js';
|
|
8
|
+
import { isQuiet } from '../../lib/global-args.js';
|
|
9
|
+
import { readLocalTextFile } from '../../lib/local-file.js';
|
|
10
|
+
import { formatJson } from '../../lib/output.js';
|
|
11
|
+
import { paginate } from '../../lib/pagination.js';
|
|
12
|
+
import { extractId, isIdRef, lenientIdRef, resolveProjectRef } from '../../lib/refs.js';
|
|
13
|
+
import { parsePriority } from '../../lib/task-list.js';
|
|
14
|
+
import { truncateForDisplay } from '../../lib/text.js';
|
|
15
|
+
import { parseTaskList } from './add-many-input.js';
|
|
16
|
+
import { normalizeLabels } from './helpers.js';
|
|
17
|
+
export async function addManyTasks(options) {
|
|
18
|
+
if (options.stdin && options.file) {
|
|
19
|
+
throw new CliError('CONFLICTING_OPTIONS', 'Cannot use both --stdin and --file');
|
|
20
|
+
}
|
|
21
|
+
const tasks = parseTaskList(await readInput(options));
|
|
22
|
+
const allTasks = flatten(tasks);
|
|
23
|
+
const sectionRefs = unique(tasks.flatMap((task) => (task.section ? [task.section] : [])));
|
|
24
|
+
const assigneeRefs = unique(allTasks.flatMap((task) => (task.assignee ? [task.assignee] : [])));
|
|
25
|
+
if (!options.project && (sectionRefs.length > 0 || assigneeRefs.length > 0)) {
|
|
26
|
+
const field = sectionRefs.length > 0 ? 'section' : 'assignee';
|
|
27
|
+
throw new CliError('PROJECT_REQUIRED', `The --project flag is required when tasks set "${field}".`);
|
|
28
|
+
}
|
|
29
|
+
const api = await getApi();
|
|
30
|
+
const resolved = {
|
|
31
|
+
newSections: [],
|
|
32
|
+
sectionIds: new Map(),
|
|
33
|
+
sectionNames: new Map(),
|
|
34
|
+
assigneeIds: new Map(),
|
|
35
|
+
};
|
|
36
|
+
if (options.project) {
|
|
37
|
+
const project = await resolveProjectRef(api, options.project);
|
|
38
|
+
if (project.isArchived) {
|
|
39
|
+
throw new CliError('PROJECT_ARCHIVED', `Cannot create tasks in archived project "${project.name}"`);
|
|
40
|
+
}
|
|
41
|
+
resolved.project = project;
|
|
42
|
+
await planSections(api, sectionRefs, project, resolved);
|
|
43
|
+
resolved.assigneeIds = await resolveAssigneeIds(api, assigneeRefs, project);
|
|
44
|
+
}
|
|
45
|
+
const plannedTasks = planTasks(tasks, resolved);
|
|
46
|
+
if (options.dryRun) {
|
|
47
|
+
printPreview(resolved, plannedTasks);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const planned = [...resolved.newSections, ...plannedTasks];
|
|
51
|
+
const outcomes = await send(api, planned);
|
|
52
|
+
printReport(resolved, plannedTasks, outcomes, options);
|
|
53
|
+
}
|
|
54
|
+
/** How much of a description the --dry-run preview shows. */
|
|
55
|
+
const PREVIEW_DESCRIPTION_LENGTH = 40;
|
|
56
|
+
/** The Sync API accepts at most this many commands in one request. */
|
|
57
|
+
const MAX_COMMANDS_PER_REQUEST = 100;
|
|
58
|
+
/**
|
|
59
|
+
* Request errors that mean the server turned the request away before applying
|
|
60
|
+
* any of it. Any other failure to get a response leaves the outcome unknown.
|
|
61
|
+
*/
|
|
62
|
+
const REJECTED_BEFORE_APPLYING = new Set([
|
|
63
|
+
'RATE_LIMITED',
|
|
64
|
+
'AUTH_ERROR',
|
|
65
|
+
'MISSING_SCOPE',
|
|
66
|
+
'READ_ONLY',
|
|
67
|
+
]);
|
|
68
|
+
/**
|
|
69
|
+
* Sends the planned items, at most 100 commands per request, and records what
|
|
70
|
+
* happened to each. The Sync API applies commands independently, so a failed
|
|
71
|
+
* command does not undo the others; anything that depended on a failed item is
|
|
72
|
+
* reported as skipped, and never sent if it falls in a later request.
|
|
73
|
+
*/
|
|
74
|
+
async function send(api, planned) {
|
|
75
|
+
const outcomes = new Map();
|
|
76
|
+
const byTempId = new Map(planned.map((item) => [item.tempId, item]));
|
|
77
|
+
for (let start = 0; start < planned.length; start += MAX_COMMANDS_PER_REQUEST) {
|
|
78
|
+
const batch = [];
|
|
79
|
+
for (const item of planned.slice(start, start + MAX_COMMANDS_PER_REQUEST)) {
|
|
80
|
+
const blocker = findBlocker(item, byTempId, outcomes);
|
|
81
|
+
if (blocker) {
|
|
82
|
+
outcomes.set(item.tempId, { status: 'skipped', reason: blocker });
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
batch.push(item);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (batch.length === 0)
|
|
89
|
+
continue;
|
|
90
|
+
// Items created by an earlier request are referred to by their real ID.
|
|
91
|
+
const commands = batch.map((item) => toCommand(withCreatedIds(item, outcomes)));
|
|
92
|
+
let syncStatus;
|
|
93
|
+
let tempIdMapping;
|
|
94
|
+
try {
|
|
95
|
+
const response = await api.sync({ commands });
|
|
96
|
+
syncStatus = response.syncStatus ?? {};
|
|
97
|
+
tempIdMapping = response.tempIdMapping ?? {};
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
if (err instanceof SyncCommandError) {
|
|
101
|
+
syncStatus = err.syncStatus;
|
|
102
|
+
tempIdMapping = err.tempIdMapping;
|
|
103
|
+
}
|
|
104
|
+
else if (outcomes.size === 0) {
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
109
|
+
const rejected = err instanceof CliError && REJECTED_BEFORE_APPLYING.has(err.code);
|
|
110
|
+
for (const item of batch) {
|
|
111
|
+
outcomes.set(item.tempId, rejected
|
|
112
|
+
? { status: 'failed', error: `not sent: ${message}` }
|
|
113
|
+
: { status: 'unknown', error: message });
|
|
114
|
+
}
|
|
115
|
+
for (const item of planned.slice(start + MAX_COMMANDS_PER_REQUEST)) {
|
|
116
|
+
if (!outcomes.has(item.tempId)) {
|
|
117
|
+
outcomes.set(item.tempId, {
|
|
118
|
+
status: 'failed',
|
|
119
|
+
error: `not sent: ${message}`,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return outcomes;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
batch.forEach((item, index) => {
|
|
127
|
+
const id = tempIdMapping[item.tempId];
|
|
128
|
+
const blocker = id ? undefined : findBlocker(item, byTempId, outcomes);
|
|
129
|
+
if (id) {
|
|
130
|
+
outcomes.set(item.tempId, { status: 'created', id });
|
|
131
|
+
}
|
|
132
|
+
else if (blocker) {
|
|
133
|
+
outcomes.set(item.tempId, { status: 'skipped', reason: blocker });
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
const status = syncStatus[commands[index].uuid];
|
|
137
|
+
const error = status && status !== 'ok' ? status.error : 'No ID came back for it';
|
|
138
|
+
outcomes.set(item.tempId, { status: 'failed', error });
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
return outcomes;
|
|
143
|
+
}
|
|
144
|
+
/** Swaps temp IDs of items already created for their real IDs. */
|
|
145
|
+
function withCreatedIds(item, outcomes) {
|
|
146
|
+
if (item.kind !== 'task')
|
|
147
|
+
return item;
|
|
148
|
+
const createdId = (ref) => {
|
|
149
|
+
const outcome = ref ? outcomes.get(ref) : undefined;
|
|
150
|
+
return outcome?.status === 'created' ? outcome.id : ref;
|
|
151
|
+
};
|
|
152
|
+
const args = { ...item.args };
|
|
153
|
+
if (args.parentId)
|
|
154
|
+
args.parentId = createdId(args.parentId);
|
|
155
|
+
if (args.sectionId)
|
|
156
|
+
args.sectionId = createdId(args.sectionId);
|
|
157
|
+
return { ...item, args };
|
|
158
|
+
}
|
|
159
|
+
/** Names the parent task or new section that kept this item from being created, if any. */
|
|
160
|
+
function findBlocker(item, byTempId, outcomes) {
|
|
161
|
+
if (item.kind !== 'task')
|
|
162
|
+
return undefined;
|
|
163
|
+
// Only items already decided count: a parent in the same request has no outcome yet.
|
|
164
|
+
const notCreated = (tempId) => {
|
|
165
|
+
const outcome = tempId === undefined ? undefined : outcomes.get(tempId);
|
|
166
|
+
return outcome !== undefined && outcome.status !== 'created';
|
|
167
|
+
};
|
|
168
|
+
if (notCreated(item.parentRef)) {
|
|
169
|
+
const parent = byTempId.get(item.parentRef);
|
|
170
|
+
return `parent "${parent.content}" was not created`;
|
|
171
|
+
}
|
|
172
|
+
if (notCreated(item.sectionRef)) {
|
|
173
|
+
const section = byTempId.get(item.sectionRef);
|
|
174
|
+
return `section "${section.name}" was not created`;
|
|
175
|
+
}
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
function printReport(resolved, plannedTasks, outcomes, options) {
|
|
179
|
+
const createdId = (tempId) => {
|
|
180
|
+
const outcome = outcomes.get(tempId);
|
|
181
|
+
return outcome?.status === 'created' ? outcome.id : undefined;
|
|
182
|
+
};
|
|
183
|
+
// A reference is either a planned item's temp ID or an existing item's ID.
|
|
184
|
+
const idOf = (ref) => {
|
|
185
|
+
if (ref === undefined)
|
|
186
|
+
return null;
|
|
187
|
+
return outcomes.has(ref) ? (createdId(ref) ?? null) : ref;
|
|
188
|
+
};
|
|
189
|
+
const sections = resolved.newSections.flatMap((section) => {
|
|
190
|
+
const id = createdId(section.tempId);
|
|
191
|
+
return id ? [{ id, name: section.name }] : [];
|
|
192
|
+
});
|
|
193
|
+
const tasks = plannedTasks.flatMap((task) => {
|
|
194
|
+
const id = createdId(task.tempId);
|
|
195
|
+
return id ? [{ id, task }] : [];
|
|
196
|
+
});
|
|
197
|
+
const problem = (tempId) => {
|
|
198
|
+
const outcome = outcomes.get(tempId);
|
|
199
|
+
switch (outcome?.status) {
|
|
200
|
+
case 'failed':
|
|
201
|
+
return { status: outcome.status, label: 'Failed', error: outcome.error };
|
|
202
|
+
case 'skipped':
|
|
203
|
+
return { status: outcome.status, label: 'Skipped', error: outcome.reason };
|
|
204
|
+
case 'unknown':
|
|
205
|
+
return {
|
|
206
|
+
status: outcome.status,
|
|
207
|
+
label: 'Unknown',
|
|
208
|
+
error: `may or may not have been created: ${outcome.error}`,
|
|
209
|
+
};
|
|
210
|
+
default:
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
const sectionFailures = resolved.newSections.flatMap((section) => {
|
|
215
|
+
const found = problem(section.tempId);
|
|
216
|
+
return found ? [{ section, ...found }] : [];
|
|
217
|
+
});
|
|
218
|
+
const taskFailures = plannedTasks.flatMap((task) => {
|
|
219
|
+
const found = problem(task.tempId);
|
|
220
|
+
return found ? [{ task, ...found }] : [];
|
|
221
|
+
});
|
|
222
|
+
if (options.json) {
|
|
223
|
+
console.log(formatJson({
|
|
224
|
+
projectId: resolved.project?.id ?? null,
|
|
225
|
+
sections,
|
|
226
|
+
tasks: tasks.map(({ id, task }) => ({
|
|
227
|
+
id,
|
|
228
|
+
content: task.content,
|
|
229
|
+
sectionId: idOf(task.sectionRef),
|
|
230
|
+
parentId: idOf(task.parentRef),
|
|
231
|
+
})),
|
|
232
|
+
failures: [
|
|
233
|
+
...sectionFailures.map(({ section, status, error }) => ({
|
|
234
|
+
type: 'section',
|
|
235
|
+
status,
|
|
236
|
+
name: section.name,
|
|
237
|
+
error,
|
|
238
|
+
})),
|
|
239
|
+
...taskFailures.map(({ task, status, error }) => ({
|
|
240
|
+
type: 'task',
|
|
241
|
+
status,
|
|
242
|
+
path: task.path,
|
|
243
|
+
content: task.content,
|
|
244
|
+
parentId: idOf(task.parentRef),
|
|
245
|
+
error,
|
|
246
|
+
})),
|
|
247
|
+
],
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
if (isQuiet()) {
|
|
252
|
+
outputIds(tasks, ({ id }) => id);
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
printCreated(resolved, sections, tasks);
|
|
256
|
+
}
|
|
257
|
+
// Problems go to stderr, even with --quiet, so stdout only lists what was created.
|
|
258
|
+
for (const { section, label, error } of sectionFailures) {
|
|
259
|
+
console.error(`${label}: section ${section.name}: ${error}`);
|
|
260
|
+
}
|
|
261
|
+
for (const { task, label, error } of taskFailures) {
|
|
262
|
+
// A parent that exists is what a retry of this task should name in "parent".
|
|
263
|
+
const parentId = idOf(task.parentRef);
|
|
264
|
+
const suffix = parentId ? ` (parent: id:${parentId})` : '';
|
|
265
|
+
console.error(`${label}: ${task.content}: ${error}${suffix}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (sectionFailures.length > 0 || taskFailures.length > 0) {
|
|
269
|
+
const isUnknown = (failure) => failure.status === 'unknown';
|
|
270
|
+
const failedTasks = taskFailures.filter((failure) => !isUnknown(failure)).length;
|
|
271
|
+
const failedSections = sectionFailures.filter((failure) => !isUnknown(failure)).length;
|
|
272
|
+
const unknownItems = taskFailures.filter(isUnknown).length + sectionFailures.filter(isUnknown).length;
|
|
273
|
+
const parts = [];
|
|
274
|
+
if (failedTasks > 0)
|
|
275
|
+
parts.push(`${failedTasks} of ${plural(plannedTasks.length, 'task')}`);
|
|
276
|
+
if (failedSections > 0) {
|
|
277
|
+
parts.push(`${failedSections} of ${plural(resolved.newSections.length, 'section')}`);
|
|
278
|
+
}
|
|
279
|
+
const sentences = [];
|
|
280
|
+
if (parts.length > 0) {
|
|
281
|
+
const verb = parts.length === 1 && failedTasks + failedSections === 1 ? 'was' : 'were';
|
|
282
|
+
sentences.push(`${parts.join(' and ')} ${verb} not created.`);
|
|
283
|
+
}
|
|
284
|
+
if (unknownItems > 0) {
|
|
285
|
+
sentences.push(`${plural(unknownItems, 'item')} may or may not have been created.`);
|
|
286
|
+
}
|
|
287
|
+
const hints = [
|
|
288
|
+
'Everything else was created. To retry, re-run only the failed and skipped items, keeping skipped subtasks nested under their failed parent, so nothing is created twice.',
|
|
289
|
+
'Give a failed subtask whose parent was created "parent": "id:<parent ID>", so it is not added at the top level. The ID is shown with the failure, and as parentId in --json.',
|
|
290
|
+
];
|
|
291
|
+
if (unknownItems > 0) {
|
|
292
|
+
hints.unshift('The request holding the items marked unknown failed after it was sent, so the server may have created them: check the project before re-running them.');
|
|
293
|
+
}
|
|
294
|
+
throw new CliError('PARTIAL_FAILURE', sentences.join(' '), hints);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function printCreated(resolved, sections, tasks) {
|
|
298
|
+
const counts = [plural(tasks.length, 'task')];
|
|
299
|
+
if (sections.length > 0)
|
|
300
|
+
counts.push(plural(sections.length, 'section'));
|
|
301
|
+
const summary = `Created ${counts.join(' and ')}`;
|
|
302
|
+
console.log(resolved.project ? `${summary} in ${resolved.project.name}` : summary);
|
|
303
|
+
for (const section of sections) {
|
|
304
|
+
console.log(` Section: ${section.name} (id:${section.id})`);
|
|
305
|
+
}
|
|
306
|
+
for (const { id, task } of tasks) {
|
|
307
|
+
console.log(`${' '.repeat(task.depth + 1)}- ${task.content} (id:${id})`);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function printPreview(resolved, plannedTasks) {
|
|
311
|
+
const counts = [plural(plannedTasks.length, 'task')];
|
|
312
|
+
if (resolved.newSections.length > 0) {
|
|
313
|
+
counts.push(plural(resolved.newSections.length, 'new section'));
|
|
314
|
+
}
|
|
315
|
+
const target = resolved.project ? resolved.project.name : 'the Inbox';
|
|
316
|
+
console.log(chalk.yellow(`[dry-run] Would add ${counts.join(' and ')} to ${target}:`));
|
|
317
|
+
for (const section of resolved.newSections) {
|
|
318
|
+
console.log(` New section: ${section.name}`);
|
|
319
|
+
}
|
|
320
|
+
for (const task of plannedTasks) {
|
|
321
|
+
const details = describeFields(task.input, resolved);
|
|
322
|
+
const suffix = details.length > 0 ? ` (${details.join(', ')})` : '';
|
|
323
|
+
console.log(`${' '.repeat(task.depth + 1)}- ${task.content}${suffix}`);
|
|
324
|
+
}
|
|
325
|
+
console.log(chalk.dim('Run without --dry-run to execute.'));
|
|
326
|
+
}
|
|
327
|
+
function describeFields(task, resolved) {
|
|
328
|
+
const details = [];
|
|
329
|
+
if (task.section) {
|
|
330
|
+
details.push(`section: ${resolved.sectionNames.get(sectionKey(task.section))}`);
|
|
331
|
+
}
|
|
332
|
+
if (task.description) {
|
|
333
|
+
// The preview is one line per task, so the description is flattened and shortened.
|
|
334
|
+
const oneLine = task.description.split(/\s+/).filter(Boolean).join(' ');
|
|
335
|
+
details.push(`description: ${truncateForDisplay(oneLine, PREVIEW_DESCRIPTION_LENGTH)}`);
|
|
336
|
+
}
|
|
337
|
+
if (task.due)
|
|
338
|
+
details.push(`due: ${task.due}`);
|
|
339
|
+
if (task.deadline)
|
|
340
|
+
details.push(`deadline: ${task.deadline}`);
|
|
341
|
+
if (task.priority)
|
|
342
|
+
details.push(`priority: ${task.priority.toLowerCase()}`);
|
|
343
|
+
const labels = normalizeLabels(task.labels ?? []);
|
|
344
|
+
if (labels.length > 0)
|
|
345
|
+
details.push(`labels: ${labels.join(', ')}`);
|
|
346
|
+
if (task.duration)
|
|
347
|
+
details.push(`duration: ${task.duration}`);
|
|
348
|
+
if (task.assignee)
|
|
349
|
+
details.push(`assignee: ${task.assignee}`);
|
|
350
|
+
if (task.parent)
|
|
351
|
+
details.push(`parent: ${task.parent}`);
|
|
352
|
+
return details;
|
|
353
|
+
}
|
|
354
|
+
function toCommand(item) {
|
|
355
|
+
return item.kind === 'section'
|
|
356
|
+
? createCommand('section_add', item.args, item.tempId)
|
|
357
|
+
: createCommand('item_add', item.args, item.tempId);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Matches each section name to an existing section in the project, by exact
|
|
361
|
+
* name ignoring case, so a re-run does not duplicate sections. Names with no
|
|
362
|
+
* match become new sections, one per name. `id:` references are used as given.
|
|
363
|
+
*/
|
|
364
|
+
async function planSections(api, refs, project, resolved) {
|
|
365
|
+
// id: references are used as given, so the section list is only needed for names.
|
|
366
|
+
const existing = refs.some((ref) => !isIdRef(ref))
|
|
367
|
+
? (await paginate((cursor, limit) => api.getSections({ projectId: project.id, cursor, limit }), { limit: Number.MAX_SAFE_INTEGER })).results
|
|
368
|
+
: [];
|
|
369
|
+
const existingByName = new Map(existing.map((section) => [section.name.toLowerCase(), section]));
|
|
370
|
+
for (const ref of refs) {
|
|
371
|
+
const key = sectionKey(ref);
|
|
372
|
+
if (resolved.sectionIds.has(key))
|
|
373
|
+
continue;
|
|
374
|
+
if (isIdRef(ref)) {
|
|
375
|
+
resolved.sectionIds.set(key, extractId(ref));
|
|
376
|
+
resolved.sectionNames.set(key, ref);
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
const match = existingByName.get(key);
|
|
380
|
+
if (match) {
|
|
381
|
+
resolved.sectionIds.set(key, match.id);
|
|
382
|
+
resolved.sectionNames.set(key, match.name);
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
const name = ref.trim();
|
|
386
|
+
const tempId = crypto.randomUUID();
|
|
387
|
+
resolved.newSections.push({
|
|
388
|
+
kind: 'section',
|
|
389
|
+
tempId,
|
|
390
|
+
name,
|
|
391
|
+
args: { projectId: project.id, name },
|
|
392
|
+
});
|
|
393
|
+
resolved.sectionIds.set(key, tempId);
|
|
394
|
+
resolved.sectionNames.set(key, name);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function sectionKey(ref) {
|
|
398
|
+
return isIdRef(ref) ? ref : ref.trim().toLowerCase();
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Flattens the task tree depth first, so every parent is sent before its
|
|
402
|
+
* subtasks. Top-level tasks go to the project; subtasks, and tasks given an
|
|
403
|
+
* existing `parent`, only name their parent and inherit its project and section.
|
|
404
|
+
*/
|
|
405
|
+
function planTasks(tasks, resolved) {
|
|
406
|
+
const planned = [];
|
|
407
|
+
const visit = (task, parent, path) => {
|
|
408
|
+
const tempId = crypto.randomUUID();
|
|
409
|
+
const args = { content: task.content };
|
|
410
|
+
let sectionRef = parent?.sectionRef;
|
|
411
|
+
let parentRef = parent?.tempId;
|
|
412
|
+
if (parent) {
|
|
413
|
+
args.parentId = parent.tempId;
|
|
414
|
+
}
|
|
415
|
+
else if (task.parent) {
|
|
416
|
+
// The input check has already confirmed this is an ID or a task URL.
|
|
417
|
+
parentRef = lenientIdRef(task.parent, 'task');
|
|
418
|
+
args.parentId = parentRef;
|
|
419
|
+
}
|
|
420
|
+
else if (resolved.project) {
|
|
421
|
+
args.projectId = resolved.project.id;
|
|
422
|
+
if (task.section) {
|
|
423
|
+
sectionRef = resolved.sectionIds.get(sectionKey(task.section));
|
|
424
|
+
args.sectionId = sectionRef;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
applyFields(args, task, resolved);
|
|
428
|
+
const item = {
|
|
429
|
+
kind: 'task',
|
|
430
|
+
tempId,
|
|
431
|
+
content: task.content,
|
|
432
|
+
args,
|
|
433
|
+
depth: parent ? parent.depth + 1 : 0,
|
|
434
|
+
path,
|
|
435
|
+
input: task,
|
|
436
|
+
parentRef,
|
|
437
|
+
sectionRef,
|
|
438
|
+
};
|
|
439
|
+
planned.push(item);
|
|
440
|
+
task.subtasks?.forEach((subtask, index) => visit(subtask, item, `${path}.subtasks[${index}]`));
|
|
441
|
+
};
|
|
442
|
+
tasks.forEach((task, index) => visit(task, undefined, `[${index}]`));
|
|
443
|
+
return planned;
|
|
444
|
+
}
|
|
445
|
+
/** Maps the optional fields the same way `td task add` maps its flags. */
|
|
446
|
+
function applyFields(args, task, resolved) {
|
|
447
|
+
if (task.description !== undefined)
|
|
448
|
+
args.description = task.description;
|
|
449
|
+
if (task.due)
|
|
450
|
+
args.due = { string: task.due };
|
|
451
|
+
if (task.deadline)
|
|
452
|
+
args.deadline = { date: task.deadline };
|
|
453
|
+
if (task.priority)
|
|
454
|
+
args.priority = parsePriority(task.priority);
|
|
455
|
+
const labels = normalizeLabels(task.labels ?? []);
|
|
456
|
+
if (labels.length > 0)
|
|
457
|
+
args.labels = labels;
|
|
458
|
+
if (task.duration) {
|
|
459
|
+
// The input schema has already rejected durations parseDuration can't read.
|
|
460
|
+
const minutes = parseDuration(task.duration);
|
|
461
|
+
if (minutes !== null)
|
|
462
|
+
args.duration = { amount: minutes, unit: 'minute' };
|
|
463
|
+
}
|
|
464
|
+
if (task.assignee)
|
|
465
|
+
args.responsibleUid = resolved.assigneeIds.get(task.assignee.toLowerCase());
|
|
466
|
+
}
|
|
467
|
+
function flatten(tasks) {
|
|
468
|
+
return tasks.flatMap((task) => [task, ...flatten(task.subtasks ?? [])]);
|
|
469
|
+
}
|
|
470
|
+
function unique(values) {
|
|
471
|
+
return [...new Set(values)];
|
|
472
|
+
}
|
|
473
|
+
async function readInput(options) {
|
|
474
|
+
return options.stdin ? readStdin() : readLocalTextFile(options.file ?? '');
|
|
475
|
+
}
|
|
476
|
+
function plural(count, noun) {
|
|
477
|
+
return `${count} ${noun}${count === 1 ? '' : 's'}`;
|
|
478
|
+
}
|
|
479
|
+
//# sourceMappingURL=add-many.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-many.js","sourceRoot":"","sources":["../../../src/commands/task/add-many.ts"],"names":[],"mappings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CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED,SAAS,MAAM,CAAC,MAAgB;IAC5B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;AAC/B,CAAC;AAED,KAAK,UAAU,SAAS,CAAC,OAAuB;IAC5C,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;AAC9E,CAAC;AAED,SAAS,MAAM,CAAC,KAAa,EAAE,IAAY;IACvC,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;AACtD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface AddOptions {
|
|
2
|
+
content: string;
|
|
3
|
+
due?: string;
|
|
4
|
+
deadline?: string;
|
|
5
|
+
priority?: string;
|
|
6
|
+
project?: string;
|
|
7
|
+
section?: string;
|
|
8
|
+
labels?: string;
|
|
9
|
+
parent?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
stdin?: boolean;
|
|
12
|
+
assignee?: string;
|
|
13
|
+
duration?: string;
|
|
14
|
+
uncompletable?: boolean;
|
|
15
|
+
order?: number;
|
|
16
|
+
json?: boolean;
|
|
17
|
+
dryRun?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function addTask(options: AddOptions): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=add.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/commands/task/add.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA0IhE"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { readStdin } from '@todoist/cli-core';
|
|
2
|
+
import { getApi } from '../../lib/api/core.js';
|
|
3
|
+
import { resolveAssigneeId } from '../../lib/collaborators.js';
|
|
4
|
+
import { CliError } from '../../lib/errors.js';
|
|
5
|
+
import { isQuiet } from '../../lib/global-args.js';
|
|
6
|
+
import { formatJson, printDryRun } from '../../lib/output.js';
|
|
7
|
+
import { extractId, isIdRef, looksLikeRawId, resolveParentTaskId, resolveProjectRef, resolveSectionId, } from '../../lib/refs.js';
|
|
8
|
+
import { parsePriority } from '../../lib/task-list.js';
|
|
9
|
+
import { applyDuration, parseLabels } from './helpers.js';
|
|
10
|
+
export async function addTask(options) {
|
|
11
|
+
const api = await getApi();
|
|
12
|
+
const args = {
|
|
13
|
+
content: options.content,
|
|
14
|
+
};
|
|
15
|
+
if (options.due) {
|
|
16
|
+
args.dueString = options.due;
|
|
17
|
+
}
|
|
18
|
+
if (options.deadline) {
|
|
19
|
+
args.deadlineDate = options.deadline;
|
|
20
|
+
}
|
|
21
|
+
if (options.priority) {
|
|
22
|
+
args.priority = parsePriority(options.priority);
|
|
23
|
+
}
|
|
24
|
+
let project = null;
|
|
25
|
+
if (options.project) {
|
|
26
|
+
project = await resolveProjectRef(api, options.project);
|
|
27
|
+
if (project.isArchived) {
|
|
28
|
+
throw new CliError('PROJECT_ARCHIVED', `Cannot create task in archived project "${project.name}"`);
|
|
29
|
+
}
|
|
30
|
+
args.projectId = project.id;
|
|
31
|
+
}
|
|
32
|
+
if (options.section) {
|
|
33
|
+
if (isIdRef(options.section)) {
|
|
34
|
+
args.sectionId = extractId(options.section);
|
|
35
|
+
}
|
|
36
|
+
else if (args.projectId) {
|
|
37
|
+
args.sectionId = await resolveSectionId(api, options.section, args.projectId);
|
|
38
|
+
}
|
|
39
|
+
else if (looksLikeRawId(options.section)) {
|
|
40
|
+
args.sectionId = options.section;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new CliError('PROJECT_REQUIRED', 'The --project flag is required when using --section with a name.', ['Use id:xxx format to specify section by ID without a project.']);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (options.labels) {
|
|
47
|
+
const labels = parseLabels(options.labels);
|
|
48
|
+
if (labels.length > 0)
|
|
49
|
+
args.labels = labels;
|
|
50
|
+
}
|
|
51
|
+
if (options.parent) {
|
|
52
|
+
if (isIdRef(options.parent)) {
|
|
53
|
+
args.parentId = extractId(options.parent);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (!args.projectId) {
|
|
57
|
+
throw new CliError('PROJECT_REQUIRED', 'The --project flag is required when using --parent with a task name.', ['Use id:xxx format to specify parent by ID without a project.']);
|
|
58
|
+
}
|
|
59
|
+
args.parentId = await resolveParentTaskId(api, options.parent, args.projectId, args.sectionId);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (options.stdin && options.description !== undefined) {
|
|
63
|
+
throw new CliError('CONFLICTING_OPTIONS', 'Cannot use both --description and --stdin');
|
|
64
|
+
}
|
|
65
|
+
if (options.stdin) {
|
|
66
|
+
args.description = await readStdin();
|
|
67
|
+
}
|
|
68
|
+
else if (options.description) {
|
|
69
|
+
args.description = options.description;
|
|
70
|
+
}
|
|
71
|
+
if (options.assignee) {
|
|
72
|
+
if (!project) {
|
|
73
|
+
throw new CliError('PROJECT_REQUIRED', 'The --project flag is required when using --assignee.');
|
|
74
|
+
}
|
|
75
|
+
args.assigneeId = await resolveAssigneeId(api, options.assignee, project);
|
|
76
|
+
}
|
|
77
|
+
if (options.duration) {
|
|
78
|
+
applyDuration(args, options.duration);
|
|
79
|
+
}
|
|
80
|
+
if (options.uncompletable) {
|
|
81
|
+
args.isUncompletable = true;
|
|
82
|
+
}
|
|
83
|
+
if (options.order !== undefined) {
|
|
84
|
+
args.order = options.order;
|
|
85
|
+
}
|
|
86
|
+
if (options.dryRun) {
|
|
87
|
+
printDryRun('add task', {
|
|
88
|
+
Content: args.content,
|
|
89
|
+
Description: args.description,
|
|
90
|
+
Due: args.dueString,
|
|
91
|
+
Deadline: args.deadlineDate ?? undefined,
|
|
92
|
+
Priority: options.priority,
|
|
93
|
+
Project: options.project,
|
|
94
|
+
Section: options.section,
|
|
95
|
+
Labels: args.labels?.join(', '),
|
|
96
|
+
Parent: options.parent,
|
|
97
|
+
Assignee: options.assignee,
|
|
98
|
+
Duration: options.duration,
|
|
99
|
+
Uncompletable: options.uncompletable ? 'yes' : undefined,
|
|
100
|
+
Order: options.order !== undefined ? String(options.order) : undefined,
|
|
101
|
+
});
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const task = await api.addTask(args);
|
|
105
|
+
if (options.json) {
|
|
106
|
+
console.log(formatJson(task, 'task'));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (isQuiet()) {
|
|
110
|
+
console.log(task.id);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
console.log(`Created: ${task.content}`);
|
|
114
|
+
if (task.due)
|
|
115
|
+
console.log(`Due: ${task.due.string || task.due.date}`);
|
|
116
|
+
if (task.deadline)
|
|
117
|
+
console.log(`Deadline: ${task.deadline.date}`);
|
|
118
|
+
console.log(`ID: ${task.id}`);
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=add.js.map
|