@ttctl/cli 0.0.0 → 0.1.0-rc.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/README.md +44 -9
- package/dist/commands/applications/index.d.ts +21 -0
- package/dist/commands/applications/index.d.ts.map +1 -0
- package/dist/commands/applications/index.js +87 -0
- package/dist/commands/applications/index.js.map +1 -0
- package/dist/commands/applications/list.d.ts +55 -0
- package/dist/commands/applications/list.d.ts.map +1 -0
- package/dist/commands/applications/list.js +106 -0
- package/dist/commands/applications/list.js.map +1 -0
- package/dist/commands/applications/shared.d.ts +14 -0
- package/dist/commands/applications/shared.d.ts.map +1 -0
- package/dist/commands/applications/shared.js +19 -0
- package/dist/commands/applications/shared.js.map +1 -0
- package/dist/commands/applications/show.d.ts +51 -0
- package/dist/commands/applications/show.d.ts.map +1 -0
- package/dist/commands/applications/show.js +154 -0
- package/dist/commands/applications/show.js.map +1 -0
- package/dist/commands/applications/stats.d.ts +42 -0
- package/dist/commands/applications/stats.d.ts.map +1 -0
- package/dist/commands/applications/stats.js +69 -0
- package/dist/commands/applications/stats.js.map +1 -0
- package/dist/commands/auth/index.d.ts +17 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +69 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/init.d.ts +98 -0
- package/dist/commands/auth/init.d.ts.map +1 -0
- package/dist/commands/auth/init.js +387 -0
- package/dist/commands/auth/init.js.map +1 -0
- package/dist/commands/auth/signin.d.ts +81 -0
- package/dist/commands/auth/signin.d.ts.map +1 -0
- package/dist/commands/auth/signin.js +145 -0
- package/dist/commands/auth/signin.js.map +1 -0
- package/dist/commands/auth/signout.d.ts +133 -0
- package/dist/commands/auth/signout.d.ts.map +1 -0
- package/dist/commands/auth/signout.js +172 -0
- package/dist/commands/auth/signout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +62 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +98 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/availability/allocated-hours.d.ts +27 -0
- package/dist/commands/availability/allocated-hours.d.ts.map +1 -0
- package/dist/commands/availability/allocated-hours.js +61 -0
- package/dist/commands/availability/allocated-hours.js.map +1 -0
- package/dist/commands/availability/index.d.ts +30 -0
- package/dist/commands/availability/index.d.ts.map +1 -0
- package/dist/commands/availability/index.js +124 -0
- package/dist/commands/availability/index.js.map +1 -0
- package/dist/commands/availability/shared.d.ts +11 -0
- package/dist/commands/availability/shared.d.ts.map +1 -0
- package/dist/commands/availability/shared.js +30 -0
- package/dist/commands/availability/shared.js.map +1 -0
- package/dist/commands/availability/show.d.ts +32 -0
- package/dist/commands/availability/show.d.ts.map +1 -0
- package/dist/commands/availability/show.js +86 -0
- package/dist/commands/availability/show.js.map +1 -0
- package/dist/commands/availability/working-hours.d.ts +53 -0
- package/dist/commands/availability/working-hours.d.ts.map +1 -0
- package/dist/commands/availability/working-hours.js +151 -0
- package/dist/commands/availability/working-hours.js.map +1 -0
- package/dist/commands/contracts/index.d.ts +69 -0
- package/dist/commands/contracts/index.d.ts.map +1 -0
- package/dist/commands/contracts/index.js +198 -0
- package/dist/commands/contracts/index.js.map +1 -0
- package/dist/commands/engagements/breaks.d.ts +81 -0
- package/dist/commands/engagements/breaks.d.ts.map +1 -0
- package/dist/commands/engagements/breaks.js +229 -0
- package/dist/commands/engagements/breaks.js.map +1 -0
- package/dist/commands/engagements/index.d.ts +29 -0
- package/dist/commands/engagements/index.d.ts.map +1 -0
- package/dist/commands/engagements/index.js +172 -0
- package/dist/commands/engagements/index.js.map +1 -0
- package/dist/commands/engagements/list.d.ts +49 -0
- package/dist/commands/engagements/list.d.ts.map +1 -0
- package/dist/commands/engagements/list.js +95 -0
- package/dist/commands/engagements/list.js.map +1 -0
- package/dist/commands/engagements/shared.d.ts +10 -0
- package/dist/commands/engagements/shared.d.ts.map +1 -0
- package/dist/commands/engagements/shared.js +31 -0
- package/dist/commands/engagements/shared.js.map +1 -0
- package/dist/commands/engagements/show.d.ts +19 -0
- package/dist/commands/engagements/show.d.ts.map +1 -0
- package/dist/commands/engagements/show.js +150 -0
- package/dist/commands/engagements/show.js.map +1 -0
- package/dist/commands/engagements/stats.d.ts +24 -0
- package/dist/commands/engagements/stats.d.ts.map +1 -0
- package/dist/commands/engagements/stats.js +51 -0
- package/dist/commands/engagements/stats.js.map +1 -0
- package/dist/commands/jobs/index.d.ts +49 -0
- package/dist/commands/jobs/index.d.ts.map +1 -0
- package/dist/commands/jobs/index.js +304 -0
- package/dist/commands/jobs/index.js.map +1 -0
- package/dist/commands/jobs/interest.d.ts +65 -0
- package/dist/commands/jobs/interest.d.ts.map +1 -0
- package/dist/commands/jobs/interest.js +172 -0
- package/dist/commands/jobs/interest.js.map +1 -0
- package/dist/commands/jobs/list.d.ts +81 -0
- package/dist/commands/jobs/list.d.ts.map +1 -0
- package/dist/commands/jobs/list.js +157 -0
- package/dist/commands/jobs/list.js.map +1 -0
- package/dist/commands/jobs/search.d.ts +71 -0
- package/dist/commands/jobs/search.d.ts.map +1 -0
- package/dist/commands/jobs/search.js +163 -0
- package/dist/commands/jobs/search.js.map +1 -0
- package/dist/commands/jobs/shared.d.ts +79 -0
- package/dist/commands/jobs/shared.d.ts.map +1 -0
- package/dist/commands/jobs/shared.js +133 -0
- package/dist/commands/jobs/shared.js.map +1 -0
- package/dist/commands/jobs/show.d.ts +20 -0
- package/dist/commands/jobs/show.d.ts.map +1 -0
- package/dist/commands/jobs/show.js +135 -0
- package/dist/commands/jobs/show.js.map +1 -0
- package/dist/commands/payments/index.d.ts +34 -0
- package/dist/commands/payments/index.d.ts.map +1 -0
- package/dist/commands/payments/index.js +160 -0
- package/dist/commands/payments/index.js.map +1 -0
- package/dist/commands/payments/methods.d.ts +17 -0
- package/dist/commands/payments/methods.d.ts.map +1 -0
- package/dist/commands/payments/methods.js +79 -0
- package/dist/commands/payments/methods.js.map +1 -0
- package/dist/commands/payments/payouts.d.ts +44 -0
- package/dist/commands/payments/payouts.d.ts.map +1 -0
- package/dist/commands/payments/payouts.js +147 -0
- package/dist/commands/payments/payouts.js.map +1 -0
- package/dist/commands/payments/rate.d.ts +48 -0
- package/dist/commands/payments/rate.d.ts.map +1 -0
- package/dist/commands/payments/rate.js +229 -0
- package/dist/commands/payments/rate.js.map +1 -0
- package/dist/commands/payments/shared.d.ts +10 -0
- package/dist/commands/payments/shared.d.ts.map +1 -0
- package/dist/commands/payments/shared.js +27 -0
- package/dist/commands/payments/shared.js.map +1 -0
- package/dist/commands/profile/basic/index.d.ts +18 -0
- package/dist/commands/profile/basic/index.d.ts.map +1 -0
- package/dist/commands/profile/basic/index.js +79 -0
- package/dist/commands/profile/basic/index.js.map +1 -0
- package/dist/commands/profile/basic/photo-show.d.ts +28 -0
- package/dist/commands/profile/basic/photo-show.d.ts.map +1 -0
- package/dist/commands/profile/basic/photo-show.js +112 -0
- package/dist/commands/profile/basic/photo-show.js.map +1 -0
- package/dist/commands/profile/basic/photo-upload.d.ts +10 -0
- package/dist/commands/profile/basic/photo-upload.d.ts.map +1 -0
- package/dist/commands/profile/basic/photo-upload.js +61 -0
- package/dist/commands/profile/basic/photo-upload.js.map +1 -0
- package/dist/commands/profile/basic/set.d.ts +54 -0
- package/dist/commands/profile/basic/set.d.ts.map +1 -0
- package/dist/commands/profile/basic/set.js +174 -0
- package/dist/commands/profile/basic/set.js.map +1 -0
- package/dist/commands/profile/basic/show.d.ts +95 -0
- package/dist/commands/profile/basic/show.d.ts.map +1 -0
- package/dist/commands/profile/basic/show.js +310 -0
- package/dist/commands/profile/basic/show.js.map +1 -0
- package/dist/commands/profile/certifications/index.d.ts +31 -0
- package/dist/commands/profile/certifications/index.d.ts.map +1 -0
- package/dist/commands/profile/certifications/index.js +298 -0
- package/dist/commands/profile/certifications/index.js.map +1 -0
- package/dist/commands/profile/education/index.d.ts +28 -0
- package/dist/commands/profile/education/index.d.ts.map +1 -0
- package/dist/commands/profile/education/index.js +287 -0
- package/dist/commands/profile/education/index.js.map +1 -0
- package/dist/commands/profile/employment/index.d.ts +40 -0
- package/dist/commands/profile/employment/index.d.ts.map +1 -0
- package/dist/commands/profile/employment/index.js +364 -0
- package/dist/commands/profile/employment/index.js.map +1 -0
- package/dist/commands/profile/external/_shared.d.ts +35 -0
- package/dist/commands/profile/external/_shared.d.ts.map +1 -0
- package/dist/commands/profile/external/_shared.js +59 -0
- package/dist/commands/profile/external/_shared.js.map +1 -0
- package/dist/commands/profile/external/advanced-wizard-show.d.ts +15 -0
- package/dist/commands/profile/external/advanced-wizard-show.d.ts.map +1 -0
- package/dist/commands/profile/external/advanced-wizard-show.js +82 -0
- package/dist/commands/profile/external/advanced-wizard-show.js.map +1 -0
- package/dist/commands/profile/external/custom-requirements-set.d.ts +32 -0
- package/dist/commands/profile/external/custom-requirements-set.d.ts.map +1 -0
- package/dist/commands/profile/external/custom-requirements-set.js +116 -0
- package/dist/commands/profile/external/custom-requirements-set.js.map +1 -0
- package/dist/commands/profile/external/custom-requirements-show.d.ts +16 -0
- package/dist/commands/profile/external/custom-requirements-show.d.ts.map +1 -0
- package/dist/commands/profile/external/custom-requirements-show.js +84 -0
- package/dist/commands/profile/external/custom-requirements-show.js.map +1 -0
- package/dist/commands/profile/external/index.d.ts +20 -0
- package/dist/commands/profile/external/index.d.ts.map +1 -0
- package/dist/commands/profile/external/index.js +102 -0
- package/dist/commands/profile/external/index.js.map +1 -0
- package/dist/commands/profile/external/readiness.d.ts +15 -0
- package/dist/commands/profile/external/readiness.d.ts.map +1 -0
- package/dist/commands/profile/external/readiness.js +104 -0
- package/dist/commands/profile/external/readiness.js.map +1 -0
- package/dist/commands/profile/external/recommendations.d.ts +17 -0
- package/dist/commands/profile/external/recommendations.d.ts.map +1 -0
- package/dist/commands/profile/external/recommendations.js +97 -0
- package/dist/commands/profile/external/recommendations.js.map +1 -0
- package/dist/commands/profile/external/update.d.ts +32 -0
- package/dist/commands/profile/external/update.d.ts.map +1 -0
- package/dist/commands/profile/external/update.js +118 -0
- package/dist/commands/profile/external/update.js.map +1 -0
- package/dist/commands/profile/index.d.ts +16 -0
- package/dist/commands/profile/index.d.ts.map +1 -0
- package/dist/commands/profile/index.js +81 -0
- package/dist/commands/profile/index.js.map +1 -0
- package/dist/commands/profile/industries/index.d.ts +36 -0
- package/dist/commands/profile/industries/index.d.ts.map +1 -0
- package/dist/commands/profile/industries/index.js +230 -0
- package/dist/commands/profile/industries/index.js.map +1 -0
- package/dist/commands/profile/portfolio/add.d.ts +43 -0
- package/dist/commands/profile/portfolio/add.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/add.js +181 -0
- package/dist/commands/profile/portfolio/add.js.map +1 -0
- package/dist/commands/profile/portfolio/highlight.d.ts +11 -0
- package/dist/commands/profile/portfolio/highlight.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/highlight.js +31 -0
- package/dist/commands/profile/portfolio/highlight.js.map +1 -0
- package/dist/commands/profile/portfolio/index.d.ts +16 -0
- package/dist/commands/profile/portfolio/index.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/index.js +121 -0
- package/dist/commands/profile/portfolio/index.js.map +1 -0
- package/dist/commands/profile/portfolio/list.d.ts +83 -0
- package/dist/commands/profile/portfolio/list.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/list.js +189 -0
- package/dist/commands/profile/portfolio/list.js.map +1 -0
- package/dist/commands/profile/portfolio/remove.d.ts +9 -0
- package/dist/commands/profile/portfolio/remove.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/remove.js +24 -0
- package/dist/commands/profile/portfolio/remove.js.map +1 -0
- package/dist/commands/profile/portfolio/reorder.d.ts +17 -0
- package/dist/commands/profile/portfolio/reorder.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/reorder.js +135 -0
- package/dist/commands/profile/portfolio/reorder.js.map +1 -0
- package/dist/commands/profile/portfolio/shared.d.ts +8 -0
- package/dist/commands/profile/portfolio/shared.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/shared.js +10 -0
- package/dist/commands/profile/portfolio/shared.js.map +1 -0
- package/dist/commands/profile/portfolio/update.d.ts +18 -0
- package/dist/commands/profile/portfolio/update.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/update.js +77 -0
- package/dist/commands/profile/portfolio/update.js.map +1 -0
- package/dist/commands/profile/portfolio/upload.d.ts +8 -0
- package/dist/commands/profile/portfolio/upload.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/upload.js +131 -0
- package/dist/commands/profile/portfolio/upload.js.map +1 -0
- package/dist/commands/profile/resume/cancel-upload.d.ts +9 -0
- package/dist/commands/profile/resume/cancel-upload.d.ts.map +1 -0
- package/dist/commands/profile/resume/cancel-upload.js +30 -0
- package/dist/commands/profile/resume/cancel-upload.js.map +1 -0
- package/dist/commands/profile/resume/index.d.ts +15 -0
- package/dist/commands/profile/resume/index.d.ts.map +1 -0
- package/dist/commands/profile/resume/index.js +42 -0
- package/dist/commands/profile/resume/index.js.map +1 -0
- package/dist/commands/profile/resume/upload.d.ts +16 -0
- package/dist/commands/profile/resume/upload.d.ts.map +1 -0
- package/dist/commands/profile/resume/upload.js +65 -0
- package/dist/commands/profile/resume/upload.js.map +1 -0
- package/dist/commands/profile/reviews/_shared.d.ts +9 -0
- package/dist/commands/profile/reviews/_shared.d.ts.map +1 -0
- package/dist/commands/profile/reviews/_shared.js +15 -0
- package/dist/commands/profile/reviews/_shared.js.map +1 -0
- package/dist/commands/profile/reviews/approve-item.d.ts +30 -0
- package/dist/commands/profile/reviews/approve-item.d.ts.map +1 -0
- package/dist/commands/profile/reviews/approve-item.js +82 -0
- package/dist/commands/profile/reviews/approve-item.js.map +1 -0
- package/dist/commands/profile/reviews/approve-section.d.ts +15 -0
- package/dist/commands/profile/reviews/approve-section.d.ts.map +1 -0
- package/dist/commands/profile/reviews/approve-section.js +67 -0
- package/dist/commands/profile/reviews/approve-section.js.map +1 -0
- package/dist/commands/profile/reviews/index.d.ts +19 -0
- package/dist/commands/profile/reviews/index.d.ts.map +1 -0
- package/dist/commands/profile/reviews/index.js +71 -0
- package/dist/commands/profile/reviews/index.js.map +1 -0
- package/dist/commands/profile/reviews/list.d.ts +17 -0
- package/dist/commands/profile/reviews/list.d.ts.map +1 -0
- package/dist/commands/profile/reviews/list.js +96 -0
- package/dist/commands/profile/reviews/list.js.map +1 -0
- package/dist/commands/profile/reviews/submit-for-review.d.ts +16 -0
- package/dist/commands/profile/reviews/submit-for-review.d.ts.map +1 -0
- package/dist/commands/profile/reviews/submit-for-review.js +65 -0
- package/dist/commands/profile/reviews/submit-for-review.js.map +1 -0
- package/dist/commands/profile/shared.d.ts +46 -0
- package/dist/commands/profile/shared.d.ts.map +1 -0
- package/dist/commands/profile/shared.js +111 -0
- package/dist/commands/profile/shared.js.map +1 -0
- package/dist/commands/profile/skills/index.d.ts +29 -0
- package/dist/commands/profile/skills/index.d.ts.map +1 -0
- package/dist/commands/profile/skills/index.js +475 -0
- package/dist/commands/profile/skills/index.js.map +1 -0
- package/dist/commands/profile/visas/add.d.ts +19 -0
- package/dist/commands/profile/visas/add.d.ts.map +1 -0
- package/dist/commands/profile/visas/add.js +37 -0
- package/dist/commands/profile/visas/add.js.map +1 -0
- package/dist/commands/profile/visas/index.d.ts +13 -0
- package/dist/commands/profile/visas/index.d.ts.map +1 -0
- package/dist/commands/profile/visas/index.js +69 -0
- package/dist/commands/profile/visas/index.js.map +1 -0
- package/dist/commands/profile/visas/list.d.ts +40 -0
- package/dist/commands/profile/visas/list.d.ts.map +1 -0
- package/dist/commands/profile/visas/list.js +115 -0
- package/dist/commands/profile/visas/list.js.map +1 -0
- package/dist/commands/profile/visas/remove.d.ts +8 -0
- package/dist/commands/profile/visas/remove.d.ts.map +1 -0
- package/dist/commands/profile/visas/remove.js +23 -0
- package/dist/commands/profile/visas/remove.js.map +1 -0
- package/dist/commands/profile/visas/shared.d.ts +11 -0
- package/dist/commands/profile/visas/shared.d.ts.map +1 -0
- package/dist/commands/profile/visas/shared.js +16 -0
- package/dist/commands/profile/visas/shared.js.map +1 -0
- package/dist/commands/profile/visas/update.d.ts +13 -0
- package/dist/commands/profile/visas/update.d.ts.map +1 -0
- package/dist/commands/profile/visas/update.js +44 -0
- package/dist/commands/profile/visas/update.js.map +1 -0
- package/dist/commands/timesheet/index.d.ts +24 -0
- package/dist/commands/timesheet/index.d.ts.map +1 -0
- package/dist/commands/timesheet/index.js +98 -0
- package/dist/commands/timesheet/index.js.map +1 -0
- package/dist/commands/timesheet/list.d.ts +40 -0
- package/dist/commands/timesheet/list.d.ts.map +1 -0
- package/dist/commands/timesheet/list.js +79 -0
- package/dist/commands/timesheet/list.js.map +1 -0
- package/dist/commands/timesheet/shared.d.ts +10 -0
- package/dist/commands/timesheet/shared.d.ts.map +1 -0
- package/dist/commands/timesheet/shared.js +35 -0
- package/dist/commands/timesheet/shared.js.map +1 -0
- package/dist/commands/timesheet/show.d.ts +19 -0
- package/dist/commands/timesheet/show.d.ts.map +1 -0
- package/dist/commands/timesheet/show.js +109 -0
- package/dist/commands/timesheet/show.js.map +1 -0
- package/dist/commands/timesheet/submit.d.ts +50 -0
- package/dist/commands/timesheet/submit.d.ts.map +1 -0
- package/dist/commands/timesheet/submit.js +151 -0
- package/dist/commands/timesheet/submit.js.map +1 -0
- package/dist/crash-handlers.d.ts +67 -0
- package/dist/crash-handlers.d.ts.map +1 -0
- package/dist/crash-handlers.js +78 -0
- package/dist/crash-handlers.js.map +1 -0
- package/dist/errors.d.ts +45 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +57 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config-context.d.ts +41 -0
- package/dist/lib/config-context.d.ts.map +1 -0
- package/dist/lib/config-context.js +74 -0
- package/dist/lib/config-context.js.map +1 -0
- package/dist/lib/dry-run.d.ts +70 -0
- package/dist/lib/dry-run.d.ts.map +1 -0
- package/dist/lib/dry-run.js +114 -0
- package/dist/lib/dry-run.js.map +1 -0
- package/dist/lib/empty-state-cta.d.ts +63 -0
- package/dist/lib/empty-state-cta.d.ts.map +1 -0
- package/dist/lib/empty-state-cta.js +88 -0
- package/dist/lib/empty-state-cta.js.map +1 -0
- package/dist/lib/envelopes.d.ts +540 -0
- package/dist/lib/envelopes.d.ts.map +1 -0
- package/dist/lib/envelopes.js +598 -0
- package/dist/lib/envelopes.js.map +1 -0
- package/dist/lib/error-routing.d.ts +49 -0
- package/dist/lib/error-routing.d.ts.map +1 -0
- package/dist/lib/error-routing.js +72 -0
- package/dist/lib/error-routing.js.map +1 -0
- package/dist/lib/format-helpers.d.ts +65 -0
- package/dist/lib/format-helpers.d.ts.map +1 -0
- package/dist/lib/format-helpers.js +79 -0
- package/dist/lib/format-helpers.js.map +1 -0
- package/dist/lib/format-overrides.d.ts +81 -0
- package/dist/lib/format-overrides.d.ts.map +1 -0
- package/dist/lib/format-overrides.js +55 -0
- package/dist/lib/format-overrides.js.map +1 -0
- package/dist/lib/freetext.d.ts +83 -0
- package/dist/lib/freetext.d.ts.map +1 -0
- package/dist/lib/freetext.js +182 -0
- package/dist/lib/freetext.js.map +1 -0
- package/dist/lib/kill-switch-hook.d.ts +49 -0
- package/dist/lib/kill-switch-hook.d.ts.map +1 -0
- package/dist/lib/kill-switch-hook.js +34 -0
- package/dist/lib/kill-switch-hook.js.map +1 -0
- package/dist/lib/output.d.ts +173 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +177 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/pagination.d.ts +49 -0
- package/dist/lib/pagination.d.ts.map +1 -0
- package/dist/lib/pagination.js +36 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/program.d.ts +80 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +273 -0
- package/dist/program.js.map +1 -0
- package/package.json +35 -13
- package/index.js +0 -7
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import Table from "cli-table3";
|
|
4
|
+
import { Command, Option } from "commander";
|
|
5
|
+
import { contracts } from "@ttctl/core";
|
|
6
|
+
import { wrapListEnvelope } from "../../lib/envelopes.js";
|
|
7
|
+
import { handleDomainError } from "../../lib/error-routing.js";
|
|
8
|
+
import { emitResult } from "../../lib/output.js";
|
|
9
|
+
import { OUTPUT_FORMATS } from "../../lib/output.js";
|
|
10
|
+
import { loadAuthTokenOrExit } from "../profile/shared.js";
|
|
11
|
+
/**
|
|
12
|
+
* Build the `ttctl contracts` command tree (#195). Two read-only leaves:
|
|
13
|
+
*
|
|
14
|
+
* | Leaf | Description |
|
|
15
|
+
* |-------------------------------|--------------------------------------------|
|
|
16
|
+
* | `list` | List talent-level contracts |
|
|
17
|
+
* | `show <id>` | Show one contract by id |
|
|
18
|
+
*
|
|
19
|
+
* `<id>` is the `Contract.id` from the `list` output.
|
|
20
|
+
*
|
|
21
|
+
* **Domain distinction**: this group surfaces *talent-level legal
|
|
22
|
+
* documents* (Toptal Direct, Master Service Agreement) reachable via
|
|
23
|
+
* `viewer.contracts` on the portal surface. Engagement-attached
|
|
24
|
+
* commercial agreements (rates, hours, period for one project) live on
|
|
25
|
+
* a different surface — use `ttctl engagements show <engagement-id>`.
|
|
26
|
+
*
|
|
27
|
+
* **Out of scope for v1** (per issue #195):
|
|
28
|
+
*
|
|
29
|
+
* - Contract negotiation / mutation (read-only group).
|
|
30
|
+
* - Document download (no API surface exposes a PDF URL today).
|
|
31
|
+
*/
|
|
32
|
+
export function buildContractsCommand() {
|
|
33
|
+
const cmd = new Command("contracts").description("Manage talent-level contracts (Toptal Direct, MSA, etc.).\n\n" +
|
|
34
|
+
"For engagement-attached agreements (rates, hours, period for a specific project), see: `ttctl engagements show <id>`");
|
|
35
|
+
cmd
|
|
36
|
+
.command("list")
|
|
37
|
+
.description("List talent-level contracts (Toptal Direct, MSA, etc.)")
|
|
38
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
39
|
+
.choices(OUTPUT_FORMATS)
|
|
40
|
+
.default("pretty"))
|
|
41
|
+
.action(async (options) => {
|
|
42
|
+
await runContractsList(options.output);
|
|
43
|
+
});
|
|
44
|
+
cmd
|
|
45
|
+
.command("show")
|
|
46
|
+
.description("Show one contract by id.\n\n" +
|
|
47
|
+
"Printed fields: id, kind, provider, status, billingType, signedAt, sentAt, isActive, verificationDeadline, title.")
|
|
48
|
+
.argument("<id>", "contract id (the row id from `contracts list`)")
|
|
49
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
50
|
+
.choices(OUTPUT_FORMATS)
|
|
51
|
+
.default("pretty"))
|
|
52
|
+
.action(async (id, options) => {
|
|
53
|
+
await runContractsShow(id, options.output);
|
|
54
|
+
});
|
|
55
|
+
return cmd;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Action handler for `ttctl contracts list`. Returns the contracts in
|
|
59
|
+
* the v1.0 list envelope on `--json` / `--yaml`; renders a
|
|
60
|
+
* `cli-table3` table on `--output=pretty`. An empty list is a
|
|
61
|
+
* legitimate return value.
|
|
62
|
+
*/
|
|
63
|
+
export async function runContractsList(output) {
|
|
64
|
+
const token = await loadAuthTokenOrExit("contracts list", output);
|
|
65
|
+
let items;
|
|
66
|
+
try {
|
|
67
|
+
items = await contracts.list(token);
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
handleContractsError("contracts list", err, output);
|
|
71
|
+
}
|
|
72
|
+
emitResult(wrapListEnvelope(items), output, {
|
|
73
|
+
pretty: (data) => formatContractsTable(data.items),
|
|
74
|
+
table: (data) => formatContractsTable(data.items),
|
|
75
|
+
empty: { command: "contracts.list" },
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Action handler for `ttctl contracts show <id>`. Returns the bare
|
|
80
|
+
* `Contract` detail shape on `--json` / `--yaml`; renders a
|
|
81
|
+
* multi-line key:value layout on `--output=pretty`.
|
|
82
|
+
*/
|
|
83
|
+
export async function runContractsShow(id, output) {
|
|
84
|
+
const token = await loadAuthTokenOrExit("contracts show", output);
|
|
85
|
+
let item;
|
|
86
|
+
try {
|
|
87
|
+
item = await contracts.show(token, id);
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
handleContractsError("contracts show", err, output);
|
|
91
|
+
}
|
|
92
|
+
emitResult(item, output, {
|
|
93
|
+
pretty: (data) => formatContractDetail(data),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Render the contracts list as a `cli-table3` table. Columns: id,
|
|
98
|
+
* kind, provider, status, signedAt, active. `title` is intentionally
|
|
99
|
+
* NOT a column (often long and redundant with kind/provider) — it
|
|
100
|
+
* surfaces in `show <id>` and in `--json`/`--yaml`.
|
|
101
|
+
*/
|
|
102
|
+
export function formatContractsTable(items, terminalWidth = process.stdout.columns || 100) {
|
|
103
|
+
if (items.length === 0) {
|
|
104
|
+
const empty = new Table({ head: ["id", "kind", "provider", "status", "signed", "active"] });
|
|
105
|
+
return empty.toString();
|
|
106
|
+
}
|
|
107
|
+
const idWidth = 22;
|
|
108
|
+
const kindWidth = 22;
|
|
109
|
+
const statusWidth = 12;
|
|
110
|
+
const signedWidth = 12;
|
|
111
|
+
const activeWidth = 8;
|
|
112
|
+
// 6 columns × 2 padding + 7 borders ≈ 19
|
|
113
|
+
const remaining = Math.max(15, terminalWidth - idWidth - kindWidth - statusWidth - signedWidth - activeWidth - 19);
|
|
114
|
+
const providerWidth = Math.max(12, remaining);
|
|
115
|
+
const table = new Table({
|
|
116
|
+
head: ["id", "kind", "provider", "status", "signed", "active"],
|
|
117
|
+
colWidths: [idWidth, kindWidth, providerWidth, statusWidth, signedWidth, activeWidth],
|
|
118
|
+
colAligns: ["left", "left", "left", "left", "left", "center"],
|
|
119
|
+
wordWrap: true,
|
|
120
|
+
});
|
|
121
|
+
for (const c of items) {
|
|
122
|
+
table.push([
|
|
123
|
+
c.id,
|
|
124
|
+
c.kind ?? "—",
|
|
125
|
+
c.provider ?? "—",
|
|
126
|
+
c.status ?? "—",
|
|
127
|
+
formatDate(c.signedAt),
|
|
128
|
+
activeMarker(c.isActive),
|
|
129
|
+
]);
|
|
130
|
+
}
|
|
131
|
+
return table.toString();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Render a single contract as a sectioned multi-line block. Pure
|
|
135
|
+
* — directly unit-testable.
|
|
136
|
+
*/
|
|
137
|
+
export function formatContractDetail(c) {
|
|
138
|
+
const lines = [];
|
|
139
|
+
lines.push(`Contract ${c.id}`);
|
|
140
|
+
if (c.title !== null)
|
|
141
|
+
lines.push(` Title: ${c.title}`);
|
|
142
|
+
if (c.kind !== null)
|
|
143
|
+
lines.push(` Kind: ${c.kind}`);
|
|
144
|
+
if (c.provider !== null)
|
|
145
|
+
lines.push(` Provider: ${c.provider}`);
|
|
146
|
+
if (c.status !== null)
|
|
147
|
+
lines.push(` Status: ${c.status}`);
|
|
148
|
+
if (c.billingType !== null)
|
|
149
|
+
lines.push(` Billing type: ${c.billingType}`);
|
|
150
|
+
if (c.isActive !== null)
|
|
151
|
+
lines.push(` Active: ${c.isActive ? "yes" : "no"}`);
|
|
152
|
+
if (c.sentAt !== null)
|
|
153
|
+
lines.push(` Sent at: ${c.sentAt}`);
|
|
154
|
+
if (c.signedAt !== null)
|
|
155
|
+
lines.push(` Signed at: ${c.signedAt}`);
|
|
156
|
+
if (c.verificationDeadline !== null)
|
|
157
|
+
lines.push(` Verification deadline: ${c.verificationDeadline}`);
|
|
158
|
+
return lines.join("\n");
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Trim an ISO 8601 timestamp to its `YYYY-MM-DD` prefix for table
|
|
162
|
+
* rendering. Returns the input unchanged when it doesn't start with a
|
|
163
|
+
* date.
|
|
164
|
+
*/
|
|
165
|
+
export function formatDate(value) {
|
|
166
|
+
if (value === null || value === "")
|
|
167
|
+
return "—";
|
|
168
|
+
if (/^\d{4}-\d{2}-\d{2}/.test(value))
|
|
169
|
+
return value.slice(0, 10);
|
|
170
|
+
return value;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Map `isActive` to a compact table-cell marker: `★` for active,
|
|
174
|
+
* empty for inactive, `?` for null (forward-compat).
|
|
175
|
+
*/
|
|
176
|
+
export function activeMarker(isActive) {
|
|
177
|
+
if (isActive === null)
|
|
178
|
+
return "?";
|
|
179
|
+
return isActive ? "★" : "";
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Thin wrapper around the shared CLI error router (#330) closed over
|
|
183
|
+
* `contracts.ContractsError` and {@link hintForContractsCode}. The
|
|
184
|
+
* router applies the envelope ABI (#128) branching uniformly across
|
|
185
|
+
* sub-domains.
|
|
186
|
+
*/
|
|
187
|
+
export function handleContractsError(commandLabel, err, format = "pretty") {
|
|
188
|
+
handleDomainError(commandLabel, err, contracts.ContractsError, format, hintForContractsCode);
|
|
189
|
+
}
|
|
190
|
+
function hintForContractsCode(code) {
|
|
191
|
+
switch (code) {
|
|
192
|
+
case "NOT_FOUND":
|
|
193
|
+
return "Verify the contract id (use `ttctl contracts list` to discover ids).";
|
|
194
|
+
default:
|
|
195
|
+
return undefined;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/contracts/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE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{ OutputFormat } from "../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl engagements breaks list <id>`. Lists
|
|
5
|
+
* scheduled breaks on a single engagement (by `jobActivityItem.id` —
|
|
6
|
+
* matches the row id from `engagements list`).
|
|
7
|
+
*
|
|
8
|
+
* Reuses the captured `EngagementBreaks` operation. Returns the
|
|
9
|
+
* breaks array wrapped in the v0.4 list envelope.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runEngagementsBreaksList(id: string, output: OutputFormat): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Action handler for `ttctl engagements breaks add <id> --from <date>
|
|
14
|
+
* --to <date> [--reason-id <id>] [--comment <text>]`. Schedules a new
|
|
15
|
+
* break window. Internal flow:
|
|
16
|
+
* 1. resolve `engagement.id` from `jobActivityItem.id` (one query)
|
|
17
|
+
* 2. issue `CreateEngagementBreak` mutation
|
|
18
|
+
*
|
|
19
|
+
* Returns the new break wrapped in the success-add envelope.
|
|
20
|
+
*/
|
|
21
|
+
export interface EngagementsBreaksAddOptions {
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
reasonId: string;
|
|
25
|
+
comment?: string;
|
|
26
|
+
output: OutputFormat;
|
|
27
|
+
}
|
|
28
|
+
export declare function runEngagementsBreaksAdd(id: string, opts: EngagementsBreaksAddOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Action handler for `ttctl engagements breaks remove <break-id>`.
|
|
31
|
+
* Cancels a previously-scheduled break by `engagementBreak.id` (the
|
|
32
|
+
* id returned by `breaks list`).
|
|
33
|
+
*
|
|
34
|
+
* Returns the cancelled break id wrapped in the success-remove
|
|
35
|
+
* envelope.
|
|
36
|
+
*/
|
|
37
|
+
export declare function runEngagementsBreaksRemove(breakId: string, output: OutputFormat): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Action handler for `ttctl engagements breaks reschedule <break-id>
|
|
40
|
+
* --from <date> --to <date>` (#155). Moves an existing break to a new
|
|
41
|
+
* date window. The break's `comment` and `reasonIdentifier` are
|
|
42
|
+
* preserved server-side — the wire mutation
|
|
43
|
+
* (`RescheduleEngagementBreak`) only carries `startDate` + `endDate`.
|
|
44
|
+
*
|
|
45
|
+
* Uses `emitUpdateSuccess` (envelope `updated: ...`) because the
|
|
46
|
+
* reschedule modifies an existing record; neither `created` nor
|
|
47
|
+
* `removed` would carry the right semantics.
|
|
48
|
+
*/
|
|
49
|
+
export interface EngagementsBreaksRescheduleOptions {
|
|
50
|
+
from: string;
|
|
51
|
+
to: string;
|
|
52
|
+
output: OutputFormat;
|
|
53
|
+
}
|
|
54
|
+
export declare function runEngagementsBreaksReschedule(breakId: string, opts: EngagementsBreaksRescheduleOptions): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Action handler for `ttctl engagements breaks reasons list`. Lists
|
|
57
|
+
* the server-side catalog of valid `--reason-id` values for
|
|
58
|
+
* `breaks add` (issue #156).
|
|
59
|
+
*
|
|
60
|
+
* Reads `platformConfiguration.engagementBreakReasons` via a hand-
|
|
61
|
+
* authored `PlatformConfiguration` query (NOT in `codegen.config.ts`
|
|
62
|
+
* — see core service for the trigger note). Output goes through the
|
|
63
|
+
* v0.4 list envelope on json/yaml.
|
|
64
|
+
*/
|
|
65
|
+
export declare function runEngagementsBreaksReasonsList(output: OutputFormat): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Render the breaks-reasons catalog as a `cli-table3` table. Columns:
|
|
68
|
+
* id, label. Pure — directly unit-testable.
|
|
69
|
+
*/
|
|
70
|
+
export declare function formatReasonsTable(items: engagements.EngagementBreakReason[], terminalWidth?: number): string;
|
|
71
|
+
/**
|
|
72
|
+
* Render the breaks list as a `cli-table3` table. Columns: id,
|
|
73
|
+
* starts, ends, comment.
|
|
74
|
+
*/
|
|
75
|
+
export declare function formatBreaksTable(items: engagements.EngagementBreak[], terminalWidth?: number): string;
|
|
76
|
+
/**
|
|
77
|
+
* Render a single break as a multi-line key:value entity. Used inside
|
|
78
|
+
* the success-add envelope's `prettyEntity` slot.
|
|
79
|
+
*/
|
|
80
|
+
export declare function formatBreakEntity(br: engagements.EngagementBreak): string;
|
|
81
|
+
//# sourceMappingURL=breaks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breaks.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/breaks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAW1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAqBxD;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAe9F;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC1G;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BrG;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,kCAAkC,GACvC,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED;;;;;;;;;GASG;AACH,wBAAsB,+BAA+B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAezF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,CAAC,qBAAqB,EAAE,EAC1C,aAAa,GAAE,MAAsC,GACpD,MAAM,CAmBR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,EACpC,aAAa,GAAE,MAAsC,GACpD,MAAM,CAkBR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,CASzE"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import Table from "cli-table3";
|
|
4
|
+
import { engagements } from "@ttctl/core";
|
|
5
|
+
import { getCliDryRun } from "../../lib/dry-run.js";
|
|
6
|
+
import { emitAddSuccess, emitDryRunSuccess, emitRemoveSuccess, emitUpdateSuccess, wrapListEnvelope, } from "../../lib/envelopes.js";
|
|
7
|
+
import { emitResult } from "../../lib/output.js";
|
|
8
|
+
import { formatDate } from "./list.js";
|
|
9
|
+
import { handleEngagementsError, loadAuthTokenOrExit } from "./shared.js";
|
|
10
|
+
/**
|
|
11
|
+
* Notice text emitted on the dry-run envelope for `breaks.add`. The
|
|
12
|
+
* mutation's apply path resolves the underlying `engagement.id` via a
|
|
13
|
+
* separate `EngagementBreaks` query (one extra round-trip) before
|
|
14
|
+
* issuing `CreateEngagementBreak`. The dry-run path SKIPS that
|
|
15
|
+
* prefetch entirely (per the AC's "no GraphQL request is sent"
|
|
16
|
+
* requirement), so the preview's `variables.engagementId` carries the
|
|
17
|
+
* caller-supplied `jobActivityItemId` as a placeholder — the real
|
|
18
|
+
* `engagement.id` would be resolved at apply time.
|
|
19
|
+
*
|
|
20
|
+
* Surfaced as the `notice` field on the dry-run envelope so consumers
|
|
21
|
+
* (CLI users reading `pretty` output AND machine consumers parsing
|
|
22
|
+
* `json` / `yaml`) see the caveat without ambiguity.
|
|
23
|
+
*/
|
|
24
|
+
const ADD_BREAK_DRY_RUN_NOTICE = "engagementId in the preview is a placeholder (the caller's jobActivityItem.id); the apply path resolves the real engagement.id via an EngagementBreaks query before issuing the mutation — this read is skipped on dry-run.";
|
|
25
|
+
/**
|
|
26
|
+
* Action handler for `ttctl engagements breaks list <id>`. Lists
|
|
27
|
+
* scheduled breaks on a single engagement (by `jobActivityItem.id` —
|
|
28
|
+
* matches the row id from `engagements list`).
|
|
29
|
+
*
|
|
30
|
+
* Reuses the captured `EngagementBreaks` operation. Returns the
|
|
31
|
+
* breaks array wrapped in the v0.4 list envelope.
|
|
32
|
+
*/
|
|
33
|
+
export async function runEngagementsBreaksList(id, output) {
|
|
34
|
+
const token = await loadAuthTokenOrExit("engagements breaks list", output);
|
|
35
|
+
let items;
|
|
36
|
+
try {
|
|
37
|
+
items = await engagements.breaks.list(token, id);
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
handleEngagementsError("engagements breaks list", err, output);
|
|
41
|
+
}
|
|
42
|
+
emitResult(wrapListEnvelope(items), output, {
|
|
43
|
+
pretty: (data) => formatBreaksTable(data.items),
|
|
44
|
+
table: (data) => formatBreaksTable(data.items),
|
|
45
|
+
empty: { command: "engagements.breaks.list" },
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export async function runEngagementsBreaksAdd(id, opts) {
|
|
49
|
+
const token = await loadAuthTokenOrExit("engagements breaks add", opts.output);
|
|
50
|
+
const dryRun = getCliDryRun();
|
|
51
|
+
const addOpts = {
|
|
52
|
+
startDate: opts.from,
|
|
53
|
+
endDate: opts.to,
|
|
54
|
+
reasonIdentifier: opts.reasonId,
|
|
55
|
+
};
|
|
56
|
+
if (opts.comment !== undefined)
|
|
57
|
+
addOpts.comment = opts.comment;
|
|
58
|
+
let outcome;
|
|
59
|
+
try {
|
|
60
|
+
outcome = await engagements.breaks.add(token, id, addOpts, { dryRun });
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
handleEngagementsError("engagements breaks add", err, opts.output);
|
|
64
|
+
}
|
|
65
|
+
if (outcome.kind === "preview") {
|
|
66
|
+
emitDryRunSuccess({
|
|
67
|
+
operation: "engagements.breaks.add",
|
|
68
|
+
format: opts.output,
|
|
69
|
+
preview: outcome.preview,
|
|
70
|
+
notice: ADD_BREAK_DRY_RUN_NOTICE,
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const { result: created } = outcome;
|
|
75
|
+
emitAddSuccess({
|
|
76
|
+
operation: "engagements.breaks.add",
|
|
77
|
+
format: opts.output,
|
|
78
|
+
created,
|
|
79
|
+
prettySummary: `engagement break ${created.id} (${formatDate(created.startDate)} → ${formatDate(created.endDate)})`,
|
|
80
|
+
prettyEntity: (br) => formatBreakEntity(br),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Action handler for `ttctl engagements breaks remove <break-id>`.
|
|
85
|
+
* Cancels a previously-scheduled break by `engagementBreak.id` (the
|
|
86
|
+
* id returned by `breaks list`).
|
|
87
|
+
*
|
|
88
|
+
* Returns the cancelled break id wrapped in the success-remove
|
|
89
|
+
* envelope.
|
|
90
|
+
*/
|
|
91
|
+
export async function runEngagementsBreaksRemove(breakId, output) {
|
|
92
|
+
const token = await loadAuthTokenOrExit("engagements breaks remove", output);
|
|
93
|
+
const dryRun = getCliDryRun();
|
|
94
|
+
let outcome;
|
|
95
|
+
try {
|
|
96
|
+
outcome = await engagements.breaks.remove(token, breakId, { dryRun });
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
handleEngagementsError("engagements breaks remove", err, output);
|
|
100
|
+
}
|
|
101
|
+
if (outcome.kind === "preview") {
|
|
102
|
+
emitDryRunSuccess({
|
|
103
|
+
operation: "engagements.breaks.remove",
|
|
104
|
+
format: output,
|
|
105
|
+
preview: outcome.preview,
|
|
106
|
+
});
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
emitRemoveSuccess({
|
|
110
|
+
operation: "engagements.breaks.remove",
|
|
111
|
+
format: output,
|
|
112
|
+
id: breakId,
|
|
113
|
+
prettySummary: `engagement break ${breakId}`,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export async function runEngagementsBreaksReschedule(breakId, opts) {
|
|
117
|
+
const token = await loadAuthTokenOrExit("engagements breaks reschedule", opts.output);
|
|
118
|
+
const dryRun = getCliDryRun();
|
|
119
|
+
let outcome;
|
|
120
|
+
try {
|
|
121
|
+
outcome = await engagements.breaks.reschedule(token, breakId, { startDate: opts.from, endDate: opts.to }, { dryRun });
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
handleEngagementsError("engagements breaks reschedule", err, opts.output);
|
|
125
|
+
}
|
|
126
|
+
if (outcome.kind === "preview") {
|
|
127
|
+
emitDryRunSuccess({
|
|
128
|
+
operation: "engagements.breaks.reschedule",
|
|
129
|
+
format: opts.output,
|
|
130
|
+
preview: outcome.preview,
|
|
131
|
+
});
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const { result: updated } = outcome;
|
|
135
|
+
emitUpdateSuccess({
|
|
136
|
+
operation: "engagements.breaks.reschedule",
|
|
137
|
+
format: opts.output,
|
|
138
|
+
updated,
|
|
139
|
+
prettySummary: `engagement break ${updated.id} (${formatDate(updated.startDate)} → ${formatDate(updated.endDate)})`,
|
|
140
|
+
prettyEntity: (br) => formatBreakEntity(br),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Action handler for `ttctl engagements breaks reasons list`. Lists
|
|
145
|
+
* the server-side catalog of valid `--reason-id` values for
|
|
146
|
+
* `breaks add` (issue #156).
|
|
147
|
+
*
|
|
148
|
+
* Reads `platformConfiguration.engagementBreakReasons` via a hand-
|
|
149
|
+
* authored `PlatformConfiguration` query (NOT in `codegen.config.ts`
|
|
150
|
+
* — see core service for the trigger note). Output goes through the
|
|
151
|
+
* v0.4 list envelope on json/yaml.
|
|
152
|
+
*/
|
|
153
|
+
export async function runEngagementsBreaksReasonsList(output) {
|
|
154
|
+
const token = await loadAuthTokenOrExit("engagements breaks reasons list", output);
|
|
155
|
+
let items;
|
|
156
|
+
try {
|
|
157
|
+
items = await engagements.breaks.reasonsList(token);
|
|
158
|
+
}
|
|
159
|
+
catch (err) {
|
|
160
|
+
handleEngagementsError("engagements breaks reasons list", err, output);
|
|
161
|
+
}
|
|
162
|
+
emitResult(wrapListEnvelope(items), output, {
|
|
163
|
+
pretty: (data) => formatReasonsTable(data.items),
|
|
164
|
+
table: (data) => formatReasonsTable(data.items),
|
|
165
|
+
empty: { command: "engagements.breaks.reasons.list" },
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Render the breaks-reasons catalog as a `cli-table3` table. Columns:
|
|
170
|
+
* id, label. Pure — directly unit-testable.
|
|
171
|
+
*/
|
|
172
|
+
export function formatReasonsTable(items, terminalWidth = process.stdout.columns || 100) {
|
|
173
|
+
if (items.length === 0) {
|
|
174
|
+
const empty = new Table({ head: ["id", "label"] });
|
|
175
|
+
return empty.toString();
|
|
176
|
+
}
|
|
177
|
+
// Find longest identifier to size the id column; cap so the label
|
|
178
|
+
// column always has at least 20 visible columns to render.
|
|
179
|
+
const widestId = items.reduce((max, r) => Math.max(max, r.identifier.length), "id".length);
|
|
180
|
+
const idWidth = Math.min(Math.max(widestId + 2, 12), 40);
|
|
181
|
+
const labelWidth = Math.max(20, terminalWidth - idWidth - 8);
|
|
182
|
+
const table = new Table({
|
|
183
|
+
head: ["id", "label"],
|
|
184
|
+
colWidths: [idWidth, labelWidth],
|
|
185
|
+
wordWrap: true,
|
|
186
|
+
});
|
|
187
|
+
for (const r of items) {
|
|
188
|
+
table.push([r.identifier, r.nameForRole]);
|
|
189
|
+
}
|
|
190
|
+
return table.toString();
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Render the breaks list as a `cli-table3` table. Columns: id,
|
|
194
|
+
* starts, ends, comment.
|
|
195
|
+
*/
|
|
196
|
+
export function formatBreaksTable(items, terminalWidth = process.stdout.columns || 100) {
|
|
197
|
+
if (items.length === 0) {
|
|
198
|
+
const empty = new Table({ head: ["id", "starts", "ends", "comment"] });
|
|
199
|
+
return empty.toString();
|
|
200
|
+
}
|
|
201
|
+
const idWidth = 22;
|
|
202
|
+
const dateWidth = 12;
|
|
203
|
+
const remaining = Math.max(20, terminalWidth - idWidth - dateWidth - dateWidth - 12);
|
|
204
|
+
const commentWidth = Math.max(20, remaining);
|
|
205
|
+
const table = new Table({
|
|
206
|
+
head: ["id", "starts", "ends", "comment"],
|
|
207
|
+
colWidths: [idWidth, dateWidth, dateWidth, commentWidth],
|
|
208
|
+
wordWrap: true,
|
|
209
|
+
});
|
|
210
|
+
for (const br of items) {
|
|
211
|
+
table.push([br.id, formatDate(br.startDate), formatDate(br.endDate), br.comment ?? ""]);
|
|
212
|
+
}
|
|
213
|
+
return table.toString();
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Render a single break as a multi-line key:value entity. Used inside
|
|
217
|
+
* the success-add envelope's `prettyEntity` slot.
|
|
218
|
+
*/
|
|
219
|
+
export function formatBreakEntity(br) {
|
|
220
|
+
const lines = [];
|
|
221
|
+
lines.push(`Id: ${br.id}`);
|
|
222
|
+
lines.push(`Starts: ${formatDate(br.startDate)}`);
|
|
223
|
+
lines.push(`Ends: ${formatDate(br.endDate)}`);
|
|
224
|
+
if (br.comment != null && br.comment !== "") {
|
|
225
|
+
lines.push(`Comment: ${br.comment}`);
|
|
226
|
+
}
|
|
227
|
+
return lines.join("\n");
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=breaks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breaks.js","sourceRoot":"","sources":["../../../src/commands/engagements/breaks.ts"],"names":[],"m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M,EAAE,IAAI,KAAK,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAA+B;IAC/D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,WAAW,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClD,KAAK,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC9C,IAAI,EAAE,CAAC,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC,OAAO,KAAK,EAAE,EAAE,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Build the `ttctl engagements` command tree (#147, extended by #155).
|
|
4
|
+
* Seven leaves across the top-level group and one nested sub-group
|
|
5
|
+
* (`breaks`):
|
|
6
|
+
*
|
|
7
|
+
* | Leaf | Description |
|
|
8
|
+
* |---------------------------------------------------|------------------------------------------|
|
|
9
|
+
* | `list [--status active|past|all]` | List engagements (active by default) |
|
|
10
|
+
* | `show <id>` | Engagement detail |
|
|
11
|
+
* | `stats` | Per-engagement-status counts |
|
|
12
|
+
* | `breaks list <id>` | List breaks on an engagement |
|
|
13
|
+
* | `breaks add <id> --from <date> --to <date>` | Schedule a break |
|
|
14
|
+
* | `breaks remove <break-id>` | Cancel a break |
|
|
15
|
+
* | `breaks reschedule <break-id> --from <date> --to <date>` | Move an existing break to a new window |
|
|
16
|
+
*
|
|
17
|
+
* `<id>` is always the `jobActivityItem.id` (the row id from
|
|
18
|
+
* `engagements list`); `<break-id>` is the `engagementBreak.id` (from
|
|
19
|
+
* `breaks list`).
|
|
20
|
+
*
|
|
21
|
+
* **Out of scope for v1** (per #147 spec):
|
|
22
|
+
* - Engagement creation / acceptance / rejection (lives in
|
|
23
|
+
* `applications` group).
|
|
24
|
+
* - Allocated-hours management — moved to `availability` (#146)
|
|
25
|
+
* after the #147 scope amendment (2026-05-10), since the wire
|
|
26
|
+
* mutation operates on `viewerRole`, not per-engagement.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildEngagementsCommand(): Command;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAgC,MAAM,WAAW,CAAC;AAkBlE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CA4KjD"}
|