@metabase/cli 0.5.3 → 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/dist/{add-collection-c1dfnavz.mjs → add-collection-D2x34KVO.mjs} +3 -3
- package/dist/{alert-BkpPdBQ_.mjs → alert-B-w0c61D.mjs} +7 -7
- package/dist/{alerts-TDYiIxjs.mjs → alerts-nnrpqD-U.mjs} +6 -6
- package/dist/api-key-CTyXuYui.mjs +13 -0
- package/dist/{append-CoeZRD6u.mjs → append-BPrVW4RB.mjs} +4 -4
- package/dist/{archive-CH1h8jz5.mjs → archive-BYo35OGC.mjs} +5 -5
- package/dist/{archive-9uzfWGuq.mjs → archive-BZVRJYTT.mjs} +5 -5
- package/dist/{archive-DY76wU2k.mjs → archive-Bw_cvk_4.mjs} +3 -3
- package/dist/{archive-NfFWXRx5.mjs → archive-CJFUFozc.mjs} +5 -5
- package/dist/{archive-DQRehboT.mjs → archive-CTZs6Hl6.mjs} +5 -5
- package/dist/{archive-f7wKQ7Uy.mjs → archive-Ccf6Qqrf.mjs} +3 -3
- package/dist/{archive-D-BJwRLc.mjs → archive-Cwetg5kK.mjs} +5 -5
- package/dist/{archive-3fdIvMsf.mjs → archive-DBQnauVo.mjs} +5 -5
- package/dist/{archive-CAJHrKwd.mjs → archive-F5hoWW7f.mjs} +5 -5
- package/dist/{archive-N3lp1o-k.mjs → archive-OZQaaQkK.mjs} +5 -5
- package/dist/{archive-DZDkfhdH.mjs → archive-p7gGwh0n.mjs} +5 -5
- package/dist/{archive-DxUnaV4x.mjs → archive-tmrsG41w.mjs} +3 -3
- package/dist/{auth-hgkvHPpH.mjs → auth-eogOlU4X.mjs} +5 -5
- package/dist/{branch-flag-CPTQ4wXp.mjs → branch-flag-BvIdNB5z.mjs} +1 -1
- package/dist/{branches-B3gHAanU.mjs → branches-CERgKqFq.mjs} +3 -3
- package/dist/{breaking-DuWIof4T.mjs → breaking-B8f_vl0i.mjs} +6 -6
- package/dist/{broken-D2ST8sTx.mjs → broken-mrkOdV4j.mjs} +8 -8
- package/dist/{bulk-discard-values-77khEfpj.mjs → bulk-discard-values-BQ3z6nJb.mjs} +5 -5
- package/dist/{bulk-edit-girwcjY6.mjs → bulk-edit-CJxoxDGQ.mjs} +7 -7
- package/dist/{bulk-rescan-values-Df8KK8um.mjs → bulk-rescan-values-DflzyxEj.mjs} +5 -5
- package/dist/{bulk-sync-schema-DEPUZ6MN.mjs → bulk-sync-schema-CBIs4yHs.mjs} +5 -5
- package/dist/{cancel-Oek5PJnu.mjs → cancel-CyTRWSOr.mjs} +3 -3
- package/dist/{cancel-task-rkqY0qLU.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-DWJOtZoN.mjs → cards-BEeFNiCt.mjs} +6 -6
- package/dist/cli.mjs +128 -294
- package/dist/{client-BFP2Ssqu.mjs → client-DvWllzKd.mjs} +294 -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-B3oARbgD.mjs → content-translation-1coWME1P.mjs} +3 -3
- package/dist/{copy-BzBp5FaY.mjs → copy-DVe4rcLK.mjs} +6 -6
- package/dist/{copy-flags-CTM91pxH.mjs → copy-flags-DZ5Cy-Gk.mjs} +2 -2
- package/dist/{copy-C7Rc4qM7.mjs → copy-hE6SaHfb.mjs} +6 -6
- package/dist/{create-YBDXZgyP.mjs → create-B3P62NaN.mjs} +4 -5
- package/dist/{create-Bc4ADRmU.mjs → create-B3kz_fHg.mjs} +4 -5
- package/dist/{create-DO4ic4Kx.mjs → create-BPRuU7Mv.mjs} +7 -8
- package/dist/{create-71_DODbc.mjs → create-BjH0i2BC.mjs} +9 -10
- package/dist/{create-f0bBEfDI.mjs → create-Btwnm6D2.mjs} +9 -10
- package/dist/{create-CfXKNnkK.mjs → create-CCb2_Kcc.mjs} +6 -7
- package/dist/{create-Bh3q3eHg.mjs → create-D271V9Cf.mjs} +9 -9
- package/dist/{create-_rOCx5b8.mjs → create-D6Xm2b2D.mjs} +4 -5
- package/dist/{create-BKRD11i-.mjs → create-DCoo3sI2.mjs} +4 -4
- package/dist/{create-vgP9K2eH2.mjs → create-DEIIUohY2.mjs} +10 -11
- package/dist/{create-C0gmhNnk.mjs → create-DJg0Ohj5.mjs} +9 -10
- package/dist/{create-DQJ9h86G.mjs → create-DR5tpMUA.mjs} +4 -5
- package/dist/{create-CGE1D0Ay.mjs → create-DR8g_rEL.mjs} +6 -7
- package/dist/{create-C-2ivjed.mjs → create-DXivfl69.mjs} +4 -5
- package/dist/{create-C3H9ljex.mjs → create-DdfFgF-w.mjs} +4 -5
- package/dist/{create-myJ8HR4B.mjs → create-DkFCjBp3.mjs} +6 -7
- package/dist/{create-CjGEkSFz.mjs → create-Dz4c8E33.mjs} +9 -10
- package/dist/{create-YIC3Q0a-.mjs → create-LpdQKxUt.mjs} +7 -7
- package/dist/{create-ByeGK_BE.mjs → create-XCzUuT42.mjs} +4 -5
- package/dist/{create-CGxxztoE.mjs → create-XVjr8IDS.mjs} +6 -7
- package/dist/{create-branch-DBCBMDWh.mjs → create-branch-D_nbKxDS.mjs} +3 -2
- package/dist/{csv-Dtgy7sTg.mjs → csv-LP7sE-CS.mjs} +4 -4
- package/dist/{current-task-AwQisIT9.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-BIAvvV2P.mjs → data-app-BlBvvRzC.mjs} +10 -10
- package/dist/{data-app-project-BL4xpu_m.mjs → data-app-project-DjDDWgUF.mjs} +2 -1
- 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-wsSYKqCB.mjs → db-D8mPRqZc.mjs} +8 -8
- package/dist/{delete-BP9-YS-f.mjs → delete-8k7oYDFr.mjs} +4 -4
- package/dist/{delete-BegkpIGi.mjs → delete-B1SbEVIc.mjs} +4 -4
- package/dist/{delete-E-g5b-HU.mjs → delete-CaaPrNOf.mjs} +4 -4
- package/dist/{delete-wnHUWWjX.mjs → delete-CqyBkMCd.mjs} +4 -4
- package/dist/{delete-D9FB7qjX.mjs → delete-CuyGTe0i.mjs} +4 -4
- package/dist/{delete-4v4_lDwD.mjs → delete-DC-DEYSq.mjs} +4 -4
- package/dist/{delete-WrV9I9uw.mjs → delete-DWTqIlbr.mjs} +4 -4
- package/dist/{delete-BSgxmR3y.mjs → delete-DaqzPLcG.mjs} +4 -4
- package/dist/{delete-BHX_F8Qu.mjs → delete-DuaJ8PUI.mjs} +4 -4
- package/dist/{delete-DmM5L0wO.mjs → delete-ZjLpkwgx.mjs} +4 -4
- package/dist/{delete-runtime-CJ7gMYA1.mjs → delete-runtime-DOOy3gzH.mjs} +2 -1
- package/dist/{delete-table-CJq8JM5J.mjs → delete-table-CnGv1gx9.mjs} +4 -4
- package/dist/{dependencies-CnW3RSoZ.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-DHXqJ3lo.mjs → dependents-BizQb14Q.mjs} +9 -9
- package/dist/{dirty-BRPWPUYH.mjs → dirty-BHwdHOEj.mjs} +3 -3
- package/dist/{discard-values-DBHfVN8o.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-BFu9xYHX.mjs → download-D2wEAgi_.mjs} +2 -2
- package/dist/{eid-eKmbXRds.mjs → eid-KtWIPUCC.mjs} +5 -5
- package/dist/{entity-DjDkaMkB.mjs → entity-DICgy4Bl.mjs} +2 -2
- package/dist/{entry-flags-Cxn09krz.mjs → entry-flags-DLS6r8Vf.mjs} +5 -6
- package/dist/{events-CZL9MU64.mjs → events-B8yMqrrD.mjs} +4 -4
- package/dist/{execute-DBJGtHHG.mjs → execute-Bebvab7D.mjs} +7 -8
- package/dist/{export-xn_-NaBd.mjs → export-BNj3RvAl.mjs} +6 -5
- package/dist/{export-flags-CpukgETM.mjs → export-flags-iXfEILf7.mjs} +3 -2
- package/dist/{export-preflight-SM9zJkBp.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-CB06GFBW.mjs → fields-BkAS_wIA.mjs} +6 -6
- package/dist/{filter-flags-DhE4olyf.mjs → filter-flags-ezqqsOQL.mjs} +4 -4
- package/dist/{fks-CSoS7xZ6.mjs → fks--SaqvPw1.mjs} +6 -6
- package/dist/{get-BYAzIaGG.mjs → get-B1S1kW2N.mjs} +5 -5
- package/dist/{get-CtDZOoWy.mjs → get-B1uiZyyi.mjs} +5 -5
- package/dist/{get-Cl-O6dFs.mjs → get-B2nBYYCw.mjs} +4 -4
- package/dist/{get-BZFyqZXa.mjs → get-BSKpQJVB.mjs} +5 -5
- package/dist/{get-Bt4C-oxh.mjs → get-BjgB5l7X.mjs} +5 -5
- package/dist/{get-Cc4-e-Q_.mjs → get-Boql3_0n.mjs} +5 -5
- package/dist/{get-B8xrmipw.mjs → get-BseHija1.mjs} +5 -5
- package/dist/{get-C1rCVUYw.mjs → get-C9VumVZ3.mjs} +6 -5
- package/dist/{get-BQ7SAJEz.mjs → get-CGPxAoow.mjs} +3 -3
- package/dist/{get-jbOgdCQg.mjs → get-CM9IOr82.mjs} +3 -3
- package/dist/{get-eZEHipwA.mjs → get-CTTKQDr7.mjs} +5 -5
- package/dist/{get-BSPxmP_W.mjs → get-CU1zKfBS.mjs} +5 -5
- package/dist/{get-DIfjxTP8.mjs → get-CWDz6eV2.mjs} +3 -3
- package/dist/{get-BZDUOZxI.mjs → get-C_hatP_z.mjs} +3 -3
- package/dist/{get-Bq_9VSTa.mjs → get-Cdcj1c9U.mjs} +3 -3
- package/dist/{get-CuSwArMS.mjs → get-CiLYhFjU.mjs} +5 -5
- package/dist/{get-BIf6eFWZ.mjs → get-De6qpuzO.mjs} +5 -5
- package/dist/{get--1qTpTIQ.mjs → get-VpGfaL7c.mjs} +5 -5
- package/dist/{get-BW3jSR3y.mjs → get-f2km9wsq.mjs} +3 -3
- package/dist/{get-B8xQXMU6.mjs → get-gGSl7Se4.mjs} +5 -5
- package/dist/{get-BfFZCiZR.mjs → get-iOs1ci6x.mjs} +5 -5
- package/dist/{get-run-C-CNDbv3.mjs → get-run-CHup8cMl.mjs} +5 -5
- package/dist/{get-DePbMmjc.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-CqBe2J4N.mjs → graph-B7SlzpkC.mjs} +6 -6
- package/dist/{group-81zoQcEP.mjs → group--6adAsqG.mjs} +2 -2
- package/dist/{has-remote-changes-CDe1teSb.mjs → has-remote-changes-DZq7q2Wk.mjs} +2 -2
- package/dist/{import-B64gjryF.mjs → import-DKZF0kMU.mjs} +6 -5
- package/dist/input-gate-registry-Dh8QjKgW.mjs +14 -0
- package/dist/{is-dirty-DhR3Xqjk.mjs → is-dirty-haRLODo1.mjs} +2 -2
- package/dist/{items-CLl2QgS8.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-C3eO2J07.mjs → library-e3aiJ1Yb.mjs} +5 -5
- package/dist/{list-BIqqh3A-.mjs → list-B9yhUzCc.mjs} +5 -5
- package/dist/{list-CFaJA317.mjs → list-BNel4hYs.mjs} +6 -6
- package/dist/{list-CjpZCiks.mjs → list-Bbc8VYDi.mjs} +3 -3
- package/dist/{list-eGlqXJno.mjs → list-BiIZdUoN.mjs} +5 -5
- package/dist/{list-YFwmHXGG.mjs → list-C-AnwSRP.mjs} +3 -3
- package/dist/{list-s9_LlXCV.mjs → list-CNiCM1NL.mjs} +3 -3
- package/dist/{list-DLLzMaS3.mjs → list-COPGHkWL.mjs} +5 -5
- package/dist/{list-DrIcKxXX.mjs → list-CsXdnNyp.mjs} +5 -5
- package/dist/{list-DyFu5Wx1.mjs → list-D0ASRA_6.mjs} +6 -6
- package/dist/{list-Cu6ET_yD.mjs → list-DAa4EWlv.mjs} +5 -5
- package/dist/{list-DpfOh8-5.mjs → list-DDt1iLXj.mjs} +4 -4
- package/dist/{list-DDPvxfhe.mjs → list-DFuydMdV.mjs} +6 -6
- package/dist/{list-CA939qkn.mjs → list-DFxfpa4W.mjs} +6 -6
- package/dist/{list-C3GBocvB.mjs → list-DJyIkrY1.mjs} +5 -5
- package/dist/{list-C7TFreS8.mjs → list-DUCxqhtn.mjs} +5 -5
- package/dist/{list-CdcFNphE.mjs → list-D_8GeDG-.mjs} +3 -3
- package/dist/{list-BiSwl56L.mjs → list-DcXqKZyg.mjs} +5 -5
- package/dist/{list-D_IT8l9B.mjs → list-DednUvr3.mjs} +3 -3
- package/dist/{list-DyQNRVAf.mjs → list-Dvf1iB8r.mjs} +3 -3
- package/dist/{list-B7Yvz5vA.mjs → list-HI7Mpoy-.mjs} +5 -5
- package/dist/{list-DLwby7YA.mjs → list-OUSeeuXb.mjs} +5 -5
- package/dist/{list-BmvitCWZ.mjs → list-P7FnSsbZ.mjs} +6 -6
- package/dist/{list-D4HNG282.mjs → list-gcDxZ7Th.mjs} +5 -5
- package/dist/{login-Bg7Z3jDy.mjs → login-APHXId1p.mjs} +6 -5
- package/dist/{logout-CAmp7DcS.mjs → logout-V0pxj6AM.mjs} +3 -2
- package/dist/{measure-CtfjqJFP.mjs → measure-BMWrX1ca.mjs} +3 -1
- package/dist/{measure-C31HLp1C.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-3eHpqznI.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-XwdHlC23.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-C2-pK0cf.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-DkaUzmMa.mjs → query-CZbI4Rlv.mjs} +17 -29
- package/dist/{query-pmw23KkL.mjs → query-gHeYfWj_.mjs} +7 -6
- package/dist/{remapping-C3htTzJn.mjs → remapping-hcWkFQsx.mjs} +5 -5
- package/dist/{remove-collection-p_t9rUUX.mjs → remove-collection-Qne5ww6M.mjs} +3 -3
- package/dist/{render-C50k8-jc.mjs → render-d1-sCPn_.mjs} +3 -2
- package/dist/{replace-BQBuFJ1B.mjs → replace-DoU0IFGd.mjs} +4 -4
- package/dist/{requirement-check-CpiVuL0H.mjs → requirement-check-BoVSK1uK.mjs} +2 -2
- package/dist/{rescan-values-DOqXJ3qH.mjs → rescan-values-COzM86P5.mjs} +5 -5
- package/dist/{rescan-values-Ctq8wpkI.mjs → rescan-values-s82n_You.mjs} +5 -5
- package/dist/{run-Dn3e8G4x.mjs → run-Bwj4Uuxk.mjs} +4 -4
- package/dist/{run-2xgPRuKR.mjs → run-JYNbEO_V.mjs} +6 -5
- package/dist/{run-CtMbObQI.mjs → run-Q7fHux1F.mjs} +5 -4
- package/dist/{runs-CgNoQW6M.mjs → runs-GQD6FO2k.mjs} +6 -6
- package/dist/{runtime-Y4VFWmmr.mjs → runtime-iIsqiOwO.mjs} +51 -9
- package/dist/{scaffold-BuL0_ptz.mjs → scaffold-CJo9l-2p.mjs} +4 -4
- package/dist/schema-2JhmK8FM.mjs +283 -0
- package/dist/{schema-tables-BdXuo_lG.mjs → schema-tables-CarGLayY.mjs} +6 -6
- package/dist/{schemas-Dap3KFwY.mjs → schemas-oSjtuQ4G.mjs} +4 -4
- package/dist/{search-DUmFK5Sy.mjs → search-Ca0sIr28.mjs} +7 -6
- package/dist/{search-Dxcejw_v.mjs → search-CvGEL2h-.mjs} +6 -5
- package/dist/{segment-CebcXn2E.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-DYdwcPTb.mjs → send-B4nZI6CU.mjs} +3 -3
- package/dist/{set-xs8Vyvy2.mjs → set-BjMZCdN8.mjs} +5 -6
- package/dist/{set-active-CVI_DDQi.mjs → set-active-CWDdv3kN.mjs} +4 -4
- package/dist/{set-bundle-DX5HqDji.mjs → set-bundle-C2uk4jdt.mjs} +4 -4
- package/dist/{set-data-actions-DAI1XCQ2.mjs → set-data-actions-lWl05ekf.mjs} +6 -6
- package/dist/{set-enabled-0QI-CHAT.mjs → set-enabled-CPhw1AX4.mjs} +4 -4
- package/dist/{set-sensitivity-DqGkiLSr.mjs → set-sensitivity-B7WI5BJC.mjs} +6 -6
- package/dist/{setting-Bmry-y_l.mjs → setting-BvPpFjJT.mjs} +4 -4
- package/dist/{setup-CO7QV-ao.mjs → setup-BnczkG96.mjs} +1 -1
- package/dist/{setup-UM8N9Vh3.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-BiSfuDqA.mjs → skills-BCivFuuZ.mjs} +3 -3
- package/dist/{skills-CcLTm3_2.mjs → skills-BY3MCR8i.mjs} +3 -2
- package/dist/{slug-qeARO25o.mjs → slug-COdwq63O.mjs} +1 -1
- package/dist/snippet-BcN1UwoS.mjs +19 -0
- package/dist/{stash-e5cSvnj3.mjs → stash-leoW1fby.mjs} +5 -4
- package/dist/{status-CH7BAWGe.mjs → status-AA4APlwZ.mjs} +3 -3
- package/dist/{status-BHiO3YBe.mjs → status-BezD_K-g.mjs} +4 -4
- package/dist/{subscription-DWleULhN.mjs → subscription-BDukZFlC.mjs} +6 -6
- package/dist/{subscriptions-DcCOA2p1.mjs → subscriptions-CU4E_p7B.mjs} +6 -6
- package/dist/{summary-CipFA6M6.mjs → summary-BFspP71W.mjs} +5 -5
- package/dist/{sync-schema-C45WO4db.mjs → sync-schema-BhRhsm8Y.mjs} +6 -6
- package/dist/{sync-schema-D7p-P8F6.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-BF1dqSnD.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-BYoguZfW.mjs → transform-tag-DQXOPhmt.mjs} +5 -5
- package/dist/transform-test-wmAjyaka.mjs +16 -0
- package/dist/{transforms-C6MFnT4C.mjs → transforms-DcXL4Dox.mjs} +6 -6
- package/dist/{transport-k_fabWdF.mjs → transport-DZSxmmtY.mjs} +5 -4
- package/dist/{tree-C4Igf6xs.mjs → tree-DrYYCdXP.mjs} +4 -3
- package/dist/{typed-schema-Bo0Q6C0S.mjs → typed-schema-DEzmTY3J.mjs} +4 -4
- package/dist/{unpublish-EStytsEm.mjs → unpublish-D8hmulCx.mjs} +3 -3
- package/dist/{unreferenced-DtUuyBrr.mjs → unreferenced-C3CqO3tu.mjs} +6 -6
- package/dist/{update-BXLY92om.mjs → update-3lRE8G9k.mjs} +10 -11
- package/dist/{update-DT8U29Kk.mjs → update-4TDRNrV-.mjs} +7 -8
- package/dist/{update-DT2ViMFr.mjs → update-4sOfpwpv.mjs} +5 -6
- package/dist/{update-DAG8m5f4.mjs → update-552UGPAG.mjs} +7 -8
- package/dist/{update-z8ZGCg1r.mjs → update-7iXRB23T2.mjs} +7 -8
- package/dist/{update-DkvIK-eL.mjs → update-B21GAnzT.mjs} +7 -8
- package/dist/{update-Bba_zPSE.mjs → update-BVz0oIwS.mjs} +10 -11
- package/dist/{update-B1UXRPN-.mjs → update-BxRFktpB.mjs} +8 -9
- package/dist/{update-BOg1jZ_s.mjs → update-CEDMvgJI.mjs} +11 -12
- package/dist/{update-pk0b6vXU.mjs → update-CcNYCalv.mjs} +5 -6
- package/dist/{update-BogvN2Mb.mjs → update-CctMr2T1.mjs} +8 -8
- package/dist/{update-VGgvQu7W.mjs → update-Ch6AAOeh.mjs} +5 -6
- package/dist/{update-CciLWH_s.mjs → update-CtuLA42g.mjs} +11 -11
- package/dist/{update-HbggUPuy.mjs → update-DVD77mVR.mjs} +5 -6
- package/dist/{update-FfeHReec.mjs → update-DmMHHn75.mjs} +10 -11
- package/dist/{update-CCLpNTPa.mjs → update-DvGIaZdl.mjs} +5 -6
- package/dist/{update-DECiEVlk.mjs → update-LlJM4tUd.mjs} +10 -11
- package/dist/{update-DhgfReDD.mjs → update-Zv7PP8nl.mjs} +7 -8
- package/dist/{update-dashcard-m-hkIGUu.mjs → update-dashcard-BijqiYQd.mjs} +7 -8
- package/dist/{update-B0Na11v-.mjs → update-l4WRN6Jh.mjs} +7 -8
- package/dist/{update-DIBaY-fy.mjs → update-sma1ZRm2.mjs} +5 -6
- package/dist/{upgrade-iETJ8fH2.mjs → upgrade-TzILOkiM.mjs} +5 -4
- package/dist/upload-B37bUVl_.mjs +13 -0
- package/dist/{upload-BF5pdKRN.mjs → upload-CdiDKe69.mjs} +2 -2
- package/dist/{upload-CoK5LnyA.mjs → upload-Do-kOGtc.mjs} +3 -3
- package/dist/{uuid-8Ha-8bDX.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-BsgA7-6h.mjs → values-CtY5zv0m.mjs} +5 -5
- package/dist/{verify-CzBZbP4W.mjs → verify-BiB8jzXB.mjs} +3 -3
- package/dist/{verify-cjUPMF_B.mjs → verify-DBTlWx-S.mjs} +3 -3
- package/dist/{verify-crIrbGZV.mjs → verify-DJ7fGyLL.mjs} +4 -3
- package/dist/{wait-mFUfpSaj.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 +1 -1
- package/skill-data/core/SKILL.md +14 -13
- 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/api-key-wGtJ8kYy.mjs +0 -13
- package/dist/body-M5qsJoub.mjs +0 -16
- package/dist/card-BWTjCE93.mjs +0 -25
- package/dist/collection-9_mj8rVX.mjs +0 -21
- package/dist/dashboard-BZV-0Qjp.mjs +0 -35
- package/dist/data-action-B7kRpvCH.mjs +0 -24
- package/dist/dependency-DDRGBlFL.mjs +0 -15
- package/dist/document-BeLf7NqP.mjs +0 -20
- package/dist/field-CQDz-6DK.mjs +0 -21
- package/dist/git-sync-D_T9oNC6.mjs +0 -29
- package/dist/glossary-BVK5DaLV.mjs +0 -14
- package/dist/snippet-DKARah-L.mjs +0 -19
- package/dist/table-BPYHnzyV.mjs +0 -26
- package/dist/timeline-C2m_QHxn.mjs +0 -21
- package/dist/transform-N_elgRuh.mjs +0 -28
- package/dist/transform-job-CTV6KRP2.mjs +0 -22
- package/dist/transform-test-jaBpHOM5.mjs +0 -16
- package/dist/upload-CqSGEZQW.mjs +0 -13
- package/dist/validate-query-YtH3d5BP.mjs +0 -38
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
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";
|
|
4
5
|
import { i as CreatedApiKey, t as ApiKey } from "./api-key-DbsqHlN6.mjs";
|
|
5
|
-
import { n as featureFailures, r as supersedingFeature, t as checkFeatures } from "./requirement-check-
|
|
6
|
-
import { n as createTransport } from "./transport-
|
|
7
|
-
import { i as CardDetail, o as CardQueryResult, t as Card } from "./card-
|
|
8
|
-
import {
|
|
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";
|
|
9
11
|
import { r as ModerationReviewCreateInput, t as ModerationReview } from "./moderation-review-Bf9bPNQI.mjs";
|
|
10
|
-
import {
|
|
12
|
+
import { i as ParameterValues, o as TemporalUnit } from "./parameter-Bucz3cLJ.mjs";
|
|
11
13
|
import { r as PivotExportFormat, t as DatasetQuery } from "./query-BKtMP5eH.mjs";
|
|
12
|
-
import {
|
|
13
|
-
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";
|
|
14
16
|
import { t as Snippet } from "./snippet-CyKAgIZl.mjs";
|
|
15
|
-
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-
|
|
16
|
-
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";
|
|
17
19
|
import { t as ContentTranslationUploadResult } from "./content-translation-BrHOrmj9.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
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";
|
|
20
22
|
import { i as DataAppEntry, t as DataApp } from "./data-app-BUW-HlUo.mjs";
|
|
21
|
-
import { r as pollUntil } from "./poll-
|
|
22
|
-
import { i as DependencyEntity, s as DependencyGraph, t as BreakingSource, u as DependencyNode } from "./dependency-
|
|
23
|
-
import { t as Document } from "./document-
|
|
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";
|
|
24
26
|
import { i as EidTranslateResult } from "./eid-translation-Ba92VOHe.mjs";
|
|
25
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";
|
|
26
|
-
import { t as Glossary } from "./glossary-
|
|
27
|
-
import { a as libraryWireSchema, i as LibraryPublishTablesInput, n as LibraryCollectionInfo, o as toLibrary } from "./library-
|
|
28
|
-
import { t as Measure } from "./measure-
|
|
29
|
-
import { t as Pulse } from "./pulse-
|
|
30
|
-
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";
|
|
31
33
|
import { r as SearchResult } from "./search-1et9tv_s.mjs";
|
|
32
|
-
import { t as Segment } from "./segment-
|
|
34
|
+
import { t as Segment } from "./segment-Cf-DrdjE.mjs";
|
|
33
35
|
import { t as Setting } from "./setting-DTiLCW8g.mjs";
|
|
34
|
-
import { n as SetupResult } from "./setup-
|
|
36
|
+
import { n as SetupResult } from "./setup-BnczkG96.mjs";
|
|
35
37
|
import { i as TimelineEvent, t as Timeline } from "./timeline-DcsCXNUt.mjs";
|
|
36
|
-
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";
|
|
37
39
|
import { t as TransformTag } from "./transform-tag-CcElGp3C.mjs";
|
|
38
40
|
import { i as TransformTestRunResult, t as TransformTest } from "./transform-test-Bexa_K89.mjs";
|
|
39
41
|
import { t as UploadResult } from "./upload-DAtxBBms.mjs";
|
|
@@ -234,112 +236,6 @@ function paginatedEnvelopeSchema(itemSchema) {
|
|
|
234
236
|
}).loose();
|
|
235
237
|
}
|
|
236
238
|
//#endregion
|
|
237
|
-
//#region ../client/src/resources/collection.ts
|
|
238
|
-
const CollectionApiList = z.array(Collection);
|
|
239
|
-
const CollectionTreeApiList = z.array(CollectionTreeNode);
|
|
240
|
-
const COLLECTION_LIST_QUERY = {
|
|
241
|
-
all: {},
|
|
242
|
-
archived: { archived: true },
|
|
243
|
-
personal: { "personal-only": true }
|
|
244
|
-
};
|
|
245
|
-
const DEFAULT_LIST_FILTER = "all";
|
|
246
|
-
function refPath(ref) {
|
|
247
|
-
return encodeURIComponent(ref);
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* List every collection the caller can read, the Library and its children among them, parsing each
|
|
251
|
-
* through the caller's own projection. `Collection` pins `type`, `namespace` and `authority_level`
|
|
252
|
-
* to closed enums, so a consumer reading a few fields off every collection on the instance narrows
|
|
253
|
-
* here: one collection carrying a server value outside those sets then costs nothing to a caller
|
|
254
|
-
* that never reads the field.
|
|
255
|
-
*/
|
|
256
|
-
async function listCollectionsAs(transport, schema, options = {}) {
|
|
257
|
-
return transport.requestParsed(z.array(schema), "/api/collection", { ...options });
|
|
258
|
-
}
|
|
259
|
-
function collectionResource(transport) {
|
|
260
|
-
/**
|
|
261
|
-
* List collections. `filter` picks a server-side preset: everything, archived, or personal. Every
|
|
262
|
-
* preset includes the Library collections that match it. `namespace` lists that namespace's
|
|
263
|
-
* collections, with its root, instead of the default namespace's.
|
|
264
|
-
*/
|
|
265
|
-
async function list(params = {}, options = {}) {
|
|
266
|
-
return {
|
|
267
|
-
data: await transport.requestParsed(CollectionApiList, "/api/collection", {
|
|
268
|
-
...options,
|
|
269
|
-
query: {
|
|
270
|
-
...COLLECTION_LIST_QUERY[params.filter ?? DEFAULT_LIST_FILTER],
|
|
271
|
-
namespace: params.namespace
|
|
272
|
-
}
|
|
273
|
-
}),
|
|
274
|
-
total: null
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
/** Get one collection by id, entity id, or the `root`/`trash` alias. */
|
|
278
|
-
async function get(ref, options = {}) {
|
|
279
|
-
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, { ...options });
|
|
280
|
-
}
|
|
281
|
-
/** Create a new collection. */
|
|
282
|
-
async function create(params, options = {}) {
|
|
283
|
-
return transport.requestParsed(Collection, "/api/collection", {
|
|
284
|
-
...options,
|
|
285
|
-
method: "POST",
|
|
286
|
-
body: params
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Update a collection, patching the fields the body carries. The server reads an absent
|
|
291
|
-
* `archived` as `false`, so a patch without it restores an archived collection, and a patch that
|
|
292
|
-
* moves a collection into the trash ignores `parent_id`.
|
|
293
|
-
*/
|
|
294
|
-
async function update(ref, params, options = {}) {
|
|
295
|
-
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, {
|
|
296
|
-
...options,
|
|
297
|
-
method: "PUT",
|
|
298
|
-
body: params
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
/** Archive (soft-delete) a collection. Metabase models this as an update, not its own endpoint. */
|
|
302
|
-
async function archive(ref, options = {}) {
|
|
303
|
-
return update(ref, { archived: true }, options);
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Walk the items inside a collection one page at a time. This endpoint pages on the server, so
|
|
307
|
-
* the caller consumes pages rather than a single list and decides how far to pull.
|
|
308
|
-
*/
|
|
309
|
-
async function* itemPages(ref, params = {}, options = {}) {
|
|
310
|
-
yield* paginatePages(transport, `/api/collection/${refPath(ref)}/items`, CollectionItem, {
|
|
311
|
-
query: {
|
|
312
|
-
models: params.models,
|
|
313
|
-
archived: params.archived,
|
|
314
|
-
pinned_state: params.pinned_state
|
|
315
|
-
},
|
|
316
|
-
...options.offset !== void 0 && { offset: options.offset },
|
|
317
|
-
...options.max !== void 0 && { max: options.max },
|
|
318
|
-
...options.pageSize !== void 0 && { pageSize: options.pageSize },
|
|
319
|
-
...options.signal !== void 0 && { signal: options.signal }
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
/** Fetch the collection hierarchy as a forest of nested nodes. */
|
|
323
|
-
async function tree(params = {}, options = {}) {
|
|
324
|
-
return {
|
|
325
|
-
data: await transport.requestParsed(CollectionTreeApiList, "/api/collection/tree", {
|
|
326
|
-
...options,
|
|
327
|
-
query: { "include-library": params["include-library"] }
|
|
328
|
-
}),
|
|
329
|
-
total: null
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
return {
|
|
333
|
-
list,
|
|
334
|
-
get,
|
|
335
|
-
create,
|
|
336
|
-
update,
|
|
337
|
-
archive,
|
|
338
|
-
itemPages,
|
|
339
|
-
tree
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
//#endregion
|
|
343
239
|
//#region ../client/src/version/refusal.ts
|
|
344
240
|
const REFUSAL_STATUSES = /* @__PURE__ */ new Set([
|
|
345
241
|
400,
|
|
@@ -462,6 +358,135 @@ function topLevelField(path) {
|
|
|
462
358
|
return end === -1 ? path : path.slice(0, end);
|
|
463
359
|
}
|
|
464
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
|
|
465
490
|
//#region ../client/src/resources/csv-upload.ts
|
|
466
491
|
const CSV_CONTENT_TYPE = "text/csv";
|
|
467
492
|
function buildCsvFormData(file) {
|
|
@@ -493,6 +518,17 @@ function contentTranslationResource(transport) {
|
|
|
493
518
|
};
|
|
494
519
|
}
|
|
495
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
|
|
496
532
|
//#region ../client/src/resources/dashboard.ts
|
|
497
533
|
const DashboardApiList = z.array(Dashboard);
|
|
498
534
|
const PreflightDashcard = z.looseObject({ card_id: z.number().int().nullable().optional() });
|
|
@@ -510,17 +546,19 @@ function dashboardResource(transport) {
|
|
|
510
546
|
}
|
|
511
547
|
/** Get one dashboard by id, with its dashcards, tabs and parameters. */
|
|
512
548
|
async function get(id, options = {}) {
|
|
513
|
-
return transport.requestParsed(
|
|
549
|
+
return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, { ...options });
|
|
514
550
|
}
|
|
515
551
|
/**
|
|
516
552
|
* Create a dashboard. The endpoint accepts no dashcards or tabs — a follow-up `update` is what
|
|
517
|
-
* 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.
|
|
518
555
|
*/
|
|
519
556
|
async function create(params, options = {}) {
|
|
557
|
+
const body = parseRequestBody(DashboardCreateInput, params, "dashboard");
|
|
520
558
|
return transport.requestParsed(Dashboard, "/api/dashboard", {
|
|
521
559
|
...options,
|
|
522
560
|
method: "POST",
|
|
523
|
-
body
|
|
561
|
+
body
|
|
524
562
|
});
|
|
525
563
|
}
|
|
526
564
|
/**
|
|
@@ -531,7 +569,7 @@ function dashboardResource(transport) {
|
|
|
531
569
|
*/
|
|
532
570
|
async function update(id, params, options = {}) {
|
|
533
571
|
const body = await withCurrentTabs(id, params, options);
|
|
534
|
-
return transport.requestParsed(
|
|
572
|
+
return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, {
|
|
535
573
|
...options,
|
|
536
574
|
method: "PUT",
|
|
537
575
|
body
|
|
@@ -704,13 +742,18 @@ function stripEntityId(dashcard) {
|
|
|
704
742
|
};
|
|
705
743
|
}
|
|
706
744
|
//#endregion
|
|
707
|
-
//#region ../client/src/
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
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
|
+
}
|
|
713
754
|
}
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region ../client/src/resources/data-action.ts
|
|
714
757
|
function dataActionResource(transport) {
|
|
715
758
|
const { explain } = explainer(transport, "dataAction");
|
|
716
759
|
async function readSchema(options) {
|
|
@@ -739,8 +782,13 @@ function dataActionResource(transport) {
|
|
|
739
782
|
body: params
|
|
740
783
|
});
|
|
741
784
|
}
|
|
742
|
-
/**
|
|
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
|
+
*/
|
|
743
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);
|
|
744
792
|
const schema = await readSchema(options);
|
|
745
793
|
return transport.requestParsed(schema, `/api/action/${id}`, {
|
|
746
794
|
...options,
|
|
@@ -772,7 +820,7 @@ function dataActionResource(transport) {
|
|
|
772
820
|
list,
|
|
773
821
|
get,
|
|
774
822
|
create: explain("create", create),
|
|
775
|
-
update
|
|
823
|
+
update,
|
|
776
824
|
archive,
|
|
777
825
|
delete: remove,
|
|
778
826
|
execute
|
|
@@ -1028,18 +1076,24 @@ function datasetResource(transport) {
|
|
|
1028
1076
|
//#region ../client/src/resources/dependency.ts
|
|
1029
1077
|
const DependencyNodeApiList = z.array(DependencyNode);
|
|
1030
1078
|
const DependencyEntityApiList = z.array(DependencyEntity);
|
|
1031
|
-
function
|
|
1032
|
-
|
|
1079
|
+
function entityTypeFeatures(type) {
|
|
1080
|
+
if (type === "measure") return [{
|
|
1033
1081
|
feature: "measureDependencyGraph",
|
|
1034
1082
|
fields: ["type"]
|
|
1035
|
-
}]
|
|
1083
|
+
}];
|
|
1084
|
+
if (type === "action") return [{
|
|
1085
|
+
feature: "actionDependencyGraph",
|
|
1086
|
+
fields: ["type"]
|
|
1087
|
+
}];
|
|
1088
|
+
return [];
|
|
1036
1089
|
}
|
|
1037
1090
|
function dependencyResource(transport) {
|
|
1038
1091
|
const { explain, explainWalk } = explainer(transport, "dependency");
|
|
1039
1092
|
/**
|
|
1040
1093
|
* The upstream dependency graph of one entity. `nodes` holds the starting entity plus every
|
|
1041
1094
|
* entity it depends on, directly or transitively; each edge runs from the dependent to what it
|
|
1042
|
-
* 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`.
|
|
1043
1097
|
*/
|
|
1044
1098
|
async function graph(type, id, options = {}) {
|
|
1045
1099
|
return transport.requestParsed(DependencyGraph, "/api/ee/dependencies/graph", {
|
|
@@ -1147,9 +1201,9 @@ function dependencyResource(transport) {
|
|
|
1147
1201
|
});
|
|
1148
1202
|
}
|
|
1149
1203
|
return {
|
|
1150
|
-
graph: explain("graph", graph,
|
|
1151
|
-
dependents: explain("dependents", dependents),
|
|
1152
|
-
broken: explain("broken", broken),
|
|
1204
|
+
graph: explain("graph", graph, entityTypeFeatures),
|
|
1205
|
+
dependents: explain("dependents", dependents, entityTypeFeatures),
|
|
1206
|
+
broken: explain("broken", broken, entityTypeFeatures),
|
|
1153
1207
|
unreferencedPages: explainWalk("unreferencedPages", unreferencedPages),
|
|
1154
1208
|
breakingPages: explainWalk("breakingPages", breakingPages)
|
|
1155
1209
|
};
|
|
@@ -1338,7 +1392,7 @@ function fieldResource(transport) {
|
|
|
1338
1392
|
* the label is refused there before the wire. Answers the field the way `get` does.
|
|
1339
1393
|
*/
|
|
1340
1394
|
async function update(id, params, options = {}) {
|
|
1341
|
-
await transport.requireFeatures(params.data_sensitivity
|
|
1395
|
+
await transport.requireFeatures(gateTriggered(DATA_SENSITIVITY_GATE, params.data_sensitivity) ? [DATA_SENSITIVITY_GATE.feature] : [], options);
|
|
1342
1396
|
const { features } = await transport.server(options);
|
|
1343
1397
|
return transport.requestParsed(fieldDetailSchema(features), `/api/field/${id}`, {
|
|
1344
1398
|
...options,
|
|
@@ -1810,17 +1864,6 @@ function glossaryResource(transport) {
|
|
|
1810
1864
|
};
|
|
1811
1865
|
}
|
|
1812
1866
|
//#endregion
|
|
1813
|
-
//#region ../client/src/resources/request-body.ts
|
|
1814
|
-
/**
|
|
1815
|
-
* Parse the body a caller hands a method, refusing one that does not match `schema` before any
|
|
1816
|
-
* request. `what` names the body in the refusal.
|
|
1817
|
-
*/
|
|
1818
|
-
function parseRequestBody(schema, value, what) {
|
|
1819
|
-
const parsed = schema.safeParse(value);
|
|
1820
|
-
if (!parsed.success) throw new ConfigError(`invalid ${what}: ${parsed.error.issues.map(formatZodIssue).join("; ")}`);
|
|
1821
|
-
return parsed.data;
|
|
1822
|
-
}
|
|
1823
|
-
//#endregion
|
|
1824
1867
|
//#region ../client/src/resources/library.ts
|
|
1825
1868
|
const LIBRARY_ROOT_PATH = "/api/ee/library/";
|
|
1826
1869
|
const PUBLISH_TABLES_PATH = "/api/ee/data-studio/table/publish-tables";
|
|
@@ -2201,7 +2244,7 @@ function notificationResource(transport) {
|
|
|
2201
2244
|
}
|
|
2202
2245
|
/** Get one question alert by id, refusing an id that names a system-event notification. */
|
|
2203
2246
|
async function get(id, options = {}) {
|
|
2204
|
-
return assertCardAlert(await transport.requestParsed(
|
|
2247
|
+
return assertCardAlert(await transport.requestParsed(AnyNotification, `/api/notification/${id}`, { ...options }));
|
|
2205
2248
|
}
|
|
2206
2249
|
/** Create a question alert — its card payload, schedules and handlers — from a full body. */
|
|
2207
2250
|
async function create(params, options = {}) {
|
|
@@ -2370,7 +2413,7 @@ function pulseResource(transport) {
|
|
|
2370
2413
|
return update(id, { archived: true }, options);
|
|
2371
2414
|
}
|
|
2372
2415
|
async function requireSubscriptionFilters(parameters, options) {
|
|
2373
|
-
if (
|
|
2416
|
+
if (gateTriggered(SUBSCRIPTION_FILTERS_GATE, parameters)) await transport.requireFeatures([SUBSCRIPTION_FILTERS_GATE.feature], options);
|
|
2374
2417
|
}
|
|
2375
2418
|
return {
|
|
2376
2419
|
list,
|
|
@@ -2594,8 +2637,34 @@ const RevisionRow = z.object({
|
|
|
2594
2637
|
is_reversion: z.boolean(),
|
|
2595
2638
|
most_recent: z.boolean()
|
|
2596
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
|
+
];
|
|
2597
2666
|
z.object({
|
|
2598
|
-
entity: RevisionEntity,
|
|
2667
|
+
entity: gateInput(z.enum(RevisionEntity.options), ...REVISION_ENTITY_GATES),
|
|
2599
2668
|
id: z.number().int().positive(),
|
|
2600
2669
|
revision_id: z.number().int().positive()
|
|
2601
2670
|
}).strict();
|
|
@@ -2618,17 +2687,11 @@ const RevisionApiRevert = z.union([Revision.transform((revision) => ({
|
|
|
2618
2687
|
outcome: "unchanged",
|
|
2619
2688
|
revision
|
|
2620
2689
|
}))]);
|
|
2621
|
-
const ENTITY_FEATURES = {
|
|
2622
|
-
measure: "measures",
|
|
2623
|
-
transform: "transforms",
|
|
2624
|
-
"transform-test": "transformTests"
|
|
2625
|
-
};
|
|
2626
2690
|
function entityFeatures(entity) {
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
feature,
|
|
2691
|
+
return REVISION_ENTITY_GATES.filter((gate) => gateTriggered(gate, entity)).map((gate) => ({
|
|
2692
|
+
feature: gate.feature,
|
|
2630
2693
|
fields: ["entity"]
|
|
2631
|
-
}
|
|
2694
|
+
}));
|
|
2632
2695
|
}
|
|
2633
2696
|
function revisionResource(transport) {
|
|
2634
2697
|
const { explain } = explainer(transport, "revision");
|
|
@@ -2667,6 +2730,25 @@ function verifiedFeatures(params = {}) {
|
|
|
2667
2730
|
fields: ["verified"]
|
|
2668
2731
|
}] : [];
|
|
2669
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
|
+
}
|
|
2670
2752
|
function searchResource(transport) {
|
|
2671
2753
|
const { explain } = explainer(transport, "search");
|
|
2672
2754
|
/**
|
|
@@ -2680,7 +2762,9 @@ function searchResource(transport) {
|
|
|
2680
2762
|
* default), and `limit`/`offset` are the window the server applies before ranking hydration.
|
|
2681
2763
|
* `verified` needs the `content_verification` premium feature, and is refused before the wire
|
|
2682
2764
|
* without it: a server granting neither it nor `official_collections` refuses the filter, and one
|
|
2683
|
-
* 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`.
|
|
2684
2768
|
*/
|
|
2685
2769
|
async function query(params = {}, options = {}) {
|
|
2686
2770
|
await transport.requireFeatures(verifiedFeatures(params).map((requirement) => requirement.feature), options);
|
|
@@ -2706,7 +2790,7 @@ function searchResource(transport) {
|
|
|
2706
2790
|
total: response.total
|
|
2707
2791
|
};
|
|
2708
2792
|
}
|
|
2709
|
-
return { query: explain("query", query,
|
|
2793
|
+
return { query: explain("query", query, queryFeatures) };
|
|
2710
2794
|
}
|
|
2711
2795
|
//#endregion
|
|
2712
2796
|
//#region ../client/src/resources/segment.ts
|
|
@@ -2885,14 +2969,11 @@ function listParamFeatures(params) {
|
|
|
2885
2969
|
return LIST_PARAM_FEATURES.filter(([param]) => params[param] === true).map(([, feature]) => feature);
|
|
2886
2970
|
}
|
|
2887
2971
|
function dataLayerFeatures(value, field) {
|
|
2888
|
-
return
|
|
2889
|
-
feature:
|
|
2972
|
+
return gateTriggered(DATA_LAYER_TIER_GATE, value) ? [{
|
|
2973
|
+
feature: DATA_LAYER_TIER_GATE.feature,
|
|
2890
2974
|
fields: [field]
|
|
2891
2975
|
}] : [];
|
|
2892
2976
|
}
|
|
2893
|
-
function isTierName(value) {
|
|
2894
|
-
return value !== null && value !== void 0 && TableDataLayerTier.safeParse(value).success;
|
|
2895
|
-
}
|
|
2896
2977
|
const UPLOAD_UPDATE_PATHS = {
|
|
2897
2978
|
append: "append-csv",
|
|
2898
2979
|
replace: "replace-csv"
|
|
@@ -2946,10 +3027,11 @@ function tableResource(transport) {
|
|
|
2946
3027
|
return updated;
|
|
2947
3028
|
}
|
|
2948
3029
|
async function refuseRewrittenDataLayer(value, options) {
|
|
2949
|
-
if (
|
|
3030
|
+
if (!gateTriggered(DATA_LAYER_MEDALLION_GATE, value)) return;
|
|
2950
3031
|
const profile = await transport.preflightServer(options);
|
|
2951
3032
|
if (profile === null) return;
|
|
2952
|
-
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);
|
|
2953
3035
|
if (failure !== null) transport.refuseBeforeSending(new CapabilityError(failure));
|
|
2954
3036
|
}
|
|
2955
3037
|
/** Get a table by id with its fields hydrated — the metadata the query builder runs on. */
|
|
@@ -3025,7 +3107,7 @@ function tableResource(transport) {
|
|
|
3025
3107
|
};
|
|
3026
3108
|
}
|
|
3027
3109
|
async function requireDataAuthorityNull(value, options) {
|
|
3028
|
-
if (value
|
|
3110
|
+
if (gateTriggered(DATA_AUTHORITY_WITHDRAWAL_GATE, value)) await transport.requireFeatures([DATA_AUTHORITY_WITHDRAWAL_GATE.feature], options);
|
|
3029
3111
|
}
|
|
3030
3112
|
async function postSelection(path, selectors, options) {
|
|
3031
3113
|
const body = parseRequestBody(TableSelectors, selectors, "table selectors");
|
|
@@ -3583,10 +3665,22 @@ const TEST_RUN_ROW_LIMIT = {
|
|
|
3583
3665
|
const TestRunRowLimit = z.number().int().min(TEST_RUN_ROW_LIMIT.min).max(TEST_RUN_ROW_LIMIT.max);
|
|
3584
3666
|
z.object({
|
|
3585
3667
|
code: z.string(),
|
|
3586
|
-
source_tables: z.array(
|
|
3668
|
+
source_tables: z.array(TransformSourceTableEntryInput).min(1),
|
|
3587
3669
|
output_row_limit: TestRunRowLimit.optional(),
|
|
3588
3670
|
per_input_row_limit: TestRunRowLimit.optional()
|
|
3589
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
|
+
}
|
|
3590
3684
|
const PythonTestRunOutput = z.object({
|
|
3591
3685
|
cols: z.array(z.object({ name: z.string() }).loose()),
|
|
3592
3686
|
rows: z.array(z.unknown())
|
|
@@ -3643,10 +3737,11 @@ function transformPythonResource(transport) {
|
|
|
3643
3737
|
* sizes are capped at 100 rows.
|
|
3644
3738
|
*/
|
|
3645
3739
|
async function testRun(params, options = {}) {
|
|
3740
|
+
const { features } = await transport.server(options);
|
|
3646
3741
|
return transport.requestParsed(PythonApiTestRun, "/api/ee/transforms-python/test-run", {
|
|
3647
3742
|
...options,
|
|
3648
3743
|
method: "POST",
|
|
3649
|
-
body: params
|
|
3744
|
+
body: pythonTestRunBody(params, features)
|
|
3650
3745
|
});
|
|
3651
3746
|
}
|
|
3652
3747
|
return {
|
|
@@ -3687,20 +3782,30 @@ function transformResource(transport) {
|
|
|
3687
3782
|
const { features } = await transport.server(options);
|
|
3688
3783
|
return transport.requestParsed(transformDetailSchema(features), `/api/transform/${id}`, { ...options });
|
|
3689
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
|
+
}
|
|
3690
3793
|
/** Create a transform — a query plus the warehouse table it writes — from a full body. */
|
|
3691
3794
|
async function create(params, options = {}) {
|
|
3795
|
+
const body = await writeBody(params, options);
|
|
3692
3796
|
return requestTransform("/api/transform", {
|
|
3693
3797
|
...options,
|
|
3694
3798
|
method: "POST",
|
|
3695
|
-
body
|
|
3799
|
+
body
|
|
3696
3800
|
});
|
|
3697
3801
|
}
|
|
3698
3802
|
/** Update a transform by id, patching only the fields the body carries. */
|
|
3699
3803
|
async function update(id, params, options = {}) {
|
|
3804
|
+
const body = await writeBody(params, options);
|
|
3700
3805
|
return requestTransform(`/api/transform/${id}`, {
|
|
3701
3806
|
...options,
|
|
3702
3807
|
method: "PUT",
|
|
3703
|
-
body
|
|
3808
|
+
body
|
|
3704
3809
|
});
|
|
3705
3810
|
}
|
|
3706
3811
|
/** Delete a transform by id, leaving any table it already materialized in place. */
|
|
@@ -4027,7 +4132,7 @@ function parseResponseInteger(value, source) {
|
|
|
4027
4132
|
//#region ../client/src/domain/user.ts
|
|
4028
4133
|
const CurrentUser = z.object({
|
|
4029
4134
|
id: z.number().int(),
|
|
4030
|
-
email: z.
|
|
4135
|
+
email: z.string(),
|
|
4031
4136
|
common_name: z.string(),
|
|
4032
4137
|
is_superuser: z.boolean()
|
|
4033
4138
|
}).loose();
|