@metabase/cli 0.1.18 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -35
- package/dist/add-collection-C8ZTPlIE.mjs +9 -0
- package/dist/{add-collection-CRZAFCZy.mjs → add-collection-CUBn11d4.mjs} +4 -5
- package/dist/append-BgDaYJW9.mjs +42 -0
- package/dist/{archive-3mEhK9_H.mjs → archive-BCPA0HhV.mjs} +6 -8
- package/dist/{archive-De4yVEV8.mjs → archive-BM9HjJHQ.mjs} +5 -7
- package/dist/{archive-CFHYRF65.mjs → archive-BZpXnQSu.mjs} +5 -7
- package/dist/{archive-C3RWdM-2.mjs → archive-BncW2dGw.mjs} +7 -8
- package/dist/archive-Bv59HYsU.mjs +38 -0
- package/dist/{archive-d74nDcp4.mjs → archive-Czzktgho.mjs} +5 -7
- package/dist/{archive-errg-EKw.mjs → archive-DFCu5hVG.mjs} +6 -8
- package/dist/archive-EoYl-lS-.mjs +38 -0
- package/dist/{archive-Z8ZM-ilB.mjs → archive-Oh1iZu2y.mjs} +8 -9
- package/dist/auth-hgAnMUfi.mjs +22 -0
- package/dist/{body-BS2s2zDl.mjs → body-DKcQw7G5.mjs} +3 -3
- package/dist/{branches-mcyT7wI-.mjs → branches-CCmtr3W8.mjs} +5 -7
- package/dist/{cancel-B2l-i2NS.mjs → cancel-72y10-Rg.mjs} +4 -6
- package/dist/{cancel-task-CugcIeIi.mjs → cancel-task-CGwdz91O.mjs} +5 -7
- package/dist/capabilities-DOTcPraV.mjs +684 -0
- package/dist/{card-DEmcRlNO.mjs → card-B8G5jQQT.mjs} +24 -18
- package/dist/card-Ct-q_C4S.mjs +26 -0
- package/dist/{cards-BGkz5BeZ.mjs → cards-CYSyvN7Z.mjs} +7 -8
- package/dist/cli.mjs +177 -29
- package/dist/{collection-DrLpA1SO.mjs → collection-CFoLPrY5.mjs} +1 -1
- package/dist/collection-K82kJWdj.mjs +23 -0
- package/dist/{collection-namespace-BP_LJrAD.mjs → collection-namespace-C7mr_a8H.mjs} +2 -2
- package/dist/{create-CD9Rp8qs.mjs → create-7pbf5Wu0.mjs} +14 -14
- package/dist/{create-DzyMvAVy.mjs → create-BDY38_Kr.mjs} +8 -9
- package/dist/create-Brh8WCa3.mjs +45 -0
- package/dist/{create-DhrftYre.mjs → create-C3DThF9E.mjs} +14 -14
- package/dist/{create-B4HAEEE0.mjs → create-CPEOSxIH.mjs} +8 -9
- package/dist/{create-YfGzANNB.mjs → create-C_WqoOf5.mjs} +8 -9
- package/dist/{create-wpvDXSSY.mjs → create-CaWFrPRU.mjs} +12 -13
- package/dist/{create-Cztp5kES.mjs → create-DFyZCXQD.mjs} +5 -7
- package/dist/{create-BOmmMSjF.mjs → create-E7XhC0gJ.mjs} +11 -12
- package/dist/{create-kWzqvTGR.mjs → create-QYctYGSa.mjs} +11 -12
- package/dist/create-U_XDwsIX.mjs +45 -0
- package/dist/{create-branch-DsoMfx_2.mjs → create-branch-DPE6itiS.mjs} +5 -7
- package/dist/{create-D8KA4zJA.mjs → create-nXlnVzXl.mjs} +9 -10
- package/dist/{create-CkRFKtFG.mjs → create-pTnveKkm.mjs} +8 -9
- package/dist/csv-CR2qhmC6.mjs +58 -0
- package/dist/{current-task-WuKPZpZ6.mjs → current-task-MUHaiHIg.mjs} +5 -7
- package/dist/{dashboard-DOplbKyQ.mjs → dashboard-B-MTpfeS.mjs} +35 -15
- package/dist/dashboard-B1iRSUBI.mjs +35 -0
- package/dist/{database-D9fftP-i.mjs → database-CIbVSfua.mjs} +2 -2
- package/dist/db-eWy7A-H3.mjs +27 -0
- package/dist/{delete-Buai0_e_.mjs → delete-B58Cng0p.mjs} +6 -8
- package/dist/{delete-CmGh0jo1.mjs → delete-BKMOtpjs.mjs} +6 -8
- package/dist/delete-BMa26SzX.mjs +49 -0
- package/dist/delete-CW3dYmuT.mjs +49 -0
- package/dist/{delete-BCitmugk.mjs → delete-doa3R-c5.mjs} +6 -8
- package/dist/{delete-runtime-B0ha5QR4.mjs → delete-runtime-_YOukDRC.mjs} +2 -3
- package/dist/{delete-table-BOkYxdjA.mjs → delete-table-D_tjBZPd.mjs} +6 -8
- package/dist/{dependencies-XZrEvHUA.mjs → dependencies-BR_4um7h.mjs} +5 -7
- package/dist/{dirty-B-5NDbG9.mjs → dirty-BKCg6oVN.mjs} +5 -7
- package/dist/{document-1W7NRaO_.mjs → document-CL4ML5FN.mjs} +20 -4
- package/dist/document-CVxhTnUD.mjs +22 -0
- package/dist/{eid-BCuJRv7a.mjs → eid-DSOk7Khb.mjs} +10 -11
- package/dist/embedding-CKdw8q7p.mjs +11 -0
- package/dist/events-Dxm7me47.mjs +44 -0
- package/dist/{export-Dod2gdyE.mjs → export-Gb_wfZpt.mjs} +7 -9
- package/dist/field-BTCw6voJ.mjs +21 -0
- package/dist/{field-CMY_LWUe.mjs → field-DsXTeqBy.mjs} +6 -4
- package/dist/{fields-B0yttrzR.mjs → fields-hZeq6IF2.mjs} +6 -8
- package/dist/{get-9p0Gt1c7.mjs → get--rGDVyje.mjs} +5 -7
- package/dist/get-43Smv3RI.mjs +67 -0
- package/dist/{get-k6M5nGMC.mjs → get-7Np_G2je.mjs} +5 -7
- package/dist/{get-BkGh9BPd.mjs → get-BSdOE5J4.mjs} +5 -7
- package/dist/{get-B0OsW6jk.mjs → get-CHAH_F37.mjs} +5 -7
- package/dist/{get-DBY5esTW.mjs → get-CH_JmPc-.mjs} +5 -7
- package/dist/{get-CbpHt4Hs.mjs → get-CP3lrIYi.mjs} +5 -7
- package/dist/{get-CfeYa0v5.mjs → get-CgZ5qjQx.mjs} +5 -7
- package/dist/get-CuPCE_AG.mjs +35 -0
- package/dist/{get-DJ8huA8y.mjs → get-DB6Y9igl.mjs} +7 -8
- package/dist/{get-D7QMqPOK.mjs → get-DRK5-UdU.mjs} +5 -7
- package/dist/{get-D-pNrQGA.mjs → get-DT2MOZ8L.mjs} +5 -7
- package/dist/{get-BpZ81hX8.mjs → get-DWzMR8sn.mjs} +5 -7
- package/dist/{get-Dz7fcqoG.mjs → get-DZatHVdn.mjs} +8 -9
- package/dist/{get-u5Uq9vms.mjs → get-DtvzjfjG.mjs} +4 -6
- package/dist/get-T85qZgnv.mjs +35 -0
- package/dist/{get-DISgP66L.mjs → get-nZW0W7Ui.mjs} +16 -9
- package/dist/{get-run-DQJVpDw1.mjs → get-run-Cwia6e0d.mjs} +5 -7
- package/dist/git-sync-Cjrx2meo.mjs +31 -0
- package/dist/{group-BNE_RiH5.mjs → group-CILtQqCL.mjs} +2 -1
- package/dist/{has-remote-changes-DvQBXudi.mjs → has-remote-changes-CIIib71u.mjs} +5 -7
- package/dist/{import-PGS8-DwE.mjs → import-D9ID9Mz4.mjs} +7 -9
- package/dist/{input-7Sj85_K7.mjs → input-DzbvxKYU.mjs} +6 -3
- package/dist/{is-dirty-DyEVFQVJ.mjs → is-dirty-CHbUJ-bh.mjs} +3 -4
- package/dist/is-dirty-DY5Zhsbk.mjs +8 -0
- package/dist/{items-CkFEy2Du.mjs → items-DN63mjpF.mjs} +7 -9
- package/dist/{key-bltP32Pm.mjs → key-BnGRTX8U.mjs} +1 -1
- package/dist/{library-1AAVbk-K.mjs → library-DF2qx50w.mjs} +6 -6
- package/dist/{list-Bb8YRON_.mjs → list-B1sdMz6m.mjs} +4 -6
- package/dist/{list-BBxRjuMn.mjs → list-B3HoSfYj.mjs} +4 -6
- package/dist/{list-Sgo3RfDY.mjs → list-BSxMFDMR.mjs} +4 -6
- package/dist/list-BeqcZVSn.mjs +39 -0
- package/dist/{list-CK0p7vvK.mjs → list-C0344yqi.mjs} +5 -7
- package/dist/{list-82NkvRpI.mjs → list-C5Ir-96z.mjs} +7 -8
- package/dist/{list-CJx5q-Yn.mjs → list-C6YpaUpC.mjs} +6 -8
- package/dist/{list-CKzpoTgP.mjs → list-C7TqbWG1.mjs} +6 -8
- package/dist/{list-BWAYDSbQ.mjs → list-CQN2BpaW.mjs} +4 -6
- package/dist/{list-BY4S32Lg.mjs → list-CY-jpBNE.mjs} +4 -6
- package/dist/{list-BCYTTCFD.mjs → list-CkTsOOA7.mjs} +4 -6
- package/dist/{list-BVzu2RIZ.mjs → list-CvS68tLn.mjs} +4 -6
- package/dist/{list-CjF12k1G.mjs → list-De82cXvn.mjs} +5 -7
- package/dist/{list-B9wXg3qi.mjs → list-KDHLmoUx.mjs} +4 -6
- package/dist/{list-pQ22nXhQ.mjs → list-MqqHcBvD.mjs} +4 -6
- package/dist/{list-D-rgDFa5.mjs → list-n2PY3OIx.mjs} +8 -9
- package/dist/{login-C6ZAnGHz.mjs → login-jy9rbYev.mjs} +8 -10
- package/dist/{logout-CWjyY3Y8.mjs → logout-CRbk1SuY.mjs} +4 -6
- package/dist/measure-CPqisgyf.mjs +25 -0
- package/dist/{measure-DoJvtCaA.mjs → measure-S9WszHre.mjs} +5 -4
- package/dist/{parameter-values-DmDOuE-j.mjs → parameter-values-CcgcG3S5.mjs} +5 -7
- package/dist/{parse-enum-BL9i_brN.mjs → parse-enum-C_2lGr3g.mjs} +1 -1
- package/dist/{parse-id-DlXnOcmP.mjs → parse-id-CD54Chc5.mjs} +1 -1
- package/dist/{parse-ref-CB_KvF9h.mjs → parse-ref-BLgKEEF-.mjs} +1 -1
- package/dist/{path-D8IJ4YrW.mjs → path-CPMr1RJO.mjs} +4 -6
- package/dist/{poll-hgnrHBoh.mjs → poll-DVF9EnEb.mjs} +2 -2
- package/dist/{poll-task-NQNLT_aA.mjs → poll-task-CpHGQOd5.mjs} +2 -2
- package/dist/{preflight-DvaPQHHf.mjs → preflight-xhwEOHAt.mjs} +4 -5
- package/dist/{process-j8UHMHc2.mjs → process-HDPKLS_z.mjs} +1 -1
- package/dist/{prompt-C85xd9HR.mjs → prompt-BgkWNgIR.mjs} +1 -1
- package/dist/{publish-BntmFR6g.mjs → publish-xVPABwE8.mjs} +7 -9
- package/dist/{query-DSKQZu91.mjs → query-B3HDIsJ-.mjs} +15 -15
- package/dist/{query-BQfgKV68.mjs → query-Cxh9hmrP.mjs} +9 -10
- package/dist/{query-result-D6mfoVfQ.mjs → query-result-Drvjv7DD.mjs} +1 -1
- package/dist/{remove-collection-BguaI3-6.mjs → remove-collection-_a4uIlLB.mjs} +7 -9
- package/dist/replace-BwvKDNur.mjs +42 -0
- package/dist/requests-qyh002pL.mjs +96 -0
- package/dist/{rescan-values-DjD6IW3J.mjs → rescan-values-Bd0Joerq.mjs} +7 -9
- package/dist/{resolve-Dj2MTBkn.mjs → resolve-Ct084wx3.mjs} +1 -1
- package/dist/{run-RQfQj7Rk.mjs → run-BfpKUjqL.mjs} +7 -9
- package/dist/{run-Bp1yxkBN.mjs → run-yrpSF6VL.mjs} +4 -6
- package/dist/{runs-CSsatfWb.mjs → runs-D_08Ma08.mjs} +6 -8
- package/dist/{runtime-oxjmrYoP.mjs → runtime-Ab96yYlM.mjs} +3 -4
- package/dist/{schema-tables-5I5pCxHl.mjs → schema-tables-ChBYz4mO.mjs} +6 -8
- package/dist/{schemas-CfzFCfBt.mjs → schemas-C2crnVML.mjs} +4 -6
- package/dist/{search-Vo-BqliA.mjs → search-DnGEh6sZ.mjs} +4 -6
- package/dist/{segment-TXktTCfU.mjs → segment-BPb1H6DW.mjs} +6 -5
- package/dist/segment-DyVTZSIM.mjs +25 -0
- package/dist/{selectors-DBnJsKlW.mjs → selectors-Ll_TRxl5.mjs} +3 -3
- package/dist/{set-active-C0mUZlNN.mjs → set-active-qqDoBh_Z.mjs} +4 -6
- package/dist/{set-1Vh0AF-T.mjs → set-tHsHXRGV.mjs} +10 -10
- package/dist/setting-B9xSyMf6.mjs +20 -0
- package/dist/{setup-CzYFvFK5.mjs → setup-CXGcyTuv.mjs} +11 -12
- package/dist/{skills-B6gfH0iR.mjs → skills-BKuiGkc1.mjs} +1 -1
- package/dist/{skills-CR2xyV33.mjs → skills-rnvVgau4.mjs} +3 -3
- package/dist/snippet-C4h-GMUf.mjs +22 -0
- package/dist/{snippet-CtA2Pkoa.mjs → snippet-DWiXNy4T.mjs} +7 -4
- package/dist/{stash-CQHXwBu_.mjs → stash-DxmpBS7x.mjs} +7 -9
- package/dist/{status-C_7aqTvB.mjs → status-B5ar0uXc.mjs} +4 -6
- package/dist/{status-DXQkM18v.mjs → status-D5CR1SrS.mjs} +6 -8
- package/dist/{summary-1aNpQc8j.mjs → summary-BEEJl2O1.mjs} +5 -7
- package/dist/{sync-schema-BqLp5uTS.mjs → sync-schema-B5HDpmrp.mjs} +9 -11
- package/dist/{table-DE3i82T_.mjs → table-C3RIKiYM.mjs} +16 -4
- package/dist/table-DHmaW3Ec.mjs +21 -0
- package/dist/timeline-B0R6-dm8.mjs +24 -0
- package/dist/timeline-BCTRThc-.mjs +157 -0
- package/dist/timeline-event-BVDTt-pM.mjs +22 -0
- package/dist/{transform-DEF38FWe.mjs → transform-BVHYzWpK.mjs} +31 -5
- package/dist/transform-Cq2_muWO.mjs +31 -0
- package/dist/transform-job-BpebgMnq.mjs +25 -0
- package/dist/transform-tag-B1xnFa9w.mjs +21 -0
- package/dist/{transforms-BelyllUL.mjs → transforms-CLkv3e81.mjs} +5 -7
- package/dist/{tree-YvmwGql7.mjs → tree-CB2IURsX.mjs} +4 -6
- package/dist/{unpublish-CHjGLMu9.mjs → unpublish-BkZldbkP.mjs} +5 -7
- package/dist/update-8bTrglfc.mjs +52 -0
- package/dist/{update-BnHYSu96.mjs → update-B1dkPypu.mjs} +13 -14
- package/dist/{update-BACl_bJS.mjs → update-B4atxTx0.mjs} +9 -10
- package/dist/{update-C9fndCqb.mjs → update-BHC3pwzR.mjs} +9 -10
- package/dist/{update-BWlN3QDo.mjs → update-BacyVaLu.mjs} +9 -10
- package/dist/{update-BKhekuqr.mjs → update-BghbOcv6.mjs} +15 -15
- package/dist/{update-Zz01Woxj.mjs → update-CGWTX1Z0.mjs} +9 -10
- package/dist/{update-D7vc8GBF.mjs → update-CO9uCJxV.mjs} +12 -13
- package/dist/{update-txUfAJxy.mjs → update-Cyxjg496.mjs} +9 -10
- package/dist/{update-CrRz47aj.mjs → update-D7Ia9Qrt.mjs} +15 -15
- package/dist/{update-BGMJTpA6.mjs → update-D80GWpWl.mjs} +12 -13
- package/dist/update-DajyWtBN.mjs +52 -0
- package/dist/{update-dashcard-Dvth-yLC.mjs → update-dashcard-DLq7ihNO.mjs} +11 -11
- package/dist/{update-K-jjQ0Aw.mjs → update-iY9WZqy0.mjs} +10 -11
- package/dist/{upgrade-DsXlfPef.mjs → upgrade-CXoNQ4FH.mjs} +5 -7
- package/dist/upload-D3eiApa0.mjs +16 -0
- package/dist/{uuid-ByJmWV7b.mjs → uuid-D6dao_q4.mjs} +3 -5
- package/dist/{validate-BqNW4Sk1.mjs → validate-Cqa14t7o.mjs} +1 -2
- package/dist/{validate-query-CcZVKYPV.mjs → validate-query-D1N30wJ7.mjs} +2 -3
- package/dist/{values-CIjJI4sz.mjs → values-DIBAgSyz.mjs} +5 -7
- package/dist/{verify-Jsuc2dat.mjs → verify-DvhZWmS2.mjs} +2 -2
- package/dist/{wait-5ltTFvSa.mjs → wait-CW1OawkI.mjs} +6 -8
- package/dist/{wait-flags-D6kd_G7c.mjs → wait-flags-DvNU8ahZ.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +30 -22
- package/skill-data/dashboard/SKILL.md +26 -3
- package/skill-data/data-workflow/SKILL.md +17 -15
- package/skill-data/visualization/SKILL.md +1 -0
- package/dist/add-collection-DbalcC3_.mjs +0 -11
- package/dist/auth--PWX0oj5.mjs +0 -22
- package/dist/capabilities-N0jo5U7S.mjs +0 -239
- package/dist/card-D07WYCQY.mjs +0 -26
- package/dist/collection-Dss2qSEF.mjs +0 -23
- package/dist/dashboard-Crh4v6Fq.mjs +0 -35
- package/dist/db-BCAURQei.mjs +0 -28
- package/dist/document-upxL2nKH.mjs +0 -22
- package/dist/error-BaBm-UrT.mjs +0 -227
- package/dist/field-CloFa1oe.mjs +0 -21
- package/dist/get-B8tugTku.mjs +0 -50
- package/dist/git-sync-C9m-OHac.mjs +0 -31
- package/dist/is-dirty-DpyKeGAJ.mjs +0 -10
- package/dist/manifest-BVf8P4bl.mjs +0 -126
- package/dist/measure-Cbly1r0E.mjs +0 -25
- package/dist/metadata-CW5Lfw5d.mjs +0 -39
- package/dist/metadata-aQAqseCm.mjs +0 -38
- package/dist/notice-DyVl5aYB.mjs +0 -206
- package/dist/segment-BuN_IoM8.mjs +0 -25
- package/dist/setting-BbdKR-lO.mjs +0 -20
- package/dist/snippet-Bzo2U9Fv.mjs +0 -22
- package/dist/table-BwGOz97O.mjs +0 -22
- package/dist/transform-B65ZD9-e.mjs +0 -31
- package/dist/transform-job-BWVKXSV6.mjs +0 -25
- package/dist/transform-tag-C4qvmicL.mjs +0 -21
- /package/dist/{body-flags-DWTTxJpP.mjs → body-flags-CgHgJBRC.mjs} +0 -0
- /package/dist/{command-augment-DdZIfx1V.mjs → command-augment-D9pI9Vbh.mjs} +0 -0
- /package/dist/{paginate-FVZUxL4J.mjs → paginate-CMqbqhMC.mjs} +0 -0
- /package/dist/{parameter-CiJ4CwWE.mjs → parameter-BZ6y-Gfs.mjs} +0 -0
- /package/dist/{render-BTKnWL0d.mjs → render-CkuFkWlQ.mjs} +0 -0
- /package/dist/{revision-message-flag-CHrJgFFx.mjs → revision-message-flag-CHzX0cqV.mjs} +0 -0
- /package/dist/{setting-m46MUtW5.mjs → setting-Cko6bE_w.mjs} +0 -0
- /package/dist/{transform-job-CtixL4An.mjs → transform-job-CjsAXMej.mjs} +0 -0
- /package/dist/{transform-tag-rsIrckCM.mjs → transform-tag--IBQ-8Ij.mjs} +0 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import "./
|
|
10
|
-
import {
|
|
11
|
-
import { Transform, TransformCreateInput, transformView } from "./transform-DEF38FWe.mjs";
|
|
12
|
-
import { enrichTransformCollectionError } from "./collection-namespace-BP_LJrAD.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { readBody } from "./body-DKcQw7G5.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import "./validate-Cqa14t7o.mjs";
|
|
8
|
+
import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-D1N30wJ7.mjs";
|
|
9
|
+
import { Transform, TransformCreateInput, transformView } from "./transform-BVHYzWpK.mjs";
|
|
10
|
+
import { enrichTransformCollectionError } from "./collection-namespace-C7mr_a8H.mjs";
|
|
13
11
|
|
|
14
12
|
//#region src/commands/transform/create.ts
|
|
15
13
|
var create_default = defineMetabaseCommand({
|
|
@@ -17,7 +15,7 @@ var create_default = defineMetabaseCommand({
|
|
|
17
15
|
name: "create",
|
|
18
16
|
description: "Create a transform from JSON"
|
|
19
17
|
},
|
|
20
|
-
details: "The JSON body needs a `name`, a `source` (the query to run — native SQL or MBQL — under `source.query`), and a `target` (the warehouse table to write, with `database`/`schema`/`name`). When `source.query` is an MBQL 5 query it is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.",
|
|
18
|
+
details: "The JSON body needs a `name`, a `source` (the query to run — native SQL or MBQL — under `source.query`), and a `target` (the warehouse table to write, with `database`/`schema`/`name`). When `source.query` is an MBQL 5 query it is checked against a bundled JSON Schema (print it with `mb query --print-schema`) before sending; pass --skip-validate to bypass.",
|
|
21
19
|
skills: [{
|
|
22
20
|
skill: "mbql",
|
|
23
21
|
purpose: "MBQL source.query bodies"
|
|
@@ -30,6 +28,7 @@ var create_default = defineMetabaseCommand({
|
|
|
30
28
|
...bodyInputFlags,
|
|
31
29
|
...skipValidateFlag
|
|
32
30
|
},
|
|
31
|
+
inputSchema: TransformCreateInput,
|
|
33
32
|
outputSchema: Transform,
|
|
34
33
|
examples: [
|
|
35
34
|
"cat transform.json | mb transform create",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./collection-DrLpA1SO.mjs";
|
|
7
|
-
import { Library, createLibrary, libraryView } from "./resolve-Dj2MTBkn.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./collection-CFoLPrY5.mjs";
|
|
5
|
+
import { Library, createLibrary, libraryView } from "./resolve-Ct084wx3.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/library/create.ts
|
|
10
8
|
var create_default = defineMetabaseCommand({
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import "./
|
|
10
|
-
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CcZVKYPV.mjs";
|
|
11
|
-
import { Measure, MeasureCreateInput, measureView } from "./measure-DoJvtCaA.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { readBody } from "./body-DKcQw7G5.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import "./validate-Cqa14t7o.mjs";
|
|
8
|
+
import { MEASURE_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-D1N30wJ7.mjs";
|
|
9
|
+
import { Measure, MeasureCreateInput, measureView } from "./measure-S9WszHre.mjs";
|
|
12
10
|
|
|
13
11
|
//#region src/commands/measure/create.ts
|
|
14
12
|
var create_default = defineMetabaseCommand({
|
|
@@ -16,7 +14,7 @@ var create_default = defineMetabaseCommand({
|
|
|
16
14
|
name: "create",
|
|
17
15
|
description: "Create a measure (saved aggregation) from JSON"
|
|
18
16
|
},
|
|
19
|
-
details: "A measure is a reusable, saved aggregation tied to a table. The JSON body needs `name`, `table_id`, and a `definition` (an MBQL query holding exactly one aggregation). An MBQL 5 `definition` is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.",
|
|
17
|
+
details: "A measure is a reusable, saved aggregation tied to a table. The JSON body needs `name`, `table_id`, and a `definition` (an MBQL query holding exactly one aggregation). An MBQL 5 `definition` is checked against a bundled JSON Schema (print it with `mb query --print-schema`) before sending; pass --skip-validate to bypass.",
|
|
20
18
|
skills: [{
|
|
21
19
|
skill: "mbql",
|
|
22
20
|
purpose: "the definition aggregation"
|
|
@@ -29,6 +27,7 @@ var create_default = defineMetabaseCommand({
|
|
|
29
27
|
...bodyInputFlags,
|
|
30
28
|
...skipValidateFlag
|
|
31
29
|
},
|
|
30
|
+
inputSchema: MeasureCreateInput,
|
|
32
31
|
outputSchema: Measure,
|
|
33
32
|
examples: [
|
|
34
33
|
"cat measure.json | mb measure create",
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import "./
|
|
10
|
-
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CcZVKYPV.mjs";
|
|
11
|
-
import { Segment, SegmentCreateInput, segmentView } from "./segment-TXktTCfU.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { readBody } from "./body-DKcQw7G5.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import "./validate-Cqa14t7o.mjs";
|
|
8
|
+
import { SEGMENT_DEFINITION_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-D1N30wJ7.mjs";
|
|
9
|
+
import { Segment, SegmentCreateInput, segmentView } from "./segment-BPb1H6DW.mjs";
|
|
12
10
|
|
|
13
11
|
//#region src/commands/segment/create.ts
|
|
14
12
|
var create_default = defineMetabaseCommand({
|
|
@@ -16,7 +14,7 @@ var create_default = defineMetabaseCommand({
|
|
|
16
14
|
name: "create",
|
|
17
15
|
description: "Create a segment (saved filter) from JSON"
|
|
18
16
|
},
|
|
19
|
-
details: "A segment is a reusable, saved row filter tied to a table. The JSON body needs `name`, `table_id`, and a `definition` (an MBQL query holding the filter). An MBQL 5 `definition` is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.",
|
|
17
|
+
details: "A segment is a reusable, saved row filter tied to a table. The JSON body needs `name`, `table_id`, and a `definition` (an MBQL query holding the filter). An MBQL 5 `definition` is checked against a bundled JSON Schema (print it with `mb query --print-schema`) before sending; pass --skip-validate to bypass.",
|
|
20
18
|
skills: [{
|
|
21
19
|
skill: "mbql",
|
|
22
20
|
purpose: "the definition filter clause"
|
|
@@ -29,6 +27,7 @@ var create_default = defineMetabaseCommand({
|
|
|
29
27
|
...bodyInputFlags,
|
|
30
28
|
...skipValidateFlag
|
|
31
29
|
},
|
|
30
|
+
inputSchema: SegmentCreateInput,
|
|
32
31
|
outputSchema: Segment,
|
|
33
32
|
examples: [
|
|
34
33
|
"cat segment.json | mb segment create",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { readBody } from "./body-DKcQw7G5.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import { TimelineEvent, TimelineEventCreateInput, timelineEventView } from "./timeline-BCTRThc-.mjs";
|
|
8
|
+
|
|
9
|
+
//#region src/commands/timeline-event/create.ts
|
|
10
|
+
var create_default = defineMetabaseCommand({
|
|
11
|
+
meta: {
|
|
12
|
+
name: "create",
|
|
13
|
+
description: "Create a timeline event from JSON"
|
|
14
|
+
},
|
|
15
|
+
details: "The JSON body needs `name`, `timestamp` (ISO 8601), `timezone` (IANA name like UTC or America/New_York), `time_matters` (true when the time of day is significant, false when only the date is), and `timeline_id`; optional fields: `description`, `icon` (star|cake|mail|warning|bell|cloud, default: the timeline's icon).",
|
|
16
|
+
capabilities: { minVersion: 58 },
|
|
17
|
+
args: {
|
|
18
|
+
...outputFlags,
|
|
19
|
+
...profileFlag,
|
|
20
|
+
...connectionFlags,
|
|
21
|
+
...bodyInputFlags
|
|
22
|
+
},
|
|
23
|
+
inputSchema: TimelineEventCreateInput,
|
|
24
|
+
outputSchema: TimelineEvent,
|
|
25
|
+
examples: [
|
|
26
|
+
"mb timeline-event create --body '{\"name\":\"v2 launch\",\"timestamp\":\"2026-07-01T00:00:00Z\",\"timezone\":\"UTC\",\"time_matters\":false,\"timeline_id\":1}'",
|
|
27
|
+
"cat event.json | mb timeline-event create",
|
|
28
|
+
"mb timeline-event create --file event.json"
|
|
29
|
+
],
|
|
30
|
+
async run({ args, ctx, getClient }) {
|
|
31
|
+
const body = await readBody({
|
|
32
|
+
flag: args.body,
|
|
33
|
+
file: args.file
|
|
34
|
+
}, TimelineEventCreateInput);
|
|
35
|
+
const client = await getClient();
|
|
36
|
+
const created = await client.requestParsed(TimelineEvent, "/api/timeline-event", {
|
|
37
|
+
method: "POST",
|
|
38
|
+
body
|
|
39
|
+
});
|
|
40
|
+
renderSummary(created, timelineEventView, `Created timeline event ${created.id} "${created.name}".`, ctx);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { create_default as default };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ConfigError } from "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./poll-hgnrHBoh.mjs";
|
|
7
|
-
import { REMOTE_SYNC_PATHS } from "./poll-task-NQNLT_aA.mjs";
|
|
1
|
+
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./poll-DVF9EnEb.mjs";
|
|
5
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-CpHGQOd5.mjs";
|
|
8
6
|
import { z } from "zod";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/git-sync/create-branch.ts
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { parseEnumFlag } from "./parse-enum-BL9i_brN.mjs";
|
|
10
|
-
import { Collection, CollectionCreateInput, CollectionNamespace, collectionView } from "./collection-DrLpA1SO.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { readBody } from "./body-DKcQw7G5.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import { parseEnumFlag } from "./parse-enum-C_2lGr3g.mjs";
|
|
8
|
+
import { Collection, CollectionCreateInput, CollectionNamespace, collectionView } from "./collection-CFoLPrY5.mjs";
|
|
11
9
|
|
|
12
10
|
//#region src/commands/collection/create.ts
|
|
13
11
|
var create_default = defineMetabaseCommand({
|
|
@@ -27,6 +25,7 @@ var create_default = defineMetabaseCommand({
|
|
|
27
25
|
description: `Collection namespace: ${CollectionNamespace.options.join("|")} (omit for a normal collection)`
|
|
28
26
|
}
|
|
29
27
|
},
|
|
28
|
+
inputSchema: CollectionCreateInput,
|
|
30
29
|
outputSchema: Collection,
|
|
31
30
|
examples: [
|
|
32
31
|
"cat collection.json | mb collection create",
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
|
|
9
|
-
import { Snippet, SnippetCreateInput, snippetView } from "./snippet-CtA2Pkoa.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { readBody } from "./body-DKcQw7G5.mjs";
|
|
6
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
7
|
+
import { Snippet, SnippetCreateInput, snippetView } from "./snippet-DWiXNy4T.mjs";
|
|
10
8
|
|
|
11
9
|
//#region src/commands/snippet/create.ts
|
|
12
10
|
var create_default = defineMetabaseCommand({
|
|
@@ -21,6 +19,7 @@ var create_default = defineMetabaseCommand({
|
|
|
21
19
|
...connectionFlags,
|
|
22
20
|
...bodyInputFlags
|
|
23
21
|
},
|
|
22
|
+
inputSchema: SnippetCreateInput,
|
|
24
23
|
outputSchema: Snippet,
|
|
25
24
|
examples: [
|
|
26
25
|
"cat snippet.json | mb snippet create",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
6
|
+
import { UploadResult, buildCsvFormData, parseCreateUploadResult, readCsvFile, requireUploadFilePath, uploadResultView } from "./requests-qyh002pL.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/upload/csv.ts
|
|
9
|
+
const UPLOAD_CSV_PATH = "/api/upload/csv";
|
|
10
|
+
const ROOT_COLLECTION = "root";
|
|
11
|
+
var csv_default = defineMetabaseCommand({
|
|
12
|
+
meta: {
|
|
13
|
+
name: "csv",
|
|
14
|
+
description: "Upload a CSV file as a new table and model"
|
|
15
|
+
},
|
|
16
|
+
details: "Uploads the CSV to the server's configured uploads database, creating a new table plus a model over it, and prints the new model id and table id. Requires an uploads database to be configured on the server. Pass --collection to place the model in a specific collection (defaults to root).",
|
|
17
|
+
capabilities: { minVersion: 58 },
|
|
18
|
+
args: {
|
|
19
|
+
...outputFlags,
|
|
20
|
+
...profileFlag,
|
|
21
|
+
...connectionFlags,
|
|
22
|
+
file: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Path to the CSV/TSV file to upload"
|
|
25
|
+
},
|
|
26
|
+
collection: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Target collection id, or 'root' (default: root)"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
outputSchema: UploadResult,
|
|
32
|
+
examples: [
|
|
33
|
+
"mb upload csv --file data.csv",
|
|
34
|
+
"mb upload csv --file data.csv --collection 5",
|
|
35
|
+
"mb upload csv --file data.csv --json"
|
|
36
|
+
],
|
|
37
|
+
async run({ args, ctx, getClient }) {
|
|
38
|
+
const collectionId = resolveCollection(args.collection);
|
|
39
|
+
const file = await readCsvFile(requireUploadFilePath(args.file));
|
|
40
|
+
const form = buildCsvFormData(file);
|
|
41
|
+
form.append("collection_id", collectionId);
|
|
42
|
+
const client = await getClient();
|
|
43
|
+
const response = await client.requestRaw(UPLOAD_CSV_PATH, {
|
|
44
|
+
method: "POST",
|
|
45
|
+
body: form,
|
|
46
|
+
expectContentType: "binary"
|
|
47
|
+
});
|
|
48
|
+
const result = parseCreateUploadResult(await response.text(), response.headers);
|
|
49
|
+
renderSummary(result, uploadResultView, `Uploaded "${file.filename}" — created model ${result.model_id} (table ${result.table_id}).`, ctx);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
function resolveCollection(collection) {
|
|
53
|
+
if (typeof collection !== "string" || collection === "" || collection === ROOT_COLLECTION) return ROOT_COLLECTION;
|
|
54
|
+
return String(parseId(collection, "collection id"));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { csv_default as default };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./poll-hgnrHBoh.mjs";
|
|
7
|
-
import { SyncTaskOrIdle, fetchCurrentTask, formatSyncTask, syncTaskIdleView, syncTaskView } from "./poll-task-NQNLT_aA.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./poll-DVF9EnEb.mjs";
|
|
5
|
+
import { SyncTaskOrIdle, fetchCurrentTask, formatSyncTask, syncTaskIdleView, syncTaskView } from "./poll-task-CpHGQOd5.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/git-sync/current-task.ts
|
|
10
8
|
const CurrentTaskResult = SyncTaskOrIdle;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EmbeddingParams } from "./embedding-CKdw8q7p.mjs";
|
|
2
|
+
import { Parameter, ParameterMapping } from "./parameter-BZ6y-Gfs.mjs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
|
|
4
5
|
//#region src/domain/dashboard.ts
|
|
@@ -126,29 +127,48 @@ const dashboardView = {
|
|
|
126
127
|
}
|
|
127
128
|
]
|
|
128
129
|
};
|
|
130
|
+
const DashcardWrite = z.object({
|
|
131
|
+
id: z.number().int().describe("existing dashcard id; negative to create a new dashcard"),
|
|
132
|
+
size_x: z.number().int().positive(),
|
|
133
|
+
size_y: z.number().int().positive(),
|
|
134
|
+
row: z.number().int().nonnegative(),
|
|
135
|
+
col: z.number().int().nonnegative(),
|
|
136
|
+
parameter_mappings: z.array(ParameterMapping).nullable().optional(),
|
|
137
|
+
inline_parameters: z.array(z.string().min(1)).nullable().optional(),
|
|
138
|
+
series: z.array(z.record(z.string(), z.unknown())).nullable().optional()
|
|
139
|
+
}).loose();
|
|
140
|
+
const DashboardTabWrite = z.object({
|
|
141
|
+
id: z.number().int().describe("existing tab id; negative to create a new tab"),
|
|
142
|
+
name: z.string().min(1)
|
|
143
|
+
}).loose();
|
|
129
144
|
const DashboardCreateInput = z.object({
|
|
130
145
|
name: z.string().min(1),
|
|
131
146
|
description: z.string().nullable().optional(),
|
|
132
|
-
parameters: z.array(Parameter).optional(),
|
|
133
|
-
cache_ttl: z.number().int().positive().optional(),
|
|
147
|
+
parameters: z.array(Parameter).nullable().optional(),
|
|
148
|
+
cache_ttl: z.number().int().positive().nullable().optional(),
|
|
134
149
|
collection_id: z.number().int().positive().nullable().optional(),
|
|
135
150
|
collection_position: z.number().int().positive().nullable().optional(),
|
|
136
|
-
dashcards: z.array(
|
|
137
|
-
tabs: z.array(
|
|
151
|
+
dashcards: z.array(DashcardWrite).optional(),
|
|
152
|
+
tabs: z.array(DashboardTabWrite).optional()
|
|
138
153
|
}).loose();
|
|
139
154
|
const DashboardUpdateInput = z.object({
|
|
140
|
-
name: z.string().min(1).optional(),
|
|
155
|
+
name: z.string().min(1).nullable().optional(),
|
|
141
156
|
description: z.string().nullable().optional(),
|
|
142
|
-
|
|
157
|
+
caveats: z.string().nullable().optional(),
|
|
158
|
+
points_of_interest: z.string().nullable().optional(),
|
|
159
|
+
show_in_getting_started: z.boolean().nullable().optional(),
|
|
160
|
+
archived: z.boolean().nullable().optional(),
|
|
161
|
+
position: z.number().int().positive().nullable().optional(),
|
|
143
162
|
width: DashboardWidth.optional(),
|
|
144
|
-
enable_embedding: z.boolean().optional(),
|
|
145
|
-
|
|
146
|
-
|
|
163
|
+
enable_embedding: z.boolean().nullable().optional(),
|
|
164
|
+
embedding_type: z.string().nullable().optional(),
|
|
165
|
+
embedding_params: EmbeddingParams.nullable().optional(),
|
|
166
|
+
parameters: z.array(Parameter).nullable().optional(),
|
|
147
167
|
cache_ttl: z.number().int().positive().nullable().optional(),
|
|
148
168
|
collection_id: z.number().int().positive().nullable().optional(),
|
|
149
169
|
collection_position: z.number().int().positive().nullable().optional(),
|
|
150
|
-
dashcards: z.array(
|
|
151
|
-
tabs: z.array(
|
|
170
|
+
dashcards: z.array(DashcardWrite).nullable().optional(),
|
|
171
|
+
tabs: z.array(DashboardTabWrite).nullable().optional()
|
|
152
172
|
}).loose();
|
|
153
173
|
const DashcardPatchInput = z.object({
|
|
154
174
|
row: z.number().int().nonnegative().optional(),
|
|
@@ -156,10 +176,10 @@ const DashcardPatchInput = z.object({
|
|
|
156
176
|
size_x: z.number().int().positive().optional(),
|
|
157
177
|
size_y: z.number().int().positive().optional(),
|
|
158
178
|
dashboard_tab_id: z.number().int().nullable().optional(),
|
|
159
|
-
parameter_mappings: z.array(ParameterMapping).optional(),
|
|
160
|
-
inline_parameters: z.array(z.string()).optional(),
|
|
179
|
+
parameter_mappings: z.array(ParameterMapping).nullable().optional(),
|
|
180
|
+
inline_parameters: z.array(z.string().min(1)).nullable().optional(),
|
|
161
181
|
visualization_settings: z.unknown().optional(),
|
|
162
|
-
series: z.array(z.unknown()).optional()
|
|
182
|
+
series: z.array(z.record(z.string(), z.unknown())).nullable().optional()
|
|
163
183
|
}).strict().refine((value) => Object.keys(value).length > 0, { message: "patch must contain at least one field" });
|
|
164
184
|
|
|
165
185
|
//#endregion
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-CILtQqCL.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/dashboard/index.ts
|
|
5
|
+
var dashboard_default = defineCommandGroup({
|
|
6
|
+
name: "dashboard",
|
|
7
|
+
description: "Manage Metabase dashboards",
|
|
8
|
+
skills: [
|
|
9
|
+
{
|
|
10
|
+
skill: "dashboard",
|
|
11
|
+
purpose: "wiring filters, linked filters, cross-filtering, click behavior, tabs"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
skill: "visualization",
|
|
15
|
+
purpose: "dashcard display and visualization_settings"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
skill: "core",
|
|
19
|
+
purpose: "the 24-column dashcard grid layout"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
subCommands: {
|
|
23
|
+
list: () => import("./list-C5Ir-96z.mjs").then((mod) => mod.default),
|
|
24
|
+
get: () => import("./get-DB6Y9igl.mjs").then((mod) => mod.default),
|
|
25
|
+
cards: () => import("./cards-CYSyvN7Z.mjs").then((mod) => mod.default),
|
|
26
|
+
"parameter-values": () => import("./parameter-values-CcgcG3S5.mjs").then((mod) => mod.default),
|
|
27
|
+
create: () => import("./create-7pbf5Wu0.mjs").then((mod) => mod.default),
|
|
28
|
+
update: () => import("./update-BghbOcv6.mjs").then((mod) => mod.default),
|
|
29
|
+
"update-dashcard": () => import("./update-dashcard-DLq7ihNO.mjs").then((mod) => mod.default),
|
|
30
|
+
archive: () => import("./archive-BncW2dGw.mjs").then((mod) => mod.default)
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { dashboard_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Table } from "./table-
|
|
1
|
+
import { Table, TableCompact } from "./table-C3RIKiYM.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/domain/database.ts
|
|
@@ -15,7 +15,7 @@ const DatabaseCompact = Database.pick({
|
|
|
15
15
|
name: true,
|
|
16
16
|
engine: true,
|
|
17
17
|
is_saved_questions: true
|
|
18
|
-
}).strip();
|
|
18
|
+
}).strip().extend({ tables: z.array(TableCompact).optional() });
|
|
19
19
|
const databaseView = {
|
|
20
20
|
compactPick: DatabaseCompact,
|
|
21
21
|
tableColumns: [
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-CILtQqCL.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/db/index.ts
|
|
5
|
+
var db_default = defineCommandGroup({
|
|
6
|
+
name: "db",
|
|
7
|
+
description: "Inspect and sync Metabase databases",
|
|
8
|
+
alias: "database",
|
|
9
|
+
skills: [{
|
|
10
|
+
skill: "core",
|
|
11
|
+
purpose: "the database traversal ladder and schema sync"
|
|
12
|
+
}, {
|
|
13
|
+
skill: "data-workflow",
|
|
14
|
+
purpose: "model a raw database into clean tables"
|
|
15
|
+
}],
|
|
16
|
+
subCommands: {
|
|
17
|
+
list: () => import("./list-C7TqbWG1.mjs").then((m) => m.default),
|
|
18
|
+
get: () => import("./get-43Smv3RI.mjs").then((m) => m.default),
|
|
19
|
+
schemas: () => import("./schemas-C2crnVML.mjs").then((m) => m.default),
|
|
20
|
+
"schema-tables": () => import("./schema-tables-ChBYz4mO.mjs").then((m) => m.default),
|
|
21
|
+
"sync-schema": () => import("./sync-schema-B5HDpmrp.mjs").then((m) => m.default),
|
|
22
|
+
"rescan-values": () => import("./rescan-values-Bd0Joerq.mjs").then((m) => m.default)
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { db_default as default };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-B0ha5QR4.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./prompt-BgkWNgIR.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
6
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-_YOukDRC.mjs";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/transform-tag/delete.ts
|
|
11
9
|
var delete_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
8
|
-
import { DeleteResult, confirmAndDelete } from "./delete-runtime-B0ha5QR4.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./prompt-BgkWNgIR.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
6
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-_YOukDRC.mjs";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/transform-job/delete.ts
|
|
11
9
|
var delete_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./prompt-BgkWNgIR.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
6
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-_YOukDRC.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/timeline/delete.ts
|
|
9
|
+
var delete_default = defineMetabaseCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "delete",
|
|
12
|
+
description: "Permanently delete a timeline and all its events by id"
|
|
13
|
+
},
|
|
14
|
+
capabilities: { minVersion: 58 },
|
|
15
|
+
args: {
|
|
16
|
+
...outputFlags,
|
|
17
|
+
...profileFlag,
|
|
18
|
+
...connectionFlags,
|
|
19
|
+
yes: {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
description: "Skip confirmation",
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
id: {
|
|
25
|
+
type: "positional",
|
|
26
|
+
description: "Timeline id",
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
outputSchema: DeleteResult,
|
|
31
|
+
examples: ["mb timeline delete 1 --yes", "mb timeline delete 1"],
|
|
32
|
+
async run({ args, ctx, getClient }) {
|
|
33
|
+
const id = parseId(args.id);
|
|
34
|
+
const client = await getClient();
|
|
35
|
+
await confirmAndDelete({
|
|
36
|
+
id,
|
|
37
|
+
path: `/api/timeline/${id}`,
|
|
38
|
+
yes: args.yes,
|
|
39
|
+
promptMessage: `Delete timeline ${id} and all its events?`,
|
|
40
|
+
successMessage: `Deleted timeline ${id}.`,
|
|
41
|
+
abortMessage: `Aborted; timeline ${id} was not deleted.`,
|
|
42
|
+
client,
|
|
43
|
+
ctx
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { delete_default as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./prompt-BgkWNgIR.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
6
|
+
import { DeleteResult, confirmAndDelete } from "./delete-runtime-_YOukDRC.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/timeline-event/delete.ts
|
|
9
|
+
var delete_default = defineMetabaseCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "delete",
|
|
12
|
+
description: "Permanently delete a timeline event by id"
|
|
13
|
+
},
|
|
14
|
+
capabilities: { minVersion: 58 },
|
|
15
|
+
args: {
|
|
16
|
+
...outputFlags,
|
|
17
|
+
...profileFlag,
|
|
18
|
+
...connectionFlags,
|
|
19
|
+
yes: {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
description: "Skip confirmation",
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
id: {
|
|
25
|
+
type: "positional",
|
|
26
|
+
description: "Timeline event id",
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
outputSchema: DeleteResult,
|
|
31
|
+
examples: ["mb timeline-event delete 1 --yes", "mb timeline-event delete 1"],
|
|
32
|
+
async run({ args, ctx, getClient }) {
|
|
33
|
+
const id = parseId(args.id);
|
|
34
|
+
const client = await getClient();
|
|
35
|
+
await confirmAndDelete({
|
|
36
|
+
id,
|
|
37
|
+
path: `/api/timeline-event/${id}`,
|
|
38
|
+
yes: args.yes,
|
|
39
|
+
promptMessage: `Delete timeline event ${id}?`,
|
|
40
|
+
successMessage: `Deleted timeline event ${id}.`,
|
|
41
|
+
abortMessage: `Aborted; timeline event ${id} was not deleted.`,
|
|
42
|
+
client,
|
|
43
|
+
ctx
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { delete_default as default };
|