@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,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,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AAK,GAAa,CAAC,oBAAoB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,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,22 @@
|
|
|
1
|
+
import { profile } from "@ttctl/core";
|
|
2
|
+
import type { OutputFormat } from "../../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl profile external show`.
|
|
5
|
+
*
|
|
6
|
+
* The primary read for the stored external-URL state (linkedin / github /
|
|
7
|
+
* website / twitter / behance / dribbble). Closes the read-side asymmetry
|
|
8
|
+
* documented in issue #343 — prior to this leaf the only ways to inspect
|
|
9
|
+
* current URL values were a no-op `update` (write-disguised-as-read) or
|
|
10
|
+
* `advanced-wizard show` (which trims URLs from its selection set).
|
|
11
|
+
*/
|
|
12
|
+
export declare function runProfileExternalShow(format: OutputFormat): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Pretty formatter — directly unit-testable. Renders each URL on its own
|
|
15
|
+
* line (unset links render as `(unset)`) plus the last-edit timestamp.
|
|
16
|
+
* Each URL line is truncated at 80 columns to match the `update` leaf's
|
|
17
|
+
* pretty entity.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatExternalShowText(data: profile.external.ExternalProfiles): string;
|
|
20
|
+
/** Pure formatter — directly unit-testable. Tab-separated key/value rows. */
|
|
21
|
+
export declare function formatExternalShowTable(data: profile.external.ExternalProfiles): string;
|
|
22
|
+
//# sourceMappingURL=show.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/external/show.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAM3D;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAehF;AAiCD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,GAAG,MAAM,CAItF;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,GAAG,MAAM,CAMvF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
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, truncate } from "./_shared.js";
|
|
8
|
+
const COMMAND_LABEL = "profile external show";
|
|
9
|
+
const OPERATION = "profile.external.show";
|
|
10
|
+
/**
|
|
11
|
+
* Action handler for `ttctl profile external show`.
|
|
12
|
+
*
|
|
13
|
+
* The primary read for the stored external-URL state (linkedin / github /
|
|
14
|
+
* website / twitter / behance / dribbble). Closes the read-side asymmetry
|
|
15
|
+
* documented in issue #343 — prior to this leaf the only ways to inspect
|
|
16
|
+
* current URL values were a no-op `update` (write-disguised-as-read) or
|
|
17
|
+
* `advanced-wizard show` (which trims URLs from its selection set).
|
|
18
|
+
*/
|
|
19
|
+
export async function runProfileExternalShow(format) {
|
|
20
|
+
const token = await loadAuthTokenOrExit(COMMAND_LABEL, format);
|
|
21
|
+
let result;
|
|
22
|
+
try {
|
|
23
|
+
result = await profile.external.show(token);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
handleError(err, format);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
emitResult(result, format, {
|
|
30
|
+
pretty: formatExternalShowText,
|
|
31
|
+
table: formatExternalShowTable,
|
|
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
|
+
/** The six external-URL fields in stable display order. */
|
|
63
|
+
const URL_FIELDS = ["linkedin", "github", "website", "twitter", "behance", "dribbble"];
|
|
64
|
+
/**
|
|
65
|
+
* Pretty formatter — directly unit-testable. Renders each URL on its own
|
|
66
|
+
* line (unset links render as `(unset)`) plus the last-edit timestamp.
|
|
67
|
+
* Each URL line is truncated at 80 columns to match the `update` leaf's
|
|
68
|
+
* pretty entity.
|
|
69
|
+
*/
|
|
70
|
+
export function formatExternalShowText(data) {
|
|
71
|
+
const lines = URL_FIELDS.map((f) => truncate(`${f}: ${data[f] ?? "(unset)"}`, 80));
|
|
72
|
+
lines.push(`updated-by-talent-at: ${data.updatedByTalentAt ?? "(unset)"}`);
|
|
73
|
+
return lines.join("\n");
|
|
74
|
+
}
|
|
75
|
+
/** Pure formatter — directly unit-testable. Tab-separated key/value rows. */
|
|
76
|
+
export function formatExternalShowTable(data) {
|
|
77
|
+
const rows = [
|
|
78
|
+
...URL_FIELDS.map((f) => [f, data[f] ?? ""]),
|
|
79
|
+
["updated-by-talent-at", data.updatedByTalentAt ?? ""],
|
|
80
|
+
];
|
|
81
|
+
return rows.map(([k, v]) => `${k}\t${v}`).join("\n");
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC7F,KAAK,CAAC,IAAI,CAAC,yBAAyB,IAAI,CAAC,iBAAiB,IAAI,SAAS,EAAE,CAAC,CAAC;IAC3E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,uBAAuB,CAAC,IAAuC;IAC7E,MAAM,IAAI,GAAuB;QAC/B,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9D,CAAC,sBAAsB,EAAE,IAAI,CAAC,iBAAiB,IAAI,EAAE,CAAC;KACvD,CAAC;IACF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 sextet (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
|
+
* `twitter` was added in #345 once the mutation's response selection set
|
|
30
|
+
* grew to echo it (`UPDATE_EXTERNAL_PROFILES_MUTATION` previously dropped
|
|
31
|
+
* twitter so the formatter had nothing to render). Ordering matches the
|
|
32
|
+
* `external show` formatter for cross-command consistency.
|
|
33
|
+
*
|
|
34
|
+
* Pure — directly unit-testable.
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatUpdatePrettyEntity(result: profile.external.UpdateExternalProfilesResult): string;
|
|
37
|
+
//# 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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,4BAA4B,GAAG,MAAM,CAUtG"}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 sextet (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
|
+
* `twitter` was added in #345 once the mutation's response selection set
|
|
102
|
+
* grew to echo it (`UPDATE_EXTERNAL_PROFILES_MUTATION` previously dropped
|
|
103
|
+
* twitter so the formatter had nothing to render). Ordering matches the
|
|
104
|
+
* `external show` formatter for cross-command consistency.
|
|
105
|
+
*
|
|
106
|
+
* Pure — directly unit-testable.
|
|
107
|
+
*/
|
|
108
|
+
export function formatUpdatePrettyEntity(result) {
|
|
109
|
+
const { profile: updated } = result;
|
|
110
|
+
const lines = [];
|
|
111
|
+
if (updated.linkedin !== null)
|
|
112
|
+
lines.push(truncate(`linkedin: ${updated.linkedin}`, 80));
|
|
113
|
+
if (updated.github !== null)
|
|
114
|
+
lines.push(truncate(`github: ${updated.github}`, 80));
|
|
115
|
+
if (updated.website !== null)
|
|
116
|
+
lines.push(truncate(`website: ${updated.website}`, 80));
|
|
117
|
+
if (updated.twitter !== null)
|
|
118
|
+
lines.push(truncate(`twitter: ${updated.twitter}`, 80));
|
|
119
|
+
if (updated.behance !== null)
|
|
120
|
+
lines.push(truncate(`behance: ${updated.behance}`, 80));
|
|
121
|
+
if (updated.dribbble !== null)
|
|
122
|
+
lines.push(truncate(`dribbble: ${updated.dribbble}`, 80));
|
|
123
|
+
return lines.join("\n");
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/profile/external/update.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,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7D,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,SAAS,GAAG,yBAAyB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,OAQ9C;IACC,MAAM,OAAO,GAA4C,EAAE,CAAC;IAC5D,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACxE,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAClE,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACrE,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACr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OAAO,EAAE,GAAG,MAAM,CAAC;IACpC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,OAAO,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACzF,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;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,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
|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AAC,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,43 @@
|
|
|
1
|
+
import { profile } from "@ttctl/core";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
/**
|
|
4
|
+
* Build the `ttctl profile industries` command tree.
|
|
5
|
+
*
|
|
6
|
+
* Six leaves:
|
|
7
|
+
* - `add <name> [--connection <type>]`
|
|
8
|
+
* - `update <id> [field-flags]`
|
|
9
|
+
* - `remove <id>`
|
|
10
|
+
* - `show <id> [-o text|json|table]`
|
|
11
|
+
* - `list [-o text|json|table]`
|
|
12
|
+
* - `autocomplete <query>` — looks up known industry names from the
|
|
13
|
+
* Toptal catalog
|
|
14
|
+
*
|
|
15
|
+
* Each `add` creates an `IndustryProfile` row (the user's authored
|
|
16
|
+
* domain-expertise entry). `<name>` becomes `title`; `--connection`
|
|
17
|
+
* becomes `domainArea` (the user's role within the industry, e.g.
|
|
18
|
+
* "Healthcare" + connection "Backend").
|
|
19
|
+
*
|
|
20
|
+
* `autocomplete` is a separate query against `industriesAutocomplete`
|
|
21
|
+
* — the catalog of known industry names. `add` does NOT consult the
|
|
22
|
+
* catalog; users supply the title directly.
|
|
23
|
+
*
|
|
24
|
+
* `show <id>` is the per-id read companion of `list`, added in #342 to
|
|
25
|
+
* close the Class A surface-shape gap (service exported a `show()` but
|
|
26
|
+
* neither CLI nor MCP exposed it). The wire call resolves the row via
|
|
27
|
+
* the schema's `node()` resolver — see
|
|
28
|
+
* `packages/core/src/services/profile/industries/index.ts:226`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildProfileIndustriesCommand(): Command;
|
|
31
|
+
/**
|
|
32
|
+
* Pretty-print an IndustryProfile row.
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatIndustryText(i: profile.industries.IndustryProfile): string;
|
|
35
|
+
/**
|
|
36
|
+
* Pretty-print an IndustryProfile row as a key/value table.
|
|
37
|
+
*/
|
|
38
|
+
export declare function formatIndustryTable(i: profile.industries.IndustryProfile): string;
|
|
39
|
+
export declare function formatIndustryListText(rows: profile.industries.IndustryProfile[]): string;
|
|
40
|
+
export declare function formatIndustryListTable(rows: profile.industries.IndustryProfile[]): string;
|
|
41
|
+
export declare function formatCatalogText(rows: profile.industries.IndustryCatalogEntry[]): string;
|
|
42
|
+
export declare function formatCatalogTable(rows: profile.industries.IndustryCatalogEntry[]): string;
|
|
43
|
+
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAuFvD;AA2HD;;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"}
|