@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,172 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { jobs } from "@ttctl/core";
|
|
4
|
+
import { getCliDryRun } from "../../lib/dry-run.js";
|
|
5
|
+
import { emitDryRunSuccess, emitRemoveSuccess, emitUpdateSuccess } from "../../lib/envelopes.js";
|
|
6
|
+
import { formatFlags, handleJobsError, loadAuthTokenOrExit } from "./shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* Action handler for `ttctl jobs save <id>`. Marks the job as saved
|
|
9
|
+
* (bookmark). Emits the v0.4 update-success envelope (the mutation
|
|
10
|
+
* conceptually updates the job's interest-state flags rather than
|
|
11
|
+
* creating a new resource).
|
|
12
|
+
*
|
|
13
|
+
* Routes through the core layer's `dryRun` option (issue #162) when
|
|
14
|
+
* the global `--dry-run` flag is set. On `kind: "preview"` the dry-run
|
|
15
|
+
* envelope is emitted on stdout; on `kind: "applied"` the regular
|
|
16
|
+
* update-success envelope is emitted.
|
|
17
|
+
*/
|
|
18
|
+
export async function runJobsSave(id, output) {
|
|
19
|
+
const token = await loadAuthTokenOrExit("jobs save", output);
|
|
20
|
+
const dryRun = getCliDryRun();
|
|
21
|
+
let outcome;
|
|
22
|
+
try {
|
|
23
|
+
outcome = await jobs.save(token, id, { dryRun });
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
handleJobsError("jobs save", err, output);
|
|
27
|
+
}
|
|
28
|
+
if (outcome.kind === "preview") {
|
|
29
|
+
emitDryRunSuccess({ operation: "jobs.save", format: output, preview: outcome.preview });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const { result: state } = outcome;
|
|
33
|
+
emitUpdateSuccess({
|
|
34
|
+
operation: "jobs.save",
|
|
35
|
+
format: output,
|
|
36
|
+
updated: state,
|
|
37
|
+
prettySummary: `job ${id} saved (flags: ${formatFlags(state) || "—"})`,
|
|
38
|
+
prettyEntity: (s) => formatInterestEntity(s),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Action handler for `ttctl jobs unsave <id>`. Clears the interest
|
|
43
|
+
* flags on a job — the wire's only "remove saved" path. Note that
|
|
44
|
+
* this also clears `not-interested` (single wire mutation covers
|
|
45
|
+
* both); see {@link jobs.unsave} for the rationale.
|
|
46
|
+
*
|
|
47
|
+
* Emits the v0.4 remove-success envelope on the apply path; the
|
|
48
|
+
* `--dry-run` envelope on the dry-run path (issue #162). The wire
|
|
49
|
+
* operation in the preview is `JobClearInterest` (matching the
|
|
50
|
+
* delegating call), while the CLI envelope's `operation` field stays
|
|
51
|
+
* `jobs.unsave` (the verb the user invoked).
|
|
52
|
+
*/
|
|
53
|
+
export async function runJobsUnsave(id, output) {
|
|
54
|
+
const token = await loadAuthTokenOrExit("jobs unsave", output);
|
|
55
|
+
const dryRun = getCliDryRun();
|
|
56
|
+
let outcome;
|
|
57
|
+
try {
|
|
58
|
+
outcome = await jobs.unsave(token, id, { dryRun });
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
handleJobsError("jobs unsave", err, output);
|
|
62
|
+
}
|
|
63
|
+
if (outcome.kind === "preview") {
|
|
64
|
+
emitDryRunSuccess({ operation: "jobs.unsave", format: output, preview: outcome.preview });
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
emitRemoveSuccess({
|
|
68
|
+
operation: "jobs.unsave",
|
|
69
|
+
format: output,
|
|
70
|
+
id,
|
|
71
|
+
prettySummary: `job ${id} interest cleared`,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export async function runJobsNotInterested(id, opts) {
|
|
75
|
+
const token = await loadAuthTokenOrExit("jobs not-interested", opts.output);
|
|
76
|
+
const dryRun = getCliDryRun();
|
|
77
|
+
let outcome;
|
|
78
|
+
try {
|
|
79
|
+
outcome = await jobs.notInterested(token, id, { reason: opts.reason }, { dryRun });
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
handleJobsError("jobs not-interested", err, opts.output);
|
|
83
|
+
}
|
|
84
|
+
if (outcome.kind === "preview") {
|
|
85
|
+
emitDryRunSuccess({ operation: "jobs.not-interested", format: opts.output, preview: outcome.preview });
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const { result: state } = outcome;
|
|
89
|
+
emitUpdateSuccess({
|
|
90
|
+
operation: "jobs.not-interested",
|
|
91
|
+
format: opts.output,
|
|
92
|
+
updated: state,
|
|
93
|
+
prettySummary: `job ${id} marked not-interested (flags: ${formatFlags(state) || "—"})`,
|
|
94
|
+
prettyEntity: (s) => formatInterestEntity(s),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Action handler for `ttctl jobs clear-interest <id>`. Aliases
|
|
99
|
+
* `unsave` semantically (calls the same wire mutation) but uses the
|
|
100
|
+
* explicit name so users who marked a job not-interested can undo it
|
|
101
|
+
* without thinking about the "unsave" naming.
|
|
102
|
+
*
|
|
103
|
+
* Routes through the core layer's `dryRun` option (issue #162) when
|
|
104
|
+
* the global `--dry-run` flag is set.
|
|
105
|
+
*/
|
|
106
|
+
export async function runJobsClearInterest(id, output) {
|
|
107
|
+
const token = await loadAuthTokenOrExit("jobs clear-interest", output);
|
|
108
|
+
const dryRun = getCliDryRun();
|
|
109
|
+
let outcome;
|
|
110
|
+
try {
|
|
111
|
+
outcome = await jobs.clearInterest(token, id, { dryRun });
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
handleJobsError("jobs clear-interest", err, output);
|
|
115
|
+
}
|
|
116
|
+
if (outcome.kind === "preview") {
|
|
117
|
+
emitDryRunSuccess({ operation: "jobs.clear-interest", format: output, preview: outcome.preview });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const { result: state } = outcome;
|
|
121
|
+
emitUpdateSuccess({
|
|
122
|
+
operation: "jobs.clear-interest",
|
|
123
|
+
format: output,
|
|
124
|
+
updated: state,
|
|
125
|
+
prettySummary: `job ${id} interest cleared`,
|
|
126
|
+
prettyEntity: (s) => formatInterestEntity(s),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Action handler for `ttctl jobs mark-viewed <id>`. Explicitly marks
|
|
131
|
+
* the job as viewed. Not in the issue AC but exposed for completeness
|
|
132
|
+
* — the UI normally auto-marks on detail-page open.
|
|
133
|
+
*
|
|
134
|
+
* Routes through the core layer's `dryRun` option (issue #162) when
|
|
135
|
+
* the global `--dry-run` flag is set.
|
|
136
|
+
*/
|
|
137
|
+
export async function runJobsMarkViewed(id, output) {
|
|
138
|
+
const token = await loadAuthTokenOrExit("jobs mark-viewed", output);
|
|
139
|
+
const dryRun = getCliDryRun();
|
|
140
|
+
let outcome;
|
|
141
|
+
try {
|
|
142
|
+
outcome = await jobs.markViewed(token, id, { dryRun });
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
handleJobsError("jobs mark-viewed", err, output);
|
|
146
|
+
}
|
|
147
|
+
if (outcome.kind === "preview") {
|
|
148
|
+
emitDryRunSuccess({ operation: "jobs.mark-viewed", format: output, preview: outcome.preview });
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const { result: state } = outcome;
|
|
152
|
+
emitUpdateSuccess({
|
|
153
|
+
operation: "jobs.mark-viewed",
|
|
154
|
+
format: output,
|
|
155
|
+
updated: state,
|
|
156
|
+
prettySummary: `job ${id} marked viewed`,
|
|
157
|
+
prettyEntity: (s) => formatInterestEntity(s),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Render the interest-state as a multi-line entity. Used as the
|
|
162
|
+
* `prettyEntity` slot for the update-success envelope.
|
|
163
|
+
*/
|
|
164
|
+
export function formatInterestEntity(state) {
|
|
165
|
+
const lines = [];
|
|
166
|
+
lines.push(`Id: ${state.id}`);
|
|
167
|
+
lines.push(`Saved: ${state.saved === true ? "yes" : "no"}`);
|
|
168
|
+
lines.push(`Not interested: ${state.notInterested === true ? "yes" : "no"}`);
|
|
169
|
+
lines.push(`Viewed: ${state.viewed === true ? "yes" : "no"}`);
|
|
170
|
+
return lines.join("\n");
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=interest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interest.js","sourceRoot":"","sources":["../../../src/commands/jobs/interest.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEjG,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEhF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAU,EAAE,MAAoB;IAChE,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAE9B,IAAI,OAAyB,CAAC;IAC9B,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAe,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC/B,iBAAiB,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACxF,OAAO;IACT,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,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E,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/F,OAAO;IACT,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAClC,iBAAiB,CAAC;QAChB,SAAS,EAAE,kBAAkB;QAC7B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,OAAO,EAAE,gBAAgB;QACxC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAA4B;IAC/D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5D,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7E,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9D,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { OutputFormat } from "../../lib/output.js";
|
|
2
|
+
/**
|
|
3
|
+
* Action handler for `ttctl jobs list`. Browse current job
|
|
4
|
+
* opportunities with optional filters (skills, keywords, commitments,
|
|
5
|
+
* work types, estimated lengths). Returns a list envelope
|
|
6
|
+
* (`{version, items, pageInfo}`) on `json` / `yaml`.
|
|
7
|
+
*
|
|
8
|
+
* Pagination (#138, refactored per-command in #183): reads `--page`
|
|
9
|
+
* / `--per-page` directly from the leaf's parsed `options` payload
|
|
10
|
+
* (no module-scoped holder, no global capture). When neither flag is
|
|
11
|
+
* set, the service applies defaults (`page: 1, perPage: 20`) — the
|
|
12
|
+
* same behavior as the pre-#138 hardcoded `eligibleJobs(page: 0,
|
|
13
|
+
* pageSize: 20)` wire call.
|
|
14
|
+
*/
|
|
15
|
+
export interface JobsListOptions {
|
|
16
|
+
skills?: string[];
|
|
17
|
+
keywords?: string[];
|
|
18
|
+
excludeSkills?: string[];
|
|
19
|
+
excludeKeywords?: string[];
|
|
20
|
+
commitments?: string[];
|
|
21
|
+
workTypes?: string[];
|
|
22
|
+
estimatedLengths?: string[];
|
|
23
|
+
sortTarget?: string;
|
|
24
|
+
page?: number;
|
|
25
|
+
perPage?: number;
|
|
26
|
+
output: OutputFormat;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Shared shape for the three filter-less paginated leaves. `saved`,
|
|
30
|
+
* `viewed`, and `not-interested-list` each accept the same three
|
|
31
|
+
* fields; aliasing them to one another would imply they're
|
|
32
|
+
* interchangeable, so each gets its own name despite the structural
|
|
33
|
+
* identity (consistent with the project pattern of one options
|
|
34
|
+
* interface per CLI surface).
|
|
35
|
+
*/
|
|
36
|
+
interface FilterlessPaginatedOptions {
|
|
37
|
+
page?: number;
|
|
38
|
+
perPage?: number;
|
|
39
|
+
output: OutputFormat;
|
|
40
|
+
}
|
|
41
|
+
export type JobsSavedOptions = FilterlessPaginatedOptions;
|
|
42
|
+
export type JobsViewedOptions = FilterlessPaginatedOptions;
|
|
43
|
+
export type JobsNotInterestedListOptions = FilterlessPaginatedOptions;
|
|
44
|
+
export declare function runJobsList(opts: JobsListOptions): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Action handler for `ttctl jobs saved`. Wraps `jobs.saved()` (which
|
|
47
|
+
* issues `eligibleJobs(filter: {saved: true})`).
|
|
48
|
+
*
|
|
49
|
+
* Pagination (#138, refactored per-command in #183): reads `--page` /
|
|
50
|
+
* `--per-page` from the leaf's parsed options; surfaces `pageInfo`
|
|
51
|
+
* and the pretty footer on the same shape as `jobs list`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function runJobsSaved(opts: JobsSavedOptions): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Action handler for `ttctl jobs viewed`. Wraps `jobs.viewedList()`
|
|
56
|
+
* (which fetches the requested page and filters client-side on
|
|
57
|
+
* `viewed`).
|
|
58
|
+
*
|
|
59
|
+
* **Wire-shape gap (R1)**: `eligibleJobs` has no `viewed:
|
|
60
|
+
* BooleanFilter`. The output is scoped to the requested page; the
|
|
61
|
+
* post-filter list can be shorter than `--per-page`. A follow-up issue
|
|
62
|
+
* tracks the wire-level filter.
|
|
63
|
+
*
|
|
64
|
+
* **Pagination (#138, refactored per-command in #183)**: the
|
|
65
|
+
* `totalCount` in `pageInfo` reflects the UNDERLYING fetch (pre-
|
|
66
|
+
* filter). When the post-filter `items.length` differs from
|
|
67
|
+
* `pageInfo.perPage`, that's the R1 narrowing — not a pagination
|
|
68
|
+
* error.
|
|
69
|
+
*/
|
|
70
|
+
export declare function runJobsViewed(opts: JobsViewedOptions): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Action handler for `ttctl jobs not-interested-list`. Wraps
|
|
73
|
+
* `jobs.notInterestedList()` (issues `eligibleJobs(filter:
|
|
74
|
+
* {notInterested: true})`).
|
|
75
|
+
*
|
|
76
|
+
* Pagination (#138, refactored per-command in #183): same shape as
|
|
77
|
+
* `runJobsList` and `runJobsSaved`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function runJobsNotInterestedList(opts: JobsNotInterestedListOptions): Promise<void>;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0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;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBhG"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { jobs } from "@ttctl/core";
|
|
4
|
+
import { wrapListEnvelope } from "../../lib/envelopes.js";
|
|
5
|
+
import { emitResult } from "../../lib/output.js";
|
|
6
|
+
import { buildJobsPageInfo, formatJobsTable, formatPageFooter, handleJobsError, loadAuthTokenOrExit, } from "./shared.js";
|
|
7
|
+
export async function runJobsList(opts) {
|
|
8
|
+
const token = await loadAuthTokenOrExit("jobs list", opts.output);
|
|
9
|
+
const listOpts = {};
|
|
10
|
+
if (opts.skills !== undefined)
|
|
11
|
+
listOpts.skills = opts.skills;
|
|
12
|
+
if (opts.keywords !== undefined)
|
|
13
|
+
listOpts.keywords = opts.keywords;
|
|
14
|
+
if (opts.excludeSkills !== undefined)
|
|
15
|
+
listOpts.excludeSkills = opts.excludeSkills;
|
|
16
|
+
if (opts.excludeKeywords !== undefined)
|
|
17
|
+
listOpts.excludeKeywords = opts.excludeKeywords;
|
|
18
|
+
if (opts.commitments !== undefined)
|
|
19
|
+
listOpts.commitments = opts.commitments;
|
|
20
|
+
if (opts.workTypes !== undefined)
|
|
21
|
+
listOpts.workTypes = opts.workTypes;
|
|
22
|
+
if (opts.estimatedLengths !== undefined)
|
|
23
|
+
listOpts.estimatedLengths = opts.estimatedLengths;
|
|
24
|
+
if (opts.sortTarget !== undefined)
|
|
25
|
+
listOpts.sortTarget = opts.sortTarget;
|
|
26
|
+
if (opts.page !== undefined)
|
|
27
|
+
listOpts.page = opts.page;
|
|
28
|
+
if (opts.perPage !== undefined)
|
|
29
|
+
listOpts.perPage = opts.perPage;
|
|
30
|
+
let page;
|
|
31
|
+
try {
|
|
32
|
+
page = await jobs.list(token, listOpts);
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
handleJobsError("jobs list", err, opts.output);
|
|
36
|
+
}
|
|
37
|
+
const pageInfo = buildJobsPageInfo(page);
|
|
38
|
+
emitResult(wrapListEnvelope(page.items, pageInfo), opts.output, {
|
|
39
|
+
pretty: (data) => renderJobsListPretty(data.items, page),
|
|
40
|
+
table: (data) => renderJobsListPretty(data.items, page),
|
|
41
|
+
empty: { command: "jobs.list" },
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Action handler for `ttctl jobs saved`. Wraps `jobs.saved()` (which
|
|
46
|
+
* issues `eligibleJobs(filter: {saved: true})`).
|
|
47
|
+
*
|
|
48
|
+
* Pagination (#138, refactored per-command in #183): reads `--page` /
|
|
49
|
+
* `--per-page` from the leaf's parsed options; surfaces `pageInfo`
|
|
50
|
+
* and the pretty footer on the same shape as `jobs list`.
|
|
51
|
+
*/
|
|
52
|
+
export async function runJobsSaved(opts) {
|
|
53
|
+
const token = await loadAuthTokenOrExit("jobs saved", opts.output);
|
|
54
|
+
const listOpts = {};
|
|
55
|
+
if (opts.page !== undefined)
|
|
56
|
+
listOpts.page = opts.page;
|
|
57
|
+
if (opts.perPage !== undefined)
|
|
58
|
+
listOpts.perPage = opts.perPage;
|
|
59
|
+
let page;
|
|
60
|
+
try {
|
|
61
|
+
page = await jobs.saved(token, listOpts);
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
handleJobsError("jobs saved", err, opts.output);
|
|
65
|
+
}
|
|
66
|
+
const pageInfo = buildJobsPageInfo(page);
|
|
67
|
+
emitResult(wrapListEnvelope(page.items, pageInfo), opts.output, {
|
|
68
|
+
pretty: (data) => renderJobsListPretty(data.items, page),
|
|
69
|
+
table: (data) => renderJobsListPretty(data.items, page),
|
|
70
|
+
empty: { command: "jobs.saved" },
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Action handler for `ttctl jobs viewed`. Wraps `jobs.viewedList()`
|
|
75
|
+
* (which fetches the requested page and filters client-side on
|
|
76
|
+
* `viewed`).
|
|
77
|
+
*
|
|
78
|
+
* **Wire-shape gap (R1)**: `eligibleJobs` has no `viewed:
|
|
79
|
+
* BooleanFilter`. The output is scoped to the requested page; the
|
|
80
|
+
* post-filter list can be shorter than `--per-page`. A follow-up issue
|
|
81
|
+
* tracks the wire-level filter.
|
|
82
|
+
*
|
|
83
|
+
* **Pagination (#138, refactored per-command in #183)**: the
|
|
84
|
+
* `totalCount` in `pageInfo` reflects the UNDERLYING fetch (pre-
|
|
85
|
+
* filter). When the post-filter `items.length` differs from
|
|
86
|
+
* `pageInfo.perPage`, that's the R1 narrowing — not a pagination
|
|
87
|
+
* error.
|
|
88
|
+
*/
|
|
89
|
+
export async function runJobsViewed(opts) {
|
|
90
|
+
const token = await loadAuthTokenOrExit("jobs viewed", opts.output);
|
|
91
|
+
const listOpts = {};
|
|
92
|
+
if (opts.page !== undefined)
|
|
93
|
+
listOpts.page = opts.page;
|
|
94
|
+
if (opts.perPage !== undefined)
|
|
95
|
+
listOpts.perPage = opts.perPage;
|
|
96
|
+
let page;
|
|
97
|
+
try {
|
|
98
|
+
page = await jobs.viewedList(token, listOpts);
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
handleJobsError("jobs viewed", err, opts.output);
|
|
102
|
+
}
|
|
103
|
+
const pageInfo = buildJobsPageInfo(page);
|
|
104
|
+
emitResult(wrapListEnvelope(page.items, pageInfo), opts.output, {
|
|
105
|
+
pretty: (data) => renderJobsListPretty(data.items, page),
|
|
106
|
+
table: (data) => renderJobsListPretty(data.items, page),
|
|
107
|
+
empty: { command: "jobs.viewed" },
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Action handler for `ttctl jobs not-interested-list`. Wraps
|
|
112
|
+
* `jobs.notInterestedList()` (issues `eligibleJobs(filter:
|
|
113
|
+
* {notInterested: true})`).
|
|
114
|
+
*
|
|
115
|
+
* Pagination (#138, refactored per-command in #183): same shape as
|
|
116
|
+
* `runJobsList` and `runJobsSaved`.
|
|
117
|
+
*/
|
|
118
|
+
export async function runJobsNotInterestedList(opts) {
|
|
119
|
+
const token = await loadAuthTokenOrExit("jobs not-interested-list", opts.output);
|
|
120
|
+
const listOpts = {};
|
|
121
|
+
if (opts.page !== undefined)
|
|
122
|
+
listOpts.page = opts.page;
|
|
123
|
+
if (opts.perPage !== undefined)
|
|
124
|
+
listOpts.perPage = opts.perPage;
|
|
125
|
+
let page;
|
|
126
|
+
try {
|
|
127
|
+
page = await jobs.notInterestedList(token, listOpts);
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
handleJobsError("jobs not-interested-list", err, opts.output);
|
|
131
|
+
}
|
|
132
|
+
const pageInfo = buildJobsPageInfo(page);
|
|
133
|
+
emitResult(wrapListEnvelope(page.items, pageInfo), opts.output, {
|
|
134
|
+
pretty: (data) => renderJobsListPretty(data.items, page),
|
|
135
|
+
table: (data) => renderJobsListPretty(data.items, page),
|
|
136
|
+
empty: { command: "jobs.not-interested-list" },
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Render the jobs table plus the pretty-mode pagination footer
|
|
141
|
+
* underneath. Single source of truth for the four jobs-domain list
|
|
142
|
+
* leaves (`list`, `saved`, `viewed`, `not-interested-list`) so the
|
|
143
|
+
* post-#138 footer styling stays uniform across the group.
|
|
144
|
+
*
|
|
145
|
+
* The footer is appended only when `totalCount > 0` — empty pages
|
|
146
|
+
* route through the empty-state CTA wrapper BEFORE this renderer
|
|
147
|
+
* fires, so the `items.length === 0` branch in `formatJobsTable` is
|
|
148
|
+
* unreachable from this path. Defensive `if` here preserves the
|
|
149
|
+
* direct-call surface (tests, future programmatic use).
|
|
150
|
+
*/
|
|
151
|
+
function renderJobsListPretty(items, page) {
|
|
152
|
+
const table = formatJobsTable(items);
|
|
153
|
+
if (page.totalCount <= 0)
|
|
154
|
+
return table;
|
|
155
|
+
return `${table}\n${formatPageFooter(page.page, page.perPage, page.totalCount)}`;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/jobs/list.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,aAAa,CAAC;AA+CrB,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAqB;IACrD,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAElE,MAAM,QAAQ,GAAqB,EAAE,CAAC;IACtC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;QAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7D,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;QAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IACnE,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS;QAAE,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;IAClF,IAAI,IAAI,CAAC,eAAe,KAAK,SAAS;QAAE,QAAQ,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IACxF,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;QAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC5E,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;QAAE,QAAQ,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,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAe,CAAC,0BAA0B,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE;QAC9D,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC;QACxD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC;QACvD,KAAK,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE;KAC/C,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,oBAAoB,CAAC,KAAyB,EAAE,IAAsB;IAC7E,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,GAAG,KAAK,KAAK,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { OutputFormat } from "../../lib/output.js";
|
|
2
|
+
/**
|
|
3
|
+
* Wire-shape note (R2): the platform exposes a SINGLE
|
|
4
|
+
* `viewer.searchSubscription` per user — there is no list of named
|
|
5
|
+
* subscriptions. The CLI's `search list / save --name / remove <id>`
|
|
6
|
+
* surface adapts to this cardinality:
|
|
7
|
+
*
|
|
8
|
+
* - `list` returns a 0-or-1 envelope (envelope-compatible).
|
|
9
|
+
* - `save` accepts `--name <name>` as advisory (cosmetic, no wire
|
|
10
|
+
* field). Starts/replaces THE subscription.
|
|
11
|
+
* - `remove` accepts an optional `<id>` argument (ignored — there's
|
|
12
|
+
* only one subscription).
|
|
13
|
+
*
|
|
14
|
+
* The CLI help text and the issue PR body surface this caveat.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Action handler for `ttctl jobs search list`. Returns the current
|
|
18
|
+
* subscription wrapped in a list envelope (0 or 1 item) so the
|
|
19
|
+
* surface stays consistent with the AC's `list` verb expectations.
|
|
20
|
+
*/
|
|
21
|
+
export declare function runJobsSearchList(output: OutputFormat): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Action handler for `ttctl jobs search save`. Starts (or replaces)
|
|
24
|
+
* the search subscription. `--name` is accepted but advisory (the
|
|
25
|
+
* wire doesn't carry a name field).
|
|
26
|
+
*/
|
|
27
|
+
export interface JobsSearchSaveOptions {
|
|
28
|
+
name?: string;
|
|
29
|
+
skills?: string[];
|
|
30
|
+
keywords?: string[];
|
|
31
|
+
excludeSkills?: string[];
|
|
32
|
+
excludeKeywords?: string[];
|
|
33
|
+
commitments?: string[];
|
|
34
|
+
workTypes?: string[];
|
|
35
|
+
estimatedLengths?: string[];
|
|
36
|
+
excludeUnspecifiedBudget?: boolean;
|
|
37
|
+
output: OutputFormat;
|
|
38
|
+
}
|
|
39
|
+
export declare function runJobsSearchSave(opts: JobsSearchSaveOptions): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Action handler for `ttctl jobs search remove`. Terminates the
|
|
42
|
+
* active subscription. The optional `<id>` argument is ignored — the
|
|
43
|
+
* wire has only one subscription per viewer.
|
|
44
|
+
*
|
|
45
|
+
* Routes through the core layer's `dryRun` option (issue #162) when
|
|
46
|
+
* the global `--dry-run` flag is set.
|
|
47
|
+
*/
|
|
48
|
+
export declare function runJobsSearchRemove(id: string | undefined, output: OutputFormat): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Row shape returned by `search list`. Flattens the
|
|
51
|
+
* `SearchSubscriptionFilters` into an envelope-compatible row.
|
|
52
|
+
*/
|
|
53
|
+
interface SearchSubscriptionRow {
|
|
54
|
+
active: true;
|
|
55
|
+
skills: string[];
|
|
56
|
+
keywords: string[];
|
|
57
|
+
excludeSkills: string[];
|
|
58
|
+
excludeKeywords: string[];
|
|
59
|
+
commitments: string[];
|
|
60
|
+
workTypes: string[];
|
|
61
|
+
estimatedLengths: string[];
|
|
62
|
+
excludeUnspecifiedBudget: boolean | null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Render the subscription rows (0 or 1) as a multi-line pretty block.
|
|
66
|
+
* Used for both `pretty` and `table` slots — a table doesn't add
|
|
67
|
+
* value for a single multi-field row.
|
|
68
|
+
*/
|
|
69
|
+
export declare function formatSubscriptionTable(rows: SearchSubscriptionRow[]): string;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/jobs/search.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;;;;;;;;GAaG;AAEH;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB3E;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsClF;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBrG;AAED;;;GAGG;AACH,UAAU,qBAAqB;IAC7B,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,wBAAwB,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1C;AAqBD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAI7E"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { jobs } from "@ttctl/core";
|
|
4
|
+
import { getCliDryRun } from "../../lib/dry-run.js";
|
|
5
|
+
import { emitDryRunSuccess, emitRemoveSuccess, emitUpdateSuccess, wrapListEnvelope } from "../../lib/envelopes.js";
|
|
6
|
+
import { emitResult } from "../../lib/output.js";
|
|
7
|
+
import { handleJobsError, loadAuthTokenOrExit } from "./shared.js";
|
|
8
|
+
/**
|
|
9
|
+
* Wire-shape note (R2): the platform exposes a SINGLE
|
|
10
|
+
* `viewer.searchSubscription` per user — there is no list of named
|
|
11
|
+
* subscriptions. The CLI's `search list / save --name / remove <id>`
|
|
12
|
+
* surface adapts to this cardinality:
|
|
13
|
+
*
|
|
14
|
+
* - `list` returns a 0-or-1 envelope (envelope-compatible).
|
|
15
|
+
* - `save` accepts `--name <name>` as advisory (cosmetic, no wire
|
|
16
|
+
* field). Starts/replaces THE subscription.
|
|
17
|
+
* - `remove` accepts an optional `<id>` argument (ignored — there's
|
|
18
|
+
* only one subscription).
|
|
19
|
+
*
|
|
20
|
+
* The CLI help text and the issue PR body surface this caveat.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Action handler for `ttctl jobs search list`. Returns the current
|
|
24
|
+
* subscription wrapped in a list envelope (0 or 1 item) so the
|
|
25
|
+
* surface stays consistent with the AC's `list` verb expectations.
|
|
26
|
+
*/
|
|
27
|
+
export async function runJobsSearchList(output) {
|
|
28
|
+
const token = await loadAuthTokenOrExit("jobs search list", output);
|
|
29
|
+
let state;
|
|
30
|
+
try {
|
|
31
|
+
state = await jobs.searchSubscriptionShow(token);
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
handleJobsError("jobs search list", err, output);
|
|
35
|
+
}
|
|
36
|
+
const items = state.active && state.filters !== null ? [renderRow(state.filters)] : [];
|
|
37
|
+
emitResult(wrapListEnvelope(items), output, {
|
|
38
|
+
pretty: (data) => formatSubscriptionTable(data.items),
|
|
39
|
+
table: (data) => formatSubscriptionTable(data.items),
|
|
40
|
+
empty: { command: "jobs.search.list" },
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export async function runJobsSearchSave(opts) {
|
|
44
|
+
const token = await loadAuthTokenOrExit("jobs search save", opts.output);
|
|
45
|
+
const dryRun = getCliDryRun();
|
|
46
|
+
const filters = {};
|
|
47
|
+
if (opts.skills !== undefined)
|
|
48
|
+
filters.skills = opts.skills;
|
|
49
|
+
if (opts.keywords !== undefined)
|
|
50
|
+
filters.keywords = opts.keywords;
|
|
51
|
+
if (opts.excludeSkills !== undefined)
|
|
52
|
+
filters.excludeSkills = opts.excludeSkills;
|
|
53
|
+
if (opts.excludeKeywords !== undefined)
|
|
54
|
+
filters.excludeKeywords = opts.excludeKeywords;
|
|
55
|
+
if (opts.commitments !== undefined)
|
|
56
|
+
filters.commitments = opts.commitments;
|
|
57
|
+
if (opts.workTypes !== undefined)
|
|
58
|
+
filters.workTypes = opts.workTypes;
|
|
59
|
+
if (opts.estimatedLengths !== undefined)
|
|
60
|
+
filters.estimatedLengths = opts.estimatedLengths;
|
|
61
|
+
if (opts.excludeUnspecifiedBudget !== undefined)
|
|
62
|
+
filters.excludeUnspecifiedBudget = opts.excludeUnspecifiedBudget;
|
|
63
|
+
let outcome;
|
|
64
|
+
try {
|
|
65
|
+
outcome = await jobs.searchSubscriptionSave(token, filters, { dryRun });
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
handleJobsError("jobs search save", err, opts.output);
|
|
69
|
+
}
|
|
70
|
+
if (outcome.kind === "preview") {
|
|
71
|
+
emitDryRunSuccess({ operation: "jobs.search.save", format: opts.output, preview: outcome.preview });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const { result: state } = outcome;
|
|
75
|
+
const row = state.active && state.filters !== null ? renderRow(state.filters) : { active: false, filters: null };
|
|
76
|
+
const nameNote = opts.name !== undefined ? ` (advisory name "${opts.name}" not stored server-side)` : "";
|
|
77
|
+
emitUpdateSuccess({
|
|
78
|
+
operation: "jobs.search.save",
|
|
79
|
+
format: opts.output,
|
|
80
|
+
updated: row,
|
|
81
|
+
prettySummary: `job-search subscription started${nameNote}`,
|
|
82
|
+
prettyEntity: (r) => formatSubscriptionEntity(r),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Action handler for `ttctl jobs search remove`. Terminates the
|
|
87
|
+
* active subscription. The optional `<id>` argument is ignored — the
|
|
88
|
+
* wire has only one subscription per viewer.
|
|
89
|
+
*
|
|
90
|
+
* Routes through the core layer's `dryRun` option (issue #162) when
|
|
91
|
+
* the global `--dry-run` flag is set.
|
|
92
|
+
*/
|
|
93
|
+
export async function runJobsSearchRemove(id, output) {
|
|
94
|
+
const token = await loadAuthTokenOrExit("jobs search remove", output);
|
|
95
|
+
const dryRun = getCliDryRun();
|
|
96
|
+
let outcome;
|
|
97
|
+
try {
|
|
98
|
+
outcome = await jobs.searchSubscriptionRemove(token, { dryRun });
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
handleJobsError("jobs search remove", err, output);
|
|
102
|
+
}
|
|
103
|
+
if (outcome.kind === "preview") {
|
|
104
|
+
emitDryRunSuccess({ operation: "jobs.search.remove", format: output, preview: outcome.preview });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const idNote = id !== undefined ? ` (supplied id "${id}" ignored — only one subscription exists per user)` : "";
|
|
108
|
+
emitRemoveSuccess({
|
|
109
|
+
operation: "jobs.search.remove",
|
|
110
|
+
format: output,
|
|
111
|
+
id: id ?? "(single)",
|
|
112
|
+
prettySummary: `job-search subscription terminated${idNote}`,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function renderRow(filters) {
|
|
116
|
+
return {
|
|
117
|
+
active: true,
|
|
118
|
+
skills: filters.skills ?? [],
|
|
119
|
+
keywords: filters.keywords ?? [],
|
|
120
|
+
excludeSkills: filters.excludeSkills ?? [],
|
|
121
|
+
excludeKeywords: filters.excludeKeywords ?? [],
|
|
122
|
+
commitments: filters.commitments ?? [],
|
|
123
|
+
workTypes: filters.workTypes ?? [],
|
|
124
|
+
estimatedLengths: filters.estimatedLengths ?? [],
|
|
125
|
+
excludeUnspecifiedBudget: filters.excludeUnspecifiedBudget ?? null,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Render the subscription rows (0 or 1) as a multi-line pretty block.
|
|
130
|
+
* Used for both `pretty` and `table` slots — a table doesn't add
|
|
131
|
+
* value for a single multi-field row.
|
|
132
|
+
*/
|
|
133
|
+
export function formatSubscriptionTable(rows) {
|
|
134
|
+
const first = rows[0];
|
|
135
|
+
if (first === undefined)
|
|
136
|
+
return "(no active job-search subscription)";
|
|
137
|
+
return formatSubscriptionEntity(first);
|
|
138
|
+
}
|
|
139
|
+
function formatSubscriptionEntity(row) {
|
|
140
|
+
if (!row.active)
|
|
141
|
+
return "(no active subscription)";
|
|
142
|
+
const lines = [];
|
|
143
|
+
lines.push("Status: active");
|
|
144
|
+
if (row.skills.length > 0)
|
|
145
|
+
lines.push(`Skills: ${row.skills.join(", ")}`);
|
|
146
|
+
if (row.keywords.length > 0)
|
|
147
|
+
lines.push(`Keywords: ${row.keywords.join(", ")}`);
|
|
148
|
+
if (row.excludeSkills.length > 0)
|
|
149
|
+
lines.push(`Exclude skills: ${row.excludeSkills.join(", ")}`);
|
|
150
|
+
if (row.excludeKeywords.length > 0)
|
|
151
|
+
lines.push(`Exclude keywords: ${row.excludeKeywords.join(", ")}`);
|
|
152
|
+
if (row.commitments.length > 0)
|
|
153
|
+
lines.push(`Commitments: ${row.commitments.join(", ")}`);
|
|
154
|
+
if (row.workTypes.length > 0)
|
|
155
|
+
lines.push(`Work types: ${row.workTypes.join(", ")}`);
|
|
156
|
+
if (row.estimatedLengths.length > 0)
|
|
157
|
+
lines.push(`Estimated lengths: ${row.estimatedLengths.join(", ")}`);
|
|
158
|
+
if (row.excludeUnspecifiedBudget !== null) {
|
|
159
|
+
lines.push(`Exclude unspecified budget: ${row.excludeUnspecifiedBudget ? "yes" : "no"}`);
|
|
160
|
+
}
|
|
161
|
+
return lines.join("\n");
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=search.js.map
|