@ttctl/cli 0.0.0 → 0.1.0-rc.2
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 +40 -0
- package/dist/commands/profile/certifications/index.d.ts.map +1 -0
- package/dist/commands/profile/certifications/index.js +350 -0
- package/dist/commands/profile/certifications/index.js.map +1 -0
- package/dist/commands/profile/education/index.d.ts +37 -0
- package/dist/commands/profile/education/index.d.ts.map +1 -0
- package/dist/commands/profile/education/index.js +331 -0
- package/dist/commands/profile/education/index.js.map +1 -0
- package/dist/commands/profile/employment/index.d.ts +49 -0
- package/dist/commands/profile/employment/index.d.ts.map +1 -0
- package/dist/commands/profile/employment/index.js +425 -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 +21 -0
- package/dist/commands/profile/external/index.d.ts.map +1 -0
- package/dist/commands/profile/external/index.js +113 -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/show.d.ts +22 -0
- package/dist/commands/profile/external/show.d.ts.map +1 -0
- package/dist/commands/profile/external/show.js +83 -0
- package/dist/commands/profile/external/show.js.map +1 -0
- package/dist/commands/profile/external/update.d.ts +37 -0
- package/dist/commands/profile/external/update.d.ts.map +1 -0
- package/dist/commands/profile/external/update.js +125 -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 +43 -0
- package/dist/commands/profile/industries/index.d.ts.map +1 -0
- package/dist/commands/profile/industries/index.js +258 -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,425 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { DateInputError, parseDateInput, profile, splitParagraphs } from "@ttctl/core";
|
|
4
|
+
import { Command, Option } from "commander";
|
|
5
|
+
import Table from "cli-table3";
|
|
6
|
+
import { emitAddSuccess, emitErrorAndExit, emitRemoveSuccess, emitUpdateSuccess, wrapListEnvelope, } from "../../../lib/envelopes.js";
|
|
7
|
+
import { FreeTextError, resolveFreeText } from "../../../lib/freetext.js";
|
|
8
|
+
import { OUTPUT_FORMATS, emitResult } from "../../../lib/output.js";
|
|
9
|
+
import { loadAuthTokenOrExit, parseLimitOrExit, presentSubDomainError } from "../shared.js";
|
|
10
|
+
/**
|
|
11
|
+
* Build the `ttctl profile employment` command tree.
|
|
12
|
+
*
|
|
13
|
+
* The canonical sub-domain name is `employment`; the CLI registers
|
|
14
|
+
* `experience` as a Commander.js alias so users can type either form. Per
|
|
15
|
+
* project policy (see issue #72), aliases are CLI-only — MCP tool names
|
|
16
|
+
* use ONLY the canonical name.
|
|
17
|
+
*
|
|
18
|
+
* Six leaves:
|
|
19
|
+
* - `add --company --role [--from --to --current]`
|
|
20
|
+
* - `update <id> [field-flags] [--description --edit]`
|
|
21
|
+
* - `remove <id>`
|
|
22
|
+
* - `show <id> [-o text|json|table]`
|
|
23
|
+
* - `highlight <id>`
|
|
24
|
+
* - `employer-autocomplete <query>` — looks up known employer names
|
|
25
|
+
*
|
|
26
|
+
* Date input flags accept ISO-8601 (`2023-01-15`) or year-only (`2023`).
|
|
27
|
+
* Employment stores year only (Int field), so the helper drops month/day.
|
|
28
|
+
*
|
|
29
|
+
* `update --description` is multi-paragraph free-text via the four-mode
|
|
30
|
+
* helper from `lib/freetext.ts` (#70): inline, stdin (`-`), file (`@path`),
|
|
31
|
+
* editor (`--edit`).
|
|
32
|
+
*/
|
|
33
|
+
export function buildProfileEmploymentCommand() {
|
|
34
|
+
const employment = new Command("employment")
|
|
35
|
+
.alias("experience")
|
|
36
|
+
.description("View and update the employment history section of your profile");
|
|
37
|
+
employment
|
|
38
|
+
.command("add")
|
|
39
|
+
.description("Add a new employment entry to your profile")
|
|
40
|
+
.requiredOption("--company <name>", "company / employer name")
|
|
41
|
+
.requiredOption("--role <title>", "job title (mapped to position)")
|
|
42
|
+
.option("--from <date>", "start date — ISO-8601 (YYYY-MM-DD) or year (YYYY)")
|
|
43
|
+
.option("--to <date>", "end date — ISO-8601 or year")
|
|
44
|
+
.option("--current", "current position (no end date)", false)
|
|
45
|
+
.option("--website <url>", "company website (optional)")
|
|
46
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
47
|
+
.choices(OUTPUT_FORMATS)
|
|
48
|
+
.default("pretty"))
|
|
49
|
+
.action(async (options) => {
|
|
50
|
+
await runAdd(options);
|
|
51
|
+
});
|
|
52
|
+
employment
|
|
53
|
+
.command("update")
|
|
54
|
+
.description("Update an existing employment entry by id")
|
|
55
|
+
.argument("<id>", "employment id (V1-Employment-NNN)")
|
|
56
|
+
.option("--company <name>", "company name")
|
|
57
|
+
.option("--role <title>", "job title")
|
|
58
|
+
.option("--from <date>", "start date — ISO-8601 or year")
|
|
59
|
+
.option("--to <date>", "end date — ISO-8601 or year")
|
|
60
|
+
.option("--current", "mark as current position (clears end date)", false)
|
|
61
|
+
.option("--website <url>", "company website")
|
|
62
|
+
.option("--description <text>", 'multi-paragraph description (inline text, "-" for stdin, or "@path" to read from file)')
|
|
63
|
+
.option("--edit", "open $EDITOR to compose the description (cannot be combined with --description)", false)
|
|
64
|
+
.option("--highlight <bool>", "set highlight flag (true|false)")
|
|
65
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
66
|
+
.choices(OUTPUT_FORMATS)
|
|
67
|
+
.default("pretty"))
|
|
68
|
+
.action(async (id, options) => {
|
|
69
|
+
await runUpdate(id, options);
|
|
70
|
+
});
|
|
71
|
+
employment
|
|
72
|
+
.command("remove")
|
|
73
|
+
.description("Remove an employment entry by id")
|
|
74
|
+
.argument("<id>", "employment id")
|
|
75
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
76
|
+
.choices(OUTPUT_FORMATS)
|
|
77
|
+
.default("pretty"))
|
|
78
|
+
.action(async (id, options) => {
|
|
79
|
+
await runRemove(id, options.output);
|
|
80
|
+
});
|
|
81
|
+
employment
|
|
82
|
+
.command("show")
|
|
83
|
+
.description("Show a single employment entry by id")
|
|
84
|
+
.argument("<id>", "employment id")
|
|
85
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
86
|
+
.choices(OUTPUT_FORMATS)
|
|
87
|
+
.default("pretty"))
|
|
88
|
+
.action(async (id, options) => {
|
|
89
|
+
await runShow(id, options.output);
|
|
90
|
+
});
|
|
91
|
+
employment
|
|
92
|
+
.command("list")
|
|
93
|
+
.description("List every employment entry on your profile")
|
|
94
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
95
|
+
.choices(OUTPUT_FORMATS)
|
|
96
|
+
.default("pretty"))
|
|
97
|
+
.action(async (options) => {
|
|
98
|
+
await runList(options.output);
|
|
99
|
+
});
|
|
100
|
+
employment
|
|
101
|
+
.command("highlight")
|
|
102
|
+
.description("Toggle highlight on an employment entry")
|
|
103
|
+
.argument("<id>", "employment id")
|
|
104
|
+
.option("--off", "un-highlight (default is to highlight)", false)
|
|
105
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
106
|
+
.choices(OUTPUT_FORMATS)
|
|
107
|
+
.default("pretty"))
|
|
108
|
+
.action(async (id, options) => {
|
|
109
|
+
await runHighlight(id, !options.off, options.output);
|
|
110
|
+
});
|
|
111
|
+
employment
|
|
112
|
+
.command("employer-autocomplete")
|
|
113
|
+
.description('Search the known-employer catalog for a name (e.g. "Google")')
|
|
114
|
+
.argument("<query>", "search term")
|
|
115
|
+
.option("--limit <n>", "max results (default 10)", "10")
|
|
116
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
117
|
+
.choices(OUTPUT_FORMATS)
|
|
118
|
+
.default("pretty"))
|
|
119
|
+
.action(async (query, options) => {
|
|
120
|
+
await runEmployerAutocomplete(query, options);
|
|
121
|
+
});
|
|
122
|
+
return employment;
|
|
123
|
+
}
|
|
124
|
+
async function runAdd(options) {
|
|
125
|
+
const fields = {
|
|
126
|
+
company: options.company,
|
|
127
|
+
position: options.role,
|
|
128
|
+
};
|
|
129
|
+
if (options.website !== undefined) {
|
|
130
|
+
fields.companyWebsite = options.website;
|
|
131
|
+
fields.noWebsite = false;
|
|
132
|
+
}
|
|
133
|
+
applyDateFlags(fields, options, "profile employment add", options.output);
|
|
134
|
+
if (options.current)
|
|
135
|
+
fields.endDate = null;
|
|
136
|
+
const token = await loadAuthTokenOrExit("profile employment add", options.output);
|
|
137
|
+
let result;
|
|
138
|
+
try {
|
|
139
|
+
result = await profile.employment.add(token, fields);
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
presentSubDomainError("profile employment add", err, options.output);
|
|
143
|
+
}
|
|
144
|
+
emitAddSuccess({
|
|
145
|
+
operation: "profile.employment.add",
|
|
146
|
+
format: options.output,
|
|
147
|
+
created: result,
|
|
148
|
+
prettySummary: `${result.position} — ${result.company} (id ${result.id})`,
|
|
149
|
+
prettyEntity: formatEmploymentText,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
async function runUpdate(id, options) {
|
|
153
|
+
const fields = {};
|
|
154
|
+
if (options.company !== undefined)
|
|
155
|
+
fields.company = options.company;
|
|
156
|
+
if (options.role !== undefined)
|
|
157
|
+
fields.position = options.role;
|
|
158
|
+
if (options.website !== undefined) {
|
|
159
|
+
fields.companyWebsite = options.website;
|
|
160
|
+
fields.noWebsite = false;
|
|
161
|
+
}
|
|
162
|
+
if (options.highlight !== undefined) {
|
|
163
|
+
if (options.highlight !== "true" && options.highlight !== "false") {
|
|
164
|
+
emitErrorAndExit({
|
|
165
|
+
operation: "profile.employment.update",
|
|
166
|
+
format: options.output,
|
|
167
|
+
errors: [
|
|
168
|
+
{
|
|
169
|
+
code: "VALIDATION_ERROR",
|
|
170
|
+
field: "highlight",
|
|
171
|
+
message: '--highlight expects "true" or "false"',
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
prettySummary: 'profile employment update failed (VALIDATION_ERROR): --highlight expects "true" or "false"',
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
fields.highlight = options.highlight === "true";
|
|
178
|
+
}
|
|
179
|
+
applyDateFlags(fields, options, "profile employment update", options.output);
|
|
180
|
+
if (options.current)
|
|
181
|
+
fields.endDate = null;
|
|
182
|
+
// Resolve --description / --edit through the four-mode free-text helper
|
|
183
|
+
// (inline, stdin "-", "@path", $EDITOR). The helper rejects mode
|
|
184
|
+
// combinations (e.g. --description with --edit) before any network I/O.
|
|
185
|
+
let description;
|
|
186
|
+
try {
|
|
187
|
+
description = await resolveFreeText(options.description, {
|
|
188
|
+
flagName: "description",
|
|
189
|
+
enableEditor: options.edit,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
catch (err) {
|
|
193
|
+
if (err instanceof FreeTextError) {
|
|
194
|
+
emitErrorAndExit({
|
|
195
|
+
operation: "profile.employment.update",
|
|
196
|
+
format: options.output,
|
|
197
|
+
errors: [{ code: err.code, message: err.message }],
|
|
198
|
+
prettySummary: `profile employment update failed (${err.code}): ${err.message}`,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
throw err;
|
|
202
|
+
}
|
|
203
|
+
if (description !== undefined) {
|
|
204
|
+
// Multi-paragraph descriptions split on blank lines into experienceItems
|
|
205
|
+
// (the API stores each paragraph as a separate row, per the
|
|
206
|
+
// UpdateEmploymentInput capture's `experienceItems: 3-10 items`).
|
|
207
|
+
fields.experienceItems = splitParagraphs(description);
|
|
208
|
+
}
|
|
209
|
+
if (Object.keys(fields).length === 0) {
|
|
210
|
+
emitErrorAndExit({
|
|
211
|
+
operation: "profile.employment.update",
|
|
212
|
+
format: options.output,
|
|
213
|
+
errors: [{ code: "VALIDATION_ERROR", message: "at least one field flag is required" }],
|
|
214
|
+
prettySummary: "profile employment update failed (VALIDATION_ERROR): at least one field flag is required",
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
const token = await loadAuthTokenOrExit("profile employment update", options.output);
|
|
218
|
+
let result;
|
|
219
|
+
try {
|
|
220
|
+
result = await profile.employment.update(token, id, fields);
|
|
221
|
+
}
|
|
222
|
+
catch (err) {
|
|
223
|
+
presentSubDomainError("profile employment update", err, options.output);
|
|
224
|
+
}
|
|
225
|
+
emitUpdateSuccess({
|
|
226
|
+
operation: "profile.employment.update",
|
|
227
|
+
format: options.output,
|
|
228
|
+
updated: result,
|
|
229
|
+
prettySummary: `${result.position} — ${result.company} (id ${result.id})`,
|
|
230
|
+
prettyEntity: formatEmploymentText,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
async function runRemove(id, format) {
|
|
234
|
+
const token = await loadAuthTokenOrExit("profile employment remove", format);
|
|
235
|
+
let removedId;
|
|
236
|
+
try {
|
|
237
|
+
removedId = await profile.employment.remove(token, id);
|
|
238
|
+
}
|
|
239
|
+
catch (err) {
|
|
240
|
+
presentSubDomainError("profile employment remove", err, format);
|
|
241
|
+
}
|
|
242
|
+
emitRemoveSuccess({
|
|
243
|
+
operation: "profile.employment.remove",
|
|
244
|
+
format,
|
|
245
|
+
id: removedId,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
async function runShow(id, format) {
|
|
249
|
+
const token = await loadAuthTokenOrExit("profile employment show", format);
|
|
250
|
+
let result;
|
|
251
|
+
try {
|
|
252
|
+
result = await profile.employment.show(token, id);
|
|
253
|
+
}
|
|
254
|
+
catch (err) {
|
|
255
|
+
presentSubDomainError("profile employment show", err, format);
|
|
256
|
+
}
|
|
257
|
+
emitResult(result, format, { pretty: formatEmploymentText, table: formatEmploymentTable });
|
|
258
|
+
}
|
|
259
|
+
async function runList(format) {
|
|
260
|
+
const token = await loadAuthTokenOrExit("profile employment list", format);
|
|
261
|
+
let rows;
|
|
262
|
+
try {
|
|
263
|
+
rows = await profile.employment.list(token);
|
|
264
|
+
}
|
|
265
|
+
catch (err) {
|
|
266
|
+
presentSubDomainError("profile employment list", err, format);
|
|
267
|
+
}
|
|
268
|
+
emitResult(wrapListEnvelope(rows), format, {
|
|
269
|
+
pretty: (data) => formatEmploymentListText(data.items),
|
|
270
|
+
table: (data) => formatEmploymentListTable(data.items),
|
|
271
|
+
empty: { command: "profile.employment.list" },
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
async function runHighlight(id, value, format) {
|
|
275
|
+
const token = await loadAuthTokenOrExit("profile employment highlight", format);
|
|
276
|
+
let result;
|
|
277
|
+
try {
|
|
278
|
+
result = await profile.employment.highlight(token, id, value);
|
|
279
|
+
}
|
|
280
|
+
catch (err) {
|
|
281
|
+
presentSubDomainError("profile employment highlight", err, format);
|
|
282
|
+
}
|
|
283
|
+
emitUpdateSuccess({
|
|
284
|
+
operation: "profile.employment.highlight",
|
|
285
|
+
format,
|
|
286
|
+
updated: result,
|
|
287
|
+
prettySummary: `${result.id} highlight set to ${result.highlight.toString()}`,
|
|
288
|
+
prettyEntity: (entity) => `highlight: ${entity.highlight.toString()}`,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
async function runEmployerAutocomplete(query, options) {
|
|
292
|
+
const limit = parseLimitOrExit(options.limit, "profile employment employer-autocomplete", options.output);
|
|
293
|
+
const token = await loadAuthTokenOrExit("profile employment employer-autocomplete", options.output);
|
|
294
|
+
let suggestions;
|
|
295
|
+
try {
|
|
296
|
+
suggestions = await profile.employment.employerAutocomplete(token, query, limit);
|
|
297
|
+
}
|
|
298
|
+
catch (err) {
|
|
299
|
+
presentSubDomainError("profile employment employer-autocomplete", err, options.output);
|
|
300
|
+
}
|
|
301
|
+
emitResult(wrapListEnvelope(suggestions), options.output, {
|
|
302
|
+
pretty: (data) => formatEmployersText(data.items),
|
|
303
|
+
table: (data) => formatEmployersTable(data.items),
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function applyDateFlags(fields, options, commandLabel, format) {
|
|
307
|
+
try {
|
|
308
|
+
if (options.from !== undefined)
|
|
309
|
+
fields.startDate = parseDateInput(options.from, "from").year;
|
|
310
|
+
if (options.to !== undefined)
|
|
311
|
+
fields.endDate = parseDateInput(options.to, "to").year;
|
|
312
|
+
}
|
|
313
|
+
catch (err) {
|
|
314
|
+
if (err instanceof DateInputError) {
|
|
315
|
+
emitErrorAndExit({
|
|
316
|
+
operation: commandLabel.replace(/ /g, "."),
|
|
317
|
+
format,
|
|
318
|
+
errors: [{ code: err.code, message: err.message }],
|
|
319
|
+
prettySummary: `${commandLabel} failed (${err.code}): ${err.message}`,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
throw err;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Pretty-print an Employment row.
|
|
327
|
+
*/
|
|
328
|
+
export function formatEmploymentText(e) {
|
|
329
|
+
const lines = [`${e.position} — ${e.company}`];
|
|
330
|
+
if (e.companyWebsite && !e.noWebsite)
|
|
331
|
+
lines.push(` ${e.companyWebsite}`);
|
|
332
|
+
lines.push(` ${formatYearRange(e.startDate, e.endDate)}`);
|
|
333
|
+
if (e.experienceItems && e.experienceItems.length > 0) {
|
|
334
|
+
for (const item of e.experienceItems) {
|
|
335
|
+
lines.push(` • ${item}`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
if (e.highlight)
|
|
339
|
+
lines.push(` highlighted`);
|
|
340
|
+
if (e.reportingTo !== null && e.reportingTo !== "")
|
|
341
|
+
lines.push(` reports to: ${e.reportingTo}`);
|
|
342
|
+
if (e.industries.length > 0) {
|
|
343
|
+
lines.push(` industries: ${e.industries.map((i) => i.name).join(", ")}`);
|
|
344
|
+
}
|
|
345
|
+
if (e.primaryGeography !== null) {
|
|
346
|
+
const geo = e.primaryGeography.name ?? e.primaryGeography.code ?? e.primaryGeography.id;
|
|
347
|
+
lines.push(` geography: ${geo}`);
|
|
348
|
+
}
|
|
349
|
+
if (e.publicationPermit !== null) {
|
|
350
|
+
lines.push(` public: ${e.publicationPermit ? "yes" : "no"}`);
|
|
351
|
+
}
|
|
352
|
+
lines.push(` id: ${e.id}`);
|
|
353
|
+
return lines.join("\n");
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Pretty-print an Employment row as a key/value table.
|
|
357
|
+
*/
|
|
358
|
+
export function formatEmploymentTable(e) {
|
|
359
|
+
const geo = e.primaryGeography === null ? "" : (e.primaryGeography.name ?? e.primaryGeography.code ?? e.primaryGeography.id);
|
|
360
|
+
const rows = [
|
|
361
|
+
["id", e.id],
|
|
362
|
+
["company", e.company],
|
|
363
|
+
["position", e.position],
|
|
364
|
+
["website", e.companyWebsite ?? ""],
|
|
365
|
+
["years", formatYearRange(e.startDate, e.endDate)],
|
|
366
|
+
["highlight", e.highlight.toString()],
|
|
367
|
+
["paragraphs", (e.experienceItems?.length ?? 0).toString()],
|
|
368
|
+
["publicationPermit", e.publicationPermit === null ? "" : e.publicationPermit.toString()],
|
|
369
|
+
["reportingTo", e.reportingTo ?? ""],
|
|
370
|
+
["industries", e.industries.map((i) => i.name).join(", ")],
|
|
371
|
+
["primaryGeography", geo],
|
|
372
|
+
];
|
|
373
|
+
return rows.map(([k, v]) => `${k}\t${v}`).join("\n");
|
|
374
|
+
}
|
|
375
|
+
function formatYearRange(from, to) {
|
|
376
|
+
if (from === null && to === null)
|
|
377
|
+
return "—";
|
|
378
|
+
if (from !== null && to === null)
|
|
379
|
+
return `${from.toString()}–present`;
|
|
380
|
+
if (from === null && to !== null)
|
|
381
|
+
return `?–${to.toString()}`;
|
|
382
|
+
return `${(from ?? 0).toString()}–${(to ?? 0).toString()}`;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Pretty-print a list of Employment rows. One row per line, tab-separated:
|
|
386
|
+
* position, company, years, id. Mirrors `formatSkillsListText` shape.
|
|
387
|
+
*/
|
|
388
|
+
export function formatEmploymentListText(rows) {
|
|
389
|
+
if (rows.length === 0)
|
|
390
|
+
return "(no employment entries on profile)";
|
|
391
|
+
return rows.map((e) => `${e.position}\t${e.company}\t${formatYearRange(e.startDate, e.endDate)}\t${e.id}`).join("\n");
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Pretty-print a list of Employment rows as a cli-table3 table.
|
|
395
|
+
*/
|
|
396
|
+
export function formatEmploymentListTable(rows) {
|
|
397
|
+
const table = new Table({ head: ["Position", "Company", "Years", "Highlight", "Id"], wordWrap: true });
|
|
398
|
+
for (const e of rows) {
|
|
399
|
+
table.push([e.position, e.company, formatYearRange(e.startDate, e.endDate), e.highlight ? "yes" : "no", e.id]);
|
|
400
|
+
}
|
|
401
|
+
return table.toString();
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Pretty-print employer-autocomplete suggestions.
|
|
405
|
+
*/
|
|
406
|
+
export function formatEmployersText(suggestions) {
|
|
407
|
+
if (suggestions.length === 0)
|
|
408
|
+
return "(no matches)";
|
|
409
|
+
return suggestions
|
|
410
|
+
.map((e) => {
|
|
411
|
+
const loc = [e.city, e.country].filter((v) => v !== null && v !== "").join(", ");
|
|
412
|
+
return [`${e.name}${loc ? ` (${loc})` : ""}`, ` id: ${e.id}`, e.website ? ` ${e.website}` : null]
|
|
413
|
+
.filter((line) => line !== null)
|
|
414
|
+
.join("\n");
|
|
415
|
+
})
|
|
416
|
+
.join("\n\n");
|
|
417
|
+
}
|
|
418
|
+
export function formatEmployersTable(suggestions) {
|
|
419
|
+
if (suggestions.length === 0)
|
|
420
|
+
return "(no matches)";
|
|
421
|
+
return suggestions
|
|
422
|
+
.map((e) => `${e.id}\t${e.name}\t${e.city ?? ""}\t${e.country ?? ""}\t${e.website ?? ""}`)
|
|
423
|
+
.join("\n");
|
|
424
|
+
}
|
|
425
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/profile/employment/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,UAAU,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC;SACzC,KAAK,CAAC,YAAY,CAAC;SACnB,WAAW,CAAC,gEAAgE,CAAC,CAAC;IAEjF,UAAU;SACP,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,4CAA4C,CAAC;SACzD,cAAc,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;SAC7D,cAAc,CAAC,gBAAgB,EAAE,gCAAgC,CAAC;SAClE,MAAM,CAAC,eAAe,EAAE,mDAAmD,CAAC;SAC5E,MAAM,CAAC,aAAa,EAAE,6BAA6B,CAAC;SACpD,MAAM,CAAC,WAAW,EAAE,gCAAgC,EAAE,KAAK,CAAC;SAC5D,MAAM,CAAC,iBAAiB,EAAE,4BAA4B,CAA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C,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAChG,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC;aAC/C,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC,CAAC;SACD,IAAI,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,WAAoD;IACvF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,cAAc,CAAC;IACpD,OAAO,WAAW;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;SACzF,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { OutputFormat } from "../../../lib/output.js";
|
|
2
|
+
/**
|
|
3
|
+
* Shared helpers for `ttctl profile external` leaves.
|
|
4
|
+
*
|
|
5
|
+
* Re-exports `loadAuthTokenOrExit` from the parent `../shared.ts` so the
|
|
6
|
+
* sub-tree leaves can keep their `from "./_shared.js"` import shape
|
|
7
|
+
* unchanged across the #107 refactor. (Pre-#107 each sub-tree had its own
|
|
8
|
+
* implementation; post-#107 the auth-token logic is centralised at
|
|
9
|
+
* profile/shared.ts to consume the in-memory `config.auth.token`.)
|
|
10
|
+
*/
|
|
11
|
+
export { loadAuthTokenOrExit } from "../shared.js";
|
|
12
|
+
/**
|
|
13
|
+
* Truncate `s` to `width` characters with an ellipsis. Mirrors the helper
|
|
14
|
+
* exported by `profile/basic/show.ts`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function truncate(s: string, width: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* Parse a `commander` boolean flag value into a TypeScript `boolean`.
|
|
19
|
+
*
|
|
20
|
+
* Commander's `--flag <value>` parses as a string; we convert
|
|
21
|
+
* `"true"`/`"false"` (and a couple of common shorthand forms) to booleans
|
|
22
|
+
* and exit through the v0.4 envelope ABI on unrecognised input. The
|
|
23
|
+
* `operation` argument is the command's canonical operation slug
|
|
24
|
+
* (`profile.external.custom-requirements.set`) so envelope consumers can
|
|
25
|
+
* branch on it; `format` controls whether the failure surfaces as a
|
|
26
|
+
* pretty stderr line or as a JSON/YAML error envelope on stdout.
|
|
27
|
+
*
|
|
28
|
+
* Why explicit string parsing instead of a `--flag` / `--no-flag` boolean?
|
|
29
|
+
* The custom-requirements set has THREE booleans, and Commander's no-flag
|
|
30
|
+
* negation would force the user to remember three negative-form flag names.
|
|
31
|
+
* `--background-check true|false` reads the same regardless of the value
|
|
32
|
+
* and matches the wire-shape (which is also `Boolean!`).
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseBooleanFlag(commandLabel: string, operation: string, flagName: string, value: string, format: OutputFormat): boolean;
|
|
35
|
+
//# sourceMappingURL=_shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/external/_shared.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;;;;GAQG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,YAAY,GACnB,OAAO,CAgBT"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { emitErrorAndExit } from "../../../lib/envelopes.js";
|
|
4
|
+
/**
|
|
5
|
+
* Shared helpers for `ttctl profile external` leaves.
|
|
6
|
+
*
|
|
7
|
+
* Re-exports `loadAuthTokenOrExit` from the parent `../shared.ts` so the
|
|
8
|
+
* sub-tree leaves can keep their `from "./_shared.js"` import shape
|
|
9
|
+
* unchanged across the #107 refactor. (Pre-#107 each sub-tree had its own
|
|
10
|
+
* implementation; post-#107 the auth-token logic is centralised at
|
|
11
|
+
* profile/shared.ts to consume the in-memory `config.auth.token`.)
|
|
12
|
+
*/
|
|
13
|
+
export { loadAuthTokenOrExit } from "../shared.js";
|
|
14
|
+
/**
|
|
15
|
+
* Truncate `s` to `width` characters with an ellipsis. Mirrors the helper
|
|
16
|
+
* exported by `profile/basic/show.ts`.
|
|
17
|
+
*/
|
|
18
|
+
export function truncate(s, width) {
|
|
19
|
+
if (s.length <= width)
|
|
20
|
+
return s;
|
|
21
|
+
return `${s.slice(0, width - 1)}…`;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse a `commander` boolean flag value into a TypeScript `boolean`.
|
|
25
|
+
*
|
|
26
|
+
* Commander's `--flag <value>` parses as a string; we convert
|
|
27
|
+
* `"true"`/`"false"` (and a couple of common shorthand forms) to booleans
|
|
28
|
+
* and exit through the v0.4 envelope ABI on unrecognised input. The
|
|
29
|
+
* `operation` argument is the command's canonical operation slug
|
|
30
|
+
* (`profile.external.custom-requirements.set`) so envelope consumers can
|
|
31
|
+
* branch on it; `format` controls whether the failure surfaces as a
|
|
32
|
+
* pretty stderr line or as a JSON/YAML error envelope on stdout.
|
|
33
|
+
*
|
|
34
|
+
* Why explicit string parsing instead of a `--flag` / `--no-flag` boolean?
|
|
35
|
+
* The custom-requirements set has THREE booleans, and Commander's no-flag
|
|
36
|
+
* negation would force the user to remember three negative-form flag names.
|
|
37
|
+
* `--background-check true|false` reads the same regardless of the value
|
|
38
|
+
* and matches the wire-shape (which is also `Boolean!`).
|
|
39
|
+
*/
|
|
40
|
+
export function parseBooleanFlag(commandLabel, operation, flagName, value, format) {
|
|
41
|
+
const normalised = value.trim().toLowerCase();
|
|
42
|
+
if (normalised === "true" || normalised === "1" || normalised === "yes")
|
|
43
|
+
return true;
|
|
44
|
+
if (normalised === "false" || normalised === "0" || normalised === "no")
|
|
45
|
+
return false;
|
|
46
|
+
emitErrorAndExit({
|
|
47
|
+
operation,
|
|
48
|
+
format,
|
|
49
|
+
errors: [
|
|
50
|
+
{
|
|
51
|
+
code: "VALIDATION_ERROR",
|
|
52
|
+
field: flagName,
|
|
53
|
+
message: `--${flagName} expects true|false (got: ${value})`,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
prettySummary: `${commandLabel} failed (VALIDATION_ERROR): --${flagName} expects true|false (got: ${value})`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=_shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../../../src/commands/profile/external/_shared.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D;;;;;;;;GAQG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAS,EAAE,KAAa;IAC/C,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK;QAAE,OAAO,CAAC,CAAC;IAChC,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAAoB,EACpB,SAAiB,EACjB,QAAgB,EAChB,KAAa,EACb,MAAoB;IAEpB,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACrF,IAAI,UAAU,KAAK,OAAO,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACtF,gBAAgB,CAAC;QACf,SAAS;QACT,MAAM;QACN,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,QAAQ;gBACf,OAAO,EAAE,KAAK,QAAQ,6BAA6B,KAAK,GAAG;aAC5D;SACF;QACD,aAAa,EAAE,GAAG,YAAY,iCAAiC,QAAQ,6BAA6B,KAAK,GAAG;KAC7G,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { profile } from "@ttctl/core";
|
|
2
|
+
import type { OutputFormat } from "../../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl profile external advanced-wizard show`.
|
|
5
|
+
*
|
|
6
|
+
* Combines `getAdvancedProfileData` and the wizard-status read into one
|
|
7
|
+
* leaf — `getAdvancedProfileData` already exposes
|
|
8
|
+
* `advancedProfileWizardStatus`, so a single query suffices.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runProfileExternalAdvancedWizardShow(format: OutputFormat): Promise<void>;
|
|
11
|
+
/** Pure formatter — directly unit-testable. */
|
|
12
|
+
export declare function formatAdvancedWizardText(data: profile.external.AdvancedProfileSnapshot): string;
|
|
13
|
+
/** Pure formatter — directly unit-testable. */
|
|
14
|
+
export declare function formatAdvancedWizardTable(data: profile.external.AdvancedProfileSnapshot): string;
|
|
15
|
+
//# sourceMappingURL=advanced-wizard-show.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advanced-wizard-show.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/external/advanced-wizard-show.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAM3D;;;;;;GAMG;AACH,wBAAsB,oCAAoC,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAe9F;AA8BD,+CAA+C;AAC/C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,uBAAuB,GAAG,MAAM,CAW/F;AAED,+CAA+C;AAC/C,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,uBAAuB,GAAG,MAAM,CAOhG"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { TtctlError, profile } from "@ttctl/core";
|
|
4
|
+
import { presentTtctlError } from "../../../errors.js";
|
|
5
|
+
import { emitErrorAndExit } from "../../../lib/envelopes.js";
|
|
6
|
+
import { emitResult } from "../../../lib/output.js";
|
|
7
|
+
import { loadAuthTokenOrExit } from "./_shared.js";
|
|
8
|
+
const COMMAND_LABEL = "profile external advanced-wizard show";
|
|
9
|
+
const OPERATION = "profile.external.advanced-wizard.show";
|
|
10
|
+
/**
|
|
11
|
+
* Action handler for `ttctl profile external advanced-wizard show`.
|
|
12
|
+
*
|
|
13
|
+
* Combines `getAdvancedProfileData` and the wizard-status read into one
|
|
14
|
+
* leaf — `getAdvancedProfileData` already exposes
|
|
15
|
+
* `advancedProfileWizardStatus`, so a single query suffices.
|
|
16
|
+
*/
|
|
17
|
+
export async function runProfileExternalAdvancedWizardShow(format) {
|
|
18
|
+
const token = await loadAuthTokenOrExit(COMMAND_LABEL, format);
|
|
19
|
+
let result;
|
|
20
|
+
try {
|
|
21
|
+
result = await profile.external.advancedWizardShow(token);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
handleError(err, format);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
emitResult(result, format, {
|
|
28
|
+
pretty: formatAdvancedWizardText,
|
|
29
|
+
table: formatAdvancedWizardTable,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function handleError(err, format) {
|
|
33
|
+
if (err instanceof TtctlError) {
|
|
34
|
+
if (format === "pretty")
|
|
35
|
+
presentTtctlError(err);
|
|
36
|
+
const errors = [{ code: err.code, message: err.message, hint: err.recovery }];
|
|
37
|
+
emitErrorAndExit({
|
|
38
|
+
operation: OPERATION,
|
|
39
|
+
format,
|
|
40
|
+
errors,
|
|
41
|
+
exitCode: err.code === "CF_403_CLEARANCE" || err.code === "CF_403_PERSISTENT" ? 2 : 1,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (err instanceof profile.external.ProfileError) {
|
|
45
|
+
emitErrorAndExit({
|
|
46
|
+
operation: OPERATION,
|
|
47
|
+
format,
|
|
48
|
+
errors: [{ code: err.code, message: err.message }],
|
|
49
|
+
prettySummary: `${COMMAND_LABEL} failed (${err.code}): ${err.message}`,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
53
|
+
emitErrorAndExit({
|
|
54
|
+
operation: OPERATION,
|
|
55
|
+
format,
|
|
56
|
+
errors: [{ code: "INTERNAL_ERROR", message }],
|
|
57
|
+
prettySummary: `${COMMAND_LABEL} failed: ${message}`,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/** Pure formatter — directly unit-testable. */
|
|
61
|
+
export function formatAdvancedWizardText(data) {
|
|
62
|
+
const lines = [
|
|
63
|
+
`Advanced profile wizard status: ${data.wizardStatus ?? "(unset)"}`,
|
|
64
|
+
` travel-visa-count: ${data.travelVisaCount.toString()}`,
|
|
65
|
+
];
|
|
66
|
+
if (data.travelVisaIds.length > 0) {
|
|
67
|
+
const preview = data.travelVisaIds.slice(0, 5).join(", ");
|
|
68
|
+
const more = data.travelVisaIds.length > 5 ? ` (+${(data.travelVisaIds.length - 5).toString()} more)` : "";
|
|
69
|
+
lines.push(` travel-visa-ids: ${preview}${more}`);
|
|
70
|
+
}
|
|
71
|
+
return lines.join("\n");
|
|
72
|
+
}
|
|
73
|
+
/** Pure formatter — directly unit-testable. */
|
|
74
|
+
export function formatAdvancedWizardTable(data) {
|
|
75
|
+
const rows = [
|
|
76
|
+
["wizard-status", data.wizardStatus ?? ""],
|
|
77
|
+
["travel-visa-count", data.travelVisaCount.toString()],
|
|
78
|
+
["travel-visa-ids", data.travelVisaIds.join(",")],
|
|
79
|
+
];
|
|
80
|
+
return rows.map(([k, v]) => `${k}\t${v}`).join("\n");
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=advanced-wizard-show.js.map
|