@metabase/cli 0.2.1 → 0.2.2-alpha.extract-api-client.27e2241

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 (324) hide show
  1. package/README.md +4 -1715
  2. package/dist/add-collection-B3Ty8SzB.mjs +36 -0
  3. package/dist/alert-DT-ee7yf.mjs +23 -0
  4. package/dist/alerts-Bf2RH_p_.mjs +43 -0
  5. package/dist/{append-BgDaYJW9.mjs → append-DFzQRPMd.mjs} +7 -12
  6. package/dist/{archive-DFCu5hVG.mjs → archive-4tmm946K.mjs} +8 -17
  7. package/dist/{archive-Bv59HYsU.mjs → archive-B6eXiyER.mjs} +7 -13
  8. package/dist/{archive-BM9HjJHQ.mjs → archive-BxNPHxOY.mjs} +7 -13
  9. package/dist/archive-ByvA49Kz.mjs +34 -0
  10. package/dist/{archive-Oh1iZu2y.mjs → archive-C7w49Grr.mjs} +7 -16
  11. package/dist/{archive-EoYl-lS-.mjs → archive-Cd29QC0c.mjs} +7 -13
  12. package/dist/{archive-BZpXnQSu.mjs → archive-ChORH5JH.mjs} +7 -13
  13. package/dist/archive-CwAdlv63.mjs +33 -0
  14. package/dist/{archive-BncW2dGw.mjs → archive-Dr9Xnx_Z.mjs} +7 -15
  15. package/dist/{archive-BCPA0HhV.mjs → archive-gid9Y09v.mjs} +8 -17
  16. package/dist/{archive-Czzktgho.mjs → archive-lQqs13Uz.mjs} +7 -13
  17. package/dist/auth-Dltxua89.mjs +19 -0
  18. package/dist/{body-DKcQw7G5.mjs → body-Cur4NJt9.mjs} +5 -8
  19. package/dist/{body-flags-CgHgJBRC.mjs → body-flags-AqKpN01Y.mjs} +1 -2
  20. package/dist/{branches-CCmtr3W8.mjs → branches-DchlyU0i.mjs} +7 -13
  21. package/dist/{cancel-72y10-Rg.mjs → cancel-BMQa5R1Z.mjs} +5 -12
  22. package/dist/{cancel-task-CGwdz91O.mjs → cancel-task-C5CU1pxU.mjs} +6 -10
  23. package/dist/card-CHI2bmds.mjs +24 -0
  24. package/dist/{card-B8G5jQQT.mjs → card-DZxRmver.mjs} +21 -48
  25. package/dist/card-zyUkr2nS.mjs +44 -0
  26. package/dist/cards-SccWvRQD.mjs +34 -0
  27. package/dist/cli.mjs +675 -81
  28. package/dist/client-BqhzKdLM.mjs +2194 -0
  29. package/dist/collection-CGoVLvcD.mjs +58 -0
  30. package/dist/collection-CY0AB99E.mjs +20 -0
  31. package/dist/{collection-CFoLPrY5.mjs → collection-CfulNRBG.mjs} +20 -63
  32. package/dist/{collection-namespace-C7mr_a8H.mjs → collection-namespace-GwydWBF3.mjs} +3 -5
  33. package/dist/{create-pTnveKkm.mjs → create-BNQ_DytP.mjs} +8 -15
  34. package/dist/{create-QYctYGSa.mjs → create-BOLwWt8Q.mjs} +9 -17
  35. package/dist/{create-C_WqoOf5.mjs → create-Beh-2uoN.mjs} +8 -15
  36. package/dist/{create-C3DThF9E.mjs → create-C79vErX0.mjs} +9 -20
  37. package/dist/{create-nXlnVzXl.mjs → create-CAQV2g6V.mjs} +9 -16
  38. package/dist/{create-E7XhC0gJ.mjs → create-CAWytBE5.mjs} +9 -17
  39. package/dist/{create-CPEOSxIH.mjs → create-CCh_LyW9.mjs} +8 -15
  40. package/dist/{create-7pbf5Wu0.mjs → create-CD008jdE.mjs} +13 -28
  41. package/dist/create-CHQx7jq4.mjs +45 -0
  42. package/dist/create-DF4QtgDL.mjs +44 -0
  43. package/dist/{create-CaWFrPRU.mjs → create-DJmXXQoq.mjs} +10 -18
  44. package/dist/{create-Brh8WCa3.mjs → create-DV-Ln5Mo.mjs} +8 -15
  45. package/dist/create-branch-CYo6jZth.mjs +35 -0
  46. package/dist/{create-U_XDwsIX.mjs → create-i14Wv3Tj.mjs} +8 -15
  47. package/dist/{create-BDY38_Kr.mjs → create-tQbnuz-I.mjs} +8 -15
  48. package/dist/{create-DFyZCXQD.mjs → create-zeveFdnd.mjs} +6 -10
  49. package/dist/cron-LKRffEC-.mjs +5 -0
  50. package/dist/{csv-CR2qhmC6.mjs → csv-B2Jgb1GM.mjs} +7 -19
  51. package/dist/{current-task-MUHaiHIg.mjs → current-task-MpBFGttd.mjs} +7 -12
  52. package/dist/{dashboard-B-MTpfeS.mjs → dashboard-BCpSq_G-.mjs} +9 -60
  53. package/dist/dashboard-BHJBoaG7.mjs +33 -0
  54. package/dist/dashboard-CsIFFpzK.mjs +58 -0
  55. package/dist/database-B19qlLKZ.mjs +38 -0
  56. package/dist/database-C8G6ZKG0.mjs +26 -0
  57. package/dist/db-DsfojyeH.mjs +24 -0
  58. package/dist/{delete-B58Cng0p.mjs → delete-B8e01xAG.mjs} +6 -11
  59. package/dist/{delete-CW3dYmuT.mjs → delete-BApOjQvl.mjs} +6 -11
  60. package/dist/{delete-doa3R-c5.mjs → delete-Ck0q4Dzp.mjs} +6 -11
  61. package/dist/{delete-BKMOtpjs.mjs → delete-DFmX7jTp.mjs} +6 -11
  62. package/dist/{delete-BMa26SzX.mjs → delete-Ob06PPie.mjs} +6 -11
  63. package/dist/{delete-runtime-_YOukDRC.mjs → delete-runtime-D74s6vhu.mjs} +6 -13
  64. package/dist/{delete-table-D_tjBZPd.mjs → delete-table-DuyhGrvA.mjs} +6 -11
  65. package/dist/{dependencies-BR_4um7h.mjs → dependencies-Bj3QrGIm.mjs} +10 -13
  66. package/dist/dirty-DNYoM6Bp.mjs +31 -0
  67. package/dist/document-BbskZPTT.mjs +19 -0
  68. package/dist/{document-CL4ML5FN.mjs → document-Cd2mmqCp.mjs} +5 -33
  69. package/dist/document-D6OybtP2.mjs +29 -0
  70. package/dist/{eid-DSOk7Khb.mjs → eid-WTZmDdsr.mjs} +12 -54
  71. package/dist/eid-translation-zEHtr5Oc.mjs +35 -0
  72. package/dist/{embedding-CKdw8q7p.mjs → embedding-i-KqpefC.mjs} +2 -4
  73. package/dist/events-Bn7jh5lP.mjs +39 -0
  74. package/dist/export-BjfoZRDJ.mjs +66 -0
  75. package/dist/field-BPsNa-TO.mjs +80 -0
  76. package/dist/{field-DsXTeqBy.mjs → field-Cr2DPUG9.mjs} +2 -81
  77. package/dist/field-Zau6Hc6X.mjs +18 -0
  78. package/dist/fields-CBBa-Prp.mjs +34 -0
  79. package/dist/{get-CHAH_F37.mjs → get-00lyLv6R.mjs} +7 -11
  80. package/dist/{get-T85qZgnv.mjs → get-B7sMgsFs.mjs} +7 -11
  81. package/dist/get-B_xdF1kq.mjs +31 -0
  82. package/dist/{get-DT2MOZ8L.mjs → get-ByBOq30r.mjs} +7 -11
  83. package/dist/get-Bz99dAxK.mjs +35 -0
  84. package/dist/get-C2-Q3iQ5.mjs +31 -0
  85. package/dist/get-CDJFVvhj.mjs +35 -0
  86. package/dist/get-CDMGbgrh.mjs +31 -0
  87. package/dist/get-CnbUCzDM.mjs +31 -0
  88. package/dist/{get-DtvzjfjG.mjs → get-CvI--9S_.mjs} +16 -12
  89. package/dist/{get-CH_JmPc-.mjs → get-DRvsATp-.mjs} +7 -11
  90. package/dist/{get-CgZ5qjQx.mjs → get-DY03Azx9.mjs} +6 -10
  91. package/dist/get-DYO1kywc.mjs +32 -0
  92. package/dist/{get-BSdOE5J4.mjs → get-D_h-G9bn.mjs} +7 -11
  93. package/dist/get-DdsoHaKH.mjs +31 -0
  94. package/dist/{get-DRK5-UdU.mjs → get-DkWO0EI0.mjs} +7 -11
  95. package/dist/{get-43Smv3RI.mjs → get-Dmj9Ygz1.mjs} +7 -17
  96. package/dist/get-DmpB6J9g.mjs +31 -0
  97. package/dist/{get-nZW0W7Ui.mjs → get-Dn9ZiSZr.mjs} +8 -16
  98. package/dist/{get-run-Cwia6e0d.mjs → get-run-Cnux9ln0.mjs} +7 -11
  99. package/dist/git-sync-BDnxPrqU.mjs +104 -0
  100. package/dist/git-sync-DxD_ng48.mjs +136 -0
  101. package/dist/git-sync-MQQYRYLg.mjs +28 -0
  102. package/dist/{group-CILtQqCL.mjs → group-DBM87IgC.mjs} +2 -4
  103. package/dist/has-remote-changes-C684Redh.mjs +35 -0
  104. package/dist/import-Rmmttboo.mjs +56 -0
  105. package/dist/{input-DzbvxKYU.mjs → input-DH9i67x_.mjs} +6 -11
  106. package/dist/{is-dirty-CHbUJ-bh.mjs → is-dirty-DYeJYhBz.mjs} +4 -8
  107. package/dist/{items-DN63mjpF.mjs → items-CQlPXBXE.mjs} +13 -29
  108. package/dist/key-BEhqIzIQ.mjs +10 -0
  109. package/dist/{library-DF2qx50w.mjs → library-Bsm5KsFF.mjs} +6 -9
  110. package/dist/library-ClLgrAXy.mjs +19 -0
  111. package/dist/library-DfYAT2Ep.mjs +21 -0
  112. package/dist/{list-n2PY3OIx.mjs → list-B4hJuMhA.mjs} +11 -27
  113. package/dist/list-B8nAGwP4.mjs +48 -0
  114. package/dist/list-BOET6zhP.mjs +36 -0
  115. package/dist/list-BP3MPq-M.mjs +36 -0
  116. package/dist/list-BpFp9Wre.mjs +28 -0
  117. package/dist/list-BtkWNtvY.mjs +34 -0
  118. package/dist/list-BtmsNOEn.mjs +28 -0
  119. package/dist/list-BzVTHOoH.mjs +28 -0
  120. package/dist/list-C5Zs8nrb.mjs +28 -0
  121. package/dist/list-CKK-s3Ty.mjs +28 -0
  122. package/dist/list-CMpoc2TN.mjs +70 -0
  123. package/dist/list-CNUiF8Z7.mjs +28 -0
  124. package/dist/list-CQDprvW0.mjs +39 -0
  125. package/dist/{list-C7TqbWG1.mjs → list-CQwOgIlj.mjs} +10 -24
  126. package/dist/list-DE9FM957.mjs +28 -0
  127. package/dist/{list-De82cXvn.mjs → list-DF2rvoO1.mjs} +22 -14
  128. package/dist/list-DMKDsBRd.mjs +38 -0
  129. package/dist/{list-B3HoSfYj.mjs → list-UhpKG6_m.mjs} +15 -15
  130. package/dist/{login-jy9rbYev.mjs → login-CGHeSjlP.mjs} +47 -52
  131. package/dist/{logout-CRbk1SuY.mjs → logout-DAxOlbv4.mjs} +7 -12
  132. package/dist/measure-4P0bOlZ3.mjs +29 -0
  133. package/dist/measure-BsYv0p26.mjs +22 -0
  134. package/dist/{measure-S9WszHre.mjs → measure-CtfjqJFP.mjs} +3 -30
  135. package/dist/network-error-CEb9ymDW.mjs +423 -0
  136. package/dist/notification-DaA4bBHW.mjs +138 -0
  137. package/dist/notification-Fcq1fIPw.mjs +67 -0
  138. package/dist/{parameter-BZ6y-Gfs.mjs → parameter-DUKR8NXo.mjs} +2 -11
  139. package/dist/{parameter-values-CcgcG3S5.mjs → parameter-values-CJTdqd8c.mjs} +17 -11
  140. package/dist/{parse-enum-C_2lGr3g.mjs → parse-enum-D0Jfm_Bz.mjs} +2 -4
  141. package/dist/{parse-id-CD54Chc5.mjs → parse-id-C_jmKFaa.mjs} +2 -4
  142. package/dist/{parse-ref-BLgKEEF-.mjs → parse-ref-ibKVB0J4.mjs} +3 -5
  143. package/dist/{path-CPMr1RJO.mjs → path-B5gHvrYL.mjs} +8 -9
  144. package/dist/{poll-DVF9EnEb.mjs → poll-75SvT7Zv.mjs} +11 -15
  145. package/dist/predicates-Bkm2IoeX.mjs +170 -0
  146. package/dist/preflight-YpPQo-sa.mjs +29 -0
  147. package/dist/{process-HDPKLS_z.mjs → process-DBOOrmET.mjs} +4 -6
  148. package/dist/publish-DijrxaCW.mjs +75 -0
  149. package/dist/pulse-BmsDenXm.mjs +133 -0
  150. package/dist/pulse-DhG6I9mI.mjs +57 -0
  151. package/dist/{query-Cxh9hmrP.mjs → query-BbqECzmF.mjs} +20 -44
  152. package/dist/{query-B3HDIsJ-.mjs → query-Dc__-KJH.mjs} +13 -24
  153. package/dist/{query-result-Drvjv7DD.mjs → query-result-DBDwk8TS.mjs} +4 -8
  154. package/dist/remove-collection-BOnxYvhj.mjs +36 -0
  155. package/dist/{render-CkuFkWlQ.mjs → render-CI93iP0I.mjs} +9 -11
  156. package/dist/{replace-BwvKDNur.mjs → replace-Cq4CxVa-.mjs} +7 -12
  157. package/dist/rescan-values-Dr_j416g.mjs +31 -0
  158. package/dist/revision-message-flag-8TCHYJV6.mjs +8 -0
  159. package/dist/run-C3DkS6NP.mjs +82 -0
  160. package/dist/{run-yrpSF6VL.mjs → run-DdGJ544X.mjs} +8 -18
  161. package/dist/runs-CUNWiidL.mjs +38 -0
  162. package/dist/runtime-DiKyBxOw.mjs +1007 -0
  163. package/dist/{schema-tables-ChBYz4mO.mjs → schema-tables-CV386fnC.mjs} +10 -14
  164. package/dist/{schemas-C2crnVML.mjs → schemas-DM-UqZBQ.mjs} +8 -12
  165. package/dist/search-DFBwUc6d.mjs +44 -0
  166. package/dist/{search-DnGEh6sZ.mjs → search-DmGScXs8.mjs} +14 -73
  167. package/dist/segment-BzUGM2Fr.mjs +22 -0
  168. package/dist/segment-C_gl5ag6.mjs +29 -0
  169. package/dist/{segment-BPb1H6DW.mjs → segment-OsrbUDzw.mjs} +3 -30
  170. package/dist/{selectors-Ll_TRxl5.mjs → selectors-DGDn0Hto.mjs} +4 -6
  171. package/dist/send-CVxxEpDB.mjs +49 -0
  172. package/dist/{set-tHsHXRGV.mjs → set-DFolTjbd.mjs} +10 -20
  173. package/dist/{set-active-qqDoBh_Z.mjs → set-active-BD8L1lPX.mjs} +7 -18
  174. package/dist/setting-CwRYgHYN.mjs +35 -0
  175. package/dist/setting-DTiLCW8g.mjs +22 -0
  176. package/dist/setting-DyhaeICs.mjs +17 -0
  177. package/dist/setup-BbDQN8fe.mjs +44 -0
  178. package/dist/setup-CO7QV-ao.mjs +21 -0
  179. package/dist/signal-CMd0EFUa.mjs +16 -0
  180. package/dist/{skills-rnvVgau4.mjs → skills--vK6J-e4.mjs} +4 -6
  181. package/dist/{skills-BKuiGkc1.mjs → skills-DTCrMcix.mjs} +13 -19
  182. package/dist/{snippet-DWiXNy4T.mjs → snippet-CyKAgIZl.mjs} +3 -32
  183. package/dist/snippet-DRwKb2x7.mjs +19 -0
  184. package/dist/snippet-oJLaYW9V.mjs +29 -0
  185. package/dist/stash-D0S4JmAz.mjs +61 -0
  186. package/dist/status-BhswxJL1.mjs +85 -0
  187. package/dist/{status-B5ar0uXc.mjs → status-hL1am-HV.mjs} +6 -8
  188. package/dist/subscription-_d5fB45F.mjs +22 -0
  189. package/dist/subscriptions-s4TF6Ax3.mjs +42 -0
  190. package/dist/summary-BytbDz6e.mjs +7 -0
  191. package/dist/summary-CsPvcUwW.mjs +31 -0
  192. package/dist/sync-schema-DaZ_MV-u.mjs +35 -0
  193. package/dist/sync-task-BACcrs0i.mjs +37 -0
  194. package/dist/{table-C3RIKiYM.mjs → table-CeeTJgQb.mjs} +4 -38
  195. package/dist/table-CsIJNPFf.mjs +37 -0
  196. package/dist/table-DYoC1kPn.mjs +18 -0
  197. package/dist/{timeline-BCTRThc-.mjs → timeline-CCSU2qOS.mjs} +2 -66
  198. package/dist/timeline-event-CNQdCTDg.mjs +19 -0
  199. package/dist/timeline-uDCmwGFT.mjs +66 -0
  200. package/dist/timeline-xlDbEKWg.mjs +21 -0
  201. package/dist/transform-Bs0EWijQ.mjs +28 -0
  202. package/dist/{transform-BVHYzWpK.mjs → transform-D3QX0jxA.mjs} +28 -74
  203. package/dist/transform-DoTyyXAu.mjs +74 -0
  204. package/dist/transform-job-50GZHhKH.mjs +37 -0
  205. package/dist/transform-job-BcLChRup.mjs +22 -0
  206. package/dist/{transform-job-CjsAXMej.mjs → transform-job-DRrK28IH.mjs} +14 -41
  207. package/dist/{transform-tag--IBQ-8Ij.mjs → transform-tag-CcElGp3C.mjs} +2 -21
  208. package/dist/transform-tag-Dmb4u3-Q.mjs +21 -0
  209. package/dist/transform-tag-_tgwlsdB.mjs +18 -0
  210. package/dist/{transforms-CLkv3e81.mjs → transforms-oU4zizbO.mjs} +10 -13
  211. package/dist/{tree-CB2IURsX.mjs → tree-CH-f3bjP.mjs} +6 -10
  212. package/dist/{unpublish-BkZldbkP.mjs → unpublish-BUl9RU5C.mjs} +7 -18
  213. package/dist/{update-B1dkPypu.mjs → update-BCS5FxKr.mjs} +11 -19
  214. package/dist/{update-8bTrglfc.mjs → update-BZPllQoR.mjs} +9 -16
  215. package/dist/{update-BacyVaLu.mjs → update-BiFDBcEH.mjs} +9 -16
  216. package/dist/update-BzMDeZiU.mjs +50 -0
  217. package/dist/{update-B4atxTx0.mjs → update-C4YJQFDS.mjs} +9 -16
  218. package/dist/{update-CGWTX1Z0.mjs → update-CHNSUHK4.mjs} +9 -16
  219. package/dist/{update-D7Ia9Qrt.mjs → update-CO4m4wH3.mjs} +10 -21
  220. package/dist/{update-CO9uCJxV.mjs → update-CVPAwJaH.mjs} +10 -18
  221. package/dist/{update-BHC3pwzR.mjs → update-CmDTljK-.mjs} +9 -16
  222. package/dist/{update-iY9WZqy0.mjs → update-CvOO8TED.mjs} +9 -17
  223. package/dist/{update-Cyxjg496.mjs → update-D-NE60AV.mjs} +9 -16
  224. package/dist/{update-D80GWpWl.mjs → update-Nfi44RrE.mjs} +10 -18
  225. package/dist/update-bD_Jh5-s.mjs +51 -0
  226. package/dist/{update-DajyWtBN.mjs → update-cYkvbqK8.mjs} +9 -16
  227. package/dist/update-dashcard-C3TuYO_k.mjs +50 -0
  228. package/dist/{update-BghbOcv6.mjs → update-tX9mKBN_.mjs} +10 -21
  229. package/dist/{upgrade-CXoNQ4FH.mjs → upgrade-DXMV4AyP.mjs} +37 -44
  230. package/dist/upload-CH632qW6.mjs +46 -0
  231. package/dist/upload-DAtxBBms.mjs +13 -0
  232. package/dist/upload-Dey_8rLf.mjs +13 -0
  233. package/dist/{uuid-D6dao_q4.mjs → uuid-BJkDWj9p.mjs} +5 -7
  234. package/dist/validate-BWchyW0V.mjs +1469 -0
  235. package/dist/{validate-query-D1N30wJ7.mjs → validate-query-DaGYSmpQ.mjs} +4 -5
  236. package/dist/{values-DIBAgSyz.mjs → values-Dxf1JEoA.mjs} +8 -13
  237. package/dist/verify-K96rItG5.mjs +89 -0
  238. package/dist/{wait-CW1OawkI.mjs → wait-DoMDH226.mjs} +10 -18
  239. package/dist/{wait-flags-DvNU8ahZ.mjs → wait-flags-DWEF9tX4.mjs} +14 -11
  240. package/dist/window-BkvrP0gB.mjs +64 -0
  241. package/package.json +5 -35
  242. package/skill-data/core/SKILL.md +31 -26
  243. package/skill-data/dashboard/SKILL.md +6 -2
  244. package/skill-data/document/SKILL.md +2 -2
  245. package/skill-data/git-sync/SKILL.md +20 -5
  246. package/skill-data/notification/SKILL.md +157 -0
  247. package/skill-data/transform/SKILL.md +1 -1
  248. package/.claude-plugin/marketplace.json +0 -19
  249. package/dist/add-collection-C8ZTPlIE.mjs +0 -9
  250. package/dist/add-collection-CUBn11d4.mjs +0 -60
  251. package/dist/auth-hgAnMUfi.mjs +0 -22
  252. package/dist/capabilities-DOTcPraV.mjs +0 -684
  253. package/dist/card-Ct-q_C4S.mjs +0 -26
  254. package/dist/cards-CYSyvN7Z.mjs +0 -38
  255. package/dist/cli.d.mts +0 -1
  256. package/dist/collection-K82kJWdj.mjs +0 -23
  257. package/dist/command-augment-D9pI9Vbh.mjs +0 -11
  258. package/dist/create-branch-DPE6itiS.mjs +0 -57
  259. package/dist/dashboard-B1iRSUBI.mjs +0 -35
  260. package/dist/database-CIbVSfua.mjs +0 -61
  261. package/dist/db-eWy7A-H3.mjs +0 -27
  262. package/dist/dirty-BKCg6oVN.mjs +0 -35
  263. package/dist/document-CVxhTnUD.mjs +0 -22
  264. package/dist/events-Dxm7me47.mjs +0 -44
  265. package/dist/export-Gb_wfZpt.mjs +0 -103
  266. package/dist/field-BTCw6voJ.mjs +0 -21
  267. package/dist/fields-hZeq6IF2.mjs +0 -37
  268. package/dist/get--rGDVyje.mjs +0 -35
  269. package/dist/get-7Np_G2je.mjs +0 -35
  270. package/dist/get-CP3lrIYi.mjs +0 -49
  271. package/dist/get-CuPCE_AG.mjs +0 -35
  272. package/dist/get-DB6Y9igl.mjs +0 -41
  273. package/dist/get-DWzMR8sn.mjs +0 -35
  274. package/dist/get-DZatHVdn.mjs +0 -38
  275. package/dist/git-sync-Cjrx2meo.mjs +0 -31
  276. package/dist/has-remote-changes-CIIib71u.mjs +0 -67
  277. package/dist/import-D9ID9Mz4.mjs +0 -94
  278. package/dist/is-dirty-DY5Zhsbk.mjs +0 -8
  279. package/dist/key-BnGRTX8U.mjs +0 -17
  280. package/dist/list-B1sdMz6m.mjs +0 -31
  281. package/dist/list-BSxMFDMR.mjs +0 -31
  282. package/dist/list-BeqcZVSn.mjs +0 -39
  283. package/dist/list-C0344yqi.mjs +0 -52
  284. package/dist/list-C5Ir-96z.mjs +0 -49
  285. package/dist/list-C6YpaUpC.mjs +0 -39
  286. package/dist/list-CQN2BpaW.mjs +0 -31
  287. package/dist/list-CY-jpBNE.mjs +0 -31
  288. package/dist/list-CkTsOOA7.mjs +0 -39
  289. package/dist/list-CvS68tLn.mjs +0 -31
  290. package/dist/list-KDHLmoUx.mjs +0 -31
  291. package/dist/list-MqqHcBvD.mjs +0 -31
  292. package/dist/measure-CPqisgyf.mjs +0 -25
  293. package/dist/paginate-CMqbqhMC.mjs +0 -49
  294. package/dist/poll-task-CpHGQOd5.mjs +0 -194
  295. package/dist/preflight-xhwEOHAt.mjs +0 -90
  296. package/dist/prompt-BgkWNgIR.mjs +0 -52
  297. package/dist/publish-xVPABwE8.mjs +0 -65
  298. package/dist/remove-collection-_a4uIlLB.mjs +0 -42
  299. package/dist/requests-qyh002pL.mjs +0 -96
  300. package/dist/rescan-values-Bd0Joerq.mjs +0 -40
  301. package/dist/resolve-Ct084wx3.mjs +0 -84
  302. package/dist/revision-message-flag-CHzX0cqV.mjs +0 -11
  303. package/dist/run-BfpKUjqL.mjs +0 -135
  304. package/dist/runs-D_08Ma08.mjs +0 -53
  305. package/dist/runtime-Ab96yYlM.mjs +0 -1695
  306. package/dist/segment-DyVTZSIM.mjs +0 -25
  307. package/dist/setting-B9xSyMf6.mjs +0 -20
  308. package/dist/setting-Cko6bE_w.mjs +0 -55
  309. package/dist/setup-CXGcyTuv.mjs +0 -71
  310. package/dist/snippet-C4h-GMUf.mjs +0 -22
  311. package/dist/stash-DxmpBS7x.mjs +0 -108
  312. package/dist/status-D5CR1SrS.mjs +0 -69
  313. package/dist/summary-BEEJl2O1.mjs +0 -40
  314. package/dist/sync-schema-B5HDpmrp.mjs +0 -54
  315. package/dist/table-DHmaW3Ec.mjs +0 -21
  316. package/dist/timeline-B0R6-dm8.mjs +0 -24
  317. package/dist/timeline-event-BVDTt-pM.mjs +0 -22
  318. package/dist/transform-Cq2_muWO.mjs +0 -31
  319. package/dist/transform-job-BpebgMnq.mjs +0 -25
  320. package/dist/transform-tag-B1xnFa9w.mjs +0 -21
  321. package/dist/update-dashcard-DLq7ihNO.mjs +0 -73
  322. package/dist/upload-D3eiApa0.mjs +0 -16
  323. package/dist/validate-Cqa14t7o.mjs +0 -1496
  324. package/dist/verify-DvhZWmS2.mjs +0 -79
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: git-sync
3
- description: Round-trip Metabase content (cards, dashboards, transforms, snippets, collections) between an instance and a git remote via `mb git-sync …` — status, dirty / has-remote-changes checks, import, export (with branch guard), branches, stash, add/remove a collection from sync. Load when the user wants to "import the latest changes", "export to git", "git sync", "dirty check", "stash before pulling", "add a collection to sync", or anything `mb git-sync …`.
3
+ description: Round-trip Metabase content (cards, dashboards, transforms, snippets, collections, Library-published table/field metadata) between an instance and a git remote via `mb git-sync …` — status, dirty / has-remote-changes checks, import, export (with branch guard), branches, stash, add/remove a collection from sync. Load when the user wants to "import the latest changes", "export to git", "push my changes to the repo", "open a PR with my Metabase changes", "git sync", "dirty check", "stash before pulling", "add a collection to sync", or anything `mb git-sync …`.
4
4
  allowed-tools: Read, Write, Edit, Bash, AskUserQuestion
5
5
  ---
6
6
 
7
7
  # git-sync (representations ↔ instance)
8
8
 
9
- Metabase content (cards, dashboards, transforms, snippets, collections, …) can live in a git repo as YAML and round-trip in and out of a Metabase instance via the `git-sync` verbs. The instance is configured with a `remote-sync-*` settings block (URL, branch, token, type read-only/read-write); the CLI drives the sync tasks against `/api/ee/remote-sync/*`. Only collections flagged for sync serialize; everything else is local-only.
9
+ Metabase content (cards, dashboards, transforms, snippets, collections, …) can live in a git repo as YAML and round-trip in and out of a Metabase instance via the `git-sync` verbs. The instance is configured with a `remote-sync-*` settings block (URL, branch, token, type read-only/read-write); the CLI drives the sync tasks against `/api/ee/remote-sync/*`. Only collections flagged for sync serialize; everything else is local-only. Table and field metadata round-trips too, for Library-published tables in a flagged collection — see "Published table metadata" below.
10
+
11
+ The repo and the instance are two ends of the same state; what "push my changes" means depends on where the changes were made. If they were made **in the instance** (CLI verbs against a read-write instance — cards edited, transforms created, tables published, metadata written), "push my changes" / "save this to the repo" / "open a PR with these changes" means driving the instance's export to a branch (`stash` or `create-branch` + `export`) and opening the PR from that branch — not reconstructing the changes as files. If the workflow is **repo-first** (content YAML edited in the repo, the instance imports it), plain `git` against the repo is the way — but only in the serialized layout already there: files in paths or formats the serializer doesn't own are invisible to Metabase and never apply on import.
10
12
 
11
13
  This skill covers the import/export workflow. Flag conventions and auth setup live in `core` (`mb skills get core`). To author content YAML by hand: the per-resource clause and settings shapes mirror the API form — query bodies follow the `mbql` skill, `visualization_settings` follow the `visualization` skill — except the portable YAML uses **name-based** references (e.g. `[Sample Database, PUBLIC, ORDERS, TOTAL]`, and entity-ids for cross-entity FKs) where the API form uses numeric ids. For the on-disk folder layout, model new files on what the synced repo already contains.
12
14
 
@@ -126,13 +128,26 @@ mb setting set remote-sync-type '"read-write"' --profile <n>
126
128
 
127
129
  (`setting set` parses the value as strict JSON — mind the inner double quotes; see `core`.) The server also rejects switching to `:read-only` while the Remote Sync collection is dirty; export or `--force` import first if you're going the other way.
128
130
 
129
- **Verifying the result.** The CLI's `Collection` schema doesn't yet expose `is_remote_synced`, so `collection get --json` won't show the flag. The pragmatic confirmation paths are:
131
+ **Verifying the result.** `mb git-sync status --profile <n> --json` lists the flagged collections under `synced_collections`, and `mb collection get <id> --json` shows the per-collection `is_remote_synced` flag.
132
+
133
+ ## Published table metadata (Library) and sync scope
134
+
135
+ Table and field metadata — table/field descriptions, semantic types (`type/PK`, `type/FK`), FK targets, plus segments and measures on the table — serializes for **Library-published tables only**, under `databases/<db>/schemas/<schema>/tables/<table>/…` in the repo. Eligibility is two-gated: the table must be published (`mb library publish`), **and** the Library collection holding it must itself carry `is_remote_synced: true`. An ordinary warehouse table, or a transform's target table that isn't published, never serializes — a transform's YAML carries only the transform definition (query, target, description), not the output table's field metadata.
136
+
137
+ The classic trap: publish tables, write field metadata, then `git-sync dirty` comes back empty and nothing lands in the repo. That does not mean git-sync can't carry table metadata — it means the Library collection isn't in the sync scope, so nothing was eligible for dirty-tracking when the writes happened. Check the scope (`synced_collections` in `status`), then:
138
+
139
+ ```bash
140
+ mb library get --profile <n> --json # Library Data collection id
141
+ mb git-sync add-collection <library-data-id> --profile <n>
142
+ mb git-sync stash --new-branch <branch> -m "..." --profile <n> # or create-branch + export
143
+ ```
130
144
 
131
- - `mb git-sync is-dirty --profile <n> --json` after editing a card in the now-synced collection — a `true` reading proves it's tracked.
132
- - The Metabase Admin UI's Remote Sync page renders the per-collection toggles.
145
+ Flagging the collection records it for the next export, which serializes its current content — including already-published tables and their field metadata. `mb library publish` prints a reminder when the target collection is outside the sync scope on an instance with a configured remote.
133
146
 
134
147
  ## Don't (git-sync-specific)
135
148
 
149
+ - Don't turn instance-side changes into hand-written repo files. When the changes were made against the instance, export them (`stash` / `create-branch` + `export`) and PR the exported branch; reconstructing them as YAML by hand — or pushing files in paths/formats the serializer doesn't own — produces content that never applies on import, and pushing behind Metabase's back races its own sync tasks. Hand-editing YAML belongs to the repo-first workflow, in the serialized layout the repo already uses.
150
+ - Don't conclude from an empty `dirty` list that a change type isn't tracked. Dirty-tracking only records changes to _eligible_ objects; the usual cause is scope (the collection isn't flagged — see "Published table metadata"), not capability. Check `synced_collections` in `status` before concluding.
136
151
  - Don't run `git-sync import --force` or `git-sync export --force` without explicit user confirmation. Both are lossy — `--force` import discards instance-side work, `--force` export overwrites the remote branch.
137
152
  - Don't drive `git-sync` against a Metabase instance that doesn't have remote-sync configured — every verb returns an error pointing at the missing `remote-sync-*` settings. To check: `mb setting get remote-sync-url --profile <n> --json`.
138
153
  - Don't author content directly via `card create` / `transform create` and then assume `git-sync export` will commit it cleanly — the instance and repo can drift if you mix direct API writes with sync-tracked changes. If you do, follow direct writes immediately with `git-sync export -m "..."` to keep them in step.
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: notification
3
+ description: Scheduled delivery of Metabase content by email, Slack, or webhook — question alerts (`mb alert …`, one card, fires on a send condition) and dashboard subscriptions (`mb subscription …`, one dashboard, fires on a schedule). Covers choosing between them, the two different schedule and recipient contracts, channel prerequisites, and testing a delivery. Load when the user wants to "alert me when X drops below Y", "email this dashboard every Monday", "send this question to Slack", "set up a subscription", "who gets this report", "add a recipient", "stop these emails", "post to a webhook when the number spikes", or anything `mb alert …` / `mb subscription …`.
4
+ allowed-tools: Read, Write, Edit, Bash, AskUserQuestion
5
+ ---
6
+
7
+ # notification (alerts & subscriptions)
8
+
9
+ Metabase delivers content on a schedule two different ways, and they share almost nothing under the hood:
10
+
11
+ | | `mb alert` | `mb subscription` |
12
+ | ---------- | ---------------------------------------------------- | ------------------------------------------- |
13
+ | Delivers | one **card** | one **dashboard** (selected dashcards) |
14
+ | Fires | on a **send condition** each time the schedule ticks | every time the schedule ticks |
15
+ | Schedule | one **cron string** | structured `schedule_type` + hour/day/frame |
16
+ | Channels | `channel/email`, `channel/slack`, `channel/http` | `email`, `slack`, `http` |
17
+ | Recipients | typed union (`user` / `group` / `raw-value`) | `{id}` or `{email}` |
18
+ | API | `/api/notification` | `/api/pulse` |
19
+
20
+ Pick by **what is being delivered**, not by how often. A user asking to "get emailed when signups drop below 100" wants an alert (a condition on one card). A user asking to "email the exec dashboard every Monday" wants a subscription. If they want a whole dashboard _conditionally_, there is no such thing — the closest is a subscription with `skip_if_empty`, or an alert on the one card that carries the condition.
21
+
22
+ Because the two bodies look superficially alike and are not, **never adapt one body shape into the other by hand.** Authoring a subscription's `schedule_type` inside an alert (or a `cron_schedule` inside a subscription) fails or, worse, silently drops the schedule.
23
+
24
+ ## Before you create anything: is the channel configured?
25
+
26
+ A delivery to an unconfigured channel is accepted by the server and then never sends. This is the single most common "it doesn't work" report, and nothing in the create response hints at it. Check first:
27
+
28
+ ```bash
29
+ mb setting get 'email-configured?' --profile <n> --json | jq .value # → true if SMTP is set up
30
+ mb setting get 'slack-token-valid?' --profile <n> --json | jq .value # → true if the Slack app is connected
31
+ ```
32
+
33
+ Quote the key — the trailing `?` is a shell glob character and an unquoted `email-configured?` will not reach the CLI.
34
+
35
+ `false` means an **admin** must configure SMTP or the Slack app in Metabase before any delivery works. Say so and stop; do not create a notification that silently goes nowhere. Slack has a second trap: to post to a **private** channel, someone must invite the Metabase app to that channel (`@Metabase` in the channel) — it will not appear as a target until then.
36
+
37
+ ## Alerts (`mb alert`)
38
+
39
+ An alert body has exactly three parts:
40
+
41
+ ```json
42
+ {
43
+ "payload": { "card_id": 94, "send_condition": "has_result", "send_once": false },
44
+ "subscriptions": [{ "cron_schedule": "0 0 8 * * ? *" }],
45
+ "handlers": [
46
+ {
47
+ "channel_type": "channel/email",
48
+ "recipients": [
49
+ { "type": "notification-recipient/raw-value", "details": { "value": "team@example.com" } }
50
+ ]
51
+ }
52
+ ]
53
+ }
54
+ ```
55
+
56
+ **`send_condition`** is the whole point of an alert:
57
+
58
+ | Value | Fires when |
59
+ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
+ | `has_result` | the card returns **any** row. The rare-event pattern: write the card so it returns rows _only_ when the thing you care about happened, then alert on `has_result`. |
61
+ | `goal_above` / `goal_below` | the result crosses the card's goal line. |
62
+
63
+ `goal_above` / `goal_below` **require a goal already set on the card's visualization** (`visualization_settings.graph.goal_value` — see the `visualization` skill). Without one the alert can never fire, and the failure is silent. Check with `mb card get <id> --fields visualization_settings --json` before choosing a goal condition; if there's no goal, either set one or reshape the card so `has_result` expresses the condition.
64
+
65
+ `send_once: true` fires the alert at most once and then deactivates it — a one-shot "tell me when this finally happens."
66
+
67
+ **`cron_schedule`** is a 7-field **Quartz** expression (`sec min hour day-of-month month day-of-week year`), not the 5-field Unix cron most people know. `0 0 8 * * ? *` is "every day at 08:00". The `?` in the day-of-week slot means "unspecified" and is mandatory when day-of-month is set (Quartz rejects `*` in both). The hour is evaluated in the **instance's report timezone**, not UTC and not yours — read it with `mb setting get report-timezone --json`, and say which zone you scheduled in when you report back to the user.
68
+
69
+ **`handlers`** carry the delivery. The `channel_type` values are prefixed (`channel/email`, not `email` — that prefix is the subscription spelling). Recipients are a typed union:
70
+
71
+ ```text
72
+ { "type": "notification-recipient/user", "user_id": 3 } a Metabase user
73
+ { "type": "notification-recipient/group", "permissions_group_id": 5 } everyone in a group
74
+ { "type": "notification-recipient/raw-value", "details": { "value": "a@b.com" } } an external address
75
+ ```
76
+
77
+ `channel/http` is a **webhook**, and it is alerts-only — dashboard subscriptions cannot post to a webhook. It needs a webhook channel configured server-side; pass its id as `channel_id`.
78
+
79
+ **Verbs.** `mb alert list` hides archived alerts unless you pass `--include-inactive`; `mb card alerts <card-id>` is the same list scoped to one card. `mb alert archive <id>` deactivates (`active: false`) and stops delivery — it is not a delete, and `mb alert update <id> --body '{"active":true}'` brings it back. `mb alert send <id>` delivers **immediately**, ignoring both the schedule and the send condition — that's your end-to-end test that the channel really works. It sends to real recipients, so test with yourself as the only recipient first.
80
+
81
+ ## Subscriptions (`mb subscription`)
82
+
83
+ ```json
84
+ {
85
+ "name": "Weekly orders",
86
+ "dashboard_id": 10,
87
+ "cards": [{ "id": 94, "dashboard_card_id": 87, "include_csv": false, "include_xls": false }],
88
+ "channels": [
89
+ {
90
+ "channel_type": "email",
91
+ "schedule_type": "weekly",
92
+ "schedule_hour": 8,
93
+ "schedule_day": "mon",
94
+ "recipients": [{ "email": "team@example.com" }]
95
+ }
96
+ ]
97
+ }
98
+ ```
99
+
100
+ **Each card needs two different ids.** `id` is the card id; `dashboard_card_id` is the id of the _placement_ of that card on that dashboard. Both come from `mb dashboard cards <dashboard-id> --json` — take them from the same row. Passing the card id in both slots is the most common subscription bug; it produces a subscription that sends the wrong content or nothing.
101
+
102
+ **The schedule fields required depend on `schedule_type`:**
103
+
104
+ | `schedule_type` | Also required | Meaning |
105
+ | --------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
106
+ | `hourly` | — | every hour |
107
+ | `daily` | `schedule_hour` (0–23) | every day at that hour |
108
+ | `weekly` | `schedule_hour` + `schedule_day` (`mon`…`sun`) | that weekday |
109
+ | `monthly` | `schedule_hour` + `schedule_frame` (`first` / `mid` / `last`) | that point in the month. With `first` / `last` you may add `schedule_day` to mean e.g. "first Monday"; with `mid` a `schedule_day` is rejected |
110
+
111
+ Recipients are `{"email": "a@b.com"}` for an external address or `{"id": <user-id>}` for a Metabase user. A Slack channel is **not** a recipient — it goes in `details`: `{"channel_type": "slack", "details": {"channel": "#general"}, …}`.
112
+
113
+ **`skip_if_empty: true`** suppresses the send when the dashboard's questions return no rows — the way to build a "only tell me when something happened" dashboard report. **`parameters`** sets filter values for this subscription only, so one dashboard can feed several audiences a different slice (Pro/Enterprise). Its entries are dashboard parameter values — the parameter `id`s come from `mb dashboard get <id> --fields parameters --json` (see the `dashboard` skill).
114
+
115
+ `mb subscription list --archived` is a **swap, not a union** — it returns archived subscriptions _instead of_ active ones, never both. `mb dashboard subscriptions <id>` is the list scoped to one dashboard. `mb subscription archive <id>` also disables every channel on it, so restoring takes two steps: `update --body '{"archived":false}'`, then re-send the `channels` array with `enabled: true`.
116
+
117
+ ## Updating: the lists replace wholesale
118
+
119
+ On both nouns, the collection-valued fields are **replaced**, not merged:
120
+
121
+ - alert — `subscriptions` and `handlers`
122
+ - subscription — `cards` and `channels`
123
+
124
+ So "add a recipient" is a read-modify-write, never a patch:
125
+
126
+ ```bash
127
+ mb alert get 9 --json > ./.scratch/alert.json # read the current handlers
128
+ # edit ./.scratch/alert.json — add the recipient to the existing handlers array
129
+ mb alert update 9 --body "$(jq -c '{handlers}' ./.scratch/alert.json)"
130
+ ```
131
+
132
+ Sending a partial `handlers` array **deletes the recipients you left out.** The same holds for a subscription's `channels`: omit a channel and it's gone.
133
+
134
+ Scalar fields _do_ merge, and inside an alert so does `payload` — `mb alert update 9 --body '{"payload":{"send_condition":"goal_above"}}'` keeps the card. An alert's `card_id` and a subscription's `dashboard_id` are fixed at creation; to point at different content, create a new one and archive the old.
135
+
136
+ (Drive updates through `mb alert update` / `mb subscription update` only. Both endpoints have destructive raw-PUT semantics — the notification PUT is a spec-diff that will delete and recreate the row under a new id if the ids don't match, and the pulse PUT re-applies server defaults to omitted keys, silently un-archiving. The CLI's update verbs read-merge-write to neutralize both. A hand-rolled `curl` PUT will not.)
137
+
138
+ ## End-to-end recipe
139
+
140
+ 1. **Confirm the channel works** — `mb setting get 'email-configured?'` / `'slack-token-valid?'`. Stop and ask for an admin if `false`.
141
+ 2. **Find the content id.** Alert: the card id (`mb card list`, `mb search`). Subscription: the dashboard id _and_ the `{id, dashboard_card_id}` pairs from `mb dashboard cards <id> --json`.
142
+ 3. **Check the condition is expressible.** Goal alert → the card must have a goal. Otherwise reshape toward `has_result`.
143
+ 4. **Confirm the recipients with the user before creating.** A wrong address means real mail to a real person, and the fix is a full read-modify-write.
144
+ 5. **Create** from a file in `./.scratch` (see `core` for body input).
145
+ 6. **Test the delivery** — `mb alert send <id>`. There is no equivalent for subscriptions; verify those by reading back `mb subscription get <id>` and waiting for the schedule.
146
+ 7. **Report the schedule in the instance's timezone**, not the user's assumed one.
147
+
148
+ ## Don't
149
+
150
+ - Don't create a notification against an unconfigured channel and call it done — it will never send, and nothing errors.
151
+ - Don't set a `goal_above` / `goal_below` alert on a card with no goal line.
152
+ - Don't reuse the card id as `dashboard_card_id`.
153
+ - Don't send a partial `handlers` / `channels` / `cards` / `subscriptions` array — you will delete the entries you omitted.
154
+ - Don't use `mb alert send` to "check it looks right" on an alert with real recipients — it emails all of them, immediately. To preview the content, run the card itself (`mb card query <card-id>`), which delivers nothing. To rehearse the delivery, create the alert with yourself as the only recipient, `mb alert send` it, then add the real recipients via the read-modify-write above.
155
+ - Don't mix the spellings: `channel/email` is an alert, `email` is a subscription.
156
+
157
+ Cross-links: `core` (auth, `--json`, body input), `dashboard` (dashcards and the `parameters` a subscription can override), `visualization` (the `graph.goal_value` a goal alert depends on).
@@ -74,7 +74,7 @@ Columns and types are inferred from the result set; change the SELECT shape and
74
74
  ## Inspect runs and cancel an in-flight run
75
75
 
76
76
  ```bash
77
- # Recent runs across all transforms (drains all pages by default; cap with --limit):
77
+ # Recent runs across all transforms (server-paged; continue with --offset <next_offset>):
78
78
  mb transform runs --profile <name> --json
79
79
  mb transform runs --transform-id <id> --limit 10 --profile <name> --json
80
80
 
@@ -1,19 +0,0 @@
1
- {
2
- "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
- "name": "metabase",
4
- "description": "Official Metabase tooling for Claude Code",
5
- "owner": {
6
- "name": "Metabase",
7
- "email": "support@metabase.com"
8
- },
9
- "plugins": [
10
- {
11
- "name": "metabase-cli",
12
- "description": "Be your data analyst / data engineer for Metabase, from the terminal via the `mb` CLI. Go from raw data to something a non-technical person can use: clean tables, reusable metrics, dashboards, and written answers. Use when someone wants to \"make sense of my data\", \"build a data model\", \"go from raw data to a dashboard\", \"answer questions about my data\", \"report on who registered / signed up / responded\", or \"set up analytics for X\". Also full CRUD on every Metabase resource (cards, dashboards, transforms, queries), git-sync content to and from a remote, and on-demand workflow skills served by `mb skills get`.",
13
- "source": "./",
14
- "strict": false,
15
- "skills": ["./skills/metabase-cli"],
16
- "category": "development"
17
- }
18
- ]
19
- }
@@ -1,9 +0,0 @@
1
- import "./capabilities-DOTcPraV.mjs";
2
- import "./command-augment-D9pI9Vbh.mjs";
3
- import "./runtime-Ab96yYlM.mjs";
4
- import "./parse-id-CD54Chc5.mjs";
5
- import "./poll-DVF9EnEb.mjs";
6
- import "./poll-task-CpHGQOd5.mjs";
7
- import { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CUBn11d4.mjs";
8
-
9
- export { add_collection_default as default };
@@ -1,60 +0,0 @@
1
- import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
2
- import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
3
- import { parseId } from "./parse-id-CD54Chc5.mjs";
4
- import { REMOTE_SYNC_PATHS } from "./poll-task-CpHGQOd5.mjs";
5
- import { z } from "zod";
6
-
7
- //#region src/commands/git-sync/add-collection.ts
8
- const SyncSettingsUpdateResult = z.object({
9
- success: z.boolean(),
10
- task_id: z.number().int().positive().optional()
11
- });
12
- const syncSettingsUpdateView = {
13
- compactPick: SyncSettingsUpdateResult,
14
- tableColumns: [{
15
- key: "success",
16
- label: "Success"
17
- }, {
18
- key: "task_id",
19
- label: "Task ID"
20
- }]
21
- };
22
- async function setCollectionRemoteSynced(client, collectionId, synced) {
23
- return await client.requestParsed(SyncSettingsUpdateResult, REMOTE_SYNC_PATHS.settings, {
24
- method: "PUT",
25
- body: { collections: { [collectionId]: synced } }
26
- });
27
- }
28
- var add_collection_default = defineMetabaseCommand({
29
- meta: {
30
- name: "add-collection",
31
- description: "Mark a collection as git-synced; cascades to descendants by location prefix"
32
- },
33
- capabilities: {
34
- minVersion: 60,
35
- tokenFeature: "remote_sync"
36
- },
37
- args: {
38
- ...outputFlags,
39
- ...profileFlag,
40
- ...connectionFlags,
41
- id: {
42
- type: "positional",
43
- description: "Collection id (positive integer)",
44
- required: true
45
- }
46
- },
47
- outputSchema: SyncSettingsUpdateResult,
48
- examples: ["mb git-sync add-collection 12", "mb git-sync add-collection 12 --json --profile prod"],
49
- async run({ args, ctx, getClient }) {
50
- const collectionId = parseId(args.id, "id");
51
- const client = await getClient();
52
- const result = await setCollectionRemoteSynced(client, collectionId, true);
53
- const taskPart = result.task_id !== void 0 ? ` (task #${result.task_id})` : "";
54
- const message = result.success ? `Collection ${collectionId} is now git-synced${taskPart}.` : `Could not update git-sync setting for collection ${collectionId}.`;
55
- renderSummary(result, syncSettingsUpdateView, message, ctx);
56
- }
57
- });
58
-
59
- //#endregion
60
- export { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView };
@@ -1,22 +0,0 @@
1
- import "./command-augment-D9pI9Vbh.mjs";
2
- import { defineCommandGroup } from "./group-CILtQqCL.mjs";
3
-
4
- //#region src/commands/auth/index.ts
5
- var auth_default = defineCommandGroup({
6
- name: "auth",
7
- description: "Authenticate against a Metabase instance",
8
- defaultCommand: "login",
9
- skills: [{
10
- skill: "core",
11
- purpose: "authentication and named profiles"
12
- }],
13
- subCommands: {
14
- login: () => import("./login-jy9rbYev.mjs").then((m) => m.default),
15
- status: () => import("./status-B5ar0uXc.mjs").then((m) => m.default),
16
- list: () => import("./list-De82cXvn.mjs").then((m) => m.default),
17
- logout: () => import("./logout-CRbk1SuY.mjs").then((m) => m.default)
18
- }
19
- });
20
-
21
- //#endregion
22
- export { auth_default as default };