@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,540 @@
|
|
|
1
|
+
import type { DryRunPreview, WireShapeDiffEntry } from "@ttctl/core";
|
|
2
|
+
import type { OutputFormat } from "./output.js";
|
|
3
|
+
export type { WireShapeDiffEntry };
|
|
4
|
+
/**
|
|
5
|
+
* Cross-CLI envelope ABI (#128) — discriminated-union wire shape for
|
|
6
|
+
* write-success and error responses, plus the top-level list envelope.
|
|
7
|
+
*
|
|
8
|
+
* The envelope locks the public-API contract for the JSON output:
|
|
9
|
+
* pre-`v1.0` (`0.x`) signals "expect breaking changes"; `v1.0` onward,
|
|
10
|
+
* any JSON shape change is a breaking-change release (semver-major).
|
|
11
|
+
*
|
|
12
|
+
* Discriminators:
|
|
13
|
+
*
|
|
14
|
+
* - `ok: true | false` separates success from error.
|
|
15
|
+
* - `operation: string` (e.g., `"profile.skills.add"`) identifies the
|
|
16
|
+
* verb so consumers can branch without parsing the command path.
|
|
17
|
+
* - For success: `created` / `updated` / `removed` field name selects
|
|
18
|
+
* the verb (add / update / remove respectively). Mutually exclusive.
|
|
19
|
+
* - For errors: `errors[]` is ALWAYS plural — even single-error cases
|
|
20
|
+
* ship a 1-element array so consumers don't branch on 1-vs-N shape.
|
|
21
|
+
*
|
|
22
|
+
* Routing (per `emitErrorAndExit`):
|
|
23
|
+
*
|
|
24
|
+
* - `--output=json` errors → STDOUT (machine consumers read structured
|
|
25
|
+
* payload regardless of exit code).
|
|
26
|
+
* - `--output=yaml` errors → STDOUT (same reasoning).
|
|
27
|
+
* - `--output=pretty` errors → STDERR human-formatted block; STDOUT
|
|
28
|
+
* stays clean.
|
|
29
|
+
* - Exit code is nonzero on error in all formats; `0` on success.
|
|
30
|
+
*
|
|
31
|
+
* The version string is hard-coded `"1.0"` here. Bumping to `"1.1"`
|
|
32
|
+
* signals an additive (non-breaking) change; bumping to `"2.0"`
|
|
33
|
+
* signals a breaking change — both are forward-evolution levers
|
|
34
|
+
* consumers may discriminate on.
|
|
35
|
+
*/
|
|
36
|
+
export declare const ENVELOPE_VERSION: "1.0";
|
|
37
|
+
/**
|
|
38
|
+
* One field-level diff entry for the `update` envelope's optional
|
|
39
|
+
* `changes` array. v0.4 ships the type but does NOT thread `changes`
|
|
40
|
+
* through the helpers — populating the `from` value requires a
|
|
41
|
+
* pre-mutation read or a server-returned old-state shape that the core
|
|
42
|
+
* layer does not surface today. The shape is reserved so adding it in
|
|
43
|
+
* a future release is non-breaking (additive).
|
|
44
|
+
*
|
|
45
|
+
* `from` and `to` are kept as `unknown` because the diff is shallow
|
|
46
|
+
* across heterogeneous field types (numbers, strings, booleans, null);
|
|
47
|
+
* narrowing belongs to the consumer.
|
|
48
|
+
*/
|
|
49
|
+
export interface EnvelopeChange {
|
|
50
|
+
field: string;
|
|
51
|
+
from: unknown;
|
|
52
|
+
to: unknown;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* One entry in the error envelope's plural `errors[]` array. `code` is
|
|
56
|
+
* a stable machine-readable token (`VALIDATION_ERROR`, `NO_VIEWER`,
|
|
57
|
+
* `CF_403_PERSISTENT`, …). `message` is human-readable. `field`,
|
|
58
|
+
* `hint`, `documentationUrl` are optional — `documentationUrl` is
|
|
59
|
+
* reserved for v1.0+ when the error doc URLs exist; v0.4 omits.
|
|
60
|
+
*
|
|
61
|
+
* `diff?` is the additive slot reserved for `WIRE_SHAPE_ERROR` (Z-3 /
|
|
62
|
+
* #286): each entry is a `WireShapeDiffEntry` per
|
|
63
|
+
* `docs/wire-validation-error-format.md`. Populated only when `code`
|
|
64
|
+
* is `"WIRE_SHAPE_ERROR"`; absent for every other code. Adding this
|
|
65
|
+
* optional field is non-breaking under `ENVELOPE_VERSION = "1.0"`
|
|
66
|
+
* (additive — sibling slot to `documentationUrl?`). The single-valued
|
|
67
|
+
* `field?` slot keeps its meaning for non-wire-shape errors; the two
|
|
68
|
+
* are mutually-exclusive in practice but the wire shape doesn't
|
|
69
|
+
* enforce it.
|
|
70
|
+
*/
|
|
71
|
+
export interface EnvelopeError {
|
|
72
|
+
code: string;
|
|
73
|
+
field?: string;
|
|
74
|
+
message: string;
|
|
75
|
+
hint?: string;
|
|
76
|
+
documentationUrl?: string;
|
|
77
|
+
diff?: WireShapeDiffEntry[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Offset-style pagination metadata block for the top-level list
|
|
81
|
+
* envelope. Activated by #138 (the wiring issue for the reservation
|
|
82
|
+
* #128 introduced).
|
|
83
|
+
*
|
|
84
|
+
* Shape decision (#138 user decision 2026-05-12): the CLI's
|
|
85
|
+
* `--page` / `--per-page` flags are 1-indexed offset-style; the wire
|
|
86
|
+
* across Toptal surfaces is heterogeneous (page-based
|
|
87
|
+
* `eligibleJobs(page, pageSize)`, offset wrapped
|
|
88
|
+
* `gigs(pagination: {limit, offset})`, cursor
|
|
89
|
+
* `payments(pagination: {limit, after})`), but the user-facing
|
|
90
|
+
* envelope normalises to offset-style metadata for predictable
|
|
91
|
+
* scripting.
|
|
92
|
+
*
|
|
93
|
+
* All fields are optional so commands whose wire ops report only a
|
|
94
|
+
* subset (e.g., a cursor-style backend that doesn't expose
|
|
95
|
+
* `totalCount`) can populate the fields they have without padding the
|
|
96
|
+
* rest. A list response with `pageInfo` omitted entirely signals "no
|
|
97
|
+
* pagination metadata available" (e.g., a wire op that returns all
|
|
98
|
+
* entities in one go).
|
|
99
|
+
*
|
|
100
|
+
* Pre-#138 the reservation was cursor-style (`{hasNextPage?,
|
|
101
|
+
* endCursor?}`) — never populated in v0.4. The reshape is
|
|
102
|
+
* forward-evolution under `ENVELOPE_VERSION = "1.0"` (pre-1.0 the
|
|
103
|
+
* envelope explicitly signals "expect breaking changes").
|
|
104
|
+
*/
|
|
105
|
+
export interface EnvelopePageInfo {
|
|
106
|
+
/** 1-indexed page number the server returned. */
|
|
107
|
+
currentPage?: number;
|
|
108
|
+
/** Items per page the server actually applied. May differ from the
|
|
109
|
+
* client request when the server enforces a cap. */
|
|
110
|
+
perPage?: number;
|
|
111
|
+
/** Total pages, derived from `totalCount / perPage` (rounded up).
|
|
112
|
+
* Omitted when the server doesn't expose `totalCount`. */
|
|
113
|
+
totalPages?: number;
|
|
114
|
+
/** True when at least one more page is available after the current
|
|
115
|
+
* page; false when the current page is the last (or the only) one. */
|
|
116
|
+
hasNextPage?: boolean;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Discriminated success envelope for `add`. The `created` field carries
|
|
120
|
+
* the full payload of the new entity (or the post-mutation list, for
|
|
121
|
+
* sub-domains where the core API returns the full list — visas /
|
|
122
|
+
* portfolio in v0.4 — until per-domain narrowing lands in a follow-up).
|
|
123
|
+
*/
|
|
124
|
+
export interface SuccessEnvelopeAdd<T> {
|
|
125
|
+
ok: true;
|
|
126
|
+
version: typeof ENVELOPE_VERSION;
|
|
127
|
+
operation: string;
|
|
128
|
+
created: T;
|
|
129
|
+
notice?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Discriminated success envelope for `update`. `changes?` is reserved
|
|
133
|
+
* (v0.4 omits — see `EnvelopeChange` doc).
|
|
134
|
+
*/
|
|
135
|
+
export interface SuccessEnvelopeUpdate<T> {
|
|
136
|
+
ok: true;
|
|
137
|
+
version: typeof ENVELOPE_VERSION;
|
|
138
|
+
operation: string;
|
|
139
|
+
updated: T;
|
|
140
|
+
changes?: EnvelopeChange[];
|
|
141
|
+
notice?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Discriminated success envelope for `remove`. `removed.id` is the
|
|
145
|
+
* server-issued identifier of the now-deleted entity; the helper
|
|
146
|
+
* derives it from the caller's input so the envelope shape is stable
|
|
147
|
+
* regardless of whether the core API returns void, an id, or a
|
|
148
|
+
* post-mutation list.
|
|
149
|
+
*/
|
|
150
|
+
export interface SuccessEnvelopeRemove {
|
|
151
|
+
ok: true;
|
|
152
|
+
version: typeof ENVELOPE_VERSION;
|
|
153
|
+
operation: string;
|
|
154
|
+
removed: {
|
|
155
|
+
id: string;
|
|
156
|
+
};
|
|
157
|
+
notice?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Error envelope. Always `ok: false`; `errors[]` is ALWAYS plural even
|
|
161
|
+
* for single-error cases.
|
|
162
|
+
*/
|
|
163
|
+
export interface ErrorEnvelope {
|
|
164
|
+
ok: false;
|
|
165
|
+
version: typeof ENVELOPE_VERSION;
|
|
166
|
+
operation: string;
|
|
167
|
+
errors: EnvelopeError[];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Top-level list envelope for `list` verbs. The `items` field carries
|
|
171
|
+
* the array; `pageInfo?` carries offset-style pagination metadata when
|
|
172
|
+
* the underlying wire op supplied any (activated in #138). Commands
|
|
173
|
+
* whose wire op has no pagination args still emit `{version, items}`
|
|
174
|
+
* with no `pageInfo` field.
|
|
175
|
+
*/
|
|
176
|
+
export interface ListEnvelope<T> {
|
|
177
|
+
version: typeof ENVELOPE_VERSION;
|
|
178
|
+
items: T[];
|
|
179
|
+
pageInfo?: EnvelopePageInfo;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Wrap an array as the v0.4+ list envelope (`{version, items,
|
|
183
|
+
* pageInfo?}`). The `version` field is required (locked at `"1.0"`)
|
|
184
|
+
* so wire consumers can branch on the envelope shape uniformly across
|
|
185
|
+
* success / error / list payloads.
|
|
186
|
+
*
|
|
187
|
+
* When `pageInfo` is supplied (by a paginated command's action
|
|
188
|
+
* handler after threading `--page` / `--per-page` through to the
|
|
189
|
+
* service layer), it's included verbatim. When omitted (by a list
|
|
190
|
+
* command whose wire op has no pagination args, OR when the user
|
|
191
|
+
* passes no flags and the server returns no metadata), the envelope
|
|
192
|
+
* surfaces `{version, items}` only.
|
|
193
|
+
*
|
|
194
|
+
* The empty-state wrapper from #122 (`isEmptyCollection` in
|
|
195
|
+
* `lib/empty-state-cta.ts`) detects both raw `[]` AND `{items: []}` —
|
|
196
|
+
* wrapping list output through this helper keeps the empty-state
|
|
197
|
+
* behavior unchanged on json/yaml.
|
|
198
|
+
*
|
|
199
|
+
* Pure — no I/O.
|
|
200
|
+
*/
|
|
201
|
+
export declare function wrapListEnvelope<T>(items: T[], pageInfo?: EnvelopePageInfo): ListEnvelope<T>;
|
|
202
|
+
/**
|
|
203
|
+
* Pretty success-line marker. The visible glyph is a heavy check
|
|
204
|
+
* (`✓`); kept in a constant so tests can assert on it without
|
|
205
|
+
* duplicating Unicode escapes across snapshots.
|
|
206
|
+
*/
|
|
207
|
+
export declare const PRETTY_SUCCESS_PREFIX = "\u2713";
|
|
208
|
+
/**
|
|
209
|
+
* Stringify the JSON success-add envelope (single-line, no extra
|
|
210
|
+
* whitespace — matches `formatResult` json branch). Exposed for tests.
|
|
211
|
+
*/
|
|
212
|
+
export declare function formatAddJson<T>(envelope: SuccessEnvelopeAdd<T>): string;
|
|
213
|
+
/**
|
|
214
|
+
* Stringify the YAML success-add envelope as block-style YAML via
|
|
215
|
+
* `formatYaml`. Exposed for tests.
|
|
216
|
+
*/
|
|
217
|
+
export declare function formatAddYaml<T>(envelope: SuccessEnvelopeAdd<T>): string;
|
|
218
|
+
/**
|
|
219
|
+
* Stringify the JSON success-update envelope. Exposed for tests.
|
|
220
|
+
*/
|
|
221
|
+
export declare function formatUpdateJson<T>(envelope: SuccessEnvelopeUpdate<T>): string;
|
|
222
|
+
/**
|
|
223
|
+
* Stringify the YAML success-update envelope. Exposed for tests.
|
|
224
|
+
*/
|
|
225
|
+
export declare function formatUpdateYaml<T>(envelope: SuccessEnvelopeUpdate<T>): string;
|
|
226
|
+
/**
|
|
227
|
+
* Stringify the JSON success-remove envelope. Exposed for tests.
|
|
228
|
+
*/
|
|
229
|
+
export declare function formatRemoveJson(envelope: SuccessEnvelopeRemove): string;
|
|
230
|
+
/**
|
|
231
|
+
* Stringify the YAML success-remove envelope. Exposed for tests.
|
|
232
|
+
*/
|
|
233
|
+
export declare function formatRemoveYaml(envelope: SuccessEnvelopeRemove): string;
|
|
234
|
+
/**
|
|
235
|
+
* Stringify the JSON error envelope. Exposed for tests.
|
|
236
|
+
*/
|
|
237
|
+
export declare function formatErrorJson(envelope: ErrorEnvelope): string;
|
|
238
|
+
/**
|
|
239
|
+
* Stringify the YAML error envelope. Exposed for tests.
|
|
240
|
+
*/
|
|
241
|
+
export declare function formatErrorYaml(envelope: ErrorEnvelope): string;
|
|
242
|
+
/**
|
|
243
|
+
* Build the pretty-format rendering of a success-add envelope:
|
|
244
|
+
*
|
|
245
|
+
* ✓ Added: <prettySummary>
|
|
246
|
+
* <prettyEntity-line-1>
|
|
247
|
+
* <prettyEntity-line-2>
|
|
248
|
+
* …
|
|
249
|
+
*
|
|
250
|
+
* `prettyEntity` is OPTIONAL — when omitted the output is just the
|
|
251
|
+
* single-line summary. `notice` (when present) appears on its own
|
|
252
|
+
* trailing line, also indented.
|
|
253
|
+
*
|
|
254
|
+
* Pure — directly unit-testable.
|
|
255
|
+
*/
|
|
256
|
+
export declare function formatAddPretty<T>(args: {
|
|
257
|
+
prettySummary: string;
|
|
258
|
+
prettyEntity?: ((entity: T) => string) | undefined;
|
|
259
|
+
entity: T;
|
|
260
|
+
notice?: string | undefined;
|
|
261
|
+
}): string;
|
|
262
|
+
/**
|
|
263
|
+
* Build the pretty-format rendering of a success-update envelope.
|
|
264
|
+
* Mirror of `formatAddPretty` with an "Updated:" header. v0.4 does NOT
|
|
265
|
+
* render the `changes` diff (the deep comparison is out of scope per
|
|
266
|
+
* #128 caller context); the field is reserved on the JSON/YAML wire
|
|
267
|
+
* shape only.
|
|
268
|
+
*/
|
|
269
|
+
export declare function formatUpdatePretty<T>(args: {
|
|
270
|
+
prettySummary: string;
|
|
271
|
+
prettyEntity?: ((entity: T) => string) | undefined;
|
|
272
|
+
entity: T;
|
|
273
|
+
notice?: string | undefined;
|
|
274
|
+
}): string;
|
|
275
|
+
/**
|
|
276
|
+
* Build the pretty-format rendering of a success-remove envelope:
|
|
277
|
+
*
|
|
278
|
+
* ✓ Removed: <prettySummary or id>
|
|
279
|
+
*
|
|
280
|
+
* The summary defaults to the bare id when no `prettySummary` is
|
|
281
|
+
* supplied; callers that have the entity name handy (post-fetch) can
|
|
282
|
+
* pass a richer line like `"sk_abc123 (TypeScript)"`.
|
|
283
|
+
*/
|
|
284
|
+
export declare function formatRemovePretty(args: {
|
|
285
|
+
id: string;
|
|
286
|
+
prettySummary?: string | undefined;
|
|
287
|
+
notice?: string | undefined;
|
|
288
|
+
}): string;
|
|
289
|
+
/**
|
|
290
|
+
* Maximum number of diff entries rendered in the pretty form of a
|
|
291
|
+
* `WIRE_SHAPE_ERROR` (per `docs/wire-validation-error-format.md`
|
|
292
|
+
* § `-o pretty`). The JSON / YAML wire shapes carry the full list;
|
|
293
|
+
* only the human-readable rendering caps to keep terminal output
|
|
294
|
+
* scannable. When the diff exceeds the cap, a `… and <K> more` line
|
|
295
|
+
* tells the operator where to look for the full data.
|
|
296
|
+
*/
|
|
297
|
+
export declare const WIRE_SHAPE_DIFF_PRETTY_CAP = 10;
|
|
298
|
+
/**
|
|
299
|
+
* Build the pretty-format rendering of an error envelope. Each error
|
|
300
|
+
* surfaces as its own block; `field` and `hint` annotate the message
|
|
301
|
+
* when present.
|
|
302
|
+
*
|
|
303
|
+
* Error: <message-1>
|
|
304
|
+
* (Code: <code-1>)
|
|
305
|
+
* (Field: <field-1>)
|
|
306
|
+
* Diff (schema vs wire):
|
|
307
|
+
* <op> <path>: expected <expected>, got <actual> [("<value>")]
|
|
308
|
+
* …
|
|
309
|
+
* Hint: <hint-1>
|
|
310
|
+
*
|
|
311
|
+
* Error: <message-2>
|
|
312
|
+
* …
|
|
313
|
+
*
|
|
314
|
+
* The format is symmetric with `formatTtctlErrorMessage` from
|
|
315
|
+
* `errors.ts` (used for the typed-hierarchy `TtctlError` block) — same
|
|
316
|
+
* `Error: …` prefix, same parenthesised metadata. The recovery line
|
|
317
|
+
* from `TtctlError` does not have a generic equivalent here; callers
|
|
318
|
+
* convert to `hint` if a recovery sentence is available.
|
|
319
|
+
*
|
|
320
|
+
* `WIRE_SHAPE_ERROR` (Z-3 / #286) carries a `diff` field — when
|
|
321
|
+
* present, the pretty form renders a `Diff (schema vs wire):` block
|
|
322
|
+
* before the `Hint:` footer per
|
|
323
|
+
* `docs/wire-validation-error-format.md` § `-o pretty`. Capped at
|
|
324
|
+
* {@link WIRE_SHAPE_DIFF_PRETTY_CAP} entries; overflow renders a
|
|
325
|
+
* `… and <K> more …` line pointing at `-o json` for the full diff.
|
|
326
|
+
*/
|
|
327
|
+
export declare function formatErrorPretty(envelope: ErrorEnvelope): string;
|
|
328
|
+
/**
|
|
329
|
+
* One-line stderr summary for the pretty error path. The AC requires
|
|
330
|
+
* a "one-line stderr summary" alongside the multi-line block — when
|
|
331
|
+
* stdout is structured (json/yaml) the summary is omitted because the
|
|
332
|
+
* structured payload IS the summary.
|
|
333
|
+
*
|
|
334
|
+
* Defaults to `Error: <first-error.message>` when the caller does not
|
|
335
|
+
* pass an explicit summary. Useful when piping the multi-line block
|
|
336
|
+
* elsewhere but still wanting a glance-readable single line on the
|
|
337
|
+
* terminal.
|
|
338
|
+
*/
|
|
339
|
+
export declare function defaultPrettyErrorSummary(envelope: ErrorEnvelope): string;
|
|
340
|
+
/**
|
|
341
|
+
* Build the success-add envelope object (pure — no I/O). Shape:
|
|
342
|
+
* `{ok: true, version: "1.0", operation, created, notice?}`. Exposed
|
|
343
|
+
* separately from `emitAddSuccess` so callers (and tests) can inspect
|
|
344
|
+
* the structured shape without going through stdout.
|
|
345
|
+
*/
|
|
346
|
+
export declare function buildAddEnvelope<T>(args: {
|
|
347
|
+
operation: string;
|
|
348
|
+
created: T;
|
|
349
|
+
notice?: string | undefined;
|
|
350
|
+
}): SuccessEnvelopeAdd<T>;
|
|
351
|
+
/**
|
|
352
|
+
* Build the success-update envelope object (pure — no I/O). Shape:
|
|
353
|
+
* `{ok: true, version: "1.0", operation, updated, changes?, notice?}`.
|
|
354
|
+
*
|
|
355
|
+
* `changes` is reserved (see `EnvelopeChange` doc). Callers do not
|
|
356
|
+
* thread it through in v0.4; the parameter is preserved for future
|
|
357
|
+
* extension without an API churn.
|
|
358
|
+
*/
|
|
359
|
+
export declare function buildUpdateEnvelope<T>(args: {
|
|
360
|
+
operation: string;
|
|
361
|
+
updated: T;
|
|
362
|
+
changes?: EnvelopeChange[] | undefined;
|
|
363
|
+
notice?: string | undefined;
|
|
364
|
+
}): SuccessEnvelopeUpdate<T>;
|
|
365
|
+
/**
|
|
366
|
+
* Build the success-remove envelope object (pure — no I/O). Shape:
|
|
367
|
+
* `{ok: true, version: "1.0", operation, removed: {id}, notice?}`.
|
|
368
|
+
*/
|
|
369
|
+
export declare function buildRemoveEnvelope(args: {
|
|
370
|
+
operation: string;
|
|
371
|
+
id: string;
|
|
372
|
+
notice?: string | undefined;
|
|
373
|
+
}): SuccessEnvelopeRemove;
|
|
374
|
+
/**
|
|
375
|
+
* Build the error envelope object (pure — no I/O). Shape:
|
|
376
|
+
* `{ok: false, version: "1.0", operation, errors[]}`. `errors` is
|
|
377
|
+
* normalised to a plural array even for single-error inputs so the
|
|
378
|
+
* wire shape is stable.
|
|
379
|
+
*/
|
|
380
|
+
export declare function buildErrorEnvelope(args: {
|
|
381
|
+
operation: string;
|
|
382
|
+
errors: EnvelopeError[];
|
|
383
|
+
}): ErrorEnvelope;
|
|
384
|
+
/**
|
|
385
|
+
* Side-effecting emitter for the `add` success envelope. Writes the
|
|
386
|
+
* per-format payload to stdout with a trailing newline; never throws.
|
|
387
|
+
*
|
|
388
|
+
* - `json` → single-line JSON envelope on stdout
|
|
389
|
+
* - `yaml` → block-style YAML envelope on stdout
|
|
390
|
+
* - `pretty` → `✓ Added: <summary>` + indented `prettyEntity?` on stdout
|
|
391
|
+
*
|
|
392
|
+
* The success path always exits 0 (the helper does not call
|
|
393
|
+
* `process.exit` — leaves it to the caller / Node's natural exit).
|
|
394
|
+
*/
|
|
395
|
+
export declare function emitAddSuccess<T>(args: {
|
|
396
|
+
operation: string;
|
|
397
|
+
format: OutputFormat;
|
|
398
|
+
created: T;
|
|
399
|
+
prettySummary: string;
|
|
400
|
+
prettyEntity?: ((entity: T) => string) | undefined;
|
|
401
|
+
notice?: string | undefined;
|
|
402
|
+
}): void;
|
|
403
|
+
/**
|
|
404
|
+
* Side-effecting emitter for the `update` success envelope. Mirror of
|
|
405
|
+
* `emitAddSuccess` for the update verb.
|
|
406
|
+
*/
|
|
407
|
+
export declare function emitUpdateSuccess<T>(args: {
|
|
408
|
+
operation: string;
|
|
409
|
+
format: OutputFormat;
|
|
410
|
+
updated: T;
|
|
411
|
+
prettySummary: string;
|
|
412
|
+
prettyEntity?: ((entity: T) => string) | undefined;
|
|
413
|
+
changes?: EnvelopeChange[] | undefined;
|
|
414
|
+
notice?: string | undefined;
|
|
415
|
+
}): void;
|
|
416
|
+
/**
|
|
417
|
+
* Side-effecting emitter for the `remove` success envelope. The id is
|
|
418
|
+
* the server-issued identifier of the now-deleted entity (the caller
|
|
419
|
+
* already knows it from the input or from the API response).
|
|
420
|
+
*/
|
|
421
|
+
export declare function emitRemoveSuccess(args: {
|
|
422
|
+
operation: string;
|
|
423
|
+
format: OutputFormat;
|
|
424
|
+
id: string;
|
|
425
|
+
prettySummary?: string | undefined;
|
|
426
|
+
notice?: string | undefined;
|
|
427
|
+
}): void;
|
|
428
|
+
/**
|
|
429
|
+
* Discriminated success envelope for `--dry-run` (issue #52). Mirrors
|
|
430
|
+
* the wire shape of {@link SuccessEnvelopeUpdate} (`ok: true, version,
|
|
431
|
+
* operation, …`) plus a `dryRun: true` discriminator and a `preview`
|
|
432
|
+
* field carrying the structured "would-have-sent" payload from the
|
|
433
|
+
* core layer's {@link DryRunPreview}.
|
|
434
|
+
*
|
|
435
|
+
* Why a separate envelope variant rather than reusing
|
|
436
|
+
* `SuccessEnvelopeUpdate`: dry-run is fundamentally a "no-op confirmed"
|
|
437
|
+
* outcome — there is NO updated entity, only a preview of the request
|
|
438
|
+
* that WOULD have updated one. Reusing the update envelope would force
|
|
439
|
+
* `updated: ...` to carry a fake/empty value that downstream consumers
|
|
440
|
+
* could mistake for a real result. The `dryRun: true` discriminator
|
|
441
|
+
* makes the no-effect semantics legible at the JSON layer.
|
|
442
|
+
*
|
|
443
|
+
* Wire shape: `{ ok, version, operation, dryRun: true, preview: { … } }`
|
|
444
|
+
* where the `preview` body matches the AC (#52 § Output format under
|
|
445
|
+
* --dry-run): `{ operation, variables, transport, surface, headers }`
|
|
446
|
+
* with secrets redacted.
|
|
447
|
+
*/
|
|
448
|
+
export interface SuccessEnvelopeDryRun {
|
|
449
|
+
ok: true;
|
|
450
|
+
version: typeof ENVELOPE_VERSION;
|
|
451
|
+
operation: string;
|
|
452
|
+
dryRun: true;
|
|
453
|
+
preview: DryRunPreview;
|
|
454
|
+
notice?: string;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Build the dry-run success envelope object (pure — no I/O). Shape:
|
|
458
|
+
* `{ok: true, version: "1.0", operation, dryRun: true, preview, notice?}`.
|
|
459
|
+
*
|
|
460
|
+
* Exposed separately from {@link emitDryRunSuccess} so callers (and
|
|
461
|
+
* tests) can inspect the structured shape without going through stdout.
|
|
462
|
+
*/
|
|
463
|
+
export declare function buildDryRunEnvelope(args: {
|
|
464
|
+
operation: string;
|
|
465
|
+
preview: DryRunPreview;
|
|
466
|
+
notice?: string | undefined;
|
|
467
|
+
}): SuccessEnvelopeDryRun;
|
|
468
|
+
/**
|
|
469
|
+
* Stringify the JSON dry-run envelope (single-line, no extra whitespace
|
|
470
|
+
* — matches `formatResult` json branch). Exposed for tests.
|
|
471
|
+
*/
|
|
472
|
+
export declare function formatDryRunJson(envelope: SuccessEnvelopeDryRun): string;
|
|
473
|
+
/**
|
|
474
|
+
* Stringify the YAML dry-run envelope as block-style YAML via
|
|
475
|
+
* `formatYaml`. Exposed for tests.
|
|
476
|
+
*/
|
|
477
|
+
export declare function formatDryRunYaml(envelope: SuccessEnvelopeDryRun): string;
|
|
478
|
+
/**
|
|
479
|
+
* Build the pretty-format rendering of a dry-run envelope:
|
|
480
|
+
*
|
|
481
|
+
* ✓ Dry run: would call `<operationName>` (no changes sent)
|
|
482
|
+
* surface: <surface> (<transport>)
|
|
483
|
+
* endpoint: <endpoint>
|
|
484
|
+
* variables:
|
|
485
|
+
* <pretty-printed-JSON, 2-space indented>
|
|
486
|
+
* headers:
|
|
487
|
+
* authorization: Token token=<redacted>
|
|
488
|
+
* <other-header>: <value>
|
|
489
|
+
* …
|
|
490
|
+
*
|
|
491
|
+
* Pure — directly unit-testable. The output is human-friendly: the
|
|
492
|
+
* variables block uses `JSON.stringify(_, null, 2)` to give a readable
|
|
493
|
+
* multi-line shape, while headers list one-per-line so the redacted
|
|
494
|
+
* `authorization` is obvious at a glance.
|
|
495
|
+
*/
|
|
496
|
+
export declare function formatDryRunPretty(envelope: SuccessEnvelopeDryRun): string;
|
|
497
|
+
/**
|
|
498
|
+
* Side-effecting emitter for the dry-run success envelope. Mirrors
|
|
499
|
+
* {@link emitUpdateSuccess} for the dry-run variant — writes the
|
|
500
|
+
* per-format payload to stdout with a trailing newline; never throws.
|
|
501
|
+
*
|
|
502
|
+
* - `json` → single-line JSON envelope on stdout
|
|
503
|
+
* - `yaml` → block-style YAML envelope on stdout
|
|
504
|
+
* - `pretty` → multi-line `✓ Dry run: …` block on stdout
|
|
505
|
+
*
|
|
506
|
+
* The success path always exits 0 (helper does not call `process.exit`
|
|
507
|
+
* — leaves it to the caller / Node's natural exit). This matches the
|
|
508
|
+
* AC: a well-formed dry-run preview exits 0 regardless of whether the
|
|
509
|
+
* apply-path WOULD have errored at the server level.
|
|
510
|
+
*/
|
|
511
|
+
export declare function emitDryRunSuccess(args: {
|
|
512
|
+
operation: string;
|
|
513
|
+
format: OutputFormat;
|
|
514
|
+
preview: DryRunPreview;
|
|
515
|
+
notice?: string | undefined;
|
|
516
|
+
}): void;
|
|
517
|
+
/**
|
|
518
|
+
* Side-effecting error emitter. Routes per format and exits the
|
|
519
|
+
* process — never returns.
|
|
520
|
+
*
|
|
521
|
+
* Routing:
|
|
522
|
+
*
|
|
523
|
+
* - `json` / `yaml`: the structured envelope is written to STDOUT (so
|
|
524
|
+
* `jq`/`yq` consumers see structured payload regardless of exit
|
|
525
|
+
* code). The exit code is nonzero (default `1`).
|
|
526
|
+
* - `pretty`: a one-line stderr summary is written FIRST, then the
|
|
527
|
+
* multi-line human block (also on stderr). STDOUT stays clean.
|
|
528
|
+
*
|
|
529
|
+
* Exit code defaults to `1`; callers can pass a different value (e.g.
|
|
530
|
+
* `2` for transport-level Cloudflare blocks, mirroring
|
|
531
|
+
* `exitCodeForTtctlError`).
|
|
532
|
+
*/
|
|
533
|
+
export declare function emitErrorAndExit(args: {
|
|
534
|
+
operation: string;
|
|
535
|
+
format: OutputFormat;
|
|
536
|
+
errors: EnvelopeError[];
|
|
537
|
+
prettySummary?: string | undefined;
|
|
538
|
+
exitCode?: number;
|
|
539
|
+
}): never;
|
|
540
|
+
//# sourceMappingURL=envelopes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelopes.d.ts","sourceRoot":"","sources":["../../src/lib/envelopes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,gBAAgB,EAAG,KAAc,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,OAAO,CAAC;CACb;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,aAAa;IAC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