@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.
Files changed (391) hide show
  1. package/README.md +44 -9
  2. package/dist/commands/applications/index.d.ts +21 -0
  3. package/dist/commands/applications/index.d.ts.map +1 -0
  4. package/dist/commands/applications/index.js +87 -0
  5. package/dist/commands/applications/index.js.map +1 -0
  6. package/dist/commands/applications/list.d.ts +55 -0
  7. package/dist/commands/applications/list.d.ts.map +1 -0
  8. package/dist/commands/applications/list.js +106 -0
  9. package/dist/commands/applications/list.js.map +1 -0
  10. package/dist/commands/applications/shared.d.ts +14 -0
  11. package/dist/commands/applications/shared.d.ts.map +1 -0
  12. package/dist/commands/applications/shared.js +19 -0
  13. package/dist/commands/applications/shared.js.map +1 -0
  14. package/dist/commands/applications/show.d.ts +51 -0
  15. package/dist/commands/applications/show.d.ts.map +1 -0
  16. package/dist/commands/applications/show.js +154 -0
  17. package/dist/commands/applications/show.js.map +1 -0
  18. package/dist/commands/applications/stats.d.ts +42 -0
  19. package/dist/commands/applications/stats.d.ts.map +1 -0
  20. package/dist/commands/applications/stats.js +69 -0
  21. package/dist/commands/applications/stats.js.map +1 -0
  22. package/dist/commands/auth/index.d.ts +17 -0
  23. package/dist/commands/auth/index.d.ts.map +1 -0
  24. package/dist/commands/auth/index.js +69 -0
  25. package/dist/commands/auth/index.js.map +1 -0
  26. package/dist/commands/auth/init.d.ts +98 -0
  27. package/dist/commands/auth/init.d.ts.map +1 -0
  28. package/dist/commands/auth/init.js +387 -0
  29. package/dist/commands/auth/init.js.map +1 -0
  30. package/dist/commands/auth/signin.d.ts +81 -0
  31. package/dist/commands/auth/signin.d.ts.map +1 -0
  32. package/dist/commands/auth/signin.js +145 -0
  33. package/dist/commands/auth/signin.js.map +1 -0
  34. package/dist/commands/auth/signout.d.ts +133 -0
  35. package/dist/commands/auth/signout.d.ts.map +1 -0
  36. package/dist/commands/auth/signout.js +172 -0
  37. package/dist/commands/auth/signout.js.map +1 -0
  38. package/dist/commands/auth/status.d.ts +62 -0
  39. package/dist/commands/auth/status.d.ts.map +1 -0
  40. package/dist/commands/auth/status.js +98 -0
  41. package/dist/commands/auth/status.js.map +1 -0
  42. package/dist/commands/availability/allocated-hours.d.ts +27 -0
  43. package/dist/commands/availability/allocated-hours.d.ts.map +1 -0
  44. package/dist/commands/availability/allocated-hours.js +61 -0
  45. package/dist/commands/availability/allocated-hours.js.map +1 -0
  46. package/dist/commands/availability/index.d.ts +30 -0
  47. package/dist/commands/availability/index.d.ts.map +1 -0
  48. package/dist/commands/availability/index.js +124 -0
  49. package/dist/commands/availability/index.js.map +1 -0
  50. package/dist/commands/availability/shared.d.ts +11 -0
  51. package/dist/commands/availability/shared.d.ts.map +1 -0
  52. package/dist/commands/availability/shared.js +30 -0
  53. package/dist/commands/availability/shared.js.map +1 -0
  54. package/dist/commands/availability/show.d.ts +32 -0
  55. package/dist/commands/availability/show.d.ts.map +1 -0
  56. package/dist/commands/availability/show.js +86 -0
  57. package/dist/commands/availability/show.js.map +1 -0
  58. package/dist/commands/availability/working-hours.d.ts +53 -0
  59. package/dist/commands/availability/working-hours.d.ts.map +1 -0
  60. package/dist/commands/availability/working-hours.js +151 -0
  61. package/dist/commands/availability/working-hours.js.map +1 -0
  62. package/dist/commands/contracts/index.d.ts +69 -0
  63. package/dist/commands/contracts/index.d.ts.map +1 -0
  64. package/dist/commands/contracts/index.js +198 -0
  65. package/dist/commands/contracts/index.js.map +1 -0
  66. package/dist/commands/engagements/breaks.d.ts +81 -0
  67. package/dist/commands/engagements/breaks.d.ts.map +1 -0
  68. package/dist/commands/engagements/breaks.js +229 -0
  69. package/dist/commands/engagements/breaks.js.map +1 -0
  70. package/dist/commands/engagements/index.d.ts +29 -0
  71. package/dist/commands/engagements/index.d.ts.map +1 -0
  72. package/dist/commands/engagements/index.js +172 -0
  73. package/dist/commands/engagements/index.js.map +1 -0
  74. package/dist/commands/engagements/list.d.ts +49 -0
  75. package/dist/commands/engagements/list.d.ts.map +1 -0
  76. package/dist/commands/engagements/list.js +95 -0
  77. package/dist/commands/engagements/list.js.map +1 -0
  78. package/dist/commands/engagements/shared.d.ts +10 -0
  79. package/dist/commands/engagements/shared.d.ts.map +1 -0
  80. package/dist/commands/engagements/shared.js +31 -0
  81. package/dist/commands/engagements/shared.js.map +1 -0
  82. package/dist/commands/engagements/show.d.ts +19 -0
  83. package/dist/commands/engagements/show.d.ts.map +1 -0
  84. package/dist/commands/engagements/show.js +150 -0
  85. package/dist/commands/engagements/show.js.map +1 -0
  86. package/dist/commands/engagements/stats.d.ts +24 -0
  87. package/dist/commands/engagements/stats.d.ts.map +1 -0
  88. package/dist/commands/engagements/stats.js +51 -0
  89. package/dist/commands/engagements/stats.js.map +1 -0
  90. package/dist/commands/jobs/index.d.ts +49 -0
  91. package/dist/commands/jobs/index.d.ts.map +1 -0
  92. package/dist/commands/jobs/index.js +304 -0
  93. package/dist/commands/jobs/index.js.map +1 -0
  94. package/dist/commands/jobs/interest.d.ts +65 -0
  95. package/dist/commands/jobs/interest.d.ts.map +1 -0
  96. package/dist/commands/jobs/interest.js +172 -0
  97. package/dist/commands/jobs/interest.js.map +1 -0
  98. package/dist/commands/jobs/list.d.ts +81 -0
  99. package/dist/commands/jobs/list.d.ts.map +1 -0
  100. package/dist/commands/jobs/list.js +157 -0
  101. package/dist/commands/jobs/list.js.map +1 -0
  102. package/dist/commands/jobs/search.d.ts +71 -0
  103. package/dist/commands/jobs/search.d.ts.map +1 -0
  104. package/dist/commands/jobs/search.js +163 -0
  105. package/dist/commands/jobs/search.js.map +1 -0
  106. package/dist/commands/jobs/shared.d.ts +79 -0
  107. package/dist/commands/jobs/shared.d.ts.map +1 -0
  108. package/dist/commands/jobs/shared.js +133 -0
  109. package/dist/commands/jobs/shared.js.map +1 -0
  110. package/dist/commands/jobs/show.d.ts +20 -0
  111. package/dist/commands/jobs/show.d.ts.map +1 -0
  112. package/dist/commands/jobs/show.js +135 -0
  113. package/dist/commands/jobs/show.js.map +1 -0
  114. package/dist/commands/payments/index.d.ts +34 -0
  115. package/dist/commands/payments/index.d.ts.map +1 -0
  116. package/dist/commands/payments/index.js +160 -0
  117. package/dist/commands/payments/index.js.map +1 -0
  118. package/dist/commands/payments/methods.d.ts +17 -0
  119. package/dist/commands/payments/methods.d.ts.map +1 -0
  120. package/dist/commands/payments/methods.js +79 -0
  121. package/dist/commands/payments/methods.js.map +1 -0
  122. package/dist/commands/payments/payouts.d.ts +44 -0
  123. package/dist/commands/payments/payouts.d.ts.map +1 -0
  124. package/dist/commands/payments/payouts.js +147 -0
  125. package/dist/commands/payments/payouts.js.map +1 -0
  126. package/dist/commands/payments/rate.d.ts +48 -0
  127. package/dist/commands/payments/rate.d.ts.map +1 -0
  128. package/dist/commands/payments/rate.js +229 -0
  129. package/dist/commands/payments/rate.js.map +1 -0
  130. package/dist/commands/payments/shared.d.ts +10 -0
  131. package/dist/commands/payments/shared.d.ts.map +1 -0
  132. package/dist/commands/payments/shared.js +27 -0
  133. package/dist/commands/payments/shared.js.map +1 -0
  134. package/dist/commands/profile/basic/index.d.ts +18 -0
  135. package/dist/commands/profile/basic/index.d.ts.map +1 -0
  136. package/dist/commands/profile/basic/index.js +79 -0
  137. package/dist/commands/profile/basic/index.js.map +1 -0
  138. package/dist/commands/profile/basic/photo-show.d.ts +28 -0
  139. package/dist/commands/profile/basic/photo-show.d.ts.map +1 -0
  140. package/dist/commands/profile/basic/photo-show.js +112 -0
  141. package/dist/commands/profile/basic/photo-show.js.map +1 -0
  142. package/dist/commands/profile/basic/photo-upload.d.ts +10 -0
  143. package/dist/commands/profile/basic/photo-upload.d.ts.map +1 -0
  144. package/dist/commands/profile/basic/photo-upload.js +61 -0
  145. package/dist/commands/profile/basic/photo-upload.js.map +1 -0
  146. package/dist/commands/profile/basic/set.d.ts +54 -0
  147. package/dist/commands/profile/basic/set.d.ts.map +1 -0
  148. package/dist/commands/profile/basic/set.js +174 -0
  149. package/dist/commands/profile/basic/set.js.map +1 -0
  150. package/dist/commands/profile/basic/show.d.ts +95 -0
  151. package/dist/commands/profile/basic/show.d.ts.map +1 -0
  152. package/dist/commands/profile/basic/show.js +310 -0
  153. package/dist/commands/profile/basic/show.js.map +1 -0
  154. package/dist/commands/profile/certifications/index.d.ts +31 -0
  155. package/dist/commands/profile/certifications/index.d.ts.map +1 -0
  156. package/dist/commands/profile/certifications/index.js +298 -0
  157. package/dist/commands/profile/certifications/index.js.map +1 -0
  158. package/dist/commands/profile/education/index.d.ts +28 -0
  159. package/dist/commands/profile/education/index.d.ts.map +1 -0
  160. package/dist/commands/profile/education/index.js +287 -0
  161. package/dist/commands/profile/education/index.js.map +1 -0
  162. package/dist/commands/profile/employment/index.d.ts +40 -0
  163. package/dist/commands/profile/employment/index.d.ts.map +1 -0
  164. package/dist/commands/profile/employment/index.js +364 -0
  165. package/dist/commands/profile/employment/index.js.map +1 -0
  166. package/dist/commands/profile/external/_shared.d.ts +35 -0
  167. package/dist/commands/profile/external/_shared.d.ts.map +1 -0
  168. package/dist/commands/profile/external/_shared.js +59 -0
  169. package/dist/commands/profile/external/_shared.js.map +1 -0
  170. package/dist/commands/profile/external/advanced-wizard-show.d.ts +15 -0
  171. package/dist/commands/profile/external/advanced-wizard-show.d.ts.map +1 -0
  172. package/dist/commands/profile/external/advanced-wizard-show.js +82 -0
  173. package/dist/commands/profile/external/advanced-wizard-show.js.map +1 -0
  174. package/dist/commands/profile/external/custom-requirements-set.d.ts +32 -0
  175. package/dist/commands/profile/external/custom-requirements-set.d.ts.map +1 -0
  176. package/dist/commands/profile/external/custom-requirements-set.js +116 -0
  177. package/dist/commands/profile/external/custom-requirements-set.js.map +1 -0
  178. package/dist/commands/profile/external/custom-requirements-show.d.ts +16 -0
  179. package/dist/commands/profile/external/custom-requirements-show.d.ts.map +1 -0
  180. package/dist/commands/profile/external/custom-requirements-show.js +84 -0
  181. package/dist/commands/profile/external/custom-requirements-show.js.map +1 -0
  182. package/dist/commands/profile/external/index.d.ts +20 -0
  183. package/dist/commands/profile/external/index.d.ts.map +1 -0
  184. package/dist/commands/profile/external/index.js +102 -0
  185. package/dist/commands/profile/external/index.js.map +1 -0
  186. package/dist/commands/profile/external/readiness.d.ts +15 -0
  187. package/dist/commands/profile/external/readiness.d.ts.map +1 -0
  188. package/dist/commands/profile/external/readiness.js +104 -0
  189. package/dist/commands/profile/external/readiness.js.map +1 -0
  190. package/dist/commands/profile/external/recommendations.d.ts +17 -0
  191. package/dist/commands/profile/external/recommendations.d.ts.map +1 -0
  192. package/dist/commands/profile/external/recommendations.js +97 -0
  193. package/dist/commands/profile/external/recommendations.js.map +1 -0
  194. package/dist/commands/profile/external/update.d.ts +32 -0
  195. package/dist/commands/profile/external/update.d.ts.map +1 -0
  196. package/dist/commands/profile/external/update.js +118 -0
  197. package/dist/commands/profile/external/update.js.map +1 -0
  198. package/dist/commands/profile/index.d.ts +16 -0
  199. package/dist/commands/profile/index.d.ts.map +1 -0
  200. package/dist/commands/profile/index.js +81 -0
  201. package/dist/commands/profile/index.js.map +1 -0
  202. package/dist/commands/profile/industries/index.d.ts +36 -0
  203. package/dist/commands/profile/industries/index.d.ts.map +1 -0
  204. package/dist/commands/profile/industries/index.js +230 -0
  205. package/dist/commands/profile/industries/index.js.map +1 -0
  206. package/dist/commands/profile/portfolio/add.d.ts +43 -0
  207. package/dist/commands/profile/portfolio/add.d.ts.map +1 -0
  208. package/dist/commands/profile/portfolio/add.js +181 -0
  209. package/dist/commands/profile/portfolio/add.js.map +1 -0
  210. package/dist/commands/profile/portfolio/highlight.d.ts +11 -0
  211. package/dist/commands/profile/portfolio/highlight.d.ts.map +1 -0
  212. package/dist/commands/profile/portfolio/highlight.js +31 -0
  213. package/dist/commands/profile/portfolio/highlight.js.map +1 -0
  214. package/dist/commands/profile/portfolio/index.d.ts +16 -0
  215. package/dist/commands/profile/portfolio/index.d.ts.map +1 -0
  216. package/dist/commands/profile/portfolio/index.js +121 -0
  217. package/dist/commands/profile/portfolio/index.js.map +1 -0
  218. package/dist/commands/profile/portfolio/list.d.ts +83 -0
  219. package/dist/commands/profile/portfolio/list.d.ts.map +1 -0
  220. package/dist/commands/profile/portfolio/list.js +189 -0
  221. package/dist/commands/profile/portfolio/list.js.map +1 -0
  222. package/dist/commands/profile/portfolio/remove.d.ts +9 -0
  223. package/dist/commands/profile/portfolio/remove.d.ts.map +1 -0
  224. package/dist/commands/profile/portfolio/remove.js +24 -0
  225. package/dist/commands/profile/portfolio/remove.js.map +1 -0
  226. package/dist/commands/profile/portfolio/reorder.d.ts +17 -0
  227. package/dist/commands/profile/portfolio/reorder.d.ts.map +1 -0
  228. package/dist/commands/profile/portfolio/reorder.js +135 -0
  229. package/dist/commands/profile/portfolio/reorder.js.map +1 -0
  230. package/dist/commands/profile/portfolio/shared.d.ts +8 -0
  231. package/dist/commands/profile/portfolio/shared.d.ts.map +1 -0
  232. package/dist/commands/profile/portfolio/shared.js +10 -0
  233. package/dist/commands/profile/portfolio/shared.js.map +1 -0
  234. package/dist/commands/profile/portfolio/update.d.ts +18 -0
  235. package/dist/commands/profile/portfolio/update.d.ts.map +1 -0
  236. package/dist/commands/profile/portfolio/update.js +77 -0
  237. package/dist/commands/profile/portfolio/update.js.map +1 -0
  238. package/dist/commands/profile/portfolio/upload.d.ts +8 -0
  239. package/dist/commands/profile/portfolio/upload.d.ts.map +1 -0
  240. package/dist/commands/profile/portfolio/upload.js +131 -0
  241. package/dist/commands/profile/portfolio/upload.js.map +1 -0
  242. package/dist/commands/profile/resume/cancel-upload.d.ts +9 -0
  243. package/dist/commands/profile/resume/cancel-upload.d.ts.map +1 -0
  244. package/dist/commands/profile/resume/cancel-upload.js +30 -0
  245. package/dist/commands/profile/resume/cancel-upload.js.map +1 -0
  246. package/dist/commands/profile/resume/index.d.ts +15 -0
  247. package/dist/commands/profile/resume/index.d.ts.map +1 -0
  248. package/dist/commands/profile/resume/index.js +42 -0
  249. package/dist/commands/profile/resume/index.js.map +1 -0
  250. package/dist/commands/profile/resume/upload.d.ts +16 -0
  251. package/dist/commands/profile/resume/upload.d.ts.map +1 -0
  252. package/dist/commands/profile/resume/upload.js +65 -0
  253. package/dist/commands/profile/resume/upload.js.map +1 -0
  254. package/dist/commands/profile/reviews/_shared.d.ts +9 -0
  255. package/dist/commands/profile/reviews/_shared.d.ts.map +1 -0
  256. package/dist/commands/profile/reviews/_shared.js +15 -0
  257. package/dist/commands/profile/reviews/_shared.js.map +1 -0
  258. package/dist/commands/profile/reviews/approve-item.d.ts +30 -0
  259. package/dist/commands/profile/reviews/approve-item.d.ts.map +1 -0
  260. package/dist/commands/profile/reviews/approve-item.js +82 -0
  261. package/dist/commands/profile/reviews/approve-item.js.map +1 -0
  262. package/dist/commands/profile/reviews/approve-section.d.ts +15 -0
  263. package/dist/commands/profile/reviews/approve-section.d.ts.map +1 -0
  264. package/dist/commands/profile/reviews/approve-section.js +67 -0
  265. package/dist/commands/profile/reviews/approve-section.js.map +1 -0
  266. package/dist/commands/profile/reviews/index.d.ts +19 -0
  267. package/dist/commands/profile/reviews/index.d.ts.map +1 -0
  268. package/dist/commands/profile/reviews/index.js +71 -0
  269. package/dist/commands/profile/reviews/index.js.map +1 -0
  270. package/dist/commands/profile/reviews/list.d.ts +17 -0
  271. package/dist/commands/profile/reviews/list.d.ts.map +1 -0
  272. package/dist/commands/profile/reviews/list.js +96 -0
  273. package/dist/commands/profile/reviews/list.js.map +1 -0
  274. package/dist/commands/profile/reviews/submit-for-review.d.ts +16 -0
  275. package/dist/commands/profile/reviews/submit-for-review.d.ts.map +1 -0
  276. package/dist/commands/profile/reviews/submit-for-review.js +65 -0
  277. package/dist/commands/profile/reviews/submit-for-review.js.map +1 -0
  278. package/dist/commands/profile/shared.d.ts +46 -0
  279. package/dist/commands/profile/shared.d.ts.map +1 -0
  280. package/dist/commands/profile/shared.js +111 -0
  281. package/dist/commands/profile/shared.js.map +1 -0
  282. package/dist/commands/profile/skills/index.d.ts +29 -0
  283. package/dist/commands/profile/skills/index.d.ts.map +1 -0
  284. package/dist/commands/profile/skills/index.js +475 -0
  285. package/dist/commands/profile/skills/index.js.map +1 -0
  286. package/dist/commands/profile/visas/add.d.ts +19 -0
  287. package/dist/commands/profile/visas/add.d.ts.map +1 -0
  288. package/dist/commands/profile/visas/add.js +37 -0
  289. package/dist/commands/profile/visas/add.js.map +1 -0
  290. package/dist/commands/profile/visas/index.d.ts +13 -0
  291. package/dist/commands/profile/visas/index.d.ts.map +1 -0
  292. package/dist/commands/profile/visas/index.js +69 -0
  293. package/dist/commands/profile/visas/index.js.map +1 -0
  294. package/dist/commands/profile/visas/list.d.ts +40 -0
  295. package/dist/commands/profile/visas/list.d.ts.map +1 -0
  296. package/dist/commands/profile/visas/list.js +115 -0
  297. package/dist/commands/profile/visas/list.js.map +1 -0
  298. package/dist/commands/profile/visas/remove.d.ts +8 -0
  299. package/dist/commands/profile/visas/remove.d.ts.map +1 -0
  300. package/dist/commands/profile/visas/remove.js +23 -0
  301. package/dist/commands/profile/visas/remove.js.map +1 -0
  302. package/dist/commands/profile/visas/shared.d.ts +11 -0
  303. package/dist/commands/profile/visas/shared.d.ts.map +1 -0
  304. package/dist/commands/profile/visas/shared.js +16 -0
  305. package/dist/commands/profile/visas/shared.js.map +1 -0
  306. package/dist/commands/profile/visas/update.d.ts +13 -0
  307. package/dist/commands/profile/visas/update.d.ts.map +1 -0
  308. package/dist/commands/profile/visas/update.js +44 -0
  309. package/dist/commands/profile/visas/update.js.map +1 -0
  310. package/dist/commands/timesheet/index.d.ts +24 -0
  311. package/dist/commands/timesheet/index.d.ts.map +1 -0
  312. package/dist/commands/timesheet/index.js +98 -0
  313. package/dist/commands/timesheet/index.js.map +1 -0
  314. package/dist/commands/timesheet/list.d.ts +40 -0
  315. package/dist/commands/timesheet/list.d.ts.map +1 -0
  316. package/dist/commands/timesheet/list.js +79 -0
  317. package/dist/commands/timesheet/list.js.map +1 -0
  318. package/dist/commands/timesheet/shared.d.ts +10 -0
  319. package/dist/commands/timesheet/shared.d.ts.map +1 -0
  320. package/dist/commands/timesheet/shared.js +35 -0
  321. package/dist/commands/timesheet/shared.js.map +1 -0
  322. package/dist/commands/timesheet/show.d.ts +19 -0
  323. package/dist/commands/timesheet/show.d.ts.map +1 -0
  324. package/dist/commands/timesheet/show.js +109 -0
  325. package/dist/commands/timesheet/show.js.map +1 -0
  326. package/dist/commands/timesheet/submit.d.ts +50 -0
  327. package/dist/commands/timesheet/submit.d.ts.map +1 -0
  328. package/dist/commands/timesheet/submit.js +151 -0
  329. package/dist/commands/timesheet/submit.js.map +1 -0
  330. package/dist/crash-handlers.d.ts +67 -0
  331. package/dist/crash-handlers.d.ts.map +1 -0
  332. package/dist/crash-handlers.js +78 -0
  333. package/dist/crash-handlers.js.map +1 -0
  334. package/dist/errors.d.ts +45 -0
  335. package/dist/errors.d.ts.map +1 -0
  336. package/dist/errors.js +57 -0
  337. package/dist/errors.js.map +1 -0
  338. package/dist/index.d.ts +8 -0
  339. package/dist/index.d.ts.map +1 -0
  340. package/dist/index.js +15 -0
  341. package/dist/index.js.map +1 -0
  342. package/dist/lib/config-context.d.ts +41 -0
  343. package/dist/lib/config-context.d.ts.map +1 -0
  344. package/dist/lib/config-context.js +74 -0
  345. package/dist/lib/config-context.js.map +1 -0
  346. package/dist/lib/dry-run.d.ts +70 -0
  347. package/dist/lib/dry-run.d.ts.map +1 -0
  348. package/dist/lib/dry-run.js +114 -0
  349. package/dist/lib/dry-run.js.map +1 -0
  350. package/dist/lib/empty-state-cta.d.ts +63 -0
  351. package/dist/lib/empty-state-cta.d.ts.map +1 -0
  352. package/dist/lib/empty-state-cta.js +88 -0
  353. package/dist/lib/empty-state-cta.js.map +1 -0
  354. package/dist/lib/envelopes.d.ts +540 -0
  355. package/dist/lib/envelopes.d.ts.map +1 -0
  356. package/dist/lib/envelopes.js +598 -0
  357. package/dist/lib/envelopes.js.map +1 -0
  358. package/dist/lib/error-routing.d.ts +49 -0
  359. package/dist/lib/error-routing.d.ts.map +1 -0
  360. package/dist/lib/error-routing.js +72 -0
  361. package/dist/lib/error-routing.js.map +1 -0
  362. package/dist/lib/format-helpers.d.ts +65 -0
  363. package/dist/lib/format-helpers.d.ts.map +1 -0
  364. package/dist/lib/format-helpers.js +79 -0
  365. package/dist/lib/format-helpers.js.map +1 -0
  366. package/dist/lib/format-overrides.d.ts +81 -0
  367. package/dist/lib/format-overrides.d.ts.map +1 -0
  368. package/dist/lib/format-overrides.js +55 -0
  369. package/dist/lib/format-overrides.js.map +1 -0
  370. package/dist/lib/freetext.d.ts +83 -0
  371. package/dist/lib/freetext.d.ts.map +1 -0
  372. package/dist/lib/freetext.js +182 -0
  373. package/dist/lib/freetext.js.map +1 -0
  374. package/dist/lib/kill-switch-hook.d.ts +49 -0
  375. package/dist/lib/kill-switch-hook.d.ts.map +1 -0
  376. package/dist/lib/kill-switch-hook.js +34 -0
  377. package/dist/lib/kill-switch-hook.js.map +1 -0
  378. package/dist/lib/output.d.ts +173 -0
  379. package/dist/lib/output.d.ts.map +1 -0
  380. package/dist/lib/output.js +177 -0
  381. package/dist/lib/output.js.map +1 -0
  382. package/dist/lib/pagination.d.ts +49 -0
  383. package/dist/lib/pagination.d.ts.map +1 -0
  384. package/dist/lib/pagination.js +36 -0
  385. package/dist/lib/pagination.js.map +1 -0
  386. package/dist/program.d.ts +80 -0
  387. package/dist/program.d.ts.map +1 -0
  388. package/dist/program.js +273 -0
  389. package/dist/program.js.map +1 -0
  390. package/package.json +35 -13
  391. package/index.js +0 -7
@@ -0,0 +1,198 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import Table from "cli-table3";
4
+ import { Command, Option } from "commander";
5
+ import { contracts } from "@ttctl/core";
6
+ import { wrapListEnvelope } from "../../lib/envelopes.js";
7
+ import { handleDomainError } from "../../lib/error-routing.js";
8
+ import { emitResult } from "../../lib/output.js";
9
+ import { OUTPUT_FORMATS } from "../../lib/output.js";
10
+ import { loadAuthTokenOrExit } from "../profile/shared.js";
11
+ /**
12
+ * Build the `ttctl contracts` command tree (#195). Two read-only leaves:
13
+ *
14
+ * | Leaf | Description |
15
+ * |-------------------------------|--------------------------------------------|
16
+ * | `list` | List talent-level contracts |
17
+ * | `show <id>` | Show one contract by id |
18
+ *
19
+ * `<id>` is the `Contract.id` from the `list` output.
20
+ *
21
+ * **Domain distinction**: this group surfaces *talent-level legal
22
+ * documents* (Toptal Direct, Master Service Agreement) reachable via
23
+ * `viewer.contracts` on the portal surface. Engagement-attached
24
+ * commercial agreements (rates, hours, period for one project) live on
25
+ * a different surface — use `ttctl engagements show <engagement-id>`.
26
+ *
27
+ * **Out of scope for v1** (per issue #195):
28
+ *
29
+ * - Contract negotiation / mutation (read-only group).
30
+ * - Document download (no API surface exposes a PDF URL today).
31
+ */
32
+ export function buildContractsCommand() {
33
+ const cmd = new Command("contracts").description("Manage talent-level contracts (Toptal Direct, MSA, etc.).\n\n" +
34
+ "For engagement-attached agreements (rates, hours, period for a specific project), see: `ttctl engagements show <id>`");
35
+ cmd
36
+ .command("list")
37
+ .description("List talent-level contracts (Toptal Direct, MSA, etc.)")
38
+ .addOption(new Option("-o, --output <format>", "output format")
39
+ .choices(OUTPUT_FORMATS)
40
+ .default("pretty"))
41
+ .action(async (options) => {
42
+ await runContractsList(options.output);
43
+ });
44
+ cmd
45
+ .command("show")
46
+ .description("Show one contract by id.\n\n" +
47
+ "Printed fields: id, kind, provider, status, billingType, signedAt, sentAt, isActive, verificationDeadline, title.")
48
+ .argument("<id>", "contract id (the row id from `contracts list`)")
49
+ .addOption(new Option("-o, --output <format>", "output format")
50
+ .choices(OUTPUT_FORMATS)
51
+ .default("pretty"))
52
+ .action(async (id, options) => {
53
+ await runContractsShow(id, options.output);
54
+ });
55
+ return cmd;
56
+ }
57
+ /**
58
+ * Action handler for `ttctl contracts list`. Returns the contracts in
59
+ * the v1.0 list envelope on `--json` / `--yaml`; renders a
60
+ * `cli-table3` table on `--output=pretty`. An empty list is a
61
+ * legitimate return value.
62
+ */
63
+ export async function runContractsList(output) {
64
+ const token = await loadAuthTokenOrExit("contracts list", output);
65
+ let items;
66
+ try {
67
+ items = await contracts.list(token);
68
+ }
69
+ catch (err) {
70
+ handleContractsError("contracts list", err, output);
71
+ }
72
+ emitResult(wrapListEnvelope(items), output, {
73
+ pretty: (data) => formatContractsTable(data.items),
74
+ table: (data) => formatContractsTable(data.items),
75
+ empty: { command: "contracts.list" },
76
+ });
77
+ }
78
+ /**
79
+ * Action handler for `ttctl contracts show <id>`. Returns the bare
80
+ * `Contract` detail shape on `--json` / `--yaml`; renders a
81
+ * multi-line key:value layout on `--output=pretty`.
82
+ */
83
+ export async function runContractsShow(id, output) {
84
+ const token = await loadAuthTokenOrExit("contracts show", output);
85
+ let item;
86
+ try {
87
+ item = await contracts.show(token, id);
88
+ }
89
+ catch (err) {
90
+ handleContractsError("contracts show", err, output);
91
+ }
92
+ emitResult(item, output, {
93
+ pretty: (data) => formatContractDetail(data),
94
+ });
95
+ }
96
+ /**
97
+ * Render the contracts list as a `cli-table3` table. Columns: id,
98
+ * kind, provider, status, signedAt, active. `title` is intentionally
99
+ * NOT a column (often long and redundant with kind/provider) — it
100
+ * surfaces in `show <id>` and in `--json`/`--yaml`.
101
+ */
102
+ export function formatContractsTable(items, terminalWidth = process.stdout.columns || 100) {
103
+ if (items.length === 0) {
104
+ const empty = new Table({ head: ["id", "kind", "provider", "status", "signed", "active"] });
105
+ return empty.toString();
106
+ }
107
+ const idWidth = 22;
108
+ const kindWidth = 22;
109
+ const statusWidth = 12;
110
+ const signedWidth = 12;
111
+ const activeWidth = 8;
112
+ // 6 columns × 2 padding + 7 borders ≈ 19
113
+ const remaining = Math.max(15, terminalWidth - idWidth - kindWidth - statusWidth - signedWidth - activeWidth - 19);
114
+ const providerWidth = Math.max(12, remaining);
115
+ const table = new Table({
116
+ head: ["id", "kind", "provider", "status", "signed", "active"],
117
+ colWidths: [idWidth, kindWidth, providerWidth, statusWidth, signedWidth, activeWidth],
118
+ colAligns: ["left", "left", "left", "left", "left", "center"],
119
+ wordWrap: true,
120
+ });
121
+ for (const c of items) {
122
+ table.push([
123
+ c.id,
124
+ c.kind ?? "—",
125
+ c.provider ?? "—",
126
+ c.status ?? "—",
127
+ formatDate(c.signedAt),
128
+ activeMarker(c.isActive),
129
+ ]);
130
+ }
131
+ return table.toString();
132
+ }
133
+ /**
134
+ * Render a single contract as a sectioned multi-line block. Pure
135
+ * — directly unit-testable.
136
+ */
137
+ export function formatContractDetail(c) {
138
+ const lines = [];
139
+ lines.push(`Contract ${c.id}`);
140
+ if (c.title !== null)
141
+ lines.push(` Title: ${c.title}`);
142
+ if (c.kind !== null)
143
+ lines.push(` Kind: ${c.kind}`);
144
+ if (c.provider !== null)
145
+ lines.push(` Provider: ${c.provider}`);
146
+ if (c.status !== null)
147
+ lines.push(` Status: ${c.status}`);
148
+ if (c.billingType !== null)
149
+ lines.push(` Billing type: ${c.billingType}`);
150
+ if (c.isActive !== null)
151
+ lines.push(` Active: ${c.isActive ? "yes" : "no"}`);
152
+ if (c.sentAt !== null)
153
+ lines.push(` Sent at: ${c.sentAt}`);
154
+ if (c.signedAt !== null)
155
+ lines.push(` Signed at: ${c.signedAt}`);
156
+ if (c.verificationDeadline !== null)
157
+ lines.push(` Verification deadline: ${c.verificationDeadline}`);
158
+ return lines.join("\n");
159
+ }
160
+ /**
161
+ * Trim an ISO 8601 timestamp to its `YYYY-MM-DD` prefix for table
162
+ * rendering. Returns the input unchanged when it doesn't start with a
163
+ * date.
164
+ */
165
+ export function formatDate(value) {
166
+ if (value === null || value === "")
167
+ return "—";
168
+ if (/^\d{4}-\d{2}-\d{2}/.test(value))
169
+ return value.slice(0, 10);
170
+ return value;
171
+ }
172
+ /**
173
+ * Map `isActive` to a compact table-cell marker: `★` for active,
174
+ * empty for inactive, `?` for null (forward-compat).
175
+ */
176
+ export function activeMarker(isActive) {
177
+ if (isActive === null)
178
+ return "?";
179
+ return isActive ? "★" : "";
180
+ }
181
+ /**
182
+ * Thin wrapper around the shared CLI error router (#330) closed over
183
+ * `contracts.ContractsError` and {@link hintForContractsCode}. The
184
+ * router applies the envelope ABI (#128) branching uniformly across
185
+ * sub-domains.
186
+ */
187
+ export function handleContractsError(commandLabel, err, format = "pretty") {
188
+ handleDomainError(commandLabel, err, contracts.ContractsError, format, hintForContractsCode);
189
+ }
190
+ function hintForContractsCode(code) {
191
+ switch (code) {
192
+ case "NOT_FOUND":
193
+ return "Verify the contract id (use `ttctl contracts list` to discover ids).";
194
+ default:
195
+ return undefined;
196
+ }
197
+ }
198
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/contracts/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAC9C,+DAA+D;QAC7D,sHAAsH,CACzH,CAAC;IAEF,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,wDAAwD,CAAC;SACrE,SAAS,CACR,IAAI,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cA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;QAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChE,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAwB;IACnD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,GAAG,CAAC;IAClC,OAAO,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,YAAoB,EAAE,GAAY,EAAE,SAAuB,QAAQ;IACtG,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAkC;IAC9D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW;YACd,OAAO,sEAAsE,CAAC;QAChF;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { engagements } from "@ttctl/core";
2
+ import type { OutputFormat } from "../../lib/output.js";
3
+ /**
4
+ * Action handler for `ttctl engagements breaks list <id>`. Lists
5
+ * scheduled breaks on a single engagement (by `jobActivityItem.id` —
6
+ * matches the row id from `engagements list`).
7
+ *
8
+ * Reuses the captured `EngagementBreaks` operation. Returns the
9
+ * breaks array wrapped in the v0.4 list envelope.
10
+ */
11
+ export declare function runEngagementsBreaksList(id: string, output: OutputFormat): Promise<void>;
12
+ /**
13
+ * Action handler for `ttctl engagements breaks add <id> --from <date>
14
+ * --to <date> [--reason-id <id>] [--comment <text>]`. Schedules a new
15
+ * break window. Internal flow:
16
+ * 1. resolve `engagement.id` from `jobActivityItem.id` (one query)
17
+ * 2. issue `CreateEngagementBreak` mutation
18
+ *
19
+ * Returns the new break wrapped in the success-add envelope.
20
+ */
21
+ export interface EngagementsBreaksAddOptions {
22
+ from: string;
23
+ to: string;
24
+ reasonId: string;
25
+ comment?: string;
26
+ output: OutputFormat;
27
+ }
28
+ export declare function runEngagementsBreaksAdd(id: string, opts: EngagementsBreaksAddOptions): Promise<void>;
29
+ /**
30
+ * Action handler for `ttctl engagements breaks remove <break-id>`.
31
+ * Cancels a previously-scheduled break by `engagementBreak.id` (the
32
+ * id returned by `breaks list`).
33
+ *
34
+ * Returns the cancelled break id wrapped in the success-remove
35
+ * envelope.
36
+ */
37
+ export declare function runEngagementsBreaksRemove(breakId: string, output: OutputFormat): Promise<void>;
38
+ /**
39
+ * Action handler for `ttctl engagements breaks reschedule <break-id>
40
+ * --from <date> --to <date>` (#155). Moves an existing break to a new
41
+ * date window. The break's `comment` and `reasonIdentifier` are
42
+ * preserved server-side — the wire mutation
43
+ * (`RescheduleEngagementBreak`) only carries `startDate` + `endDate`.
44
+ *
45
+ * Uses `emitUpdateSuccess` (envelope `updated: ...`) because the
46
+ * reschedule modifies an existing record; neither `created` nor
47
+ * `removed` would carry the right semantics.
48
+ */
49
+ export interface EngagementsBreaksRescheduleOptions {
50
+ from: string;
51
+ to: string;
52
+ output: OutputFormat;
53
+ }
54
+ export declare function runEngagementsBreaksReschedule(breakId: string, opts: EngagementsBreaksRescheduleOptions): Promise<void>;
55
+ /**
56
+ * Action handler for `ttctl engagements breaks reasons list`. Lists
57
+ * the server-side catalog of valid `--reason-id` values for
58
+ * `breaks add` (issue #156).
59
+ *
60
+ * Reads `platformConfiguration.engagementBreakReasons` via a hand-
61
+ * authored `PlatformConfiguration` query (NOT in `codegen.config.ts`
62
+ * — see core service for the trigger note). Output goes through the
63
+ * v0.4 list envelope on json/yaml.
64
+ */
65
+ export declare function runEngagementsBreaksReasonsList(output: OutputFormat): Promise<void>;
66
+ /**
67
+ * Render the breaks-reasons catalog as a `cli-table3` table. Columns:
68
+ * id, label. Pure — directly unit-testable.
69
+ */
70
+ export declare function formatReasonsTable(items: engagements.EngagementBreakReason[], terminalWidth?: number): string;
71
+ /**
72
+ * Render the breaks list as a `cli-table3` table. Columns: id,
73
+ * starts, ends, comment.
74
+ */
75
+ export declare function formatBreaksTable(items: engagements.EngagementBreak[], terminalWidth?: number): string;
76
+ /**
77
+ * Render a single break as a multi-line key:value entity. Used inside
78
+ * the success-add envelope's `prettyEntity` slot.
79
+ */
80
+ export declare function formatBreakEntity(br: engagements.EngagementBreak): string;
81
+ //# sourceMappingURL=breaks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breaks.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/breaks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAW1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAqBxD;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAe9F;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC1G;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BrG;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,kCAAkC,GACvC,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED;;;;;;;;;GASG;AACH,wBAAsB,+BAA+B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAezF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,CAAC,qBAAqB,EAAE,EAC1C,aAAa,GAAE,MAAsC,GACpD,MAAM,CAmBR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,EACpC,aAAa,GAAE,MAAsC,GACpD,MAAM,CAkBR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,CAAC,eAAe,GAAG,MAAM,CASzE"}
@@ -0,0 +1,229 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import Table from "cli-table3";
4
+ import { engagements } from "@ttctl/core";
5
+ import { getCliDryRun } from "../../lib/dry-run.js";
6
+ import { emitAddSuccess, emitDryRunSuccess, emitRemoveSuccess, emitUpdateSuccess, wrapListEnvelope, } from "../../lib/envelopes.js";
7
+ import { emitResult } from "../../lib/output.js";
8
+ import { formatDate } from "./list.js";
9
+ import { handleEngagementsError, loadAuthTokenOrExit } from "./shared.js";
10
+ /**
11
+ * Notice text emitted on the dry-run envelope for `breaks.add`. The
12
+ * mutation's apply path resolves the underlying `engagement.id` via a
13
+ * separate `EngagementBreaks` query (one extra round-trip) before
14
+ * issuing `CreateEngagementBreak`. The dry-run path SKIPS that
15
+ * prefetch entirely (per the AC's "no GraphQL request is sent"
16
+ * requirement), so the preview's `variables.engagementId` carries the
17
+ * caller-supplied `jobActivityItemId` as a placeholder — the real
18
+ * `engagement.id` would be resolved at apply time.
19
+ *
20
+ * Surfaced as the `notice` field on the dry-run envelope so consumers
21
+ * (CLI users reading `pretty` output AND machine consumers parsing
22
+ * `json` / `yaml`) see the caveat without ambiguity.
23
+ */
24
+ const ADD_BREAK_DRY_RUN_NOTICE = "engagementId in the preview is a placeholder (the caller's jobActivityItem.id); the apply path resolves the real engagement.id via an EngagementBreaks query before issuing the mutation — this read is skipped on dry-run.";
25
+ /**
26
+ * Action handler for `ttctl engagements breaks list <id>`. Lists
27
+ * scheduled breaks on a single engagement (by `jobActivityItem.id` —
28
+ * matches the row id from `engagements list`).
29
+ *
30
+ * Reuses the captured `EngagementBreaks` operation. Returns the
31
+ * breaks array wrapped in the v0.4 list envelope.
32
+ */
33
+ export async function runEngagementsBreaksList(id, output) {
34
+ const token = await loadAuthTokenOrExit("engagements breaks list", output);
35
+ let items;
36
+ try {
37
+ items = await engagements.breaks.list(token, id);
38
+ }
39
+ catch (err) {
40
+ handleEngagementsError("engagements breaks list", err, output);
41
+ }
42
+ emitResult(wrapListEnvelope(items), output, {
43
+ pretty: (data) => formatBreaksTable(data.items),
44
+ table: (data) => formatBreaksTable(data.items),
45
+ empty: { command: "engagements.breaks.list" },
46
+ });
47
+ }
48
+ export async function runEngagementsBreaksAdd(id, opts) {
49
+ const token = await loadAuthTokenOrExit("engagements breaks add", opts.output);
50
+ const dryRun = getCliDryRun();
51
+ const addOpts = {
52
+ startDate: opts.from,
53
+ endDate: opts.to,
54
+ reasonIdentifier: opts.reasonId,
55
+ };
56
+ if (opts.comment !== undefined)
57
+ addOpts.comment = opts.comment;
58
+ let outcome;
59
+ try {
60
+ outcome = await engagements.breaks.add(token, id, addOpts, { dryRun });
61
+ }
62
+ catch (err) {
63
+ handleEngagementsError("engagements breaks add", err, opts.output);
64
+ }
65
+ if (outcome.kind === "preview") {
66
+ emitDryRunSuccess({
67
+ operation: "engagements.breaks.add",
68
+ format: opts.output,
69
+ preview: outcome.preview,
70
+ notice: ADD_BREAK_DRY_RUN_NOTICE,
71
+ });
72
+ return;
73
+ }
74
+ const { result: created } = outcome;
75
+ emitAddSuccess({
76
+ operation: "engagements.breaks.add",
77
+ format: opts.output,
78
+ created,
79
+ prettySummary: `engagement break ${created.id} (${formatDate(created.startDate)} → ${formatDate(created.endDate)})`,
80
+ prettyEntity: (br) => formatBreakEntity(br),
81
+ });
82
+ }
83
+ /**
84
+ * Action handler for `ttctl engagements breaks remove <break-id>`.
85
+ * Cancels a previously-scheduled break by `engagementBreak.id` (the
86
+ * id returned by `breaks list`).
87
+ *
88
+ * Returns the cancelled break id wrapped in the success-remove
89
+ * envelope.
90
+ */
91
+ export async function runEngagementsBreaksRemove(breakId, output) {
92
+ const token = await loadAuthTokenOrExit("engagements breaks remove", output);
93
+ const dryRun = getCliDryRun();
94
+ let outcome;
95
+ try {
96
+ outcome = await engagements.breaks.remove(token, breakId, { dryRun });
97
+ }
98
+ catch (err) {
99
+ handleEngagementsError("engagements breaks remove", err, output);
100
+ }
101
+ if (outcome.kind === "preview") {
102
+ emitDryRunSuccess({
103
+ operation: "engagements.breaks.remove",
104
+ format: output,
105
+ preview: outcome.preview,
106
+ });
107
+ return;
108
+ }
109
+ emitRemoveSuccess({
110
+ operation: "engagements.breaks.remove",
111
+ format: output,
112
+ id: breakId,
113
+ prettySummary: `engagement break ${breakId}`,
114
+ });
115
+ }
116
+ export async function runEngagementsBreaksReschedule(breakId, opts) {
117
+ const token = await loadAuthTokenOrExit("engagements breaks reschedule", opts.output);
118
+ const dryRun = getCliDryRun();
119
+ let outcome;
120
+ try {
121
+ outcome = await engagements.breaks.reschedule(token, breakId, { startDate: opts.from, endDate: opts.to }, { dryRun });
122
+ }
123
+ catch (err) {
124
+ handleEngagementsError("engagements breaks reschedule", err, opts.output);
125
+ }
126
+ if (outcome.kind === "preview") {
127
+ emitDryRunSuccess({
128
+ operation: "engagements.breaks.reschedule",
129
+ format: opts.output,
130
+ preview: outcome.preview,
131
+ });
132
+ return;
133
+ }
134
+ const { result: updated } = outcome;
135
+ emitUpdateSuccess({
136
+ operation: "engagements.breaks.reschedule",
137
+ format: opts.output,
138
+ updated,
139
+ prettySummary: `engagement break ${updated.id} (${formatDate(updated.startDate)} → ${formatDate(updated.endDate)})`,
140
+ prettyEntity: (br) => formatBreakEntity(br),
141
+ });
142
+ }
143
+ /**
144
+ * Action handler for `ttctl engagements breaks reasons list`. Lists
145
+ * the server-side catalog of valid `--reason-id` values for
146
+ * `breaks add` (issue #156).
147
+ *
148
+ * Reads `platformConfiguration.engagementBreakReasons` via a hand-
149
+ * authored `PlatformConfiguration` query (NOT in `codegen.config.ts`
150
+ * — see core service for the trigger note). Output goes through the
151
+ * v0.4 list envelope on json/yaml.
152
+ */
153
+ export async function runEngagementsBreaksReasonsList(output) {
154
+ const token = await loadAuthTokenOrExit("engagements breaks reasons list", output);
155
+ let items;
156
+ try {
157
+ items = await engagements.breaks.reasonsList(token);
158
+ }
159
+ catch (err) {
160
+ handleEngagementsError("engagements breaks reasons list", err, output);
161
+ }
162
+ emitResult(wrapListEnvelope(items), output, {
163
+ pretty: (data) => formatReasonsTable(data.items),
164
+ table: (data) => formatReasonsTable(data.items),
165
+ empty: { command: "engagements.breaks.reasons.list" },
166
+ });
167
+ }
168
+ /**
169
+ * Render the breaks-reasons catalog as a `cli-table3` table. Columns:
170
+ * id, label. Pure — directly unit-testable.
171
+ */
172
+ export function formatReasonsTable(items, terminalWidth = process.stdout.columns || 100) {
173
+ if (items.length === 0) {
174
+ const empty = new Table({ head: ["id", "label"] });
175
+ return empty.toString();
176
+ }
177
+ // Find longest identifier to size the id column; cap so the label
178
+ // column always has at least 20 visible columns to render.
179
+ const widestId = items.reduce((max, r) => Math.max(max, r.identifier.length), "id".length);
180
+ const idWidth = Math.min(Math.max(widestId + 2, 12), 40);
181
+ const labelWidth = Math.max(20, terminalWidth - idWidth - 8);
182
+ const table = new Table({
183
+ head: ["id", "label"],
184
+ colWidths: [idWidth, labelWidth],
185
+ wordWrap: true,
186
+ });
187
+ for (const r of items) {
188
+ table.push([r.identifier, r.nameForRole]);
189
+ }
190
+ return table.toString();
191
+ }
192
+ /**
193
+ * Render the breaks list as a `cli-table3` table. Columns: id,
194
+ * starts, ends, comment.
195
+ */
196
+ export function formatBreaksTable(items, terminalWidth = process.stdout.columns || 100) {
197
+ if (items.length === 0) {
198
+ const empty = new Table({ head: ["id", "starts", "ends", "comment"] });
199
+ return empty.toString();
200
+ }
201
+ const idWidth = 22;
202
+ const dateWidth = 12;
203
+ const remaining = Math.max(20, terminalWidth - idWidth - dateWidth - dateWidth - 12);
204
+ const commentWidth = Math.max(20, remaining);
205
+ const table = new Table({
206
+ head: ["id", "starts", "ends", "comment"],
207
+ colWidths: [idWidth, dateWidth, dateWidth, commentWidth],
208
+ wordWrap: true,
209
+ });
210
+ for (const br of items) {
211
+ table.push([br.id, formatDate(br.startDate), formatDate(br.endDate), br.comment ?? ""]);
212
+ }
213
+ return table.toString();
214
+ }
215
+ /**
216
+ * Render a single break as a multi-line key:value entity. Used inside
217
+ * the success-add envelope's `prettyEntity` slot.
218
+ */
219
+ export function formatBreakEntity(br) {
220
+ const lines = [];
221
+ lines.push(`Id: ${br.id}`);
222
+ lines.push(`Starts: ${formatDate(br.startDate)}`);
223
+ lines.push(`Ends: ${formatDate(br.endDate)}`);
224
+ if (br.comment != null && br.comment !== "") {
225
+ lines.push(`Comment: ${br.comment}`);
226
+ }
227
+ return lines.join("\n");
228
+ }
229
+ //# sourceMappingURL=breaks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breaks.js","sourceRoot":"","sources":["../../../src/commands/engagements/breaks.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OA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EAA+B;IAC/D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,WAAW,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClD,KAAK,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC9C,IAAI,EAAE,CAAC,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC,OAAO,KAAK,EAAE,EAAE,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { Command } from "commander";
2
+ /**
3
+ * Build the `ttctl engagements` command tree (#147, extended by #155).
4
+ * Seven leaves across the top-level group and one nested sub-group
5
+ * (`breaks`):
6
+ *
7
+ * | Leaf | Description |
8
+ * |---------------------------------------------------|------------------------------------------|
9
+ * | `list [--status active|past|all]` | List engagements (active by default) |
10
+ * | `show <id>` | Engagement detail |
11
+ * | `stats` | Per-engagement-status counts |
12
+ * | `breaks list <id>` | List breaks on an engagement |
13
+ * | `breaks add <id> --from <date> --to <date>` | Schedule a break |
14
+ * | `breaks remove <break-id>` | Cancel a break |
15
+ * | `breaks reschedule <break-id> --from <date> --to <date>` | Move an existing break to a new window |
16
+ *
17
+ * `<id>` is always the `jobActivityItem.id` (the row id from
18
+ * `engagements list`); `<break-id>` is the `engagementBreak.id` (from
19
+ * `breaks list`).
20
+ *
21
+ * **Out of scope for v1** (per #147 spec):
22
+ * - Engagement creation / acceptance / rejection (lives in
23
+ * `applications` group).
24
+ * - Allocated-hours management — moved to `availability` (#146)
25
+ * after the #147 scope amendment (2026-05-10), since the wire
26
+ * mutation operates on `viewerRole`, not per-engagement.
27
+ */
28
+ export declare function buildEngagementsCommand(): Command;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAgC,MAAM,WAAW,CAAC;AAkBlE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CA4KjD"}