@metabase/cli 0.5.2 → 0.5.4
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 +1 -1
- package/dist/{add-collection-C0BQHjJd.mjs → add-collection-D2x34KVO.mjs} +3 -3
- package/dist/{alert-mXHOt00T.mjs → alert-B-w0c61D.mjs} +7 -7
- package/dist/{alerts-CyB1Z7AU.mjs → alerts-nnrpqD-U.mjs} +6 -6
- package/dist/api-key-9jVV67hF.mjs +38 -0
- package/dist/api-key-CTyXuYui.mjs +13 -0
- package/dist/api-key-DbsqHlN6.mjs +31 -0
- package/dist/{append-DeHhUAeY.mjs → append-BPrVW4RB.mjs} +4 -4
- package/dist/{archive-DRMXvkiI.mjs → archive-BYo35OGC.mjs} +5 -5
- package/dist/{archive-Bi-Sfq5T.mjs → archive-BZVRJYTT.mjs} +5 -5
- package/dist/{archive-CCKxZEuq.mjs → archive-Bw_cvk_4.mjs} +3 -3
- package/dist/{archive-qy0CFo1s2.mjs → archive-CJFUFozc.mjs} +5 -5
- package/dist/{archive-CfNLlebd.mjs → archive-CTZs6Hl6.mjs} +5 -5
- package/dist/{archive-CDSAXKKB.mjs → archive-Ccf6Qqrf.mjs} +3 -3
- package/dist/{archive-DfDqPgtk.mjs → archive-Cwetg5kK.mjs} +5 -5
- package/dist/{archive-CjVd1fJ5.mjs → archive-DBQnauVo.mjs} +5 -5
- package/dist/{archive-CpvpGZlz.mjs → archive-F5hoWW7f.mjs} +5 -5
- package/dist/{archive-DpgtAdEa.mjs → archive-OZQaaQkK.mjs} +5 -5
- package/dist/{archive-B1MA5MZp.mjs → archive-p7gGwh0n.mjs} +5 -5
- package/dist/{archive-HCVTRXI2.mjs → archive-tmrsG41w.mjs} +3 -3
- package/dist/{auth-_cdypXeX.mjs → auth-eogOlU4X.mjs} +5 -5
- package/dist/{branch-flag-CPTQ4wXp.mjs → branch-flag-BvIdNB5z.mjs} +1 -1
- package/dist/{branches-C7mNYAky.mjs → branches-CERgKqFq.mjs} +3 -3
- package/dist/{breaking-BindR3ZW.mjs → breaking-B8f_vl0i.mjs} +6 -6
- package/dist/{broken-SoXfkx7d.mjs → broken-mrkOdV4j.mjs} +8 -8
- package/dist/{bulk-discard-values-D_d5_1w5.mjs → bulk-discard-values-BQ3z6nJb.mjs} +5 -5
- package/dist/{bulk-edit-Cce05vb_.mjs → bulk-edit-CJxoxDGQ.mjs} +7 -7
- package/dist/{bulk-rescan-values-DIQN4VT_.mjs → bulk-rescan-values-DflzyxEj.mjs} +5 -5
- package/dist/{bulk-sync-schema-DLWf5dCl.mjs → bulk-sync-schema-CBIs4yHs.mjs} +5 -5
- package/dist/{cancel-rnd6UI-6.mjs → cancel-CyTRWSOr.mjs} +3 -3
- package/dist/{cancel-task-acq1GT6Z.mjs → cancel-task-BuZsQuLp.mjs} +2 -2
- package/dist/{card-QR3zEu6E.mjs → card-BJRZ5D5Q.mjs} +2 -2
- package/dist/card-DA1W3Axw.mjs +25 -0
- package/dist/{card-3NmUiU5F.mjs → card-VipF12MJ.mjs} +1 -1
- package/dist/{cards-DmzPtx81.mjs → cards-BEeFNiCt.mjs} +6 -6
- package/dist/cli.mjs +142 -292
- package/dist/{client-D-Aw6JLk.mjs → client-DvWllzKd.mjs} +401 -189
- package/dist/{collection-D5vt2IJ_.mjs → collection-Bf3lv-zo.mjs} +1 -1
- package/dist/collection-C98jgufi.mjs +21 -0
- package/dist/{collection-DNmFKALA.mjs → collection-Cz2qLX2m.mjs} +1 -1
- package/dist/{collection-namespace-Dl8_7xII.mjs → collection-namespace-C0JcSEwN.mjs} +2 -1
- package/dist/{content-translation-DxT1OMnP.mjs → content-translation-1coWME1P.mjs} +3 -3
- package/dist/{copy-BTdTiDQo.mjs → copy-DVe4rcLK.mjs} +6 -6
- package/dist/{copy-flags-CTM91pxH.mjs → copy-flags-DZ5Cy-Gk.mjs} +2 -2
- package/dist/{copy-CyFf3e2Y.mjs → copy-hE6SaHfb.mjs} +6 -6
- package/dist/{create-CuJJd7Rh.mjs → create-B3P62NaN.mjs} +4 -5
- package/dist/{create-BH6zpwKD.mjs → create-B3kz_fHg.mjs} +4 -5
- package/dist/{create-Dn8V5siS.mjs → create-BPRuU7Mv.mjs} +7 -8
- package/dist/{create-DeCPAYJi.mjs → create-BjH0i2BC.mjs} +9 -10
- package/dist/{create-Ch-NbeMr.mjs → create-Btwnm6D2.mjs} +9 -10
- package/dist/{create-Ce5YVusp.mjs → create-CCb2_Kcc.mjs} +6 -7
- package/dist/{create-DeiBnRRz.mjs → create-D271V9Cf.mjs} +9 -9
- package/dist/create-D6Xm2b2D.mjs +37 -0
- package/dist/{create-roJbQOmm.mjs → create-DCoo3sI2.mjs} +4 -4
- package/dist/{create-B6dABrs7.mjs → create-DEIIUohY2.mjs} +10 -11
- package/dist/{create-qtTB8rIE.mjs → create-DJg0Ohj5.mjs} +9 -10
- package/dist/{create-C3rabvE_.mjs → create-DR5tpMUA.mjs} +4 -5
- package/dist/{create-BwIOlpLc.mjs → create-DR8g_rEL.mjs} +6 -7
- package/dist/{create-GU8_GNbN.mjs → create-DXivfl69.mjs} +4 -5
- package/dist/create-DdfFgF-w.mjs +33 -0
- package/dist/{create-DsCydgm22.mjs → create-DkFCjBp3.mjs} +6 -7
- package/dist/{create-B3QZpifA.mjs → create-Dz4c8E33.mjs} +9 -10
- package/dist/{create-Bg3WTMMU.mjs → create-LpdQKxUt.mjs} +7 -7
- package/dist/{create-D6NLpIzV.mjs → create-XCzUuT42.mjs} +4 -5
- package/dist/{create-DiG165B2.mjs → create-XVjr8IDS.mjs} +6 -7
- package/dist/{create-branch-C4Ql9G2g.mjs → create-branch-D_nbKxDS.mjs} +3 -2
- package/dist/{csv-DmuyyLdz.mjs → csv-LP7sE-CS.mjs} +4 -4
- package/dist/{current-task-C2PPBVVv.mjs → current-task-DhgwtGN3.mjs} +3 -3
- package/dist/{dashboard-D5E3fMKh.mjs → dashboard-Bx2sYijR.mjs} +1 -1
- package/dist/dashboard-CR97_zXn.mjs +35 -0
- package/dist/{dashboard-Chjy5GKR.mjs → dashboard-Cwsf-e9T.mjs} +23 -6
- package/dist/data-action-C4jE-RLb.mjs +24 -0
- package/dist/{data-action-DZxVB_hD.mjs → data-action-CuvI17XF.mjs} +8 -2
- package/dist/{data-action-R9qxJDPA.mjs → data-action-DLj9cgpu.mjs} +1 -1
- package/dist/data-app-BUW-HlUo.mjs +52 -0
- package/dist/data-app-BlBvvRzC.mjs +41 -0
- package/dist/data-app-Blz61mG5.mjs +29 -0
- package/dist/data-app-project-DjDDWgUF.mjs +58 -0
- package/dist/{database-CxykzTAA.mjs → database-C5ucihp3.mjs} +2 -2
- package/dist/{database-D8XzgJEz.mjs → database-u_spHEa0.mjs} +1 -1
- package/dist/{dataset-DIQLAp2P.mjs → dataset-LJxNN6p5.mjs} +3 -3
- package/dist/{db-BgKKN1-4.mjs → db-D8mPRqZc.mjs} +8 -8
- package/dist/{delete-DiZg2wit.mjs → delete-8k7oYDFr.mjs} +4 -4
- package/dist/{delete-_XC6R-Jn.mjs → delete-B1SbEVIc.mjs} +4 -4
- package/dist/{delete-CS6hsBnd.mjs → delete-CaaPrNOf.mjs} +4 -4
- package/dist/{delete-5ZOvFr-7.mjs → delete-CqyBkMCd.mjs} +4 -4
- package/dist/{delete-DeqGTuwO.mjs → delete-CuyGTe0i.mjs} +4 -4
- package/dist/delete-DC-DEYSq.mjs +44 -0
- package/dist/{delete-B3aylPHD.mjs → delete-DWTqIlbr.mjs} +4 -4
- package/dist/delete-DaqzPLcG.mjs +40 -0
- package/dist/{delete-DtIbkF42.mjs → delete-DuaJ8PUI.mjs} +4 -4
- package/dist/{delete-CH32Ew4m.mjs → delete-ZjLpkwgx.mjs} +4 -4
- package/dist/delete-runtime-DOOy3gzH.mjs +73 -0
- package/dist/{delete-table-BEuMlqw1.mjs → delete-table-CnGv1gx9.mjs} +4 -4
- package/dist/{dependencies-DD48u9i3.mjs → dependencies-D6SNdLW8.mjs} +6 -6
- package/dist/dependency-Bbg9x1V9.mjs +15 -0
- package/dist/{dependency-CaC6XuTY.mjs → dependency-C1DExO6k.mjs} +8 -5
- package/dist/{dependency-Dxvb2Znu.mjs → dependency-DcM96XJ-.mjs} +4 -3
- package/dist/{dependents-ByfHs8pO.mjs → dependents-BizQb14Q.mjs} +9 -9
- package/dist/{dirty-DsrGfLit.mjs → dirty-BHwdHOEj.mjs} +3 -3
- package/dist/{discard-values-BfpwwC62.mjs → discard-values-BWlh2ce8.mjs} +5 -5
- package/dist/document-B6254tue.mjs +20 -0
- package/dist/{document-UMG6me2P.mjs → document-BHOQq2T_.mjs} +2 -2
- package/dist/{document-DVIu3Vj4.mjs → document-lS1XZEF3.mjs} +1 -1
- package/dist/{download-kpgGtfpw.mjs → download-D2wEAgi_.mjs} +2 -2
- package/dist/{eid-Tp-ACZ4O.mjs → eid-KtWIPUCC.mjs} +5 -5
- package/dist/{entity-DjDkaMkB.mjs → entity-DICgy4Bl.mjs} +2 -2
- package/dist/{entry-flags-nhBrUS6p.mjs → entry-flags-DLS6r8Vf.mjs} +5 -6
- package/dist/{events-Dm9-ofXu.mjs → events-B8yMqrrD.mjs} +4 -4
- package/dist/{execute-BL0dAlrp.mjs → execute-Bebvab7D.mjs} +7 -8
- package/dist/{export-CIW-dHft.mjs → export-BNj3RvAl.mjs} +6 -5
- package/dist/{export-flags-CpukgETM.mjs → export-flags-iXfEILf7.mjs} +3 -2
- package/dist/{export-preflight-BMlz3Hp9.mjs → export-preflight-F3OapAD5.mjs} +3 -3
- package/dist/{field-DoWQUl7V.mjs → field-C2qOViFZ.mjs} +8 -2
- package/dist/{field-BVz4AS3f.mjs → field-CT4r6b92.mjs} +1 -1
- package/dist/field-DQAcCjXr.mjs +21 -0
- package/dist/{fields-CcerFaiu.mjs → fields-BkAS_wIA.mjs} +6 -6
- package/dist/{filter-flags-DhE4olyf.mjs → filter-flags-ezqqsOQL.mjs} +4 -4
- package/dist/{fks-CYfBesHV.mjs → fks--SaqvPw1.mjs} +6 -6
- package/dist/{get-DKbGKa6F.mjs → get-B1S1kW2N.mjs} +5 -5
- package/dist/{get-Be7yjY9v.mjs → get-B1uiZyyi.mjs} +5 -5
- package/dist/{get-BaiyMem3.mjs → get-B2nBYYCw.mjs} +4 -4
- package/dist/{get-CmxYFUuR.mjs → get-BSKpQJVB.mjs} +5 -5
- package/dist/{get-BFloqjrN.mjs → get-BjgB5l7X.mjs} +5 -5
- package/dist/{get-RCDF-hEq.mjs → get-Boql3_0n.mjs} +5 -5
- package/dist/{get-CEJE9Rmp.mjs → get-BseHija1.mjs} +5 -5
- package/dist/{get-eNRULmE5.mjs → get-C9VumVZ3.mjs} +6 -5
- package/dist/{get--E7UvR-v.mjs → get-CGPxAoow.mjs} +3 -3
- package/dist/{get-HzDQViDP2.mjs → get-CM9IOr82.mjs} +3 -3
- package/dist/{get-CRfrkxqc.mjs → get-CTTKQDr7.mjs} +5 -5
- package/dist/{get-DHSuVxrH.mjs → get-CU1zKfBS.mjs} +5 -5
- package/dist/{get-Dp45rXRS.mjs → get-CWDz6eV2.mjs} +3 -3
- package/dist/{get-p2sZvp7v.mjs → get-C_hatP_z.mjs} +3 -3
- package/dist/get-Cdcj1c9U.mjs +28 -0
- package/dist/{get-BLnQ2aut.mjs → get-CiLYhFjU.mjs} +5 -5
- package/dist/{get-LRTRu85E.mjs → get-De6qpuzO.mjs} +5 -5
- package/dist/{get-CZgAr8rM.mjs → get-VpGfaL7c.mjs} +5 -5
- package/dist/{get-BvEHWLGL.mjs → get-f2km9wsq.mjs} +3 -3
- package/dist/{get-Cj3-w_Nu.mjs → get-gGSl7Se4.mjs} +5 -5
- package/dist/{get-B0RQPTV-2.mjs → get-iOs1ci6x.mjs} +5 -5
- package/dist/{get-run-C3AHKn3-.mjs → get-run-CHup8cMl.mjs} +5 -5
- package/dist/{get-DRhcS76J.mjs → get-uHs9Ve-4.mjs} +5 -5
- package/dist/git-sync-Czena0TW.mjs +29 -0
- package/dist/glossary-BVxRpD7o.mjs +14 -0
- package/dist/{glossary-BkGmCI4X.mjs → glossary-CQRW3Z4d.mjs} +1 -1
- package/dist/{glossary-QN-hHfOT.mjs → glossary-iPIWrEbP.mjs} +1 -1
- package/dist/{graph-BGOYocJc.mjs → graph-B7SlzpkC.mjs} +6 -6
- package/dist/{group-81zoQcEP.mjs → group--6adAsqG.mjs} +2 -2
- package/dist/{has-remote-changes-DxsRvZsw.mjs → has-remote-changes-DZq7q2Wk.mjs} +2 -2
- package/dist/{import-izn2_OsW.mjs → import-DKZF0kMU.mjs} +6 -5
- package/dist/input-gate-registry-Dh8QjKgW.mjs +14 -0
- package/dist/{is-dirty-DHYYRl6Y.mjs → is-dirty-haRLODo1.mjs} +2 -2
- package/dist/{items-mIoZBqUc.mjs → items-BGWE5hLl.mjs} +7 -6
- package/dist/{key-BYEv4Wgq.mjs → key-DLrpCgdZ.mjs} +1 -1
- package/dist/{library-wUiD2jbw.mjs → library-BprxuqZl.mjs} +1 -1
- package/dist/{library-DKIqzyUk.mjs → library-C4g9pdiS.mjs} +8 -3
- package/dist/{library-5I0TlXmf.mjs → library-e3aiJ1Yb.mjs} +5 -5
- package/dist/{list-BKhJfFyB.mjs → list-B9yhUzCc.mjs} +5 -5
- package/dist/{list-CpxEOoqw.mjs → list-BNel4hYs.mjs} +6 -6
- package/dist/{list-D8jiz8YP.mjs → list-Bbc8VYDi.mjs} +3 -3
- package/dist/{list-CT7AOXTS.mjs → list-BiIZdUoN.mjs} +5 -5
- package/dist/list-C-AnwSRP.mjs +33 -0
- package/dist/list-CNiCM1NL.mjs +29 -0
- package/dist/{list-DV4wojtv.mjs → list-COPGHkWL.mjs} +5 -5
- package/dist/{list-CTlIVHeG.mjs → list-CsXdnNyp.mjs} +5 -5
- package/dist/{list-DVnPzc5m.mjs → list-D0ASRA_6.mjs} +6 -6
- package/dist/{list-B6TYzXyW.mjs → list-DAa4EWlv.mjs} +5 -5
- package/dist/{list-CmOTwt_z.mjs → list-DDt1iLXj.mjs} +4 -4
- package/dist/{list-C6roDyBd.mjs → list-DFuydMdV.mjs} +6 -6
- package/dist/{list-C1dEh2yq.mjs → list-DFxfpa4W.mjs} +6 -6
- package/dist/{list-OWPg67JC.mjs → list-DJyIkrY1.mjs} +5 -5
- package/dist/{list-CuEPFHrk.mjs → list-DUCxqhtn.mjs} +5 -5
- package/dist/{list-B8FPpgct.mjs → list-D_8GeDG-.mjs} +3 -3
- package/dist/{list-NeImhwLD.mjs → list-DcXqKZyg.mjs} +5 -5
- package/dist/{list-C3CXHKTW.mjs → list-DednUvr3.mjs} +3 -3
- package/dist/{list-O_nmgwSj.mjs → list-Dvf1iB8r.mjs} +3 -3
- package/dist/{list-jT5ndEGr.mjs → list-HI7Mpoy-.mjs} +5 -5
- package/dist/{list-BEBAq1xc.mjs → list-OUSeeuXb.mjs} +5 -5
- package/dist/{list-BxIulkp3.mjs → list-P7FnSsbZ.mjs} +6 -6
- package/dist/{list-C-f-G-cC.mjs → list-gcDxZ7Th.mjs} +5 -5
- package/dist/{login-DOW1mr40.mjs → login-APHXId1p.mjs} +6 -5
- package/dist/{logout-BQ8wywf7.mjs → logout-V0pxj6AM.mjs} +3 -2
- package/dist/{measure-CtfjqJFP.mjs → measure-BMWrX1ca.mjs} +3 -1
- package/dist/{measure-Bz-bGn-Z.mjs → measure-DnGWkKyx.mjs} +6 -6
- package/dist/{measure-4P0bOlZ3.mjs → measure-DqZG65of.mjs} +1 -1
- package/dist/{notification-DaA4bBHW.mjs → notification-B5yMuPmo.mjs} +6 -1
- package/dist/{notification-W2SVssyY.mjs → notification-BEJaEZS2.mjs} +2 -2
- package/dist/{parameter-DvRQMKd2.mjs → parameter-Bucz3cLJ.mjs} +1 -1
- package/dist/{parameter-values-B7rr6fcy.mjs → parameter-values-DfZSEK3O.mjs} +6 -5
- package/dist/{parse-enum-DAcTzG1q.mjs → parse-enum-CEXPuN9H.mjs} +1 -1
- package/dist/{parse-id-5BZGQ9Vd.mjs → parse-id-EXZan40V.mjs} +1 -1
- package/dist/{parse-ref-ByXc-pls.mjs → parse-ref-D28NvwpR.mjs} +1 -1
- package/dist/{parse-text-FgX60vIg.mjs → parse-text-C4LYzIFa.mjs} +1 -1
- package/dist/{path-CHQguAPa.mjs → path-Bni-pnKS.mjs} +4 -4
- package/dist/{poll-CgtcJopL.mjs → poll-vxN__4cz.mjs} +2 -2
- package/dist/predicates-0C0TsWcJ.mjs +219 -0
- package/dist/{preflight-ChTKhB8Y.mjs → preflight-4iy2qzsh.mjs} +3 -2
- package/dist/{process-aqXm5QgC.mjs → process-BQC3mK2k.mjs} +1 -1
- package/dist/{publish-CaoFOucS.mjs → publish-DkYn86ak.mjs} +5 -4
- package/dist/{pulse-CC81N2_0.mjs → pulse-B2AmIWsO.mjs} +11 -4
- package/dist/{pulse-JPrq6NFP.mjs → pulse-CPSpum5U.mjs} +2 -2
- package/dist/{query-0u1WR1bV.mjs → query-CZbI4Rlv.mjs} +17 -29
- package/dist/{query-CzDBwAZD.mjs → query-gHeYfWj_.mjs} +7 -6
- package/dist/{remapping-CodmT28F.mjs → remapping-hcWkFQsx.mjs} +5 -5
- package/dist/{remove-collection-DfUsf6Dd.mjs → remove-collection-Qne5ww6M.mjs} +3 -3
- package/dist/{render-DP6UoZNT.mjs → render-d1-sCPn_.mjs} +3 -2
- package/dist/{replace-qWiUOgmn.mjs → replace-DoU0IFGd.mjs} +4 -4
- package/dist/{requirement-check-sfmyH2PH.mjs → requirement-check-BoVSK1uK.mjs} +2 -2
- package/dist/{rescan-values-BuDmeda3.mjs → rescan-values-COzM86P5.mjs} +5 -5
- package/dist/{rescan-values-BcrhdSj_.mjs → rescan-values-s82n_You.mjs} +5 -5
- package/dist/{run-BG_5lR0x.mjs → run-Bwj4Uuxk.mjs} +4 -4
- package/dist/{run-BBRnFayr.mjs → run-JYNbEO_V.mjs} +6 -5
- package/dist/{run-DXXD-CnS.mjs → run-Q7fHux1F.mjs} +5 -4
- package/dist/{runs-CovgMSwy.mjs → runs-GQD6FO2k.mjs} +6 -6
- package/dist/{runtime-Cmes70jO.mjs → runtime-iIsqiOwO.mjs} +51 -9
- package/dist/scaffold-CJo9l-2p.mjs +50 -0
- package/dist/schema-2JhmK8FM.mjs +283 -0
- package/dist/{schema-tables-CjKl8jr5.mjs → schema-tables-CarGLayY.mjs} +6 -6
- package/dist/{schemas-CAGvBAD_.mjs → schemas-oSjtuQ4G.mjs} +4 -4
- package/dist/{search-DFU6FHRd.mjs → search-Ca0sIr28.mjs} +7 -6
- package/dist/{search-OpYS2Ub4.mjs → search-CvGEL2h-.mjs} +6 -5
- package/dist/{segment-D-SKpFzF.mjs → segment-BJCEJwNY.mjs} +6 -6
- package/dist/{segment-C_gl5ag6.mjs → segment-CWVASaM1.mjs} +1 -1
- package/dist/{segment-OsrbUDzw.mjs → segment-Cf-DrdjE.mjs} +3 -1
- package/dist/{send-DNu83_3E.mjs → send-B4nZI6CU.mjs} +3 -3
- package/dist/{set-CGYZcLVo.mjs → set-BjMZCdN8.mjs} +5 -6
- package/dist/{set-active-32IaLx1O.mjs → set-active-CWDdv3kN.mjs} +4 -4
- package/dist/set-bundle-C2uk4jdt.mjs +40 -0
- package/dist/{set-data-actions-DRhgAfhE.mjs → set-data-actions-lWl05ekf.mjs} +6 -6
- package/dist/set-enabled-CPhw1AX4.mjs +41 -0
- package/dist/{set-sensitivity-D_i3XEe8.mjs → set-sensitivity-B7WI5BJC.mjs} +6 -6
- package/dist/{setting-BBn9Lv9J.mjs → setting-BvPpFjJT.mjs} +4 -4
- package/dist/{setup-CO7QV-ao.mjs → setup-BnczkG96.mjs} +1 -1
- package/dist/{setup-8d7Uplhy.mjs → setup-DPRa8Uxm.mjs} +5 -6
- package/dist/{signal-D8MH3LMN.mjs → signal-BNUlQjpc.mjs} +1 -1
- package/dist/{skill-list-D2FhhYS3.mjs → skill-list-BoJITnw8.mjs} +1 -1
- package/dist/{skills-BeIDC-_H.mjs → skills-BCivFuuZ.mjs} +3 -3
- package/dist/{skills-BZGd_9d3.mjs → skills-BY3MCR8i.mjs} +3 -2
- package/dist/slug-COdwq63O.mjs +15 -0
- package/dist/snippet-BcN1UwoS.mjs +19 -0
- package/dist/{stash-Dyc1xZ8u.mjs → stash-leoW1fby.mjs} +5 -4
- package/dist/{status-CQZwl1PX.mjs → status-AA4APlwZ.mjs} +3 -3
- package/dist/{status-lCN8unWe.mjs → status-BezD_K-g.mjs} +4 -4
- package/dist/{subscription-CEFxmtGH.mjs → subscription-BDukZFlC.mjs} +6 -6
- package/dist/{subscriptions-AU14uznL.mjs → subscriptions-CU4E_p7B.mjs} +6 -6
- package/dist/{summary-Do9IBOQM.mjs → summary-BFspP71W.mjs} +5 -5
- package/dist/{sync-schema-_gw9RQyF.mjs → sync-schema-BhRhsm8Y.mjs} +6 -6
- package/dist/{sync-schema-B3nyoKZl.mjs → sync-schema-BtjC-PNY.mjs} +5 -5
- package/dist/{sync-task-DNKG9Bk4.mjs → sync-task-Gf86CU9l.mjs} +1 -1
- package/dist/{table-BDsqRU7a.mjs → table-BNA9Or05.mjs} +3 -3
- package/dist/table-Dzp1uANs.mjs +26 -0
- package/dist/{table-CF7zW9cI.mjs → table-hgrX1i-R.mjs} +36 -5
- package/dist/{table-selector-flags-CHfrVpYQ.mjs → table-selector-flags-BpFFoSaT.mjs} +4 -3
- package/dist/{text-C2VwKF9D.mjs → text-8nOxfC17.mjs} +1 -1
- package/dist/timeline-Cr5d4Oer.mjs +21 -0
- package/dist/{timeline-event-B-nGnoVL.mjs → timeline-event-BiYDbW3r.mjs} +6 -6
- package/dist/{transform-DiW7bREn.mjs → transform-B62craFM.mjs} +76 -7
- package/dist/transform-C-0nV5Et.mjs +28 -0
- package/dist/{transform-CWGJB8N_.mjs → transform-DKPtUV54.mjs} +2 -2
- package/dist/transform-job-B9MPk7S5.mjs +22 -0
- package/dist/{transform-job-ClX8e5iO.mjs → transform-job-CDIb3B9o.mjs} +6 -1
- package/dist/{transform-job-BBZ5L46v.mjs → transform-job-D18XRLBK.mjs} +1 -1
- package/dist/{transform-tag-dKCqQPTd.mjs → transform-tag-DQXOPhmt.mjs} +5 -5
- package/dist/transform-test-wmAjyaka.mjs +16 -0
- package/dist/{transforms-DRAws1f4.mjs → transforms-DcXL4Dox.mjs} +6 -6
- package/dist/{transport-Ck4anhoc.mjs → transport-DZSxmmtY.mjs} +5 -4
- package/dist/{tree-Ddsj298M.mjs → tree-DrYYCdXP.mjs} +4 -3
- package/dist/typed-schema-DEzmTY3J.mjs +45 -0
- package/dist/{unpublish-BMfjQ8UV.mjs → unpublish-D8hmulCx.mjs} +3 -3
- package/dist/{unreferenced-DRQrvH5r.mjs → unreferenced-C3CqO3tu.mjs} +6 -6
- package/dist/{update-C1VwtJWu.mjs → update-3lRE8G9k.mjs} +10 -11
- package/dist/{update-BCC1Igr2.mjs → update-4TDRNrV-.mjs} +7 -8
- package/dist/{update-0AoF6QJ_.mjs → update-4sOfpwpv.mjs} +5 -6
- package/dist/{update-BQLTaw3z.mjs → update-552UGPAG.mjs} +7 -8
- package/dist/{update-DpP1EEC0.mjs → update-7iXRB23T2.mjs} +7 -8
- package/dist/{update-Bpsdi6kM.mjs → update-B21GAnzT.mjs} +7 -8
- package/dist/{update-6sfqiInZ.mjs → update-BVz0oIwS.mjs} +10 -11
- package/dist/{update-CGpiLu7N.mjs → update-BxRFktpB.mjs} +8 -9
- package/dist/{update-CnxzmPRG.mjs → update-CEDMvgJI.mjs} +11 -12
- package/dist/{update-BIL0JPqm.mjs → update-CcNYCalv.mjs} +5 -6
- package/dist/{update-DlFHoUxe.mjs → update-CctMr2T1.mjs} +8 -8
- package/dist/{update-DrT10fxQ.mjs → update-Ch6AAOeh.mjs} +5 -6
- package/dist/{update-_hHnM1Hx.mjs → update-CtuLA42g.mjs} +11 -11
- package/dist/{update-C19B1Sry.mjs → update-DVD77mVR.mjs} +5 -6
- package/dist/{update-C1x90FSH.mjs → update-DmMHHn75.mjs} +10 -11
- package/dist/{update-D1aKeWfo.mjs → update-DvGIaZdl.mjs} +5 -6
- package/dist/{update-BtfUX9CN.mjs → update-LlJM4tUd.mjs} +10 -11
- package/dist/{update-8eXJso_l.mjs → update-Zv7PP8nl.mjs} +7 -8
- package/dist/{update-dashcard-CDI0Tnxy.mjs → update-dashcard-BijqiYQd.mjs} +7 -8
- package/dist/{update-pXVhyiFo.mjs → update-l4WRN6Jh.mjs} +7 -8
- package/dist/update-sma1ZRm2.mjs +36 -0
- package/dist/{upgrade-Cfouv1Ii.mjs → upgrade-TzILOkiM.mjs} +5 -4
- package/dist/upload-B37bUVl_.mjs +13 -0
- package/dist/{upload-DnLXgUA-.mjs → upload-CdiDKe69.mjs} +2 -2
- package/dist/{upload-DIEcI5iM.mjs → upload-Do-kOGtc.mjs} +3 -3
- package/dist/{uuid-D0sH5txV.mjs → uuid-Dqq2WfAT.mjs} +3 -2
- package/dist/{validate-BQ7vI8_x.mjs → validate-moGYlHxB.mjs} +8 -18
- package/dist/validate-query-Bf5FhhMI.mjs +72 -0
- package/dist/{values-BFPO6y5o.mjs → values-CtY5zv0m.mjs} +5 -5
- package/dist/{verify-C-StvB4f.mjs → verify-BiB8jzXB.mjs} +3 -3
- package/dist/{verify-CuGs0X3C.mjs → verify-DBTlWx-S.mjs} +3 -3
- package/dist/{verify-7fW020r_.mjs → verify-DJ7fGyLL.mjs} +4 -3
- package/dist/{wait-Cvt8xO0h.mjs → wait-DEYagfq4.mjs} +5 -5
- package/dist/{wait-flags-BnZ-dfE2.mjs → wait-flags-C3cu_O0w.mjs} +2 -2
- package/dist/{window-CfK_j6m1.mjs → window-D1w7B0vh.mjs} +1 -1
- package/package.json +2 -2
- package/skill-data/core/SKILL.md +14 -13
- package/skill-data/data-action/SKILL.md +1 -1
- package/skill-data/data-app/SKILL.md +138 -0
- package/skill-data/data-app/template/.env.local.example +2 -0
- package/skill-data/data-app/template/LICENSE +21 -0
- package/skill-data/data-app/template/README.md +29 -0
- package/skill-data/data-app/template/gitignore +5 -0
- package/skill-data/data-app/template/package.json +25 -0
- package/skill-data/data-app/template/src/App.tsx +9 -0
- package/skill-data/data-app/template/src/index.tsx +14 -0
- package/skill-data/data-app/template/src/theme.ts +25 -0
- package/skill-data/data-app/template/tsconfig.json +25 -0
- package/skill-data/data-app/template/vite.config.ts +3 -0
- package/skill-data/data-app-actions/SKILL.md +96 -0
- package/skill-data/data-app-data/SKILL.md +158 -0
- package/skill-data/data-app-filters/SKILL.md +87 -0
- package/skill-data/data-app-ui/SKILL.md +120 -0
- package/skill-data/mbql/SKILL.md +3 -3
- package/skill-data/native-sql/SKILL.md +1 -1
- package/skill-data/native-sql/references/template-tags.md +1 -1
- package/dist/body-C0VnEiRV.mjs +0 -16
- package/dist/card-BnL92zoT.mjs +0 -25
- package/dist/collection-DRHGwFSL.mjs +0 -21
- package/dist/dashboard-Bq1pae4N.mjs +0 -35
- package/dist/data-action-BZ2PvlaP.mjs +0 -24
- package/dist/delete-runtime-DRGveT8H.mjs +0 -55
- package/dist/dependency-6kfpR8Ga.mjs +0 -15
- package/dist/document-C0mZEg5w.mjs +0 -20
- package/dist/field-BUkyWiWk.mjs +0 -21
- package/dist/git-sync-CNTB5jvI.mjs +0 -29
- package/dist/glossary-B9Eo4hXc.mjs +0 -14
- package/dist/snippet-CpZ5cJ_y.mjs +0 -19
- package/dist/table-Cb_Uvw8m.mjs +0 -26
- package/dist/timeline-x0s_3sfc.mjs +0 -21
- package/dist/transform-job-Dlx2c6II.mjs +0 -22
- package/dist/transform-kP11Mv9_.mjs +0 -28
- package/dist/transform-test-jFuzVhlT.mjs +0 -16
- package/dist/upload-Cqv-In6j.mjs +0 -13
- package/dist/validate-query-YtH3d5BP.mjs +0 -38
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { _ as formatZodIssue, c as InternalError, d as PartialWriteError, f as ResponseShapeError, g as errorMessage, o as ConfigError, p as TimeoutError, r as isPlainObject, y as isNonInterruptFailure } from "./predicates-0C0TsWcJ.mjs";
|
|
2
|
+
import { F as CapabilityError, K as HttpError, Z as parseJsonOrPlain, i as methodRequirements, r as isMethodKey } from "./cli.mjs";
|
|
3
|
+
import { i as NotificationCardPayload, n as CARD_PAYLOAD_TYPE, r as Notification, t as AnyNotification } from "./notification-B5yMuPmo.mjs";
|
|
4
|
+
import { V as profileFromProperties, tt as SessionProperties } from "./runtime-iIsqiOwO.mjs";
|
|
5
|
+
import { i as CreatedApiKey, t as ApiKey } from "./api-key-DbsqHlN6.mjs";
|
|
6
|
+
import { n as featureFailures, r as supersedingFeature, t as checkFeatures } from "./requirement-check-BoVSK1uK.mjs";
|
|
7
|
+
import { n as createTransport } from "./transport-DZSxmmtY.mjs";
|
|
8
|
+
import { i as CardDetail, o as CardQueryResult, t as Card } from "./card-BJRZ5D5Q.mjs";
|
|
9
|
+
import { t as gateInput } from "./input-gate-registry-Dh8QjKgW.mjs";
|
|
10
|
+
import { _ as fieldRemappedValueSchema, c as FieldSemanticType, d as FieldValues, g as fieldDetailSchema, p as FieldWithDataSensitivity, r as FieldBaseType, s as FieldSearchMatches, t as DATA_SENSITIVITY_GATE } from "./field-C2qOViFZ.mjs";
|
|
8
11
|
import { r as ModerationReviewCreateInput, t as ModerationReview } from "./moderation-review-Bf9bPNQI.mjs";
|
|
9
|
-
import {
|
|
12
|
+
import { i as ParameterValues, o as TemporalUnit } from "./parameter-Bucz3cLJ.mjs";
|
|
10
13
|
import { r as PivotExportFormat, t as DatasetQuery } from "./query-BKtMP5eH.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import { c as DatabaseWithSettings, t as Database } from "./database-
|
|
14
|
+
import { S as TableSelectors, _ as TableQueryMetadata, a as Table, d as TableDataLayerTier, m as TableForeignKey, n as DATA_LAYER_MEDALLION_GATE, r as DATA_LAYER_TIER_GATE, t as DATA_AUTHORITY_WITHDRAWAL_GATE, w as TableVisibilityType } from "./table-hgrX1i-R.mjs";
|
|
15
|
+
import { c as DatabaseWithSettings, t as Database } from "./database-C5ucihp3.mjs";
|
|
13
16
|
import { t as Snippet } from "./snippet-CyKAgIZl.mjs";
|
|
14
|
-
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-
|
|
15
|
-
import { c as CollectionItem, m as CollectionTreeNode, r as Collection } from "./collection-
|
|
17
|
+
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-LJxNN6p5.mjs";
|
|
18
|
+
import { c as CollectionItem, m as CollectionTreeNode, r as Collection } from "./collection-Cz2qLX2m.mjs";
|
|
16
19
|
import { t as ContentTranslationUploadResult } from "./content-translation-BrHOrmj9.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
20
|
+
import { a as DashboardCreateInput, f as Dashcard, g as dashboardDetailSchema, r as DashboardCopy, t as Dashboard } from "./dashboard-Cwsf-e9T.mjs";
|
|
21
|
+
import { c as dataActionSchema, o as DataActionExecuteResult, t as DATA_ACTION_COLLECTION_GATE } from "./data-action-CuvI17XF.mjs";
|
|
22
|
+
import { i as DataAppEntry, t as DataApp } from "./data-app-BUW-HlUo.mjs";
|
|
23
|
+
import { r as pollUntil } from "./poll-vxN__4cz.mjs";
|
|
24
|
+
import { i as DependencyEntity, s as DependencyGraph, t as BreakingSource, u as DependencyNode } from "./dependency-C1DExO6k.mjs";
|
|
25
|
+
import { t as Document } from "./document-BHOQq2T_.mjs";
|
|
22
26
|
import { i as EidTranslateResult } from "./eid-translation-Ba92VOHe.mjs";
|
|
23
27
|
import { a as SyncExportPreflight, f as SyncTask, g as isSyncTaskTerminal, l as SyncRemoteChanges, n as SyncBranchCreated, r as SyncDirtyItem, t as RemoteSyncState, u as SyncSettingsUpdateResult } from "./git-sync-DP4wQFzm.mjs";
|
|
24
|
-
import { t as Glossary } from "./glossary-
|
|
25
|
-
import { a as libraryWireSchema, i as LibraryPublishTablesInput, n as LibraryCollectionInfo, o as toLibrary } from "./library-
|
|
26
|
-
import { t as Measure } from "./measure-
|
|
27
|
-
import { t as Pulse } from "./pulse-
|
|
28
|
-
import { a as TransformDagTransform, d as TransformTarget, g as
|
|
28
|
+
import { t as Glossary } from "./glossary-iPIWrEbP.mjs";
|
|
29
|
+
import { a as libraryWireSchema, i as LibraryPublishTablesInput, n as LibraryCollectionInfo, o as toLibrary } from "./library-C4g9pdiS.mjs";
|
|
30
|
+
import { t as Measure } from "./measure-BMWrX1ca.mjs";
|
|
31
|
+
import { o as SUBSCRIPTION_FILTERS_GATE, t as Pulse } from "./pulse-B2AmIWsO.mjs";
|
|
32
|
+
import { _ as transformRowSchema, a as TransformDagTransform, d as TransformTarget, g as transformDetailSchema, h as keyedByAlias, i as TransformDagRunResult, l as TransformRunSummary, m as isTransformRunTerminal, o as TransformRun, p as isTransformRunFailed, u as TransformSourceTableEntryInput, v as transformSourceBody } from "./transform-B62craFM.mjs";
|
|
29
33
|
import { r as SearchResult } from "./search-1et9tv_s.mjs";
|
|
30
|
-
import { t as Segment } from "./segment-
|
|
34
|
+
import { t as Segment } from "./segment-Cf-DrdjE.mjs";
|
|
31
35
|
import { t as Setting } from "./setting-DTiLCW8g.mjs";
|
|
32
|
-
import { n as SetupResult } from "./setup-
|
|
36
|
+
import { n as SetupResult } from "./setup-BnczkG96.mjs";
|
|
33
37
|
import { i as TimelineEvent, t as Timeline } from "./timeline-DcsCXNUt.mjs";
|
|
34
|
-
import { c as transformJobSchema, n as TransformJobActiveResult, s as transformJobRunResultSchema } from "./transform-job-
|
|
38
|
+
import { c as transformJobSchema, n as TransformJobActiveResult, s as transformJobRunResultSchema } from "./transform-job-CDIb3B9o.mjs";
|
|
35
39
|
import { t as TransformTag } from "./transform-tag-CcElGp3C.mjs";
|
|
36
40
|
import { i as TransformTestRunResult, t as TransformTest } from "./transform-test-Bexa_K89.mjs";
|
|
37
41
|
import { t as UploadResult } from "./upload-DAtxBBms.mjs";
|
|
@@ -48,6 +52,38 @@ var __exportAll = (all, no_symbols) => {
|
|
|
48
52
|
return target;
|
|
49
53
|
};
|
|
50
54
|
//#endregion
|
|
55
|
+
//#region ../client/src/resources/api-key.ts
|
|
56
|
+
function apiKeyResource(transport) {
|
|
57
|
+
/** List the API keys, each with its masked key and the group it acts as. `GET /api/api-key` answers a bare array. */
|
|
58
|
+
async function list(options = {}) {
|
|
59
|
+
return {
|
|
60
|
+
data: await transport.requestParsed(z.array(ApiKey), "/api/api-key", { ...options }),
|
|
61
|
+
total: null
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** Create an API key acting as a member of the group; the answer carries the key itself, which no later read returns. */
|
|
65
|
+
async function create(params, options = {}) {
|
|
66
|
+
return transport.requestParsed(CreatedApiKey, "/api/api-key", {
|
|
67
|
+
...options,
|
|
68
|
+
method: "POST",
|
|
69
|
+
body: params
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/** Delete an API key by id; requests made with it fail from then on. */
|
|
73
|
+
async function remove(id, options = {}) {
|
|
74
|
+
await transport.requestRaw(`/api/api-key/${id}`, {
|
|
75
|
+
...options,
|
|
76
|
+
method: "DELETE",
|
|
77
|
+
expectContentType: "binary"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
list,
|
|
82
|
+
create,
|
|
83
|
+
delete: remove
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
51
87
|
//#region ../client/src/resources/pivot-export.ts
|
|
52
88
|
const PivotedExportsProperty = SessionProperties.extend({ "enable-pivoted-exports": z.boolean() });
|
|
53
89
|
/**
|
|
@@ -200,112 +236,6 @@ function paginatedEnvelopeSchema(itemSchema) {
|
|
|
200
236
|
}).loose();
|
|
201
237
|
}
|
|
202
238
|
//#endregion
|
|
203
|
-
//#region ../client/src/resources/collection.ts
|
|
204
|
-
const CollectionApiList = z.array(Collection);
|
|
205
|
-
const CollectionTreeApiList = z.array(CollectionTreeNode);
|
|
206
|
-
const COLLECTION_LIST_QUERY = {
|
|
207
|
-
all: {},
|
|
208
|
-
archived: { archived: true },
|
|
209
|
-
personal: { "personal-only": true }
|
|
210
|
-
};
|
|
211
|
-
const DEFAULT_LIST_FILTER = "all";
|
|
212
|
-
function refPath(ref) {
|
|
213
|
-
return encodeURIComponent(ref);
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* List every collection the caller can read, the Library and its children among them, parsing each
|
|
217
|
-
* through the caller's own projection. `Collection` pins `type`, `namespace` and `authority_level`
|
|
218
|
-
* to closed enums, so a consumer reading a few fields off every collection on the instance narrows
|
|
219
|
-
* here: one collection carrying a server value outside those sets then costs nothing to a caller
|
|
220
|
-
* that never reads the field.
|
|
221
|
-
*/
|
|
222
|
-
async function listCollectionsAs(transport, schema, options = {}) {
|
|
223
|
-
return transport.requestParsed(z.array(schema), "/api/collection", { ...options });
|
|
224
|
-
}
|
|
225
|
-
function collectionResource(transport) {
|
|
226
|
-
/**
|
|
227
|
-
* List collections. `filter` picks a server-side preset: everything, archived, or personal. Every
|
|
228
|
-
* preset includes the Library collections that match it. `namespace` lists that namespace's
|
|
229
|
-
* collections, with its root, instead of the default namespace's.
|
|
230
|
-
*/
|
|
231
|
-
async function list(params = {}, options = {}) {
|
|
232
|
-
return {
|
|
233
|
-
data: await transport.requestParsed(CollectionApiList, "/api/collection", {
|
|
234
|
-
...options,
|
|
235
|
-
query: {
|
|
236
|
-
...COLLECTION_LIST_QUERY[params.filter ?? DEFAULT_LIST_FILTER],
|
|
237
|
-
namespace: params.namespace
|
|
238
|
-
}
|
|
239
|
-
}),
|
|
240
|
-
total: null
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
/** Get one collection by id, entity id, or the `root`/`trash` alias. */
|
|
244
|
-
async function get(ref, options = {}) {
|
|
245
|
-
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, { ...options });
|
|
246
|
-
}
|
|
247
|
-
/** Create a new collection. */
|
|
248
|
-
async function create(params, options = {}) {
|
|
249
|
-
return transport.requestParsed(Collection, "/api/collection", {
|
|
250
|
-
...options,
|
|
251
|
-
method: "POST",
|
|
252
|
-
body: params
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Update a collection, patching the fields the body carries. The server reads an absent
|
|
257
|
-
* `archived` as `false`, so a patch without it restores an archived collection, and a patch that
|
|
258
|
-
* moves a collection into the trash ignores `parent_id`.
|
|
259
|
-
*/
|
|
260
|
-
async function update(ref, params, options = {}) {
|
|
261
|
-
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, {
|
|
262
|
-
...options,
|
|
263
|
-
method: "PUT",
|
|
264
|
-
body: params
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
/** Archive (soft-delete) a collection. Metabase models this as an update, not its own endpoint. */
|
|
268
|
-
async function archive(ref, options = {}) {
|
|
269
|
-
return update(ref, { archived: true }, options);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Walk the items inside a collection one page at a time. This endpoint pages on the server, so
|
|
273
|
-
* the caller consumes pages rather than a single list and decides how far to pull.
|
|
274
|
-
*/
|
|
275
|
-
async function* itemPages(ref, params = {}, options = {}) {
|
|
276
|
-
yield* paginatePages(transport, `/api/collection/${refPath(ref)}/items`, CollectionItem, {
|
|
277
|
-
query: {
|
|
278
|
-
models: params.models,
|
|
279
|
-
archived: params.archived,
|
|
280
|
-
pinned_state: params.pinned_state
|
|
281
|
-
},
|
|
282
|
-
...options.offset !== void 0 && { offset: options.offset },
|
|
283
|
-
...options.max !== void 0 && { max: options.max },
|
|
284
|
-
...options.pageSize !== void 0 && { pageSize: options.pageSize },
|
|
285
|
-
...options.signal !== void 0 && { signal: options.signal }
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
/** Fetch the collection hierarchy as a forest of nested nodes. */
|
|
289
|
-
async function tree(params = {}, options = {}) {
|
|
290
|
-
return {
|
|
291
|
-
data: await transport.requestParsed(CollectionTreeApiList, "/api/collection/tree", {
|
|
292
|
-
...options,
|
|
293
|
-
query: { "include-library": params["include-library"] }
|
|
294
|
-
}),
|
|
295
|
-
total: null
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
return {
|
|
299
|
-
list,
|
|
300
|
-
get,
|
|
301
|
-
create,
|
|
302
|
-
update,
|
|
303
|
-
archive,
|
|
304
|
-
itemPages,
|
|
305
|
-
tree
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
//#endregion
|
|
309
239
|
//#region ../client/src/version/refusal.ts
|
|
310
240
|
const REFUSAL_STATUSES = /* @__PURE__ */ new Set([
|
|
311
241
|
400,
|
|
@@ -428,6 +358,135 @@ function topLevelField(path) {
|
|
|
428
358
|
return end === -1 ? path : path.slice(0, end);
|
|
429
359
|
}
|
|
430
360
|
//#endregion
|
|
361
|
+
//#region ../client/src/resources/collection.ts
|
|
362
|
+
const CollectionApiList = z.array(Collection);
|
|
363
|
+
const CollectionTreeApiList = z.array(CollectionTreeNode);
|
|
364
|
+
const COLLECTION_LIST_QUERY = {
|
|
365
|
+
all: {},
|
|
366
|
+
archived: { archived: true },
|
|
367
|
+
personal: { "personal-only": true }
|
|
368
|
+
};
|
|
369
|
+
const DEFAULT_LIST_FILTER = "all";
|
|
370
|
+
const TRASH_ALIAS = "trash";
|
|
371
|
+
const MODELS_FIELDS$1 = ["models"];
|
|
372
|
+
const ITEM_MODEL_FEATURES = {
|
|
373
|
+
transform: "transforms",
|
|
374
|
+
measure: "collectionItemMeasures",
|
|
375
|
+
exploration: "explorations"
|
|
376
|
+
};
|
|
377
|
+
function itemModelFeatures(_ref, params = {}) {
|
|
378
|
+
if (params.models === void 0) return [];
|
|
379
|
+
return params.models.flatMap((model) => {
|
|
380
|
+
const feature = ITEM_MODEL_FEATURES[model];
|
|
381
|
+
return feature === void 0 ? [] : [{
|
|
382
|
+
feature,
|
|
383
|
+
fields: MODELS_FIELDS$1
|
|
384
|
+
}];
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
function refPath(ref) {
|
|
388
|
+
return encodeURIComponent(ref);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* List every collection the caller can read, the Library and its children among them, parsing each
|
|
392
|
+
* through the caller's own projection. `Collection` pins `type`, `namespace` and `authority_level`
|
|
393
|
+
* to closed enums, so a consumer reading a few fields off every collection on the instance narrows
|
|
394
|
+
* here: one collection carrying a server value outside those sets then costs nothing to a caller
|
|
395
|
+
* that never reads the field.
|
|
396
|
+
*/
|
|
397
|
+
async function listCollectionsAs(transport, schema, options = {}) {
|
|
398
|
+
return transport.requestParsed(z.array(schema), "/api/collection", { ...options });
|
|
399
|
+
}
|
|
400
|
+
function collectionResource(transport) {
|
|
401
|
+
const { explainWalk } = explainer(transport, "collection");
|
|
402
|
+
/**
|
|
403
|
+
* List collections. `filter` picks a server-side preset: everything, archived, or personal. Every
|
|
404
|
+
* preset includes the Library collections that match it. `namespace` lists that namespace's
|
|
405
|
+
* collections, with its root, instead of the default namespace's.
|
|
406
|
+
*/
|
|
407
|
+
async function list(params = {}, options = {}) {
|
|
408
|
+
return {
|
|
409
|
+
data: await transport.requestParsed(CollectionApiList, "/api/collection", {
|
|
410
|
+
...options,
|
|
411
|
+
query: {
|
|
412
|
+
...COLLECTION_LIST_QUERY[params.filter ?? DEFAULT_LIST_FILTER],
|
|
413
|
+
namespace: params.namespace
|
|
414
|
+
}
|
|
415
|
+
}),
|
|
416
|
+
total: null
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
/** Get one collection by id, entity id, or the `root`/`trash` alias. */
|
|
420
|
+
async function get(ref, options = {}) {
|
|
421
|
+
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, { ...options });
|
|
422
|
+
}
|
|
423
|
+
/** Create a new collection. */
|
|
424
|
+
async function create(params, options = {}) {
|
|
425
|
+
return transport.requestParsed(Collection, "/api/collection", {
|
|
426
|
+
...options,
|
|
427
|
+
method: "POST",
|
|
428
|
+
body: params
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Update a collection, patching the fields the body carries. The server reads an absent
|
|
433
|
+
* `archived` as `false`, so a patch without it restores an archived collection, and a patch that
|
|
434
|
+
* moves a collection into the trash ignores `parent_id`.
|
|
435
|
+
*/
|
|
436
|
+
async function update(ref, params, options = {}) {
|
|
437
|
+
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, {
|
|
438
|
+
...options,
|
|
439
|
+
method: "PUT",
|
|
440
|
+
body: params
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
/** Archive (soft-delete) a collection. Metabase models this as an update, not its own endpoint. */
|
|
444
|
+
async function archive(ref, options = {}) {
|
|
445
|
+
return update(ref, { archived: true }, options);
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Walk the items inside a collection one page at a time. This endpoint pages on the server, so
|
|
449
|
+
* the caller consumes pages rather than a single list and decides how far to pull. The `trash`
|
|
450
|
+
* alias costs one more request, which reads the trash collection's id. A `models` filter takes
|
|
451
|
+
* `transform` only with `transforms`, `measure` only with `collectionItemMeasures`, and
|
|
452
|
+
* `exploration` only with `explorations`.
|
|
453
|
+
*/
|
|
454
|
+
async function* itemPages(ref, params = {}, options = {}) {
|
|
455
|
+
const withSignal = options.signal !== void 0 && { signal: options.signal };
|
|
456
|
+
yield* paginatePages(transport, `/api/collection/${refPath(ref === TRASH_ALIAS ? (await get(TRASH_ALIAS, { ...withSignal })).id : ref)}/items`, CollectionItem, {
|
|
457
|
+
query: {
|
|
458
|
+
models: params.models,
|
|
459
|
+
archived: params.archived,
|
|
460
|
+
pinned_state: params.pinned_state,
|
|
461
|
+
"pinned-state": params.pinned_state
|
|
462
|
+
},
|
|
463
|
+
...options.offset !== void 0 && { offset: options.offset },
|
|
464
|
+
...options.max !== void 0 && { max: options.max },
|
|
465
|
+
...options.pageSize !== void 0 && { pageSize: options.pageSize },
|
|
466
|
+
...withSignal
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
/** Fetch the collection hierarchy as a forest of nested nodes. */
|
|
470
|
+
async function tree(params = {}, options = {}) {
|
|
471
|
+
return {
|
|
472
|
+
data: await transport.requestParsed(CollectionTreeApiList, "/api/collection/tree", {
|
|
473
|
+
...options,
|
|
474
|
+
query: { "include-library": params["include-library"] }
|
|
475
|
+
}),
|
|
476
|
+
total: null
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
return {
|
|
480
|
+
list,
|
|
481
|
+
get,
|
|
482
|
+
create,
|
|
483
|
+
update,
|
|
484
|
+
archive,
|
|
485
|
+
itemPages: explainWalk("itemPages", itemPages, itemModelFeatures),
|
|
486
|
+
tree
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
//#endregion
|
|
431
490
|
//#region ../client/src/resources/csv-upload.ts
|
|
432
491
|
const CSV_CONTENT_TYPE = "text/csv";
|
|
433
492
|
function buildCsvFormData(file) {
|
|
@@ -459,6 +518,17 @@ function contentTranslationResource(transport) {
|
|
|
459
518
|
};
|
|
460
519
|
}
|
|
461
520
|
//#endregion
|
|
521
|
+
//#region ../client/src/resources/request-body.ts
|
|
522
|
+
/**
|
|
523
|
+
* Parse the body a caller hands a method, refusing one that does not match `schema` before any
|
|
524
|
+
* request. `what` names the body in the refusal.
|
|
525
|
+
*/
|
|
526
|
+
function parseRequestBody(schema, value, what) {
|
|
527
|
+
const parsed = schema.safeParse(value);
|
|
528
|
+
if (!parsed.success) throw new ConfigError(`invalid ${what}: ${parsed.error.issues.map(formatZodIssue).join("; ")}`);
|
|
529
|
+
return parsed.data;
|
|
530
|
+
}
|
|
531
|
+
//#endregion
|
|
462
532
|
//#region ../client/src/resources/dashboard.ts
|
|
463
533
|
const DashboardApiList = z.array(Dashboard);
|
|
464
534
|
const PreflightDashcard = z.looseObject({ card_id: z.number().int().nullable().optional() });
|
|
@@ -476,17 +546,19 @@ function dashboardResource(transport) {
|
|
|
476
546
|
}
|
|
477
547
|
/** Get one dashboard by id, with its dashcards, tabs and parameters. */
|
|
478
548
|
async function get(id, options = {}) {
|
|
479
|
-
return transport.requestParsed(
|
|
549
|
+
return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, { ...options });
|
|
480
550
|
}
|
|
481
551
|
/**
|
|
482
552
|
* Create a dashboard. The endpoint accepts no dashcards or tabs — a follow-up `update` is what
|
|
483
|
-
* puts content on a fresh dashboard.
|
|
553
|
+
* puts content on a fresh dashboard. A key `DashboardCreateInput` does not declare is dropped
|
|
554
|
+
* before the request, as the server drops it.
|
|
484
555
|
*/
|
|
485
556
|
async function create(params, options = {}) {
|
|
557
|
+
const body = parseRequestBody(DashboardCreateInput, params, "dashboard");
|
|
486
558
|
return transport.requestParsed(Dashboard, "/api/dashboard", {
|
|
487
559
|
...options,
|
|
488
560
|
method: "POST",
|
|
489
|
-
body
|
|
561
|
+
body
|
|
490
562
|
});
|
|
491
563
|
}
|
|
492
564
|
/**
|
|
@@ -497,7 +569,7 @@ function dashboardResource(transport) {
|
|
|
497
569
|
*/
|
|
498
570
|
async function update(id, params, options = {}) {
|
|
499
571
|
const body = await withCurrentTabs(id, params, options);
|
|
500
|
-
return transport.requestParsed(
|
|
572
|
+
return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, {
|
|
501
573
|
...options,
|
|
502
574
|
method: "PUT",
|
|
503
575
|
body
|
|
@@ -670,13 +742,18 @@ function stripEntityId(dashcard) {
|
|
|
670
742
|
};
|
|
671
743
|
}
|
|
672
744
|
//#endregion
|
|
673
|
-
//#region ../client/src/
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
745
|
+
//#region ../client/src/version/input-gates.ts
|
|
746
|
+
/** Whether `value`, as a caller passes it for the gated field, is one the gate applies to. */
|
|
747
|
+
function gateTriggered(gate, value) {
|
|
748
|
+
const { when } = gate;
|
|
749
|
+
switch (when.kind) {
|
|
750
|
+
case "present": return value !== void 0;
|
|
751
|
+
case "values": return when.values.some((gated) => gated === value);
|
|
752
|
+
case "nonEmpty": return Array.isArray(value) && value.length > 0;
|
|
753
|
+
}
|
|
679
754
|
}
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region ../client/src/resources/data-action.ts
|
|
680
757
|
function dataActionResource(transport) {
|
|
681
758
|
const { explain } = explainer(transport, "dataAction");
|
|
682
759
|
async function readSchema(options) {
|
|
@@ -705,8 +782,13 @@ function dataActionResource(transport) {
|
|
|
705
782
|
body: params
|
|
706
783
|
});
|
|
707
784
|
}
|
|
708
|
-
/**
|
|
785
|
+
/**
|
|
786
|
+
* Update a data action by id, patching only the fields the body carries. A server whose data
|
|
787
|
+
* actions have no collection never moves the action, and from 58.31 it strips the undeclared key and
|
|
788
|
+
* answers as if it had. So the field is refused there before the wire.
|
|
789
|
+
*/
|
|
709
790
|
async function update(id, params, options = {}) {
|
|
791
|
+
await transport.requireFeatures(gateTriggered(DATA_ACTION_COLLECTION_GATE, params.collection_id) ? [DATA_ACTION_COLLECTION_GATE.feature] : [], options);
|
|
710
792
|
const schema = await readSchema(options);
|
|
711
793
|
return transport.requestParsed(schema, `/api/action/${id}`, {
|
|
712
794
|
...options,
|
|
@@ -738,13 +820,84 @@ function dataActionResource(transport) {
|
|
|
738
820
|
list,
|
|
739
821
|
get,
|
|
740
822
|
create: explain("create", create),
|
|
741
|
-
update
|
|
823
|
+
update,
|
|
742
824
|
archive,
|
|
743
825
|
delete: remove,
|
|
744
826
|
execute
|
|
745
827
|
};
|
|
746
828
|
}
|
|
747
829
|
//#endregion
|
|
830
|
+
//#region ../client/src/resources/data-app.ts
|
|
831
|
+
const DATA_APPS_PATH = "/api/ee/apps";
|
|
832
|
+
function appPath(slug) {
|
|
833
|
+
return `${DATA_APPS_PATH}/${encodeURIComponent(slug)}`;
|
|
834
|
+
}
|
|
835
|
+
function dataAppResource(transport) {
|
|
836
|
+
const { explain } = explainer(transport, "dataApp");
|
|
837
|
+
/** List the data apps; `available` keeps only the enabled ones that aren't outdated. `GET /api/ee/apps` answers a bare array. */
|
|
838
|
+
async function list(filter = {}, options = {}) {
|
|
839
|
+
return {
|
|
840
|
+
data: await transport.requestParsed(z.array(DataAppEntry), DATA_APPS_PATH, {
|
|
841
|
+
...options,
|
|
842
|
+
query: { available: filter.available }
|
|
843
|
+
}),
|
|
844
|
+
total: null
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
/** Get one data app by slug; admins read disabled apps too. */
|
|
848
|
+
async function get(slug, options = {}) {
|
|
849
|
+
return transport.requestParsed(DataAppEntry, appPath(slug), { ...options });
|
|
850
|
+
}
|
|
851
|
+
/** Create a data app with its resource collection and an empty bundle; it is disabled unless the body says otherwise. */
|
|
852
|
+
async function create(params, options = {}) {
|
|
853
|
+
return transport.requestParsed(DataApp, DATA_APPS_PATH, {
|
|
854
|
+
...options,
|
|
855
|
+
method: "POST",
|
|
856
|
+
body: params
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
/** Update a data app's fields, or enable or disable it. */
|
|
860
|
+
async function update(slug, params, options = {}) {
|
|
861
|
+
return transport.requestParsed(DataApp, appPath(slug), {
|
|
862
|
+
...options,
|
|
863
|
+
method: "PUT",
|
|
864
|
+
body: params
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
/** Replace a data app's bundle with the text of a built bundle. */
|
|
868
|
+
async function replaceBundle(slug, bundle, options = {}) {
|
|
869
|
+
return transport.requestParsed(DataApp, `${appPath(slug)}/bundle`, {
|
|
870
|
+
...options,
|
|
871
|
+
method: "PUT",
|
|
872
|
+
body: { bundle }
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
/** The TypeScript module of the app's queries and actions: a `defineQuery` or `defineAction` call per question and action in its collection. */
|
|
876
|
+
async function typedSchema(slug, options = {}) {
|
|
877
|
+
return (await transport.requestRaw(`${appPath(slug)}/typed-schema`, {
|
|
878
|
+
...options,
|
|
879
|
+
expectContentType: "text"
|
|
880
|
+
})).text();
|
|
881
|
+
}
|
|
882
|
+
/** Delete a data app with its bundle, its collection and its group assignments. */
|
|
883
|
+
async function remove(slug, options = {}) {
|
|
884
|
+
await transport.requestRaw(appPath(slug), {
|
|
885
|
+
...options,
|
|
886
|
+
method: "DELETE",
|
|
887
|
+
expectContentType: "binary"
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
return {
|
|
891
|
+
list: explain("list", list),
|
|
892
|
+
get: explain("get", get),
|
|
893
|
+
create: explain("create", create),
|
|
894
|
+
update: explain("update", update),
|
|
895
|
+
replaceBundle: explain("replaceBundle", replaceBundle),
|
|
896
|
+
typedSchema: explain("typedSchema", typedSchema),
|
|
897
|
+
delete: explain("delete", remove)
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
//#endregion
|
|
748
901
|
//#region ../client/src/resources/database.ts
|
|
749
902
|
const DatabaseApiList = z.object({
|
|
750
903
|
data: z.array(Database),
|
|
@@ -923,18 +1076,24 @@ function datasetResource(transport) {
|
|
|
923
1076
|
//#region ../client/src/resources/dependency.ts
|
|
924
1077
|
const DependencyNodeApiList = z.array(DependencyNode);
|
|
925
1078
|
const DependencyEntityApiList = z.array(DependencyEntity);
|
|
926
|
-
function
|
|
927
|
-
|
|
1079
|
+
function entityTypeFeatures(type) {
|
|
1080
|
+
if (type === "measure") return [{
|
|
928
1081
|
feature: "measureDependencyGraph",
|
|
929
1082
|
fields: ["type"]
|
|
930
|
-
}]
|
|
1083
|
+
}];
|
|
1084
|
+
if (type === "action") return [{
|
|
1085
|
+
feature: "actionDependencyGraph",
|
|
1086
|
+
fields: ["type"]
|
|
1087
|
+
}];
|
|
1088
|
+
return [];
|
|
931
1089
|
}
|
|
932
1090
|
function dependencyResource(transport) {
|
|
933
1091
|
const { explain, explainWalk } = explainer(transport, "dependency");
|
|
934
1092
|
/**
|
|
935
1093
|
* The upstream dependency graph of one entity. `nodes` holds the starting entity plus every
|
|
936
1094
|
* entity it depends on, directly or transitively; each edge runs from the dependent to what it
|
|
937
|
-
* depends on. A measure starts a graph only on a server with `measureDependencyGraph
|
|
1095
|
+
* depends on. A measure starts a graph only on a server with `measureDependencyGraph`, and an
|
|
1096
|
+
* action only on one with `actionDependencyGraph`.
|
|
938
1097
|
*/
|
|
939
1098
|
async function graph(type, id, options = {}) {
|
|
940
1099
|
return transport.requestParsed(DependencyGraph, "/api/ee/dependencies/graph", {
|
|
@@ -1042,9 +1201,9 @@ function dependencyResource(transport) {
|
|
|
1042
1201
|
});
|
|
1043
1202
|
}
|
|
1044
1203
|
return {
|
|
1045
|
-
graph: explain("graph", graph,
|
|
1046
|
-
dependents: explain("dependents", dependents),
|
|
1047
|
-
broken: explain("broken", broken),
|
|
1204
|
+
graph: explain("graph", graph, entityTypeFeatures),
|
|
1205
|
+
dependents: explain("dependents", dependents, entityTypeFeatures),
|
|
1206
|
+
broken: explain("broken", broken, entityTypeFeatures),
|
|
1048
1207
|
unreferencedPages: explainWalk("unreferencedPages", unreferencedPages),
|
|
1049
1208
|
breakingPages: explainWalk("breakingPages", breakingPages)
|
|
1050
1209
|
};
|
|
@@ -1233,7 +1392,7 @@ function fieldResource(transport) {
|
|
|
1233
1392
|
* the label is refused there before the wire. Answers the field the way `get` does.
|
|
1234
1393
|
*/
|
|
1235
1394
|
async function update(id, params, options = {}) {
|
|
1236
|
-
await transport.requireFeatures(params.data_sensitivity
|
|
1395
|
+
await transport.requireFeatures(gateTriggered(DATA_SENSITIVITY_GATE, params.data_sensitivity) ? [DATA_SENSITIVITY_GATE.feature] : [], options);
|
|
1237
1396
|
const { features } = await transport.server(options);
|
|
1238
1397
|
return transport.requestParsed(fieldDetailSchema(features), `/api/field/${id}`, {
|
|
1239
1398
|
...options,
|
|
@@ -1705,17 +1864,6 @@ function glossaryResource(transport) {
|
|
|
1705
1864
|
};
|
|
1706
1865
|
}
|
|
1707
1866
|
//#endregion
|
|
1708
|
-
//#region ../client/src/resources/request-body.ts
|
|
1709
|
-
/**
|
|
1710
|
-
* Parse the body a caller hands a method, refusing one that does not match `schema` before any
|
|
1711
|
-
* request. `what` names the body in the refusal.
|
|
1712
|
-
*/
|
|
1713
|
-
function parseRequestBody(schema, value, what) {
|
|
1714
|
-
const parsed = schema.safeParse(value);
|
|
1715
|
-
if (!parsed.success) throw new ConfigError(`invalid ${what}: ${parsed.error.issues.map(formatZodIssue).join("; ")}`);
|
|
1716
|
-
return parsed.data;
|
|
1717
|
-
}
|
|
1718
|
-
//#endregion
|
|
1719
1867
|
//#region ../client/src/resources/library.ts
|
|
1720
1868
|
const LIBRARY_ROOT_PATH = "/api/ee/library/";
|
|
1721
1869
|
const PUBLISH_TABLES_PATH = "/api/ee/data-studio/table/publish-tables";
|
|
@@ -2096,7 +2244,7 @@ function notificationResource(transport) {
|
|
|
2096
2244
|
}
|
|
2097
2245
|
/** Get one question alert by id, refusing an id that names a system-event notification. */
|
|
2098
2246
|
async function get(id, options = {}) {
|
|
2099
|
-
return assertCardAlert(await transport.requestParsed(
|
|
2247
|
+
return assertCardAlert(await transport.requestParsed(AnyNotification, `/api/notification/${id}`, { ...options }));
|
|
2100
2248
|
}
|
|
2101
2249
|
/** Create a question alert — its card payload, schedules and handlers — from a full body. */
|
|
2102
2250
|
async function create(params, options = {}) {
|
|
@@ -2265,7 +2413,7 @@ function pulseResource(transport) {
|
|
|
2265
2413
|
return update(id, { archived: true }, options);
|
|
2266
2414
|
}
|
|
2267
2415
|
async function requireSubscriptionFilters(parameters, options) {
|
|
2268
|
-
if (
|
|
2416
|
+
if (gateTriggered(SUBSCRIPTION_FILTERS_GATE, parameters)) await transport.requireFeatures([SUBSCRIPTION_FILTERS_GATE.feature], options);
|
|
2269
2417
|
}
|
|
2270
2418
|
return {
|
|
2271
2419
|
list,
|
|
@@ -2489,8 +2637,34 @@ const RevisionRow = z.object({
|
|
|
2489
2637
|
is_reversion: z.boolean(),
|
|
2490
2638
|
most_recent: z.boolean()
|
|
2491
2639
|
}).loose();
|
|
2640
|
+
const REVISION_ENTITY_GATES = [
|
|
2641
|
+
{
|
|
2642
|
+
feature: "measures",
|
|
2643
|
+
effect: "needs",
|
|
2644
|
+
when: {
|
|
2645
|
+
kind: "values",
|
|
2646
|
+
values: ["measure"]
|
|
2647
|
+
}
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
feature: "transforms",
|
|
2651
|
+
effect: "needs",
|
|
2652
|
+
when: {
|
|
2653
|
+
kind: "values",
|
|
2654
|
+
values: ["transform"]
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
feature: "transformTests",
|
|
2659
|
+
effect: "needs",
|
|
2660
|
+
when: {
|
|
2661
|
+
kind: "values",
|
|
2662
|
+
values: ["transform-test"]
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
];
|
|
2492
2666
|
z.object({
|
|
2493
|
-
entity: RevisionEntity,
|
|
2667
|
+
entity: gateInput(z.enum(RevisionEntity.options), ...REVISION_ENTITY_GATES),
|
|
2494
2668
|
id: z.number().int().positive(),
|
|
2495
2669
|
revision_id: z.number().int().positive()
|
|
2496
2670
|
}).strict();
|
|
@@ -2513,17 +2687,11 @@ const RevisionApiRevert = z.union([Revision.transform((revision) => ({
|
|
|
2513
2687
|
outcome: "unchanged",
|
|
2514
2688
|
revision
|
|
2515
2689
|
}))]);
|
|
2516
|
-
const ENTITY_FEATURES = {
|
|
2517
|
-
measure: "measures",
|
|
2518
|
-
transform: "transforms",
|
|
2519
|
-
"transform-test": "transformTests"
|
|
2520
|
-
};
|
|
2521
2690
|
function entityFeatures(entity) {
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
feature,
|
|
2691
|
+
return REVISION_ENTITY_GATES.filter((gate) => gateTriggered(gate, entity)).map((gate) => ({
|
|
2692
|
+
feature: gate.feature,
|
|
2525
2693
|
fields: ["entity"]
|
|
2526
|
-
}
|
|
2694
|
+
}));
|
|
2527
2695
|
}
|
|
2528
2696
|
function revisionResource(transport) {
|
|
2529
2697
|
const { explain } = explainer(transport, "revision");
|
|
@@ -2562,6 +2730,25 @@ function verifiedFeatures(params = {}) {
|
|
|
2562
2730
|
fields: ["verified"]
|
|
2563
2731
|
}] : [];
|
|
2564
2732
|
}
|
|
2733
|
+
const MODELS_FIELDS = ["models"];
|
|
2734
|
+
const SEARCH_MODEL_FEATURES = {
|
|
2735
|
+
measure: "measures",
|
|
2736
|
+
transform: "transforms",
|
|
2737
|
+
exploration: "explorations"
|
|
2738
|
+
};
|
|
2739
|
+
function modelFeatures(params) {
|
|
2740
|
+
if (params.models === void 0) return [];
|
|
2741
|
+
return params.models.flatMap((model) => {
|
|
2742
|
+
const feature = SEARCH_MODEL_FEATURES[model];
|
|
2743
|
+
return feature === void 0 ? [] : [{
|
|
2744
|
+
feature,
|
|
2745
|
+
fields: MODELS_FIELDS
|
|
2746
|
+
}];
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2749
|
+
function queryFeatures(params = {}) {
|
|
2750
|
+
return [...verifiedFeatures(params), ...modelFeatures(params)];
|
|
2751
|
+
}
|
|
2565
2752
|
function searchResource(transport) {
|
|
2566
2753
|
const { explain } = explainer(transport, "search");
|
|
2567
2754
|
/**
|
|
@@ -2575,7 +2762,9 @@ function searchResource(transport) {
|
|
|
2575
2762
|
* default), and `limit`/`offset` are the window the server applies before ranking hydration.
|
|
2576
2763
|
* `verified` needs the `content_verification` premium feature, and is refused before the wire
|
|
2577
2764
|
* without it: a server granting neither it nor `official_collections` refuses the filter, and one
|
|
2578
|
-
* granting `official_collections` alone takes it without applying it.
|
|
2765
|
+
* granting `official_collections` alone takes it without applying it. `models` takes `measure`
|
|
2766
|
+
* only with `measures`, `transform` with `transforms` or on a Metabase 58 enterprise build, and
|
|
2767
|
+
* `exploration` only with `explorations`.
|
|
2579
2768
|
*/
|
|
2580
2769
|
async function query(params = {}, options = {}) {
|
|
2581
2770
|
await transport.requireFeatures(verifiedFeatures(params).map((requirement) => requirement.feature), options);
|
|
@@ -2601,7 +2790,7 @@ function searchResource(transport) {
|
|
|
2601
2790
|
total: response.total
|
|
2602
2791
|
};
|
|
2603
2792
|
}
|
|
2604
|
-
return { query: explain("query", query,
|
|
2793
|
+
return { query: explain("query", query, queryFeatures) };
|
|
2605
2794
|
}
|
|
2606
2795
|
//#endregion
|
|
2607
2796
|
//#region ../client/src/resources/segment.ts
|
|
@@ -2780,14 +2969,11 @@ function listParamFeatures(params) {
|
|
|
2780
2969
|
return LIST_PARAM_FEATURES.filter(([param]) => params[param] === true).map(([, feature]) => feature);
|
|
2781
2970
|
}
|
|
2782
2971
|
function dataLayerFeatures(value, field) {
|
|
2783
|
-
return
|
|
2784
|
-
feature:
|
|
2972
|
+
return gateTriggered(DATA_LAYER_TIER_GATE, value) ? [{
|
|
2973
|
+
feature: DATA_LAYER_TIER_GATE.feature,
|
|
2785
2974
|
fields: [field]
|
|
2786
2975
|
}] : [];
|
|
2787
2976
|
}
|
|
2788
|
-
function isTierName(value) {
|
|
2789
|
-
return value !== null && value !== void 0 && TableDataLayerTier.safeParse(value).success;
|
|
2790
|
-
}
|
|
2791
2977
|
const UPLOAD_UPDATE_PATHS = {
|
|
2792
2978
|
append: "append-csv",
|
|
2793
2979
|
replace: "replace-csv"
|
|
@@ -2841,10 +3027,11 @@ function tableResource(transport) {
|
|
|
2841
3027
|
return updated;
|
|
2842
3028
|
}
|
|
2843
3029
|
async function refuseRewrittenDataLayer(value, options) {
|
|
2844
|
-
if (
|
|
3030
|
+
if (!gateTriggered(DATA_LAYER_MEDALLION_GATE, value)) return;
|
|
2845
3031
|
const profile = await transport.preflightServer(options);
|
|
2846
3032
|
if (profile === null) return;
|
|
2847
|
-
const
|
|
3033
|
+
const detail = `data_layer "${value}" is a medallion name; this server names a table's layer ${TableDataLayerTier.options.join(", ")} and would map it onto one of those without a word`;
|
|
3034
|
+
const failure = supersedingFeature(DATA_LAYER_MEDALLION_GATE.feature, profile, detail);
|
|
2848
3035
|
if (failure !== null) transport.refuseBeforeSending(new CapabilityError(failure));
|
|
2849
3036
|
}
|
|
2850
3037
|
/** Get a table by id with its fields hydrated — the metadata the query builder runs on. */
|
|
@@ -2920,7 +3107,7 @@ function tableResource(transport) {
|
|
|
2920
3107
|
};
|
|
2921
3108
|
}
|
|
2922
3109
|
async function requireDataAuthorityNull(value, options) {
|
|
2923
|
-
if (value
|
|
3110
|
+
if (gateTriggered(DATA_AUTHORITY_WITHDRAWAL_GATE, value)) await transport.requireFeatures([DATA_AUTHORITY_WITHDRAWAL_GATE.feature], options);
|
|
2924
3111
|
}
|
|
2925
3112
|
async function postSelection(path, selectors, options) {
|
|
2926
3113
|
const body = parseRequestBody(TableSelectors, selectors, "table selectors");
|
|
@@ -3478,10 +3665,22 @@ const TEST_RUN_ROW_LIMIT = {
|
|
|
3478
3665
|
const TestRunRowLimit = z.number().int().min(TEST_RUN_ROW_LIMIT.min).max(TEST_RUN_ROW_LIMIT.max);
|
|
3479
3666
|
z.object({
|
|
3480
3667
|
code: z.string(),
|
|
3481
|
-
source_tables: z.array(
|
|
3668
|
+
source_tables: z.array(TransformSourceTableEntryInput).min(1),
|
|
3482
3669
|
output_row_limit: TestRunRowLimit.optional(),
|
|
3483
3670
|
per_input_row_limit: TestRunRowLimit.optional()
|
|
3484
3671
|
}).strict();
|
|
3672
|
+
function toTestRunTableValue(entry) {
|
|
3673
|
+
const { alias: _alias, ...reference } = entry;
|
|
3674
|
+
return typeof entry.table_id === "number" ? entry.table_id : reference;
|
|
3675
|
+
}
|
|
3676
|
+
/** A test run body as a server with `features` reads it. */
|
|
3677
|
+
function pythonTestRunBody(params, features) {
|
|
3678
|
+
if (features.transformSourceTablesAsList) return params;
|
|
3679
|
+
return {
|
|
3680
|
+
...params,
|
|
3681
|
+
source_tables: keyedByAlias(params.source_tables, toTestRunTableValue)
|
|
3682
|
+
};
|
|
3683
|
+
}
|
|
3485
3684
|
const PythonTestRunOutput = z.object({
|
|
3486
3685
|
cols: z.array(z.object({ name: z.string() }).loose()),
|
|
3487
3686
|
rows: z.array(z.unknown())
|
|
@@ -3538,10 +3737,11 @@ function transformPythonResource(transport) {
|
|
|
3538
3737
|
* sizes are capped at 100 rows.
|
|
3539
3738
|
*/
|
|
3540
3739
|
async function testRun(params, options = {}) {
|
|
3740
|
+
const { features } = await transport.server(options);
|
|
3541
3741
|
return transport.requestParsed(PythonApiTestRun, "/api/ee/transforms-python/test-run", {
|
|
3542
3742
|
...options,
|
|
3543
3743
|
method: "POST",
|
|
3544
|
-
body: params
|
|
3744
|
+
body: pythonTestRunBody(params, features)
|
|
3545
3745
|
});
|
|
3546
3746
|
}
|
|
3547
3747
|
return {
|
|
@@ -3582,20 +3782,30 @@ function transformResource(transport) {
|
|
|
3582
3782
|
const { features } = await transport.server(options);
|
|
3583
3783
|
return transport.requestParsed(transformDetailSchema(features), `/api/transform/${id}`, { ...options });
|
|
3584
3784
|
}
|
|
3785
|
+
async function writeBody(params, options) {
|
|
3786
|
+
if (params.source === void 0) return params;
|
|
3787
|
+
const { features } = await transport.server(options);
|
|
3788
|
+
return {
|
|
3789
|
+
...params,
|
|
3790
|
+
source: transformSourceBody(params.source, features)
|
|
3791
|
+
};
|
|
3792
|
+
}
|
|
3585
3793
|
/** Create a transform — a query plus the warehouse table it writes — from a full body. */
|
|
3586
3794
|
async function create(params, options = {}) {
|
|
3795
|
+
const body = await writeBody(params, options);
|
|
3587
3796
|
return requestTransform("/api/transform", {
|
|
3588
3797
|
...options,
|
|
3589
3798
|
method: "POST",
|
|
3590
|
-
body
|
|
3799
|
+
body
|
|
3591
3800
|
});
|
|
3592
3801
|
}
|
|
3593
3802
|
/** Update a transform by id, patching only the fields the body carries. */
|
|
3594
3803
|
async function update(id, params, options = {}) {
|
|
3804
|
+
const body = await writeBody(params, options);
|
|
3595
3805
|
return requestTransform(`/api/transform/${id}`, {
|
|
3596
3806
|
...options,
|
|
3597
3807
|
method: "PUT",
|
|
3598
|
-
body
|
|
3808
|
+
body
|
|
3599
3809
|
});
|
|
3600
3810
|
}
|
|
3601
3811
|
/** Delete a transform by id, leaving any table it already materialized in place. */
|
|
@@ -3922,7 +4132,7 @@ function parseResponseInteger(value, source) {
|
|
|
3922
4132
|
//#region ../client/src/domain/user.ts
|
|
3923
4133
|
const CurrentUser = z.object({
|
|
3924
4134
|
id: z.number().int(),
|
|
3925
|
-
email: z.
|
|
4135
|
+
email: z.string(),
|
|
3926
4136
|
common_name: z.string(),
|
|
3927
4137
|
is_superuser: z.boolean()
|
|
3928
4138
|
}).loose();
|
|
@@ -3947,11 +4157,13 @@ var client_exports = /* @__PURE__ */ __exportAll({ createClient: () => createCli
|
|
|
3947
4157
|
function createClient(config, options) {
|
|
3948
4158
|
const transport = createTransport(config, options);
|
|
3949
4159
|
return {
|
|
4160
|
+
apiKey: apiKeyResource(transport),
|
|
3950
4161
|
card: cardResource(transport),
|
|
3951
4162
|
collection: collectionResource(transport),
|
|
3952
4163
|
contentTranslation: contentTranslationResource(transport),
|
|
3953
4164
|
dashboard: dashboardResource(transport),
|
|
3954
4165
|
dataAction: dataActionResource(transport),
|
|
4166
|
+
dataApp: dataAppResource(transport),
|
|
3955
4167
|
database: databaseResource(transport),
|
|
3956
4168
|
dataset: datasetResource(transport),
|
|
3957
4169
|
dependency: dependencyResource(transport),
|