@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,10 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ /**
4
+ * Shared helpers for `ttctl profile portfolio` leaves. Re-exports
5
+ * `loadAuthTokenOrExit` from `../shared.ts` (post-#107 unification — the
6
+ * separate token file is gone; auth-token resolution is centralised on
7
+ * the in-memory `config.auth.token`).
8
+ */
9
+ export { loadAuthTokenOrExit } from "../shared.js";
10
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/shared.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { OutputFormat } from "../../../lib/output.js";
2
+ /**
3
+ * Action handler for `ttctl profile portfolio update <id>`. Updates only
4
+ * the fields supplied; if no field flags are provided, the command exits
5
+ * with a `VALIDATION_ERROR` (#128 envelope) rather than issuing an empty
6
+ * mutation.
7
+ */
8
+ export declare function runProfilePortfolioUpdate(id: string, options: {
9
+ title?: string;
10
+ description?: string;
11
+ edit?: boolean;
12
+ url?: string;
13
+ link?: string;
14
+ client?: string;
15
+ accomplishment?: string;
16
+ output: OutputFormat;
17
+ }): Promise<void>;
18
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/update.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,EAAE,EAAE,MAAM,EACV,OAAO,EAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,YAAY,CAAC;CACtB,GACA,OAAO,CAAC,IAAI,CAAC,CA8Df"}
@@ -0,0 +1,77 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { profile } from "@ttctl/core";
4
+ import { emitErrorAndExit } from "../../../lib/envelopes.js";
5
+ import { FreeTextError, resolveFreeText } from "../../../lib/freetext.js";
6
+ import { emitMutationResult, handlePortfolioError } from "./add.js";
7
+ import { loadAuthTokenOrExit } from "./shared.js";
8
+ /**
9
+ * Action handler for `ttctl profile portfolio update <id>`. Updates only
10
+ * the fields supplied; if no field flags are provided, the command exits
11
+ * with a `VALIDATION_ERROR` (#128 envelope) rather than issuing an empty
12
+ * mutation.
13
+ */
14
+ export async function runProfilePortfolioUpdate(id, options) {
15
+ let description;
16
+ try {
17
+ description = await resolveFreeText(options.description, {
18
+ flagName: "description",
19
+ enableEditor: options.edit ?? false,
20
+ });
21
+ }
22
+ catch (err) {
23
+ if (err instanceof FreeTextError) {
24
+ emitErrorAndExit({
25
+ operation: "profile.portfolio.update",
26
+ format: options.output,
27
+ errors: [{ code: err.code, message: err.message }],
28
+ prettySummary: `portfolio update failed (${err.code}): ${err.message}`,
29
+ });
30
+ }
31
+ throw err;
32
+ }
33
+ if (options.url !== undefined && options.link !== undefined && options.url !== options.link) {
34
+ emitErrorAndExit({
35
+ operation: "profile.portfolio.update",
36
+ format: options.output,
37
+ errors: [{ code: "VALIDATION_ERROR", message: "--url and --link cannot disagree." }],
38
+ prettySummary: "portfolio update failed (VALIDATION_ERROR): --url and --link cannot disagree.",
39
+ });
40
+ }
41
+ const link = options.link ?? options.url;
42
+ const changes = {};
43
+ if (options.title !== undefined)
44
+ changes.title = options.title;
45
+ if (description !== undefined)
46
+ changes.description = description;
47
+ if (link !== undefined)
48
+ changes.link = link;
49
+ if (options.client !== undefined)
50
+ changes.clientOrCompanyName = options.client;
51
+ if (options.accomplishment !== undefined)
52
+ changes.accomplishment = options.accomplishment;
53
+ if (Object.keys(changes).length === 0) {
54
+ emitErrorAndExit({
55
+ operation: "profile.portfolio.update",
56
+ format: options.output,
57
+ errors: [
58
+ {
59
+ code: "VALIDATION_ERROR",
60
+ message: "supply at least one field flag (--title, --description, --link, --client, --accomplishment, or --edit).",
61
+ },
62
+ ],
63
+ prettySummary: "portfolio update failed (VALIDATION_ERROR): supply at least one field flag (--title, --description, --link, --client, --accomplishment, or --edit).",
64
+ });
65
+ }
66
+ const token = await loadAuthTokenOrExit("portfolio update", options.output);
67
+ let items;
68
+ try {
69
+ items = await profile.portfolio.update(token, id, changes);
70
+ }
71
+ catch (err) {
72
+ handlePortfolioError("portfolio update", err, options.output);
73
+ return;
74
+ }
75
+ emitMutationResult(items, options.output, "update", { prettyHeader: `Portfolio item ${id} updated.` });
76
+ }
77
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/update.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,EAAU,EACV,OASC;IAED,IAAI,WAA+B,CAAC;IACpC,IAAI,CAAC;QACH,WAAW,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,WAAW,EAAE;YACvD,QAAQ,EAAE,aAAa;YACvB,YAAY,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;SACpC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAA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OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAE1F,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtC,gBAAgB,CAAC;YACf,SAAS,EAAE,0BAA0B;YACrC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,kBAAkB;oBACxB,OAAO,EACL,yGAAyG;iBAC5G;aACF;YACD,aAAa,EACX,qJAAqJ;SACxJ,CAAC,CAAC;IACL,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5E,IAAI,KAAwC,CAAC;IAC7C,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,oBAAoB,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO;IACT,CAAC;IAED,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC,CAAC;AACzG,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { OutputFormat } from "../../../lib/output.js";
2
+ export declare function runProfilePortfolioUpload(_id: string | undefined, options: {
3
+ cover?: string;
4
+ file?: string;
5
+ crop?: string;
6
+ output: OutputFormat;
7
+ }): Promise<void>;
8
+ //# sourceMappingURL=upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/upload.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqC3D,wBAAsB,yBAAyB,CAC7C,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAC9E,OAAO,CAAC,IAAI,CAAC,CAwFf"}
@@ -0,0 +1,131 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { profile } from "@ttctl/core";
4
+ import { emitAddSuccess, emitErrorAndExit } from "../../../lib/envelopes.js";
5
+ import { handlePortfolioError } from "./add.js";
6
+ import { loadAuthTokenOrExit } from "./shared.js";
7
+ /**
8
+ * Action handler for `ttctl profile portfolio upload`. Routes to the
9
+ * cover-image upload (`--cover <file>`) or attachment-file upload
10
+ * (`--file <file>`) depending on which flag is supplied. The two flags
11
+ * are mutually exclusive — exactly one must be passed. Emits the v0.4
12
+ * envelope ABI (#128).
13
+ *
14
+ * The optional positional `[id]` is reserved for future per-item routing
15
+ * (a follow-up if the server gains item-scoped upload mutations); for
16
+ * now it is accepted but unused so the public surface stays stable when
17
+ * the binding lands.
18
+ */
19
+ /**
20
+ * Parse a `--crop x,y,w,h` value into a `PortfolioCoverTransformation`.
21
+ * All four components must be non-negative integers; otherwise the
22
+ * function returns a `VALIDATION_ERROR` for the caller to surface.
23
+ */
24
+ function parseCropOption(value) {
25
+ const parts = value.split(",");
26
+ if (parts.length !== 4) {
27
+ return { error: "--crop must be four comma-separated integers (x,y,w,h)." };
28
+ }
29
+ const ints = parts.map((p) => Number.parseInt(p.trim(), 10));
30
+ if (ints.some((n) => !Number.isInteger(n) || n < 0)) {
31
+ return { error: "--crop components must be non-negative integers." };
32
+ }
33
+ const [cropX, cropY, cropW, cropH] = ints;
34
+ if (cropW === 0 || cropH === 0) {
35
+ return { error: "--crop width and height must be positive." };
36
+ }
37
+ return { cropX, cropY, cropW, cropH };
38
+ }
39
+ export async function runProfilePortfolioUpload(_id, options) {
40
+ const modes = [options.cover !== undefined, options.file !== undefined];
41
+ const modeCount = modes.filter(Boolean).length;
42
+ if (modeCount === 0) {
43
+ emitErrorAndExit({
44
+ operation: "profile.portfolio.upload",
45
+ format: options.output,
46
+ errors: [
47
+ {
48
+ code: "VALIDATION_ERROR",
49
+ message: "supply exactly one of --cover <file> or --file <file>.",
50
+ },
51
+ ],
52
+ prettySummary: "portfolio upload failed (VALIDATION_ERROR): supply exactly one of --cover <file> or --file <file>.",
53
+ });
54
+ }
55
+ if (modeCount > 1) {
56
+ emitErrorAndExit({
57
+ operation: "profile.portfolio.upload",
58
+ format: options.output,
59
+ errors: [{ code: "VALIDATION_ERROR", message: "--cover and --file are mutually exclusive." }],
60
+ prettySummary: "portfolio upload failed (VALIDATION_ERROR): --cover and --file are mutually exclusive.",
61
+ });
62
+ }
63
+ const token = await loadAuthTokenOrExit("portfolio upload", options.output);
64
+ if (options.cover !== undefined) {
65
+ // Optional explicit crop override. The service supplies sensible
66
+ // defaults (whole-image for PNG, oversized for non-PNG) when this
67
+ // is omitted — see service-layer doc on `uploadCover` for the
68
+ // `cropX/Y/W/H` wire shape and server-side 750x500 minimum.
69
+ let transformation;
70
+ if (options.crop !== undefined) {
71
+ const parsed = parseCropOption(options.crop);
72
+ if ("error" in parsed) {
73
+ emitErrorAndExit({
74
+ operation: "profile.portfolio.upload",
75
+ format: options.output,
76
+ errors: [{ code: "VALIDATION_ERROR", field: "crop", message: parsed.error }],
77
+ prettySummary: `portfolio upload failed (VALIDATION_ERROR): ${parsed.error}`,
78
+ });
79
+ }
80
+ transformation = parsed;
81
+ }
82
+ let result;
83
+ try {
84
+ result = await profile.portfolio.uploadCover(token, { kind: "path", path: options.cover }, transformation);
85
+ }
86
+ catch (err) {
87
+ handlePortfolioError("portfolio upload", err, options.output);
88
+ return;
89
+ }
90
+ emitAddSuccess({
91
+ operation: "profile.portfolio.upload",
92
+ format: options.output,
93
+ created: result,
94
+ prettySummary: "Cover image uploaded.",
95
+ prettyEntity: (entity) => {
96
+ const lines = [];
97
+ if (entity.coverImageCacheName !== null)
98
+ lines.push(`cacheName: ${entity.coverImageCacheName}`);
99
+ if (entity.coverImageUrl !== null)
100
+ lines.push(`url: ${entity.coverImageUrl}`);
101
+ return lines.join("\n");
102
+ },
103
+ });
104
+ return;
105
+ }
106
+ // --file branch
107
+ const filePath = options.file;
108
+ let fileResult;
109
+ try {
110
+ fileResult = await profile.portfolio.uploadFile(token, { kind: "path", path: filePath });
111
+ }
112
+ catch (err) {
113
+ handlePortfolioError("portfolio upload", err, options.output);
114
+ return;
115
+ }
116
+ emitAddSuccess({
117
+ operation: "profile.portfolio.upload",
118
+ format: options.output,
119
+ created: fileResult,
120
+ prettySummary: "Portfolio file uploaded.",
121
+ prettyEntity: (entity) => {
122
+ const lines = [];
123
+ if (entity.fileCacheName !== null)
124
+ lines.push(`cacheName: ${entity.fileCacheName}`);
125
+ if (entity.fileUrl !== null)
126
+ lines.push(`url: ${entity.fileUrl}`);
127
+ return lines.join("\n");
128
+ },
129
+ });
130
+ }
131
+ //# sourceMappingURL=upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/upload.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;GAWG;AACH;;;;GAIG;AACH,SAAS,eAAe,CAAC,KAAa;IACpC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,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AAa,EAAE,0BAA0B;QACzC,YAAY,EAAE,CAAC,MAAmD,EAAE,EAAE;YACpE,MAAM,KAAK,GAAa,EAAE,CAAC;YAC3B,IAAI,MAAM,CAAC,aAAa,KAAK,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;YACpF,IAAI,MAAM,CAAC,OAAO,KAAK,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAClE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { OutputFormat } from "../../../lib/output.js";
2
+ /**
3
+ * Action handler for `ttctl profile resume cancel-upload`. The mutation
4
+ * is idempotent — the server returns `success: true` even when no upload
5
+ * is in flight. Emits the v0.4 update envelope (#128) — cancellation is
6
+ * a state transition on the in-flight upload (semantically an update).
7
+ */
8
+ export declare function runProfileResumeCancelUpload(format: OutputFormat): Promise<void>;
9
+ //# sourceMappingURL=cancel-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-upload.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/resume/cancel-upload.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBtF"}
@@ -0,0 +1,30 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { profile } from "@ttctl/core";
4
+ import { emitUpdateSuccess } from "../../../lib/envelopes.js";
5
+ import { loadAuthTokenOrExit } from "../shared.js";
6
+ import { handleResumeError } from "./upload.js";
7
+ /**
8
+ * Action handler for `ttctl profile resume cancel-upload`. The mutation
9
+ * is idempotent — the server returns `success: true` even when no upload
10
+ * is in flight. Emits the v0.4 update envelope (#128) — cancellation is
11
+ * a state transition on the in-flight upload (semantically an update).
12
+ */
13
+ export async function runProfileResumeCancelUpload(format) {
14
+ const token = await loadAuthTokenOrExit("resume cancel-upload", format);
15
+ let result;
16
+ try {
17
+ result = await profile.resume.cancelUpload(token);
18
+ }
19
+ catch (err) {
20
+ handleResumeError("resume cancel-upload", err, format);
21
+ return;
22
+ }
23
+ emitUpdateSuccess({
24
+ operation: "profile.resume.cancel-upload",
25
+ format,
26
+ updated: result,
27
+ prettySummary: `Resume upload canceled (success=${result.success ? "true" : "false"}).`,
28
+ });
29
+ }
30
+ //# sourceMappingURL=cancel-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-upload.js","sourceRoot":"","sources":["../../../../src/commands/profile/resume/cancel-upload.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,MAAoB;IACrE,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;IAExE,IAAI,MAA+C,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,iBAAiB,CAAC,sBAAsB,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACvD,OAAO;IACT,CAAC;IAED,iBAAiB,CAAC;QAChB,SAAS,EAAE,8BAA8B;QACzC,MAAM;QACN,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,mCAAmC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,IAAI;KACxF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Command } from "commander";
2
+ /**
3
+ * Build the `ttctl profile resume` command tree.
4
+ *
5
+ * The canonical sub-domain name is `resume`; the CLI registers `cv` as a
6
+ * Commander.js alias (Commonwealth English). Per project policy (#72),
7
+ * aliases are CLI-only — MCP tool names use ONLY the canonical name
8
+ * (e.g. `ttctl_profile_resume_upload`).
9
+ *
10
+ * Operations: `upload <file>`, `cancel-upload`. The cancel command is a
11
+ * one-shot to clear in-flight upload state on the server (e.g., when a
12
+ * partial upload from another client is stuck).
13
+ */
14
+ export declare function buildProfileResumeCommand(): Command;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/resume/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CA6BnD"}
@@ -0,0 +1,42 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { Command, Option } from "commander";
4
+ import { OUTPUT_FORMATS } from "../../../lib/output.js";
5
+ import { runProfileResumeCancelUpload } from "./cancel-upload.js";
6
+ import { runProfileResumeUpload } from "./upload.js";
7
+ /**
8
+ * Build the `ttctl profile resume` command tree.
9
+ *
10
+ * The canonical sub-domain name is `resume`; the CLI registers `cv` as a
11
+ * Commander.js alias (Commonwealth English). Per project policy (#72),
12
+ * aliases are CLI-only — MCP tool names use ONLY the canonical name
13
+ * (e.g. `ttctl_profile_resume_upload`).
14
+ *
15
+ * Operations: `upload <file>`, `cancel-upload`. The cancel command is a
16
+ * one-shot to clear in-flight upload state on the server (e.g., when a
17
+ * partial upload from another client is stuck).
18
+ */
19
+ export function buildProfileResumeCommand() {
20
+ const resume = new Command("resume").alias("cv").description("View and update the resume section of your profile");
21
+ resume
22
+ .command("upload")
23
+ .description("Upload a resume file (PDF or DOCX)")
24
+ .argument("<file>", "path to the resume file")
25
+ .addOption(new Option("-o, --output <format>", "output format")
26
+ .choices(OUTPUT_FORMATS)
27
+ .default("pretty"))
28
+ .action(async (file, options) => {
29
+ await runProfileResumeUpload(file, options.output);
30
+ });
31
+ resume
32
+ .command("cancel-upload")
33
+ .description("Cancel any in-flight resume upload, clearing half-uploaded server state")
34
+ .addOption(new Option("-o, --output <format>", "output format")
35
+ .choices(OUTPUT_FORMATS)
36
+ .default("pretty"))
37
+ .action(async (options) => {
38
+ await runProfileResumeCancelUpload(options.output);
39
+ });
40
+ return resume;
41
+ }
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/profile/resume/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,oDAAoD,CAAC,CAAC;IAEnH,MAAM;SACH,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,oCAAoC,CAAC;SACjD,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;SAC7C,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,IAAY,EAAE,OAAiC,EAAE,EAAE;QAChE,MAAM,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEL,MAAM;SACH,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,yEAAyE,CAAC;SACtF,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,4BAA4B,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEL,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { OutputFormat } from "../../../lib/output.js";
2
+ /**
3
+ * Action handler for `ttctl profile resume upload <file>`. Uploads the
4
+ * file at the supplied path. Emits the v0.4 envelope ABI (#128).
5
+ *
6
+ * Errors:
7
+ * - `(FILE_NOT_FOUND)` if the file doesn't exist
8
+ * - `(FILE_READ_ERROR)` for other read failures (permissions, etc.)
9
+ * - `(USER_ERROR)` if the server rejects the resume (e.g., size limit)
10
+ * - `TtctlError` subclasses route through `presentTtctlError` on
11
+ * `pretty`, the envelope on `json`/`yaml`
12
+ */
13
+ export declare function runProfileResumeUpload(file: string, format: OutputFormat): Promise<void>;
14
+ declare function handleResumeError(commandLabel: string, err: unknown, format?: OutputFormat): never;
15
+ export { handleResumeError };
16
+ //# sourceMappingURL=upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/resume/upload.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB9F;AAED,iBAAS,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,YAAuB,GAAG,KAAK,CA0BrG;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,65 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { TtctlError, profile } from "@ttctl/core";
4
+ import { presentTtctlError } from "../../../errors.js";
5
+ import { emitAddSuccess, emitErrorAndExit } from "../../../lib/envelopes.js";
6
+ import { loadAuthTokenOrExit } from "../shared.js";
7
+ /**
8
+ * Action handler for `ttctl profile resume upload <file>`. Uploads the
9
+ * file at the supplied path. Emits the v0.4 envelope ABI (#128).
10
+ *
11
+ * Errors:
12
+ * - `(FILE_NOT_FOUND)` if the file doesn't exist
13
+ * - `(FILE_READ_ERROR)` for other read failures (permissions, etc.)
14
+ * - `(USER_ERROR)` if the server rejects the resume (e.g., size limit)
15
+ * - `TtctlError` subclasses route through `presentTtctlError` on
16
+ * `pretty`, the envelope on `json`/`yaml`
17
+ */
18
+ export async function runProfileResumeUpload(file, format) {
19
+ const token = await loadAuthTokenOrExit("resume upload", format);
20
+ let result;
21
+ try {
22
+ result = await profile.resume.upload(token, { kind: "path", path: file });
23
+ }
24
+ catch (err) {
25
+ handleResumeError("resume upload", err, format);
26
+ return;
27
+ }
28
+ emitAddSuccess({
29
+ operation: "profile.resume.upload",
30
+ format,
31
+ created: result,
32
+ prettySummary: "Resume uploaded.",
33
+ prettyEntity: () => `file: ${file}`,
34
+ });
35
+ }
36
+ function handleResumeError(commandLabel, err, format = "pretty") {
37
+ if (err instanceof TtctlError) {
38
+ if (format === "pretty")
39
+ presentTtctlError(err);
40
+ const errors = [{ code: err.code, message: err.message, hint: err.recovery }];
41
+ emitErrorAndExit({
42
+ operation: commandLabel.replace(/ /g, "."),
43
+ format,
44
+ errors,
45
+ exitCode: err.code === "CF_403_CLEARANCE" || err.code === "CF_403_PERSISTENT" ? 2 : 1,
46
+ });
47
+ }
48
+ if (err instanceof profile.resume.ResumeError) {
49
+ emitErrorAndExit({
50
+ operation: commandLabel.replace(/ /g, "."),
51
+ format,
52
+ errors: [{ code: err.code, message: err.message }],
53
+ prettySummary: `${commandLabel} failed (${err.code}): ${err.message}`,
54
+ });
55
+ }
56
+ const message = err instanceof Error ? err.message : String(err);
57
+ emitErrorAndExit({
58
+ operation: commandLabel.replace(/ /g, "."),
59
+ format,
60
+ errors: [{ code: "INTERNAL_ERROR", message }],
61
+ prettySummary: `${commandLabel} failed: ${message}`,
62
+ });
63
+ }
64
+ export { handleResumeError };
65
+ //# sourceMappingURL=upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../../src/commands/profile/resume/upload.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAAY,EAAE,MAAoB;IAC7E,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAEjE,IAAI,MAAyC,CAAC;IAC9C,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,OAAO,CA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,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;YAClD,aAAa,EAAE,GAAG,YAAY,YAAY,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;SACtE,CAAC,CAAC;IACL,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,gBAAgB,CAAC;QACf,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;QAC1C,MAAM;QACN,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;QAC7C,aAAa,EAAE,GAAG,YAAY,YAAY,OAAO,EAAE;KACpD,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared helpers for `ttctl profile reviews` leaves.
3
+ *
4
+ * Re-exports `loadAuthTokenOrExit` from the parent `../shared.ts` (post-#107
5
+ * unification — see that file's comment for the in-memory token rationale).
6
+ */
7
+ export { loadAuthTokenOrExit } from "../shared.js";
8
+ export declare function truncate(s: string, width: number): string;
9
+ //# sourceMappingURL=_shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/reviews/_shared.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGzD"}
@@ -0,0 +1,15 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ /**
4
+ * Shared helpers for `ttctl profile reviews` leaves.
5
+ *
6
+ * Re-exports `loadAuthTokenOrExit` from the parent `../shared.ts` (post-#107
7
+ * unification — see that file's comment for the in-memory token rationale).
8
+ */
9
+ export { loadAuthTokenOrExit } from "../shared.js";
10
+ export function truncate(s, width) {
11
+ if (s.length <= width)
12
+ return s;
13
+ return `${s.slice(0, width - 1)}…`;
14
+ }
15
+ //# sourceMappingURL=_shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../../../src/commands/profile/reviews/_shared.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,UAAU,QAAQ,CAAC,CAAS,EAAE,KAAa;IAC/C,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK;QAAE,OAAO,CAAC,CAAC;IAChC,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC;AACrC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { profile } from "@ttctl/core";
2
+ import type { OutputFormat } from "../../../lib/output.js";
3
+ /**
4
+ * Action handler for `ttctl profile reviews approve-item`.
5
+ *
6
+ * The issue spec listed `approve-item <id>` as a single-positional
7
+ * signature; the actual API requires three fields (`reviewId`, `itemId`,
8
+ * `itemKind`), so this leaf uses named flags. Run `profile reviews list`
9
+ * first to see all three values for each pending item. Emits the v0.4
10
+ * update envelope (#128) — review approval is conceptually a state
11
+ * transition, mapped to `update`.
12
+ *
13
+ * **Destructive**: approval is final per the platform's review semantics.
14
+ * No `--dry-run` at v0; the dry-run feature lands separately (see
15
+ * issue #52).
16
+ */
17
+ export declare function runProfileReviewsApproveItem(options: {
18
+ reviewId: string;
19
+ itemId: string;
20
+ kind: string;
21
+ output: OutputFormat;
22
+ }): Promise<void>;
23
+ /**
24
+ * Pretty entity preview for the approve envelope. Pure function —
25
+ * directly unit-testable. Shared with `approve-section` since both
26
+ * mutations return the same shape (the post-approval pending-reviews
27
+ * list).
28
+ */
29
+ export declare function formatApproveEntity(result: profile.reviews.ApproveItemReviewResult): string;
30
+ //# sourceMappingURL=approve-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approve-item.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/reviews/approve-item.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAK3D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBhB;AA8BD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,uBAAuB,GAAG,MAAM,CAE3F"}
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { TtctlError, profile } from "@ttctl/core";
4
+ import { presentTtctlError } from "../../../errors.js";
5
+ import { emitErrorAndExit, emitUpdateSuccess } from "../../../lib/envelopes.js";
6
+ import { loadAuthTokenOrExit } from "./_shared.js";
7
+ const COMMAND_LABEL = "profile reviews approve-item";
8
+ /**
9
+ * Action handler for `ttctl profile reviews approve-item`.
10
+ *
11
+ * The issue spec listed `approve-item <id>` as a single-positional
12
+ * signature; the actual API requires three fields (`reviewId`, `itemId`,
13
+ * `itemKind`), so this leaf uses named flags. Run `profile reviews list`
14
+ * first to see all three values for each pending item. Emits the v0.4
15
+ * update envelope (#128) — review approval is conceptually a state
16
+ * transition, mapped to `update`.
17
+ *
18
+ * **Destructive**: approval is final per the platform's review semantics.
19
+ * No `--dry-run` at v0; the dry-run feature lands separately (see
20
+ * issue #52).
21
+ */
22
+ export async function runProfileReviewsApproveItem(options) {
23
+ const token = await loadAuthTokenOrExit(COMMAND_LABEL, options.output);
24
+ let result;
25
+ try {
26
+ result = await profile.reviews.approveItem(token, {
27
+ reviewId: options.reviewId,
28
+ itemId: options.itemId,
29
+ itemKind: options.kind,
30
+ });
31
+ }
32
+ catch (err) {
33
+ handleError(err, options.output);
34
+ return;
35
+ }
36
+ emitUpdateSuccess({
37
+ operation: "profile.reviews.approve-item",
38
+ format: options.output,
39
+ updated: result,
40
+ prettySummary: `item ${options.itemId} approved`,
41
+ prettyEntity: formatApproveEntity,
42
+ notice: result.notice ?? undefined,
43
+ });
44
+ }
45
+ function handleError(err, format) {
46
+ if (err instanceof TtctlError) {
47
+ if (format === "pretty")
48
+ presentTtctlError(err);
49
+ const errors = [{ code: err.code, message: err.message, hint: err.recovery }];
50
+ emitErrorAndExit({
51
+ operation: "profile.reviews.approve-item",
52
+ format,
53
+ errors,
54
+ exitCode: err.code === "CF_403_CLEARANCE" || err.code === "CF_403_PERSISTENT" ? 2 : 1,
55
+ });
56
+ }
57
+ if (err instanceof profile.reviews.ProfileError) {
58
+ emitErrorAndExit({
59
+ operation: "profile.reviews.approve-item",
60
+ format,
61
+ errors: [{ code: err.code, message: err.message }],
62
+ prettySummary: `${COMMAND_LABEL} failed (${err.code}): ${err.message}`,
63
+ });
64
+ }
65
+ const message = err instanceof Error ? err.message : String(err);
66
+ emitErrorAndExit({
67
+ operation: "profile.reviews.approve-item",
68
+ format,
69
+ errors: [{ code: "INTERNAL_ERROR", message }],
70
+ prettySummary: `${COMMAND_LABEL} failed: ${message}`,
71
+ });
72
+ }
73
+ /**
74
+ * Pretty entity preview for the approve envelope. Pure function —
75
+ * directly unit-testable. Shared with `approve-section` since both
76
+ * mutations return the same shape (the post-approval pending-reviews
77
+ * list).
78
+ */
79
+ export function formatApproveEntity(result) {
80
+ return `pending-reviews remaining: ${result.sectionReviews.length.toString()}`;
81
+ }
82
+ //# sourceMappingURL=approve-item.js.map