@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,97 @@
|
|
|
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 recommendations";
|
|
9
|
+
const OPERATION = "profile.external.recommendations";
|
|
10
|
+
/**
|
|
11
|
+
* Action handler for `ttctl profile external recommendations`.
|
|
12
|
+
*
|
|
13
|
+
* Lists the per-section "do this next" recommendations the platform
|
|
14
|
+
* surfaces to nudge the talent towards a complete profile. Each
|
|
15
|
+
* recommendation is a discriminated union over multiple types (e.g.
|
|
16
|
+
* `EmploymentsCountRecommendation`, `PortfolioItemsCountRecommendation`);
|
|
17
|
+
* the CLI surfaces each as `type` + a stringified payload preview.
|
|
18
|
+
*/
|
|
19
|
+
export async function runProfileExternalRecommendations(format) {
|
|
20
|
+
const token = await loadAuthTokenOrExit(COMMAND_LABEL, format);
|
|
21
|
+
let result;
|
|
22
|
+
try {
|
|
23
|
+
result = await profile.external.recommendations(token);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
handleError(err, format);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
emitResult(result, format, {
|
|
30
|
+
pretty: formatRecommendationsText,
|
|
31
|
+
table: formatRecommendationsTable,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function handleError(err, format) {
|
|
35
|
+
if (err instanceof TtctlError) {
|
|
36
|
+
if (format === "pretty")
|
|
37
|
+
presentTtctlError(err);
|
|
38
|
+
const errors = [{ code: err.code, message: err.message, hint: err.recovery }];
|
|
39
|
+
emitErrorAndExit({
|
|
40
|
+
operation: OPERATION,
|
|
41
|
+
format,
|
|
42
|
+
errors,
|
|
43
|
+
exitCode: err.code === "CF_403_CLEARANCE" || err.code === "CF_403_PERSISTENT" ? 2 : 1,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (err instanceof profile.external.ProfileError) {
|
|
47
|
+
emitErrorAndExit({
|
|
48
|
+
operation: OPERATION,
|
|
49
|
+
format,
|
|
50
|
+
errors: [{ code: err.code, message: err.message }],
|
|
51
|
+
prettySummary: `${COMMAND_LABEL} failed (${err.code}): ${err.message}`,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
55
|
+
emitErrorAndExit({
|
|
56
|
+
operation: OPERATION,
|
|
57
|
+
format,
|
|
58
|
+
errors: [{ code: "INTERNAL_ERROR", message }],
|
|
59
|
+
prettySummary: `${COMMAND_LABEL} failed: ${message}`,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function summarizePayload(payload) {
|
|
63
|
+
const entries = Object.entries(payload).filter(([, v]) => v !== null && v !== undefined);
|
|
64
|
+
if (entries.length === 0)
|
|
65
|
+
return "";
|
|
66
|
+
return entries.map(([k, v]) => `${k}=${formatScalar(v)}`).join(", ");
|
|
67
|
+
}
|
|
68
|
+
function formatScalar(value) {
|
|
69
|
+
if (typeof value === "string")
|
|
70
|
+
return value;
|
|
71
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
72
|
+
return String(value);
|
|
73
|
+
if (value === null)
|
|
74
|
+
return "null";
|
|
75
|
+
// For nested objects/arrays we just render the JSON shorthand — the user
|
|
76
|
+
// typically uses `--output json` if they need machine-readable detail.
|
|
77
|
+
return JSON.stringify(value);
|
|
78
|
+
}
|
|
79
|
+
/** Pure formatter — directly unit-testable. */
|
|
80
|
+
export function formatRecommendationsText(data) {
|
|
81
|
+
if (data.length === 0)
|
|
82
|
+
return "No recommendations.";
|
|
83
|
+
const lines = [`Recommendations (${data.length.toString()}):`];
|
|
84
|
+
for (const rec of data) {
|
|
85
|
+
const summary = summarizePayload(rec.payload);
|
|
86
|
+
lines.push(summary ? ` - ${rec.type}: ${summary}` : ` - ${rec.type}`);
|
|
87
|
+
}
|
|
88
|
+
return lines.join("\n");
|
|
89
|
+
}
|
|
90
|
+
/** Pure formatter — directly unit-testable. */
|
|
91
|
+
export function formatRecommendationsTable(data) {
|
|
92
|
+
if (data.length === 0)
|
|
93
|
+
return "type\tpayload";
|
|
94
|
+
const rows = data.map((rec) => [rec.type, summarizePayload(rec.payload)]);
|
|
95
|
+
return [["type", "payload"], ...rows].map(([k, v]) => `${k}\t${v}`).join("\n");
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=recommendations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommendations.js","sourceRoot":"","sources":["../../../../src/commands/profile/external/recommendations.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,aAAa,GAAG,kCAAkC,CAAC;AACzD,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,MAAoB;IAC1E,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAE/D,IAAI,MAAgD,CAAC;IACrD,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,EAAE,MA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CAAC;QACvB,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC9C,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,0BAA0B,CAAC,IAA8C;IACvF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC;IAC9C,MAAM,IAAI,GAAuB,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9F,OAAO,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { profile } from "@ttctl/core";
|
|
2
|
+
import type { OutputFormat } from "../../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl profile external update`.
|
|
5
|
+
*
|
|
6
|
+
* The issue spec listed `--portfolio-url` as one of the flags; that field
|
|
7
|
+
* is not in the underlying `UpdateExternalProfilesInput` schema (the
|
|
8
|
+
* portfolio URL is a server-determined read via `getPublicProfileUrl`).
|
|
9
|
+
* The flags exposed here match the schema's settable external-profile
|
|
10
|
+
* URLs: linkedin / github / website / twitter / behance / dribbble.
|
|
11
|
+
*/
|
|
12
|
+
export declare function runProfileExternalUpdate(options: {
|
|
13
|
+
linkedin?: string;
|
|
14
|
+
github?: string;
|
|
15
|
+
website?: string;
|
|
16
|
+
twitter?: string;
|
|
17
|
+
behance?: string;
|
|
18
|
+
dribbble?: string;
|
|
19
|
+
output: OutputFormat;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Pretty entity preview for the external-update envelope. Renders the
|
|
23
|
+
* non-null URL trio (linkedin / github / website / twitter / behance /
|
|
24
|
+
* dribbble), each truncated at 80 columns. The notice (when present)
|
|
25
|
+
* flows through the envelope's `notice` field, NOT this body —
|
|
26
|
+
* `emitUpdateSuccess` appends it as a trailing indented line in pretty
|
|
27
|
+
* mode.
|
|
28
|
+
*
|
|
29
|
+
* Pure — directly unit-testable.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatUpdatePrettyEntity(result: profile.external.UpdateExternalProfilesResult): string;
|
|
32
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/external/update.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAM3D;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4ChB;AA8BD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,4BAA4B,GAAG,MAAM,CAStG"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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, emitUpdateSuccess } from "../../../lib/envelopes.js";
|
|
6
|
+
import { loadAuthTokenOrExit, truncate } from "./_shared.js";
|
|
7
|
+
const COMMAND_LABEL = "profile external update";
|
|
8
|
+
const OPERATION = "profile.external.update";
|
|
9
|
+
/**
|
|
10
|
+
* Action handler for `ttctl profile external update`.
|
|
11
|
+
*
|
|
12
|
+
* The issue spec listed `--portfolio-url` as one of the flags; that field
|
|
13
|
+
* is not in the underlying `UpdateExternalProfilesInput` schema (the
|
|
14
|
+
* portfolio URL is a server-determined read via `getPublicProfileUrl`).
|
|
15
|
+
* The flags exposed here match the schema's settable external-profile
|
|
16
|
+
* URLs: linkedin / github / website / twitter / behance / dribbble.
|
|
17
|
+
*/
|
|
18
|
+
export async function runProfileExternalUpdate(options) {
|
|
19
|
+
const changes = {};
|
|
20
|
+
if (options.linkedin !== undefined)
|
|
21
|
+
changes.linkedin = options.linkedin;
|
|
22
|
+
if (options.github !== undefined)
|
|
23
|
+
changes.github = options.github;
|
|
24
|
+
if (options.website !== undefined)
|
|
25
|
+
changes.website = options.website;
|
|
26
|
+
if (options.twitter !== undefined)
|
|
27
|
+
changes.twitter = options.twitter;
|
|
28
|
+
if (options.behance !== undefined)
|
|
29
|
+
changes.behance = options.behance;
|
|
30
|
+
if (options.dribbble !== undefined)
|
|
31
|
+
changes.dribbble = options.dribbble;
|
|
32
|
+
if (Object.keys(changes).length === 0) {
|
|
33
|
+
emitErrorAndExit({
|
|
34
|
+
operation: OPERATION,
|
|
35
|
+
format: options.output,
|
|
36
|
+
errors: [
|
|
37
|
+
{
|
|
38
|
+
code: "VALIDATION_ERROR",
|
|
39
|
+
message: `${COMMAND_LABEL} requires at least one of --linkedin, --github, --website, --twitter, --behance, --dribbble.`,
|
|
40
|
+
hint: "ttctl profile external update --linkedin https://linkedin.com/in/your-handle",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
prettySummary: `${COMMAND_LABEL} requires at least one of --linkedin, --github, --website, --twitter, --behance, --dribbble.\n` +
|
|
44
|
+
"Example: ttctl profile external update --linkedin https://linkedin.com/in/your-handle",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const token = await loadAuthTokenOrExit(COMMAND_LABEL, options.output);
|
|
48
|
+
let result;
|
|
49
|
+
try {
|
|
50
|
+
result = await profile.external.update(token, changes);
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
handleError(err, options.output);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
emitUpdateSuccess({
|
|
57
|
+
operation: OPERATION,
|
|
58
|
+
format: options.output,
|
|
59
|
+
updated: result,
|
|
60
|
+
prettySummary: "External profiles updated.",
|
|
61
|
+
prettyEntity: formatUpdatePrettyEntity,
|
|
62
|
+
notice: result.notice ?? undefined,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function handleError(err, format) {
|
|
66
|
+
if (err instanceof TtctlError) {
|
|
67
|
+
if (format === "pretty")
|
|
68
|
+
presentTtctlError(err);
|
|
69
|
+
const errors = [{ code: err.code, message: err.message, hint: err.recovery }];
|
|
70
|
+
emitErrorAndExit({
|
|
71
|
+
operation: OPERATION,
|
|
72
|
+
format,
|
|
73
|
+
errors,
|
|
74
|
+
exitCode: err.code === "CF_403_CLEARANCE" || err.code === "CF_403_PERSISTENT" ? 2 : 1,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (err instanceof profile.external.ProfileError) {
|
|
78
|
+
emitErrorAndExit({
|
|
79
|
+
operation: OPERATION,
|
|
80
|
+
format,
|
|
81
|
+
errors: [{ code: err.code, message: err.message }],
|
|
82
|
+
prettySummary: `${COMMAND_LABEL} failed (${err.code}): ${err.message}`,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
86
|
+
emitErrorAndExit({
|
|
87
|
+
operation: OPERATION,
|
|
88
|
+
format,
|
|
89
|
+
errors: [{ code: "INTERNAL_ERROR", message }],
|
|
90
|
+
prettySummary: `${COMMAND_LABEL} failed: ${message}`,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Pretty entity preview for the external-update envelope. Renders the
|
|
95
|
+
* non-null URL trio (linkedin / github / website / twitter / behance /
|
|
96
|
+
* dribbble), each truncated at 80 columns. The notice (when present)
|
|
97
|
+
* flows through the envelope's `notice` field, NOT this body —
|
|
98
|
+
* `emitUpdateSuccess` appends it as a trailing indented line in pretty
|
|
99
|
+
* mode.
|
|
100
|
+
*
|
|
101
|
+
* Pure — directly unit-testable.
|
|
102
|
+
*/
|
|
103
|
+
export function formatUpdatePrettyEntity(result) {
|
|
104
|
+
const { profile: updated } = result;
|
|
105
|
+
const lines = [];
|
|
106
|
+
if (updated.linkedin !== null)
|
|
107
|
+
lines.push(truncate(`linkedin: ${updated.linkedin}`, 80));
|
|
108
|
+
if (updated.github !== null)
|
|
109
|
+
lines.push(truncate(`github: ${updated.github}`, 80));
|
|
110
|
+
if (updated.website !== null)
|
|
111
|
+
lines.push(truncate(`website: ${updated.website}`, 80));
|
|
112
|
+
if (updated.behance !== null)
|
|
113
|
+
lines.push(truncate(`behance: ${updated.behance}`, 80));
|
|
114
|
+
if (updated.dribbble !== null)
|
|
115
|
+
lines.push(truncate(`dribbble: ${updated.dribbble}`, 80));
|
|
116
|
+
return lines.join("\n");
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/profile/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;IACnF,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACtF,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACtF,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,OAAO,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACzF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Build the `ttctl profile` command tree. Hosts the 11 profile sub-domains
|
|
4
|
+
* landing across #69 → #76. Today `basic`, `skills` (#73), `industries`,
|
|
5
|
+
* `education`, `certifications`, `employment` (#74), `portfolio`, `visas`,
|
|
6
|
+
* `resume` (#75), `external`, and `reviews` (#76) carry full operations.
|
|
7
|
+
*
|
|
8
|
+
* The tree also preserves the wave-0 short-form CLI surface: `ttctl profile
|
|
9
|
+
* show` and `ttctl profile update --bio --headline` continue to work as
|
|
10
|
+
* direct aliases for `ttctl profile basic show` and `ttctl profile basic
|
|
11
|
+
* update`. This is the AC-permitted "backwards-compatible" branch — the
|
|
12
|
+
* alternative was a hard rename to the deeper `basic` sub-tree (see
|
|
13
|
+
* CHANGELOG entry for the v0 surface refactor for the rationale).
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildProfileCommand(): Command;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAmB5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CA0D7C"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { Command, Option } from "commander";
|
|
4
|
+
import { markMutation } from "../../lib/dry-run.js";
|
|
5
|
+
import { OUTPUT_FORMATS } from "../../lib/output.js";
|
|
6
|
+
import { buildProfileBasicCommand } from "./basic/index.js";
|
|
7
|
+
import { runProfileBasicShow } from "./basic/show.js";
|
|
8
|
+
import { runProfileBasicUpdate } from "./basic/set.js";
|
|
9
|
+
import { buildProfileCertificationsCommand } from "./certifications/index.js";
|
|
10
|
+
import { buildProfileEducationCommand } from "./education/index.js";
|
|
11
|
+
import { buildProfileEmploymentCommand } from "./employment/index.js";
|
|
12
|
+
import { buildProfileExternalCommand } from "./external/index.js";
|
|
13
|
+
import { buildProfileIndustriesCommand } from "./industries/index.js";
|
|
14
|
+
import { buildProfilePortfolioCommand } from "./portfolio/index.js";
|
|
15
|
+
import { buildProfileResumeCommand } from "./resume/index.js";
|
|
16
|
+
import { buildProfileReviewsCommand } from "./reviews/index.js";
|
|
17
|
+
import { buildProfileSkillsCommand } from "./skills/index.js";
|
|
18
|
+
import { buildProfileVisasCommand } from "./visas/index.js";
|
|
19
|
+
/**
|
|
20
|
+
* Build the `ttctl profile` command tree. Hosts the 11 profile sub-domains
|
|
21
|
+
* landing across #69 → #76. Today `basic`, `skills` (#73), `industries`,
|
|
22
|
+
* `education`, `certifications`, `employment` (#74), `portfolio`, `visas`,
|
|
23
|
+
* `resume` (#75), `external`, and `reviews` (#76) carry full operations.
|
|
24
|
+
*
|
|
25
|
+
* The tree also preserves the wave-0 short-form CLI surface: `ttctl profile
|
|
26
|
+
* show` and `ttctl profile update --bio --headline` continue to work as
|
|
27
|
+
* direct aliases for `ttctl profile basic show` and `ttctl profile basic
|
|
28
|
+
* update`. This is the AC-permitted "backwards-compatible" branch — the
|
|
29
|
+
* alternative was a hard rename to the deeper `basic` sub-tree (see
|
|
30
|
+
* CHANGELOG entry for the v0 surface refactor for the rationale).
|
|
31
|
+
*/
|
|
32
|
+
export function buildProfileCommand() {
|
|
33
|
+
const profile = new Command("profile").description("View and update your Toptal Talent profile");
|
|
34
|
+
// Short-form aliases at the top level. These dispatch to the same handlers
|
|
35
|
+
// as the canonical `basic` sub-tree below — the duplication keeps the
|
|
36
|
+
// user-visible behavior of the wave-0 commands unchanged while the v0
|
|
37
|
+
// tree shape is rolled out underneath.
|
|
38
|
+
profile
|
|
39
|
+
.command("show")
|
|
40
|
+
.description("Print a summary of the signed-in user's Toptal Talent profile (alias for `profile basic show`)")
|
|
41
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
42
|
+
.choices(OUTPUT_FORMATS)
|
|
43
|
+
.default("pretty"))
|
|
44
|
+
.action(async (options) => {
|
|
45
|
+
await runProfileBasicShow(options.output);
|
|
46
|
+
});
|
|
47
|
+
// Marked as a mutation (issue #52) so the global `--dry-run` flag
|
|
48
|
+
// routes through to `profile.basic.set()`'s `dryRun` option instead
|
|
49
|
+
// of firing the read-no-op stderr note. The canonical
|
|
50
|
+
// `profile basic update` leaf is also marked below for the same
|
|
51
|
+
// reason.
|
|
52
|
+
markMutation(profile
|
|
53
|
+
.command("update")
|
|
54
|
+
.description("Update editable fields on the signed-in user's profile (alias for `profile basic update`)")
|
|
55
|
+
.option("--bio <text>", 'long-form bio (inline text, "-" for stdin, or "@path" to read from file)')
|
|
56
|
+
.option("--headline <text>", 'short tagline (inline text, "-" for stdin, or "@path" to read from file)')
|
|
57
|
+
.option("--edit", "open $EDITOR to compose the bio interactively (cannot be combined with --bio)")
|
|
58
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
59
|
+
.choices(OUTPUT_FORMATS)
|
|
60
|
+
.default("pretty"))
|
|
61
|
+
.action(async (options) => {
|
|
62
|
+
await runProfileBasicUpdate(options);
|
|
63
|
+
}));
|
|
64
|
+
// Canonical sub-domain tree. All 11 sub-domains carry full operations:
|
|
65
|
+
// `basic` and `skills` (#73), `industries`, `education`, `certifications`,
|
|
66
|
+
// `employment` (#74), `portfolio`, `visas`, `resume` (#75), and
|
|
67
|
+
// `external`, `reviews` (#76).
|
|
68
|
+
profile.addCommand(buildProfileBasicCommand());
|
|
69
|
+
profile.addCommand(buildProfileIndustriesCommand());
|
|
70
|
+
profile.addCommand(buildProfileEducationCommand());
|
|
71
|
+
profile.addCommand(buildProfileCertificationsCommand());
|
|
72
|
+
profile.addCommand(buildProfileEmploymentCommand());
|
|
73
|
+
profile.addCommand(buildProfileExternalCommand());
|
|
74
|
+
profile.addCommand(buildProfilePortfolioCommand());
|
|
75
|
+
profile.addCommand(buildProfileResumeCommand());
|
|
76
|
+
profile.addCommand(buildProfileReviewsCommand());
|
|
77
|
+
profile.addCommand(buildProfileSkillsCommand());
|
|
78
|
+
profile.addCommand(buildProfileVisasCommand());
|
|
79
|
+
return profile;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/profile/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,iCAAiC,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EAA0E,CAAC;SAClG,MAAM,CAAC,mBAAmB,EAAE,0EAA0E,CAAC;SACvG,MAAM,CAAC,QAAQ,EAAE,+EAA+E,CAAC;SACjG,SAAS,CACR,IAAI,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,QAA+B,CAAC,CAC5C;SACA,MAAM,CAAC,KAAK,EAAE,OAAkF,EAAE,EAAE;QACnG,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC,CAAC,CACL,CAAC;IAEF,uEAAuE;IACvE,2EAA2E;IAC3E,gEAAgE;IAChE,+BAA+B;IAC/B,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAC,CAAC;IACpD,OAAO,CAAC,UAAU,CAAC,4BAA4B,EAAE,CAAC,CAAC;IACnD,OAAO,CAAC,UAAU,CAAC,iCAAiC,EAAE,CAAC,CAAC;IACxD,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAC,CAAC;IACpD,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;IAClD,OAAO,CAAC,UAAU,CAAC,4BAA4B,EAAE,CAAC,CAAC;IACnD,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAC;IAChD,OAAO,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAC,CAAC;IACjD,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAC;IAChD,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAE/C,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { profile } from "@ttctl/core";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
/**
|
|
4
|
+
* Build the `ttctl profile industries` command tree.
|
|
5
|
+
*
|
|
6
|
+
* Five leaves:
|
|
7
|
+
* - `add <name> [--connection <type>]`
|
|
8
|
+
* - `update <id> [field-flags]`
|
|
9
|
+
* - `remove <id>`
|
|
10
|
+
* - `list [-o text|json|table]`
|
|
11
|
+
* - `autocomplete <query>` — looks up known industry names from the
|
|
12
|
+
* Toptal catalog
|
|
13
|
+
*
|
|
14
|
+
* Each `add` creates an `IndustryProfile` row (the user's authored
|
|
15
|
+
* domain-expertise entry). `<name>` becomes `title`; `--connection`
|
|
16
|
+
* becomes `domainArea` (the user's role within the industry, e.g.
|
|
17
|
+
* "Healthcare" + connection "Backend").
|
|
18
|
+
*
|
|
19
|
+
* `autocomplete` is a separate query against `industriesAutocomplete`
|
|
20
|
+
* — the catalog of known industry names. `add` does NOT consult the
|
|
21
|
+
* catalog; users supply the title directly.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildProfileIndustriesCommand(): Command;
|
|
24
|
+
/**
|
|
25
|
+
* Pretty-print an IndustryProfile row.
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatIndustryText(i: profile.industries.IndustryProfile): string;
|
|
28
|
+
/**
|
|
29
|
+
* Pretty-print an IndustryProfile row as a key/value table.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatIndustryTable(i: profile.industries.IndustryProfile): string;
|
|
32
|
+
export declare function formatIndustryListText(rows: profile.industries.IndustryProfile[]): string;
|
|
33
|
+
export declare function formatIndustryListTable(rows: profile.industries.IndustryProfile[]): string;
|
|
34
|
+
export declare function formatCatalogText(rows: profile.industries.IndustryCatalogEntry[]): string;
|
|
35
|
+
export declare function formatCatalogTable(rows: profile.industries.IndustryCatalogEntry[]): string;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/industries/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAa5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CA0EvD;AAgHD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,eAAe,GAAG,MAAM,CAMhF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,eAAe,GAAG,MAAM,CAQjF;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,GAAG,MAAM,CAGzF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,GAAG,MAAM,CAG1F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,GAAG,MAAM,CAGzF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,GAAG,MAAM,CAG1F"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { profile } from "@ttctl/core";
|
|
4
|
+
import { Command, Option } from "commander";
|
|
5
|
+
import { emitAddSuccess, emitErrorAndExit, emitRemoveSuccess, emitUpdateSuccess, wrapListEnvelope, } from "../../../lib/envelopes.js";
|
|
6
|
+
import { OUTPUT_FORMATS, emitResult } from "../../../lib/output.js";
|
|
7
|
+
import { loadAuthTokenOrExit, parseLimitOrExit, presentSubDomainError } from "../shared.js";
|
|
8
|
+
/**
|
|
9
|
+
* Build the `ttctl profile industries` command tree.
|
|
10
|
+
*
|
|
11
|
+
* Five leaves:
|
|
12
|
+
* - `add <name> [--connection <type>]`
|
|
13
|
+
* - `update <id> [field-flags]`
|
|
14
|
+
* - `remove <id>`
|
|
15
|
+
* - `list [-o text|json|table]`
|
|
16
|
+
* - `autocomplete <query>` — looks up known industry names from the
|
|
17
|
+
* Toptal catalog
|
|
18
|
+
*
|
|
19
|
+
* Each `add` creates an `IndustryProfile` row (the user's authored
|
|
20
|
+
* domain-expertise entry). `<name>` becomes `title`; `--connection`
|
|
21
|
+
* becomes `domainArea` (the user's role within the industry, e.g.
|
|
22
|
+
* "Healthcare" + connection "Backend").
|
|
23
|
+
*
|
|
24
|
+
* `autocomplete` is a separate query against `industriesAutocomplete`
|
|
25
|
+
* — the catalog of known industry names. `add` does NOT consult the
|
|
26
|
+
* catalog; users supply the title directly.
|
|
27
|
+
*/
|
|
28
|
+
export function buildProfileIndustriesCommand() {
|
|
29
|
+
const industries = new Command("industries").description("View and update the industries section of your profile");
|
|
30
|
+
industries
|
|
31
|
+
.command("add")
|
|
32
|
+
.description("Add a new industry-profile entry to your profile")
|
|
33
|
+
.argument("<name>", "industry name (mapped to title)")
|
|
34
|
+
.option("--connection <type>", "your connection / role within the industry (mapped to domainArea)")
|
|
35
|
+
.option("--about <text>", "longer-form description (optional)")
|
|
36
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
37
|
+
.choices(OUTPUT_FORMATS)
|
|
38
|
+
.default("pretty"))
|
|
39
|
+
.action(async (name, options) => {
|
|
40
|
+
await runAdd(name, options);
|
|
41
|
+
});
|
|
42
|
+
industries
|
|
43
|
+
.command("update")
|
|
44
|
+
.description("Update an existing industry-profile entry by id")
|
|
45
|
+
.argument("<id>", "industry profile id")
|
|
46
|
+
.option("--name <text>", "industry name (mapped to title)")
|
|
47
|
+
.option("--connection <type>", "your connection / role within the industry")
|
|
48
|
+
.option("--about <text>", "longer-form description")
|
|
49
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
50
|
+
.choices(OUTPUT_FORMATS)
|
|
51
|
+
.default("pretty"))
|
|
52
|
+
.action(async (id, options) => {
|
|
53
|
+
await runUpdate(id, options);
|
|
54
|
+
});
|
|
55
|
+
industries
|
|
56
|
+
.command("remove")
|
|
57
|
+
.description("Remove an industry-profile entry by id")
|
|
58
|
+
.argument("<id>", "industry profile id")
|
|
59
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
60
|
+
.choices(OUTPUT_FORMATS)
|
|
61
|
+
.default("pretty"))
|
|
62
|
+
.action(async (id, options) => {
|
|
63
|
+
await runRemove(id, options.output);
|
|
64
|
+
});
|
|
65
|
+
industries
|
|
66
|
+
.command("list")
|
|
67
|
+
.description("List your industry-profile entries")
|
|
68
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
69
|
+
.choices(OUTPUT_FORMATS)
|
|
70
|
+
.default("pretty"))
|
|
71
|
+
.action(async (options) => {
|
|
72
|
+
await runList(options.output);
|
|
73
|
+
});
|
|
74
|
+
industries
|
|
75
|
+
.command("autocomplete")
|
|
76
|
+
.description('Search the known-industries catalog for a name (e.g. "Healthcare")')
|
|
77
|
+
.argument("<query>", "search term")
|
|
78
|
+
.option("--limit <n>", "max results (default 10)", "10")
|
|
79
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
80
|
+
.choices(OUTPUT_FORMATS)
|
|
81
|
+
.default("pretty"))
|
|
82
|
+
.action(async (query, options) => {
|
|
83
|
+
await runAutocomplete(query, options);
|
|
84
|
+
});
|
|
85
|
+
return industries;
|
|
86
|
+
}
|
|
87
|
+
async function runAdd(name, options) {
|
|
88
|
+
const fields = { title: name };
|
|
89
|
+
if (options.connection !== undefined)
|
|
90
|
+
fields.domainArea = options.connection;
|
|
91
|
+
if (options.about !== undefined)
|
|
92
|
+
fields.about = options.about;
|
|
93
|
+
const token = await loadAuthTokenOrExit("profile industries add", options.output);
|
|
94
|
+
let result;
|
|
95
|
+
try {
|
|
96
|
+
result = await profile.industries.add(token, fields);
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
presentSubDomainError("profile industries add", err, options.output);
|
|
100
|
+
}
|
|
101
|
+
emitAddSuccess({
|
|
102
|
+
operation: "profile.industries.add",
|
|
103
|
+
format: options.output,
|
|
104
|
+
created: result,
|
|
105
|
+
prettySummary: `${result.title} (id ${result.id})`,
|
|
106
|
+
prettyEntity: formatIndustryText,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async function runUpdate(id, options) {
|
|
110
|
+
const fields = {};
|
|
111
|
+
if (options.name !== undefined)
|
|
112
|
+
fields.title = options.name;
|
|
113
|
+
if (options.connection !== undefined)
|
|
114
|
+
fields.domainArea = options.connection;
|
|
115
|
+
if (options.about !== undefined)
|
|
116
|
+
fields.about = options.about;
|
|
117
|
+
if (Object.keys(fields).length === 0) {
|
|
118
|
+
emitErrorAndExit({
|
|
119
|
+
operation: "profile.industries.update",
|
|
120
|
+
format: options.output,
|
|
121
|
+
errors: [{ code: "VALIDATION_ERROR", message: "at least one field flag is required" }],
|
|
122
|
+
prettySummary: "profile industries update failed (VALIDATION_ERROR): at least one field flag is required",
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const token = await loadAuthTokenOrExit("profile industries update", options.output);
|
|
126
|
+
let result;
|
|
127
|
+
try {
|
|
128
|
+
result = await profile.industries.update(token, id, fields);
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
presentSubDomainError("profile industries update", err, options.output);
|
|
132
|
+
}
|
|
133
|
+
emitUpdateSuccess({
|
|
134
|
+
operation: "profile.industries.update",
|
|
135
|
+
format: options.output,
|
|
136
|
+
updated: result,
|
|
137
|
+
prettySummary: `${result.title} (id ${result.id})`,
|
|
138
|
+
prettyEntity: formatIndustryText,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async function runRemove(id, format) {
|
|
142
|
+
const token = await loadAuthTokenOrExit("profile industries remove", format);
|
|
143
|
+
let removedId;
|
|
144
|
+
try {
|
|
145
|
+
removedId = await profile.industries.remove(token, id);
|
|
146
|
+
}
|
|
147
|
+
catch (err) {
|
|
148
|
+
presentSubDomainError("profile industries remove", err, format);
|
|
149
|
+
}
|
|
150
|
+
emitRemoveSuccess({
|
|
151
|
+
operation: "profile.industries.remove",
|
|
152
|
+
format,
|
|
153
|
+
id: removedId,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
async function runList(format) {
|
|
157
|
+
const token = await loadAuthTokenOrExit("profile industries list", format);
|
|
158
|
+
let result;
|
|
159
|
+
try {
|
|
160
|
+
result = await profile.industries.list(token);
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
presentSubDomainError("profile industries list", err, format);
|
|
164
|
+
}
|
|
165
|
+
emitResult(wrapListEnvelope(result), format, {
|
|
166
|
+
pretty: (data) => formatIndustryListText(data.items),
|
|
167
|
+
table: (data) => formatIndustryListTable(data.items),
|
|
168
|
+
empty: { command: "profile.industries.list" },
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
async function runAutocomplete(query, options) {
|
|
172
|
+
const limit = parseLimitOrExit(options.limit, "profile industries autocomplete", options.output);
|
|
173
|
+
const token = await loadAuthTokenOrExit("profile industries autocomplete", options.output);
|
|
174
|
+
let suggestions;
|
|
175
|
+
try {
|
|
176
|
+
suggestions = await profile.industries.autocomplete(token, query, { limit });
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
presentSubDomainError("profile industries autocomplete", err, options.output);
|
|
180
|
+
}
|
|
181
|
+
emitResult(wrapListEnvelope(suggestions), options.output, {
|
|
182
|
+
pretty: (data) => formatCatalogText(data.items),
|
|
183
|
+
table: (data) => formatCatalogTable(data.items),
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Pretty-print an IndustryProfile row.
|
|
188
|
+
*/
|
|
189
|
+
export function formatIndustryText(i) {
|
|
190
|
+
const lines = [i.title];
|
|
191
|
+
if (i.domainArea)
|
|
192
|
+
lines.push(` domain: ${i.domainArea}`);
|
|
193
|
+
if (i.about)
|
|
194
|
+
lines.push(` ${i.about}`);
|
|
195
|
+
lines.push(` id: ${i.id}`);
|
|
196
|
+
return lines.join("\n");
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Pretty-print an IndustryProfile row as a key/value table.
|
|
200
|
+
*/
|
|
201
|
+
export function formatIndustryTable(i) {
|
|
202
|
+
const rows = [
|
|
203
|
+
["id", i.id],
|
|
204
|
+
["title", i.title],
|
|
205
|
+
["domain", i.domainArea ?? ""],
|
|
206
|
+
["about", i.about ?? ""],
|
|
207
|
+
];
|
|
208
|
+
return rows.map(([k, v]) => `${k}\t${v}`).join("\n");
|
|
209
|
+
}
|
|
210
|
+
export function formatIndustryListText(rows) {
|
|
211
|
+
if (rows.length === 0)
|
|
212
|
+
return "(no industries on this profile)";
|
|
213
|
+
return rows.map(formatIndustryText).join("\n\n");
|
|
214
|
+
}
|
|
215
|
+
export function formatIndustryListTable(rows) {
|
|
216
|
+
if (rows.length === 0)
|
|
217
|
+
return "(no industries on this profile)";
|
|
218
|
+
return rows.map((i) => `${i.id}\t${i.title}\t${i.domainArea ?? ""}`).join("\n");
|
|
219
|
+
}
|
|
220
|
+
export function formatCatalogText(rows) {
|
|
221
|
+
if (rows.length === 0)
|
|
222
|
+
return "(no matches)";
|
|
223
|
+
return rows.map((r) => `${r.name} (${r.id})`).join("\n");
|
|
224
|
+
}
|
|
225
|
+
export function formatCatalogTable(rows) {
|
|
226
|
+
if (rows.length === 0)
|
|
227
|
+
return "(no matches)";
|
|
228
|
+
return rows.map((r) => `${r.id}\t${r.name}`).join("\n");
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=index.js.map
|