@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.
Files changed (395) 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 +40 -0
  155. package/dist/commands/profile/certifications/index.d.ts.map +1 -0
  156. package/dist/commands/profile/certifications/index.js +350 -0
  157. package/dist/commands/profile/certifications/index.js.map +1 -0
  158. package/dist/commands/profile/education/index.d.ts +37 -0
  159. package/dist/commands/profile/education/index.d.ts.map +1 -0
  160. package/dist/commands/profile/education/index.js +331 -0
  161. package/dist/commands/profile/education/index.js.map +1 -0
  162. package/dist/commands/profile/employment/index.d.ts +49 -0
  163. package/dist/commands/profile/employment/index.d.ts.map +1 -0
  164. package/dist/commands/profile/employment/index.js +425 -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 +21 -0
  183. package/dist/commands/profile/external/index.d.ts.map +1 -0
  184. package/dist/commands/profile/external/index.js +113 -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/show.d.ts +22 -0
  195. package/dist/commands/profile/external/show.d.ts.map +1 -0
  196. package/dist/commands/profile/external/show.js +83 -0
  197. package/dist/commands/profile/external/show.js.map +1 -0
  198. package/dist/commands/profile/external/update.d.ts +37 -0
  199. package/dist/commands/profile/external/update.d.ts.map +1 -0
  200. package/dist/commands/profile/external/update.js +125 -0
  201. package/dist/commands/profile/external/update.js.map +1 -0
  202. package/dist/commands/profile/index.d.ts +16 -0
  203. package/dist/commands/profile/index.d.ts.map +1 -0
  204. package/dist/commands/profile/index.js +81 -0
  205. package/dist/commands/profile/index.js.map +1 -0
  206. package/dist/commands/profile/industries/index.d.ts +43 -0
  207. package/dist/commands/profile/industries/index.d.ts.map +1 -0
  208. package/dist/commands/profile/industries/index.js +258 -0
  209. package/dist/commands/profile/industries/index.js.map +1 -0
  210. package/dist/commands/profile/portfolio/add.d.ts +43 -0
  211. package/dist/commands/profile/portfolio/add.d.ts.map +1 -0
  212. package/dist/commands/profile/portfolio/add.js +181 -0
  213. package/dist/commands/profile/portfolio/add.js.map +1 -0
  214. package/dist/commands/profile/portfolio/highlight.d.ts +11 -0
  215. package/dist/commands/profile/portfolio/highlight.d.ts.map +1 -0
  216. package/dist/commands/profile/portfolio/highlight.js +31 -0
  217. package/dist/commands/profile/portfolio/highlight.js.map +1 -0
  218. package/dist/commands/profile/portfolio/index.d.ts +16 -0
  219. package/dist/commands/profile/portfolio/index.d.ts.map +1 -0
  220. package/dist/commands/profile/portfolio/index.js +121 -0
  221. package/dist/commands/profile/portfolio/index.js.map +1 -0
  222. package/dist/commands/profile/portfolio/list.d.ts +83 -0
  223. package/dist/commands/profile/portfolio/list.d.ts.map +1 -0
  224. package/dist/commands/profile/portfolio/list.js +189 -0
  225. package/dist/commands/profile/portfolio/list.js.map +1 -0
  226. package/dist/commands/profile/portfolio/remove.d.ts +9 -0
  227. package/dist/commands/profile/portfolio/remove.d.ts.map +1 -0
  228. package/dist/commands/profile/portfolio/remove.js +24 -0
  229. package/dist/commands/profile/portfolio/remove.js.map +1 -0
  230. package/dist/commands/profile/portfolio/reorder.d.ts +17 -0
  231. package/dist/commands/profile/portfolio/reorder.d.ts.map +1 -0
  232. package/dist/commands/profile/portfolio/reorder.js +135 -0
  233. package/dist/commands/profile/portfolio/reorder.js.map +1 -0
  234. package/dist/commands/profile/portfolio/shared.d.ts +8 -0
  235. package/dist/commands/profile/portfolio/shared.d.ts.map +1 -0
  236. package/dist/commands/profile/portfolio/shared.js +10 -0
  237. package/dist/commands/profile/portfolio/shared.js.map +1 -0
  238. package/dist/commands/profile/portfolio/update.d.ts +18 -0
  239. package/dist/commands/profile/portfolio/update.d.ts.map +1 -0
  240. package/dist/commands/profile/portfolio/update.js +77 -0
  241. package/dist/commands/profile/portfolio/update.js.map +1 -0
  242. package/dist/commands/profile/portfolio/upload.d.ts +8 -0
  243. package/dist/commands/profile/portfolio/upload.d.ts.map +1 -0
  244. package/dist/commands/profile/portfolio/upload.js +131 -0
  245. package/dist/commands/profile/portfolio/upload.js.map +1 -0
  246. package/dist/commands/profile/resume/cancel-upload.d.ts +9 -0
  247. package/dist/commands/profile/resume/cancel-upload.d.ts.map +1 -0
  248. package/dist/commands/profile/resume/cancel-upload.js +30 -0
  249. package/dist/commands/profile/resume/cancel-upload.js.map +1 -0
  250. package/dist/commands/profile/resume/index.d.ts +15 -0
  251. package/dist/commands/profile/resume/index.d.ts.map +1 -0
  252. package/dist/commands/profile/resume/index.js +42 -0
  253. package/dist/commands/profile/resume/index.js.map +1 -0
  254. package/dist/commands/profile/resume/upload.d.ts +16 -0
  255. package/dist/commands/profile/resume/upload.d.ts.map +1 -0
  256. package/dist/commands/profile/resume/upload.js +65 -0
  257. package/dist/commands/profile/resume/upload.js.map +1 -0
  258. package/dist/commands/profile/reviews/_shared.d.ts +9 -0
  259. package/dist/commands/profile/reviews/_shared.d.ts.map +1 -0
  260. package/dist/commands/profile/reviews/_shared.js +15 -0
  261. package/dist/commands/profile/reviews/_shared.js.map +1 -0
  262. package/dist/commands/profile/reviews/approve-item.d.ts +30 -0
  263. package/dist/commands/profile/reviews/approve-item.d.ts.map +1 -0
  264. package/dist/commands/profile/reviews/approve-item.js +82 -0
  265. package/dist/commands/profile/reviews/approve-item.js.map +1 -0
  266. package/dist/commands/profile/reviews/approve-section.d.ts +15 -0
  267. package/dist/commands/profile/reviews/approve-section.d.ts.map +1 -0
  268. package/dist/commands/profile/reviews/approve-section.js +67 -0
  269. package/dist/commands/profile/reviews/approve-section.js.map +1 -0
  270. package/dist/commands/profile/reviews/index.d.ts +19 -0
  271. package/dist/commands/profile/reviews/index.d.ts.map +1 -0
  272. package/dist/commands/profile/reviews/index.js +71 -0
  273. package/dist/commands/profile/reviews/index.js.map +1 -0
  274. package/dist/commands/profile/reviews/list.d.ts +17 -0
  275. package/dist/commands/profile/reviews/list.d.ts.map +1 -0
  276. package/dist/commands/profile/reviews/list.js +96 -0
  277. package/dist/commands/profile/reviews/list.js.map +1 -0
  278. package/dist/commands/profile/reviews/submit-for-review.d.ts +16 -0
  279. package/dist/commands/profile/reviews/submit-for-review.d.ts.map +1 -0
  280. package/dist/commands/profile/reviews/submit-for-review.js +65 -0
  281. package/dist/commands/profile/reviews/submit-for-review.js.map +1 -0
  282. package/dist/commands/profile/shared.d.ts +46 -0
  283. package/dist/commands/profile/shared.d.ts.map +1 -0
  284. package/dist/commands/profile/shared.js +111 -0
  285. package/dist/commands/profile/shared.js.map +1 -0
  286. package/dist/commands/profile/skills/index.d.ts +29 -0
  287. package/dist/commands/profile/skills/index.d.ts.map +1 -0
  288. package/dist/commands/profile/skills/index.js +475 -0
  289. package/dist/commands/profile/skills/index.js.map +1 -0
  290. package/dist/commands/profile/visas/add.d.ts +19 -0
  291. package/dist/commands/profile/visas/add.d.ts.map +1 -0
  292. package/dist/commands/profile/visas/add.js +37 -0
  293. package/dist/commands/profile/visas/add.js.map +1 -0
  294. package/dist/commands/profile/visas/index.d.ts +13 -0
  295. package/dist/commands/profile/visas/index.d.ts.map +1 -0
  296. package/dist/commands/profile/visas/index.js +69 -0
  297. package/dist/commands/profile/visas/index.js.map +1 -0
  298. package/dist/commands/profile/visas/list.d.ts +40 -0
  299. package/dist/commands/profile/visas/list.d.ts.map +1 -0
  300. package/dist/commands/profile/visas/list.js +115 -0
  301. package/dist/commands/profile/visas/list.js.map +1 -0
  302. package/dist/commands/profile/visas/remove.d.ts +8 -0
  303. package/dist/commands/profile/visas/remove.d.ts.map +1 -0
  304. package/dist/commands/profile/visas/remove.js +23 -0
  305. package/dist/commands/profile/visas/remove.js.map +1 -0
  306. package/dist/commands/profile/visas/shared.d.ts +11 -0
  307. package/dist/commands/profile/visas/shared.d.ts.map +1 -0
  308. package/dist/commands/profile/visas/shared.js +16 -0
  309. package/dist/commands/profile/visas/shared.js.map +1 -0
  310. package/dist/commands/profile/visas/update.d.ts +13 -0
  311. package/dist/commands/profile/visas/update.d.ts.map +1 -0
  312. package/dist/commands/profile/visas/update.js +44 -0
  313. package/dist/commands/profile/visas/update.js.map +1 -0
  314. package/dist/commands/timesheet/index.d.ts +24 -0
  315. package/dist/commands/timesheet/index.d.ts.map +1 -0
  316. package/dist/commands/timesheet/index.js +98 -0
  317. package/dist/commands/timesheet/index.js.map +1 -0
  318. package/dist/commands/timesheet/list.d.ts +40 -0
  319. package/dist/commands/timesheet/list.d.ts.map +1 -0
  320. package/dist/commands/timesheet/list.js +79 -0
  321. package/dist/commands/timesheet/list.js.map +1 -0
  322. package/dist/commands/timesheet/shared.d.ts +10 -0
  323. package/dist/commands/timesheet/shared.d.ts.map +1 -0
  324. package/dist/commands/timesheet/shared.js +35 -0
  325. package/dist/commands/timesheet/shared.js.map +1 -0
  326. package/dist/commands/timesheet/show.d.ts +19 -0
  327. package/dist/commands/timesheet/show.d.ts.map +1 -0
  328. package/dist/commands/timesheet/show.js +109 -0
  329. package/dist/commands/timesheet/show.js.map +1 -0
  330. package/dist/commands/timesheet/submit.d.ts +50 -0
  331. package/dist/commands/timesheet/submit.d.ts.map +1 -0
  332. package/dist/commands/timesheet/submit.js +151 -0
  333. package/dist/commands/timesheet/submit.js.map +1 -0
  334. package/dist/crash-handlers.d.ts +67 -0
  335. package/dist/crash-handlers.d.ts.map +1 -0
  336. package/dist/crash-handlers.js +78 -0
  337. package/dist/crash-handlers.js.map +1 -0
  338. package/dist/errors.d.ts +45 -0
  339. package/dist/errors.d.ts.map +1 -0
  340. package/dist/errors.js +57 -0
  341. package/dist/errors.js.map +1 -0
  342. package/dist/index.d.ts +8 -0
  343. package/dist/index.d.ts.map +1 -0
  344. package/dist/index.js +15 -0
  345. package/dist/index.js.map +1 -0
  346. package/dist/lib/config-context.d.ts +41 -0
  347. package/dist/lib/config-context.d.ts.map +1 -0
  348. package/dist/lib/config-context.js +74 -0
  349. package/dist/lib/config-context.js.map +1 -0
  350. package/dist/lib/dry-run.d.ts +70 -0
  351. package/dist/lib/dry-run.d.ts.map +1 -0
  352. package/dist/lib/dry-run.js +114 -0
  353. package/dist/lib/dry-run.js.map +1 -0
  354. package/dist/lib/empty-state-cta.d.ts +63 -0
  355. package/dist/lib/empty-state-cta.d.ts.map +1 -0
  356. package/dist/lib/empty-state-cta.js +88 -0
  357. package/dist/lib/empty-state-cta.js.map +1 -0
  358. package/dist/lib/envelopes.d.ts +540 -0
  359. package/dist/lib/envelopes.d.ts.map +1 -0
  360. package/dist/lib/envelopes.js +598 -0
  361. package/dist/lib/envelopes.js.map +1 -0
  362. package/dist/lib/error-routing.d.ts +49 -0
  363. package/dist/lib/error-routing.d.ts.map +1 -0
  364. package/dist/lib/error-routing.js +72 -0
  365. package/dist/lib/error-routing.js.map +1 -0
  366. package/dist/lib/format-helpers.d.ts +65 -0
  367. package/dist/lib/format-helpers.d.ts.map +1 -0
  368. package/dist/lib/format-helpers.js +79 -0
  369. package/dist/lib/format-helpers.js.map +1 -0
  370. package/dist/lib/format-overrides.d.ts +81 -0
  371. package/dist/lib/format-overrides.d.ts.map +1 -0
  372. package/dist/lib/format-overrides.js +55 -0
  373. package/dist/lib/format-overrides.js.map +1 -0
  374. package/dist/lib/freetext.d.ts +83 -0
  375. package/dist/lib/freetext.d.ts.map +1 -0
  376. package/dist/lib/freetext.js +182 -0
  377. package/dist/lib/freetext.js.map +1 -0
  378. package/dist/lib/kill-switch-hook.d.ts +49 -0
  379. package/dist/lib/kill-switch-hook.d.ts.map +1 -0
  380. package/dist/lib/kill-switch-hook.js +34 -0
  381. package/dist/lib/kill-switch-hook.js.map +1 -0
  382. package/dist/lib/output.d.ts +173 -0
  383. package/dist/lib/output.d.ts.map +1 -0
  384. package/dist/lib/output.js +177 -0
  385. package/dist/lib/output.js.map +1 -0
  386. package/dist/lib/pagination.d.ts +49 -0
  387. package/dist/lib/pagination.d.ts.map +1 -0
  388. package/dist/lib/pagination.js +36 -0
  389. package/dist/lib/pagination.js.map +1 -0
  390. package/dist/program.d.ts +80 -0
  391. package/dist/program.d.ts.map +1 -0
  392. package/dist/program.js +273 -0
  393. package/dist/program.js.map +1 -0
  394. package/package.json +35 -13
  395. package/index.js +0 -7
@@ -0,0 +1,172 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { Command, InvalidArgumentError, Option } from "commander";
4
+ import { engagements } from "@ttctl/core";
5
+ import { markMutation } from "../../lib/dry-run.js";
6
+ import { OUTPUT_FORMATS } from "../../lib/output.js";
7
+ import { runEngagementsBreaksAdd, runEngagementsBreaksList, runEngagementsBreaksRemove, runEngagementsBreaksReschedule, runEngagementsBreaksReasonsList, } from "./breaks.js";
8
+ import { runEngagementsList } from "./list.js";
9
+ import { runEngagementsShow } from "./show.js";
10
+ import { runEngagementsStats } from "./stats.js";
11
+ /**
12
+ * Build the `ttctl engagements` command tree (#147, extended by #155).
13
+ * Seven leaves across the top-level group and one nested sub-group
14
+ * (`breaks`):
15
+ *
16
+ * | Leaf | Description |
17
+ * |---------------------------------------------------|------------------------------------------|
18
+ * | `list [--status active|past|all]` | List engagements (active by default) |
19
+ * | `show <id>` | Engagement detail |
20
+ * | `stats` | Per-engagement-status counts |
21
+ * | `breaks list <id>` | List breaks on an engagement |
22
+ * | `breaks add <id> --from <date> --to <date>` | Schedule a break |
23
+ * | `breaks remove <break-id>` | Cancel a break |
24
+ * | `breaks reschedule <break-id> --from <date> --to <date>` | Move an existing break to a new window |
25
+ *
26
+ * `<id>` is always the `jobActivityItem.id` (the row id from
27
+ * `engagements list`); `<break-id>` is the `engagementBreak.id` (from
28
+ * `breaks list`).
29
+ *
30
+ * **Out of scope for v1** (per #147 spec):
31
+ * - Engagement creation / acceptance / rejection (lives in
32
+ * `applications` group).
33
+ * - Allocated-hours management — moved to `availability` (#146)
34
+ * after the #147 scope amendment (2026-05-10), since the wire
35
+ * mutation operates on `viewerRole`, not per-engagement.
36
+ */
37
+ export function buildEngagementsCommand() {
38
+ const cmd = new Command("engagements").description("View current and past engagements; manage engagement breaks");
39
+ cmd
40
+ .command("list")
41
+ .description("List engagements (active by default)")
42
+ .addOption(new Option("--status <status>", "filter by engagement status")
43
+ .choices([...engagements.ENGAGEMENT_LIST_STATUSES])
44
+ .default("active"))
45
+ .option("--keywords <keyword...>", "free-text keyword filter (repeatable; AND across keywords)")
46
+ .addOption(new Option("-o, --output <format>", "output format")
47
+ .choices(OUTPUT_FORMATS)
48
+ .default("pretty"))
49
+ .action(async (options) => {
50
+ const listOpts = {
51
+ status: options.status,
52
+ output: options.output,
53
+ };
54
+ if (options.keywords !== undefined)
55
+ listOpts.keywords = options.keywords;
56
+ await runEngagementsList(listOpts);
57
+ });
58
+ cmd
59
+ .command("show")
60
+ .description("Show one engagement by id (jobActivityItem.id)")
61
+ .argument("<id>", "engagement id (the row id from `engagements list`)", parseIdArg)
62
+ .addOption(new Option("-o, --output <format>", "output format")
63
+ .choices(OUTPUT_FORMATS)
64
+ .default("pretty"))
65
+ .action(async (id, options) => {
66
+ await runEngagementsShow(id, options.output);
67
+ });
68
+ cmd
69
+ .command("stats")
70
+ .description("Per-engagement-status counts (issues 2 server calls in parallel)")
71
+ .addOption(new Option("-o, --output <format>", "output format")
72
+ .choices(OUTPUT_FORMATS)
73
+ .default("pretty"))
74
+ .action(async (options) => {
75
+ await runEngagementsStats(options.output);
76
+ });
77
+ // ----- Breaks sub-group ------------------------------------------------
78
+ const breaks = cmd.command("breaks").description("Manage engagement breaks (scheduled time-off windows)");
79
+ breaks
80
+ .command("list")
81
+ .description("List breaks on an engagement")
82
+ .argument("<id>", "engagement id (the row id from `engagements list`)", parseIdArg)
83
+ .addOption(new Option("-o, --output <format>", "output format")
84
+ .choices(OUTPUT_FORMATS)
85
+ .default("pretty"))
86
+ .action(async (id, options) => {
87
+ await runEngagementsBreaksList(id, options.output);
88
+ });
89
+ // Marked as a mutation (issue #163) so the global `--dry-run` flag
90
+ // routes through to `engagements.breaks.add()`'s `dryRun` option.
91
+ markMutation(breaks
92
+ .command("add")
93
+ .description("Schedule a new break on an engagement")
94
+ .argument("<id>", "engagement id (the row id from `engagements list`)", parseIdArg)
95
+ .requiredOption("--from <date>", "start date (YYYY-MM-DD)")
96
+ .requiredOption("--to <date>", "end date (YYYY-MM-DD)")
97
+ .requiredOption("--reason-id <id>", "server-side reason identifier (run `ttctl engagements breaks reasons list` for the live catalog; examples: `talent_on_vacation`, `client_needs_preparation`, `client_on_vacation`, `other`)")
98
+ .option("--comment <text>", "optional free-text comment")
99
+ .addOption(new Option("-o, --output <format>", "output format")
100
+ .choices(OUTPUT_FORMATS)
101
+ .default("pretty"))
102
+ .action(async (id, options) => {
103
+ const addOpts = {
104
+ from: options.from,
105
+ to: options.to,
106
+ reasonId: options.reasonId,
107
+ output: options.output,
108
+ };
109
+ if (options.comment !== undefined)
110
+ addOpts.comment = options.comment;
111
+ await runEngagementsBreaksAdd(id, addOpts);
112
+ }));
113
+ // Marked as a mutation (issue #163) so the global `--dry-run` flag
114
+ // routes through to `engagements.breaks.remove()`'s `dryRun` option.
115
+ markMutation(breaks
116
+ .command("remove")
117
+ .description("Cancel a scheduled break by id")
118
+ .argument("<break-id>", "engagementBreak id (from `breaks list`)", parseIdArg)
119
+ .addOption(new Option("-o, --output <format>", "output format")
120
+ .choices(OUTPUT_FORMATS)
121
+ .default("pretty"))
122
+ .action(async (breakId, options) => {
123
+ await runEngagementsBreaksRemove(breakId, options.output);
124
+ }));
125
+ // Marked as a mutation (#155 inherits the #163 dry-run wiring) so the
126
+ // global `--dry-run` flag routes through to
127
+ // `engagements.breaks.reschedule()`'s `dryRun` option.
128
+ markMutation(breaks
129
+ .command("reschedule")
130
+ .description("Move an existing break to a new date window (in-place; preserves reason and comment)")
131
+ .argument("<break-id>", "engagementBreak id (from `breaks list`)", parseIdArg)
132
+ .requiredOption("--from <date>", "new start date (YYYY-MM-DD)")
133
+ .requiredOption("--to <date>", "new end date (YYYY-MM-DD)")
134
+ .addOption(new Option("-o, --output <format>", "output format")
135
+ .choices(OUTPUT_FORMATS)
136
+ .default("pretty"))
137
+ .action(async (breakId, options) => {
138
+ await runEngagementsBreaksReschedule(breakId, {
139
+ from: options.from,
140
+ to: options.to,
141
+ output: options.output,
142
+ });
143
+ }));
144
+ // ----- Reasons sub-group (issue #156) ----------------------------------
145
+ // Discovery surface for valid `--reason-id` values. Only read-only,
146
+ // so no mutation marking needed.
147
+ const reasons = breaks
148
+ .command("reasons")
149
+ .description("Discovery: list the valid `--reason-id` values for `breaks add`");
150
+ reasons
151
+ .command("list")
152
+ .description("List the server-side catalog of valid `breaks add --reason-id` values, sorted by id")
153
+ .addOption(new Option("-o, --output <format>", "output format")
154
+ .choices(OUTPUT_FORMATS)
155
+ .default("pretty"))
156
+ .action(async (options) => {
157
+ await runEngagementsBreaksReasonsList(options.output);
158
+ });
159
+ return cmd;
160
+ }
161
+ /**
162
+ * Reject empty or whitespace-only id arguments at parse time. Mirrors
163
+ * the applications group's `parseIdArg`.
164
+ */
165
+ function parseIdArg(value) {
166
+ const trimmed = value.trim();
167
+ if (trimmed.length === 0) {
168
+ throw new InvalidArgumentError("id must not be empty");
169
+ }
170
+ return trimmed;
171
+ }
172
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/engagements/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,6DAA6D,CAAC,CAAC;IAEl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AC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,QAA+B,CAAC,CAC5C;SACA,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,OAA2D,EAAE,EAAE;QAC7F,MAAM,8BAA8B,CAAC,OAAO,EAAE;YAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAC;IACL,CAAC,CAAC,CACL,CAAC;IAEF,0EAA0E;IAC1E,oEAAoE;IACpE,iCAAiC;IACjC,MAAM,OAAO,GAAG,MAAM;SACnB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,iEAAiE,CAAC,CAAC;IAElF,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,qFAAqF,CAAC;SAClG,SAAS,CACR,IAAI,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,QAA+B,CAAC,CAC5C;SACA,MAAM,CAAC,KAAK,EAAE,OAAiC,EAAE,EAAE;QAClD,MAAM,+BAA+B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,KAAa;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { engagements } from "@ttctl/core";
2
+ import type { OutputFormat } from "../../lib/output.js";
3
+ /**
4
+ * Action handler for `ttctl engagements list`. Lists the user's
5
+ * engagements (active by default), filtered to the engagement-bearing
6
+ * status groups.
7
+ *
8
+ * Filters: `--status active|past|all` (default `active`) and
9
+ * `--keywords` (free-text, repeatable; passed through to the gateway).
10
+ *
11
+ * **Pagination not supported** — the captured `JobActivityItems`
12
+ * operation has no `page` / `pageSize` args. Per #183, pagination
13
+ * flags are declared PER paginating leaf; this leaf does not declare
14
+ * `--page` / `--per-page`, so Commander emits its standard
15
+ * `error: unknown option '--page'` (exit 1) when a user passes
16
+ * either flag. If the wire ever gains pagination args, declare the
17
+ * flags on this leaf and extend `engagements.list()` to accept
18
+ * `{page?, perPage?}`.
19
+ */
20
+ export interface EngagementsListOptions {
21
+ status?: engagements.EngagementListStatus;
22
+ keywords?: string[];
23
+ output: OutputFormat;
24
+ }
25
+ export declare function runEngagementsList(opts: EngagementsListOptions): Promise<void>;
26
+ /**
27
+ * Render the engagements list as a `cli-table3` table sized to the
28
+ * current terminal width. Columns: id, status, client, job title,
29
+ * starts, hours.
30
+ *
31
+ * `client` and `job title` together carry the engagement identity for
32
+ * the human reader; `starts` (engagement start date) and `hours`
33
+ * (expected hours per week) are the most diagnostic fields for
34
+ * day-to-day use.
35
+ */
36
+ export declare function formatEngagementsTable(items: engagements.EngagementListItem[], terminalWidth?: number): string;
37
+ /**
38
+ * Shorten the engagement-bearing status group for column display.
39
+ * Other status groups (which the engagements service shouldn't return,
40
+ * but defend against) fall through with the full enum value.
41
+ */
42
+ export declare function shortenEngagementStatus(value: string): string;
43
+ /**
44
+ * Render an ISO 8601 timestamp or `Date` string as just the date
45
+ * portion (YYYY-MM-DD) for table compactness. Returns `"—"` for
46
+ * `null` and the input as-is when it doesn't parse.
47
+ */
48
+ export declare function formatDate(value: string | null): string;
49
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBpF;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,WAAW,CAAC,kBAAkB,EAAE,EACvC,aAAa,GAAE,MAAsC,GACpD,MAAM,CA8BR;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAS7D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAIvD"}
@@ -0,0 +1,95 @@
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 { wrapListEnvelope } from "../../lib/envelopes.js";
6
+ import { emitResult } from "../../lib/output.js";
7
+ import { handleEngagementsError, loadAuthTokenOrExit } from "./shared.js";
8
+ export async function runEngagementsList(opts) {
9
+ const token = await loadAuthTokenOrExit("engagements list", opts.output);
10
+ const listOpts = {};
11
+ if (opts.status !== undefined)
12
+ listOpts.status = opts.status;
13
+ if (opts.keywords !== undefined)
14
+ listOpts.keywords = opts.keywords;
15
+ let items;
16
+ try {
17
+ items = await engagements.list(token, listOpts);
18
+ }
19
+ catch (err) {
20
+ handleEngagementsError("engagements list", err, opts.output);
21
+ }
22
+ emitResult(wrapListEnvelope(items), opts.output, {
23
+ pretty: (data) => formatEngagementsTable(data.items),
24
+ table: (data) => formatEngagementsTable(data.items),
25
+ empty: { command: "engagements.list" },
26
+ });
27
+ }
28
+ /**
29
+ * Render the engagements list as a `cli-table3` table sized to the
30
+ * current terminal width. Columns: id, status, client, job title,
31
+ * starts, hours.
32
+ *
33
+ * `client` and `job title` together carry the engagement identity for
34
+ * the human reader; `starts` (engagement start date) and `hours`
35
+ * (expected hours per week) are the most diagnostic fields for
36
+ * day-to-day use.
37
+ */
38
+ export function formatEngagementsTable(items, terminalWidth = process.stdout.columns || 100) {
39
+ if (items.length === 0) {
40
+ const empty = new Table({ head: ["id", "status", "client", "job", "starts", "hours"] });
41
+ return empty.toString();
42
+ }
43
+ const idWidth = 22;
44
+ const statusWidth = 12;
45
+ const clientWidth = 18;
46
+ const startsWidth = 12;
47
+ const hoursWidth = 7;
48
+ // 6 columns × 2 padding-char + 7 borders ≈ 19
49
+ const remaining = Math.max(20, terminalWidth - idWidth - statusWidth - clientWidth - startsWidth - hoursWidth - 19);
50
+ const titleWidth = Math.max(20, remaining);
51
+ const table = new Table({
52
+ head: ["id", "status", "client", "job", "starts", "hours"],
53
+ colWidths: [idWidth, statusWidth, clientWidth, titleWidth, startsWidth, hoursWidth],
54
+ colAligns: ["left", "left", "left", "left", "left", "right"],
55
+ wordWrap: true,
56
+ });
57
+ for (const it of items) {
58
+ table.push([
59
+ it.id,
60
+ shortenEngagementStatus(it.statusGroupV2.value),
61
+ it.job.client?.fullName ?? "(no client)",
62
+ it.job.title ?? "(untitled)",
63
+ formatDate(it.startDate),
64
+ it.expectedHours !== null ? it.expectedHours.toString() : "—",
65
+ ]);
66
+ }
67
+ return table.toString();
68
+ }
69
+ /**
70
+ * Shorten the engagement-bearing status group for column display.
71
+ * Other status groups (which the engagements service shouldn't return,
72
+ * but defend against) fall through with the full enum value.
73
+ */
74
+ export function shortenEngagementStatus(value) {
75
+ switch (value) {
76
+ case "ACTIVE_ENGAGEMENT":
77
+ return "Active";
78
+ case "CLOSED_ENGAGEMENT":
79
+ return "Closed";
80
+ default:
81
+ return value;
82
+ }
83
+ }
84
+ /**
85
+ * Render an ISO 8601 timestamp or `Date` string as just the date
86
+ * portion (YYYY-MM-DD) for table compactness. Returns `"—"` for
87
+ * `null` and the input as-is when it doesn't parse.
88
+ */
89
+ export function formatDate(value) {
90
+ if (value === null || value === "")
91
+ return "—";
92
+ const m = /^(\d{4}-\d{2}-\d{2})/.exec(value);
93
+ return m?.[1] ?? value;
94
+ }
95
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/engagements/list.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,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAyB1E,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAA4B;IACnE,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,kBAAkB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;QAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7D,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;QAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEnE,IAAI,KAAuC,CAAC;IAC5C,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,sBAAsB,CAAC,kBA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C,GAAG,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;AACzB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { OutputFormat } from "../../lib/output.js";
2
+ export { loadAuthTokenOrExit } from "../profile/shared.js";
3
+ /**
4
+ * Thin wrapper around the shared CLI error router (#330) closed over
5
+ * `engagements.EngagementsError` and {@link hintForEngagementsCode}.
6
+ * The router applies the envelope ABI (#128) branching uniformly across
7
+ * sub-domains.
8
+ */
9
+ export declare function handleEngagementsError(commandLabel: string, err: unknown, format?: OutputFormat): never;
10
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/shared.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,YAAuB,GAAG,KAAK,CAEjH"}
@@ -0,0 +1,31 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { engagements } from "@ttctl/core";
4
+ import { handleDomainError } from "../../lib/error-routing.js";
5
+ export { loadAuthTokenOrExit } from "../profile/shared.js";
6
+ /**
7
+ * Thin wrapper around the shared CLI error router (#330) closed over
8
+ * `engagements.EngagementsError` and {@link hintForEngagementsCode}.
9
+ * The router applies the envelope ABI (#128) branching uniformly across
10
+ * sub-domains.
11
+ */
12
+ export function handleEngagementsError(commandLabel, err, format = "pretty") {
13
+ handleDomainError(commandLabel, err, engagements.EngagementsError, format, hintForEngagementsCode);
14
+ }
15
+ /**
16
+ * Per-code recovery hints. Not every code carries one — only the ones
17
+ * where a concrete next step is clearly actionable for the user.
18
+ */
19
+ function hintForEngagementsCode(code) {
20
+ switch (code) {
21
+ case "NOT_FOUND":
22
+ return "Verify the engagement id (use `ttctl engagements list` to discover it).";
23
+ case "NO_ENGAGEMENT":
24
+ return "This activity item is not an engagement (likely an application or interview). Use `ttctl applications show` instead.";
25
+ case "MUTATION_ERROR":
26
+ return "The mutation was rejected by the server (often: overlapping break dates or validation). Check the message above.";
27
+ default:
28
+ return undefined;
29
+ }
30
+ }
31
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/commands/engagements/shared.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,YAAoB,EAAE,GAAY,EAAE,SAAuB,QAAQ;IACxG,iBAAiB,CAAC,YAAY,EAAE,GAAG,EAAE,WAAW,CAAC,gBAAgB,EAAE,MAAM,EAAE,sBAAsB,CAAC,CAAC;AACrG,CAAC;AAED;;;GAGG;AACH,SAAS,sBAAsB,CAAC,IAAsC;IACpE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW;YACd,OAAO,yEAAyE,CAAC;QACnF,KAAK,eAAe;YAClB,OAAO,sHAAsH,CAAC;QAChI,KAAK,gBAAgB;YACnB,OAAO,kHAAkH,CAAC;QAC5H;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { engagements } from "@ttctl/core";
2
+ import type { OutputFormat } from "../../lib/output.js";
3
+ /**
4
+ * Action handler for `ttctl engagements show <id>`. Reads a single
5
+ * engagement detail by `jobActivityItem.id` (the row id from
6
+ * `engagements list`).
7
+ *
8
+ * Pretty rendering is a multi-line key:value layout grouped into
9
+ * sections (Status, Client/Job, Engagement, Agreement, Earnings,
10
+ * Breaks). Sections with no data are omitted. `json` / `yaml` always
11
+ * emit the full server payload.
12
+ */
13
+ export declare function runEngagementsShow(id: string, output: OutputFormat): Promise<void>;
14
+ /**
15
+ * Render the engagement detail as a sectioned multi-line block. Pure —
16
+ * directly unit-testable.
17
+ */
18
+ export declare function formatEngagementDetail(item: engagements.EngagementDetail): string;
19
+ //# sourceMappingURL=show.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/show.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAaxD;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAaxF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,CAAC,gBAAgB,GAAG,MAAM,CAyGjF"}
@@ -0,0 +1,150 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { engagements } from "@ttctl/core";
4
+ import { emitResult } from "../../lib/output.js";
5
+ import { formatDate } from "./list.js";
6
+ import { handleEngagementsError, loadAuthTokenOrExit } from "./shared.js";
7
+ /**
8
+ * Toptal's mobile-gateway `Money` type carries only `decimal` + `verbose`
9
+ * — no currency code. Empirically Toptal pays talents in USD across the
10
+ * platform, so the pretty formatter labels the earning with this
11
+ * hardcoded default. JSON / YAML output remains the raw `{decimal}`
12
+ * shape — currency is a presentation-only assumption, not a wire field.
13
+ */
14
+ const DEFAULT_CURRENCY = "USD";
15
+ /**
16
+ * Action handler for `ttctl engagements show <id>`. Reads a single
17
+ * engagement detail by `jobActivityItem.id` (the row id from
18
+ * `engagements list`).
19
+ *
20
+ * Pretty rendering is a multi-line key:value layout grouped into
21
+ * sections (Status, Client/Job, Engagement, Agreement, Earnings,
22
+ * Breaks). Sections with no data are omitted. `json` / `yaml` always
23
+ * emit the full server payload.
24
+ */
25
+ export async function runEngagementsShow(id, output) {
26
+ const token = await loadAuthTokenOrExit("engagements show", output);
27
+ let item;
28
+ try {
29
+ item = await engagements.show(token, id);
30
+ }
31
+ catch (err) {
32
+ handleEngagementsError("engagements show", err, output);
33
+ }
34
+ emitResult(item, output, {
35
+ pretty: (data) => formatEngagementDetail(data),
36
+ });
37
+ }
38
+ /**
39
+ * Render the engagement detail as a sectioned multi-line block. Pure —
40
+ * directly unit-testable.
41
+ */
42
+ export function formatEngagementDetail(item) {
43
+ const lines = [];
44
+ lines.push(`Engagement ${item.id}`);
45
+ if (item.engagementId !== null) {
46
+ lines.push(` Engagement-ID: ${item.engagementId}`);
47
+ }
48
+ lines.push(` Status: ${item.statusV2.verbose} (${item.statusV2.value})`);
49
+ lines.push(` Group: ${item.statusGroupV2.verbose} (${item.statusGroupV2.value})`);
50
+ lines.push(` Updated: ${item.lastUpdatedAt}`);
51
+ lines.push("");
52
+ lines.push("Job");
53
+ if (item.job.title !== null)
54
+ lines.push(` ${item.job.title}`);
55
+ if (item.job.url !== null)
56
+ lines.push(` ${item.job.url}`);
57
+ if (item.job.client?.fullName != null) {
58
+ lines.push(` Client: ${item.job.client.fullName}`);
59
+ }
60
+ if (item.job.commitment?.slug != null) {
61
+ lines.push(` Commitment: ${item.job.commitment.slug}`);
62
+ }
63
+ if (item.job.workType?.slug != null) {
64
+ lines.push(` Work type: ${item.job.workType.slug}`);
65
+ }
66
+ if (item.job.specialization?.title != null) {
67
+ lines.push(` Specialization: ${item.job.specialization.title}`);
68
+ }
69
+ if (item.job.expectedHours !== null) {
70
+ lines.push(` Hours: ${item.job.expectedHours.toString()}`);
71
+ }
72
+ if (item.job.startDate !== null) {
73
+ lines.push(` Starts: ${item.job.startDate}`);
74
+ }
75
+ if (item.job.isCoaching === true) {
76
+ lines.push(` Type: coaching`);
77
+ }
78
+ if (item.job.isToptalProject === true) {
79
+ lines.push(` Type: toptal-project`);
80
+ }
81
+ if (item.job.descriptionMd !== null && item.job.descriptionMd !== "") {
82
+ lines.push(` Description:`);
83
+ for (const para of item.job.descriptionMd.split(/\n+/)) {
84
+ if (para.trim().length > 0)
85
+ lines.push(` ${para}`);
86
+ }
87
+ }
88
+ lines.push("");
89
+ lines.push("Engagement");
90
+ if (item.startDate !== null)
91
+ lines.push(` Started: ${item.startDate}`);
92
+ if (item.endDate !== null)
93
+ lines.push(` Ended: ${item.endDate}`);
94
+ if (item.commitment?.slug != null)
95
+ lines.push(` Commitment: ${item.commitment.slug}`);
96
+ if (item.expectedHours !== null)
97
+ lines.push(` Hours/week: ${item.expectedHours.toString()}`);
98
+ if (item.billCycle?.verbose != null)
99
+ lines.push(` Bill cycle: ${item.billCycle.verbose}`);
100
+ if (item.eligibleForPayment !== null)
101
+ lines.push(` Eligible for payment: ${String(item.eligibleForPayment)}`);
102
+ if (item.eligibleToViewTimesheets !== null) {
103
+ lines.push(` Timesheets enabled: ${String(item.eligibleToViewTimesheets)}`);
104
+ }
105
+ if (item.eligibleToViewTimeOffs !== null) {
106
+ lines.push(` Time-offs enabled: ${String(item.eligibleToViewTimeOffs)}`);
107
+ }
108
+ if (item.proposedEnd?.endDate != null) {
109
+ lines.push(` Proposed end: ${item.proposedEnd.endDate} (${item.proposedEnd.status ?? "—"})`);
110
+ }
111
+ if (item.currentAgreement !== null) {
112
+ lines.push("");
113
+ lines.push("Agreement");
114
+ if (item.currentAgreement.applicationRate !== null) {
115
+ lines.push(` Application rate: ${item.currentAgreement.applicationRate}`);
116
+ }
117
+ if (item.currentAgreement.talentHourlyRate !== null) {
118
+ lines.push(` Hourly rate: ${item.currentAgreement.talentHourlyRate}`);
119
+ }
120
+ if (item.currentAgreement.talentRate !== null) {
121
+ lines.push(` Talent rate: ${item.currentAgreement.talentRate}`);
122
+ }
123
+ if (item.currentAgreement.marketplaceMargin !== null) {
124
+ lines.push(` Marketplace margin: ${item.currentAgreement.marketplaceMargin}`);
125
+ }
126
+ if (item.currentAgreement.timePeriod !== null) {
127
+ lines.push(` Time period: ${item.currentAgreement.timePeriod}`);
128
+ }
129
+ if (item.currentAgreement.commitment?.slug != null) {
130
+ lines.push(` Commitment: ${item.currentAgreement.commitment.slug}`);
131
+ }
132
+ }
133
+ if (item.earning?.paid != null) {
134
+ lines.push("");
135
+ lines.push("Earnings");
136
+ const decimal = item.earning.paid.decimal;
137
+ lines.push(` Paid: ${decimal} ${DEFAULT_CURRENCY}`);
138
+ }
139
+ if (item.breaks.length > 0) {
140
+ lines.push("");
141
+ lines.push(`Breaks (${item.breaks.length.toString()})`);
142
+ for (const br of item.breaks) {
143
+ const range = `${formatDate(br.startDate)} → ${formatDate(br.endDate)}`;
144
+ const comment = br.comment != null && br.comment !== "" ? ` — ${br.comment}` : "";
145
+ lines.push(` ${br.id}: ${range}${comment}`);
146
+ }
147
+ }
148
+ return lines.join("\n");
149
+ }
150
+ //# sourceMappingURL=show.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show.js","sourceRoot":"","sources":["../../../src/commands/engagements/show.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EAAU,EAAE,MAAoB;I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,CAAC;IACvD,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACxD,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAG,GAAG,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;YACxE,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClF,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { engagements } from "@ttctl/core";
2
+ import type { OutputFormat } from "../../lib/output.js";
3
+ /**
4
+ * Action handler for `ttctl engagements stats`. Issues 2 calls (one
5
+ * per engagement-status-group) in parallel via the core service,
6
+ * surfaces a `{ total, groups: [{name, count}] }` shape.
7
+ *
8
+ * Each `count` is server-provided (`totalCount`); no client-side
9
+ * synthesis. The `<group> stats` sub-command absorbs the role of the
10
+ * top-level `ttctl stats engagements` (per the project's "stats folds
11
+ * into per-group sub-commands" decision).
12
+ *
13
+ * **JSON shape rationale** (mirrors `applications stats`): emits a
14
+ * BARE `{total, groups}` payload, NOT the v0.4 list envelope. `stats`
15
+ * is an aggregate scalar grouping; the envelope is for collection
16
+ * payloads.
17
+ */
18
+ export declare function runEngagementsStats(output: OutputFormat): Promise<void>;
19
+ /**
20
+ * Render the stats payload as a small table plus a total line. Pure —
21
+ * directly unit-testable.
22
+ */
23
+ export declare function formatStatsPretty(stats: engagements.EngagementsStats): string;
24
+ //# sourceMappingURL=stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/commands/engagements/stats.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAa7E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,GAAG,MAAM,CAU7E"}