@metabase/cli 0.5.16 → 0.5.17-alpha.verification.b5c6485
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-C7MKpQ_s.mjs → add-collection-Bj9NfvnN.mjs} +5 -5
- package/dist/{alert-5KJl2LGw.mjs → alert-CMshuKkD.mjs} +7 -7
- package/dist/{alerts-VdBqaRBN.mjs → alerts-DNfvRAHF.mjs} +4 -4
- package/dist/api-key-AnD8WQtk.mjs +13 -0
- package/dist/{append-CKR_78Hr.mjs → append-B6NKVXmC.mjs} +4 -4
- package/dist/{archive-BuGuzMOF.mjs → archive-BHwRFiIp.mjs} +3 -3
- package/dist/{archive-BaNVn1zm.mjs → archive-BigVLFhO.mjs} +5 -5
- package/dist/{archive-BO1Lhbhj.mjs → archive-BymwF3JK.mjs} +3 -3
- package/dist/{archive-DMGJ8d64.mjs → archive-CnScSiQl.mjs} +3 -3
- package/dist/{archive-b2ZdURU-.mjs → archive-CsxKuct2.mjs} +3 -3
- package/dist/{archive-C_t5LBQX.mjs → archive-DASCU44R.mjs} +3 -3
- package/dist/{archive-fxJhlFeE.mjs → archive-DFSuRpQU.mjs} +5 -5
- package/dist/{archive-A-q9e46B.mjs → archive-DQL3uq3S.mjs} +3 -3
- package/dist/{archive-hBsJNt9B.mjs → archive-DXD8E-tc.mjs} +5 -5
- package/dist/{archive-PyBRVjY2.mjs → archive-fDo0iMXZ.mjs} +3 -3
- package/dist/{archive-yzyLfcKv.mjs → archive-wKfb5LNv.mjs} +3 -3
- package/dist/{archive-Lv8i5kbZ.mjs → archive-xGLFsqVv.mjs} +3 -3
- package/dist/{auth-zQZU0h1l.mjs → auth-CNDQbQXF.mjs} +5 -5
- package/dist/{branch-flag-ClXFjNvx.mjs → branch-flag-kZkAZcPJ.mjs} +1 -1
- package/dist/{branches-BNuxljRy.mjs → branches-CcDKZnBq.mjs} +2 -2
- package/dist/{breaking-B2p2TbDM.mjs → breaking-BEwEGyrk.mjs} +5 -5
- package/dist/{broken-DhnT5VzF.mjs → broken-Bx2JFtDZ.mjs} +7 -7
- package/dist/{bulk-discard-values-KzDA_90h.mjs → bulk-discard-values-BQzOIue5.mjs} +4 -4
- package/dist/{bulk-edit-BlnQtpvj.mjs → bulk-edit-DGx6in-k.mjs} +3 -3
- package/dist/{bulk-rescan-values-D9JN-CFA.mjs → bulk-rescan-values-DGlGDhXf.mjs} +3 -3
- package/dist/{bulk-sync-schema-k_J9jizj.mjs → bulk-sync-schema-BttWpXxE.mjs} +3 -3
- package/dist/{cancel-hoChHxqA.mjs → cancel-DdhLoGp1.mjs} +3 -3
- package/dist/{cancel-task-GA9Szh_n.mjs → cancel-task-D28bHXK_.mjs} +4 -4
- package/dist/card-Jy0kBLqO.mjs +25 -0
- package/dist/{cards-e5n3QAov.mjs → cards-BXiY52Nm.mjs} +5 -5
- package/dist/{ci-D8Q5uinJ.mjs → ci-D97nJ6-1.mjs} +2 -2
- package/dist/cli.mjs +199 -100
- package/dist/{client-CjR4yUXv.mjs → client-C3lyoltK.mjs} +646 -49
- package/dist/{collection-UBLWQLeo.mjs → collection-875u7UiH.mjs} +11 -2
- package/dist/{collection-T1vdKXLp.mjs → collection-CcagB_dn.mjs} +1 -1
- package/dist/collection-CsWEl350.mjs +21 -0
- package/dist/{collection-namespace-D5df5a3W.mjs → collection-namespace-BHGpFZ3M.mjs} +2 -2
- package/dist/{content-translation-DGVLulsm.mjs → content-translation-C8Z06-vg.mjs} +3 -3
- package/dist/{copy-D5Xwxf8O.mjs → copy-FIxCe679.mjs} +6 -6
- package/dist/{copy-BXIL7wYk.mjs → copy-UIDZe3Qc.mjs} +6 -6
- package/dist/{copy-flags-4FH-1Kli.mjs → copy-flags-D_lqBhi8.mjs} +2 -2
- package/dist/{create-se8RRWKu.mjs → create-0UemhsxL.mjs} +2 -2
- package/dist/{create-B27Y2Agn.mjs → create-3fsDGV9E.mjs} +2 -2
- package/dist/{create-CMTpjoqJ2.mjs → create-Au6xqgIO2.mjs} +4 -4
- package/dist/{create-Cq0fW-no.mjs → create-BI-do2mK.mjs} +2 -2
- package/dist/{create-DEkqfDmi.mjs → create-BabzAD_X.mjs} +2 -2
- package/dist/{create-BNXNJK2B.mjs → create-Bpwl2GQ3.mjs} +5 -5
- package/dist/{create-BjhYTFJK.mjs → create-Buvd5NBb.mjs} +2 -2
- package/dist/{create-BB2ZM7fL.mjs → create-C3JXunBQ.mjs} +2 -2
- package/dist/{create-BE5VOx07.mjs → create-CUUp0UyT.mjs} +4 -4
- package/dist/{create-CYVv0RkU.mjs → create-CazoyArr.mjs} +3 -3
- package/dist/{create-BYln360V.mjs → create-D-2RdE2_.mjs} +3 -3
- package/dist/{create-BbnQQMIq.mjs → create-DJjRunsw.mjs} +3 -3
- package/dist/{create-045KXNCm.mjs → create-DaE_oGxs.mjs} +3 -3
- package/dist/{create-CYQD_XGH.mjs → create-DoVQrBJ4.mjs} +2 -2
- package/dist/{create-CfZWHNIu.mjs → create-DwY140oE.mjs} +2 -2
- package/dist/{create-DU8dvDn6.mjs → create-bksqNBGg.mjs} +2 -2
- package/dist/{create-branch-BuXhvXjm.mjs → create-branch-Dwdy7irk.mjs} +5 -5
- package/dist/{create-LRsr3Uhf.mjs → create-gMYMUL7t.mjs} +5 -5
- package/dist/{create-C3cxBLip.mjs → create-hvtusQEZ.mjs} +5 -5
- package/dist/{create-heJR0nJH.mjs → create-lu1w-Hbw.mjs} +4 -4
- package/dist/{csv-qx4IBp-p.mjs → csv-DsE_ndhE.mjs} +4 -4
- package/dist/{current-task-q6-QEL9Q.mjs → current-task-DRNyn9QX.mjs} +4 -4
- package/dist/{dashboard-BpgLh8jq.mjs → dashboard-CLvvUUuF.mjs} +1 -1
- package/dist/{dashboard-CYgXhTBr.mjs → dashboard-D5BJZS3L.mjs} +1 -1
- package/dist/dashboard-DvoGk7ty.mjs +35 -0
- package/dist/data-action-KdcOST0y.mjs +24 -0
- package/dist/{data-app-B0t_SbO4.mjs → data-app-BMfcgWaI.mjs} +9 -9
- package/dist/{data-app-project-BMwuM3sR.mjs → data-app-project-BBWM7Zdk.mjs} +4 -4
- package/dist/{database-C5ucihp3.mjs → database-BSETP2o-.mjs} +9 -2
- package/dist/{database-u_spHEa0.mjs → database-CCUXiXH_.mjs} +1 -1
- package/dist/{dataset-LJxNN6p5.mjs → dataset-a7Q_ocDR.mjs} +1 -1
- package/dist/{db-DTFpgPBk.mjs → db-C-UN7Mw7.mjs} +8 -8
- package/dist/{delete-DjSFVFV7.mjs → delete-B5RQJybZ.mjs} +4 -4
- package/dist/{delete-BSlCKzBz.mjs → delete-BxHxz81i.mjs} +4 -4
- package/dist/{delete-Dmqrn_0-.mjs → delete-BycN1h3j.mjs} +4 -4
- package/dist/{delete-DVCNhz5n.mjs → delete-CEjfhdrB.mjs} +4 -4
- package/dist/{delete-Bw-UTJI7.mjs → delete-Cnv4Bp9r.mjs} +4 -4
- package/dist/{delete-CEqsZehc.mjs → delete-DOStUKHR.mjs} +4 -4
- package/dist/{delete-gIdO570b.mjs → delete-DtZUEUck.mjs} +4 -4
- package/dist/{delete-Ct_dN7dm.mjs → delete-RhO0HMY8.mjs} +4 -4
- package/dist/{delete-runtime-DL_-4ffZ.mjs → delete-runtime-Cxw6w3Jg.mjs} +1 -1
- package/dist/{delete-table-BhhP3-_p.mjs → delete-table-BkrSMJ6s.mjs} +4 -4
- package/dist/{delete-DMZCewEx.mjs → delete-woVgrl8z.mjs} +4 -4
- package/dist/{dependencies-DR_Bckq3.mjs → dependencies-DlrwzY_z.mjs} +3 -3
- package/dist/{dependency-MDyiJVQD.mjs → dependency-00_O1kxU.mjs} +1 -1
- package/dist/{dependency-DipNC15K.mjs → dependency-C4b_A3_L.mjs} +1 -1
- package/dist/dependency-I9bjDqIy.mjs +15 -0
- package/dist/{dependents-DTa2DZ0A.mjs → dependents-DyiLbk63.mjs} +8 -8
- package/dist/{dirty-Dm1ZYpS7.mjs → dirty-CnlYt6E6.mjs} +4 -4
- package/dist/{discard-values-DRp7IqaQ.mjs → discard-values-4FiVdoR1.mjs} +4 -4
- package/dist/document-CPA4VsKw.mjs +20 -0
- package/dist/{document-BcmSU5nG.mjs → document-PQg8DshK.mjs} +1 -1
- package/dist/{document-Bt-UgIBR.mjs → document-ks1uxhBt.mjs} +1 -1
- package/dist/{download-B5QADTKg.mjs → download-CsrJ5AtI.mjs} +2 -2
- package/dist/{eid-CEQZn7Ru.mjs → eid-Da_G_-sZ.mjs} +3 -3
- package/dist/{embedding-sdk-DioW9wdh.mjs → embedding-sdk-u_7nTdoy.mjs} +2 -2
- package/dist/{entity-CrmOaQ4E.mjs → entity-DBcuKQtX.mjs} +2 -2
- package/dist/{entry-flags-COaiQvXt.mjs → entry-flags-D7BhJxIr.mjs} +3 -3
- package/dist/{events-B4KDnJnZ.mjs → events-CnJ7Rwtn.mjs} +3 -3
- package/dist/{execute-B_grmyLF.mjs → execute-CWdVreci.mjs} +3 -3
- package/dist/{export-V1W9sn5C.mjs → export-T7nyfMGZ.mjs} +8 -8
- package/dist/{export-flags-eZeWPfeZ.mjs → export-flags-BbmWODey.mjs} +2 -2
- package/dist/{export-preflight-B2tvCt3v.mjs → export-preflight-BltqMU8P.mjs} +5 -5
- package/dist/field-DquBSVH3.mjs +21 -0
- package/dist/{fields-R5D83pgR.mjs → fields-D6L8qD0M.mjs} +3 -3
- package/dist/{filter-flags-DjUePmM2.mjs → filter-flags-BEdazLt3.mjs} +3 -3
- package/dist/{fks-B5VpYMev.mjs → fks-B5_IvC2f.mjs} +3 -3
- package/dist/{generate-actions-O49UqjD3.mjs → generate-actions-CFJ_ghia.mjs} +4 -4
- package/dist/{generate-queries-CCxaX_ce.mjs → generate-queries-DTkjAUEC.mjs} +4 -4
- package/dist/{generate-schema-Cbzw8S8T.mjs → generate-schema-z8tuKZdY.mjs} +4 -4
- package/dist/{get-B_gS_XuD.mjs → get-4Polb4EY.mjs} +3 -3
- package/dist/{get-D-xmiRx5.mjs → get-7aQ6kB1P.mjs} +3 -3
- package/dist/{get-CiHEY6YW.mjs → get-B4xNfH3p.mjs} +5 -5
- package/dist/{get-DXjWWEWG.mjs → get-BFdBm5Yv.mjs} +3 -3
- package/dist/{get-DWYhIlSs.mjs → get-BGnE-1e0.mjs} +3 -3
- package/dist/{get-CPRkpfky.mjs → get-BQvkMnCE.mjs} +5 -5
- package/dist/{get-DrCrl-ZN.mjs → get-BRjcNZro.mjs} +5 -5
- package/dist/{get-BpGJSf8d.mjs → get-BZpdNUMg.mjs} +3 -3
- package/dist/{get-D1EPFO5_.mjs → get-BoYBPOre.mjs} +3 -3
- package/dist/{get-C7LFdtZL.mjs → get-BzHlTaIt.mjs} +3 -3
- package/dist/{get-DTH_ZiwE.mjs → get-CCODVqkM.mjs} +4 -4
- package/dist/{get-Cib9UKz1.mjs → get-CPJ79uJS.mjs} +3 -3
- package/dist/{get-J019yh0K.mjs → get-CPTbKAkr.mjs} +3 -3
- package/dist/{get-H3X0ASHs.mjs → get-CmAfytZm.mjs} +4 -4
- package/dist/{get-DqKsf4N-.mjs → get-Co_dWeNO.mjs} +3 -3
- package/dist/{get-BIX5uHft.mjs → get-D83daNye.mjs} +3 -3
- package/dist/{get-C2g5h7yv.mjs → get-DRTQCy8i.mjs} +3 -3
- package/dist/{get-r_UoDqgf.mjs → get-DWxbhLGD.mjs} +3 -3
- package/dist/{get-BsptQrzr.mjs → get-DZ0Y723i.mjs} +3 -3
- package/dist/{get-BL7E_E2I.mjs → get-Ia79m3fd.mjs} +5 -5
- package/dist/{get-Cd0QEjSh.mjs → get-NFhCBU6R.mjs} +3 -3
- package/dist/{get-Dmxkihcr.mjs → get-rSBE94TP.mjs} +3 -3
- package/dist/{get-run-BvzAhPi0.mjs → get-run-DlpRMIC1.mjs} +3 -3
- package/dist/{git-sync-D1aKczo6.mjs → git-sync-C0yHY3bG.mjs} +1 -1
- package/dist/git-sync-CfDVrtF4.mjs +399 -0
- package/dist/git-sync-u9IUnjvH.mjs +29 -0
- package/dist/glossary-CVhKIwOq.mjs +14 -0
- package/dist/{glossary-B1jwt25B.mjs → glossary-CnSPXHAd.mjs} +1 -1
- package/dist/{glossary--NSqIGy5.mjs → glossary-z3Nvbo2P.mjs} +1 -1
- package/dist/{graph-BOLRH-lU.mjs → graph-CDzK39x5.mjs} +6 -6
- package/dist/{group-DxaqX3Gg.mjs → group-W6sZ0eWr.mjs} +1 -1
- package/dist/{has-remote-changes-CTrRo6EC.mjs → has-remote-changes-DAI22ieL.mjs} +4 -4
- package/dist/{import-CsIkDnWQ.mjs → import-CvBhorpj.mjs} +8 -8
- package/dist/{is-dirty-CUToDpA1.mjs → is-dirty-C35y7-Gk.mjs} +2 -2
- package/dist/{items-D9kxySKc.mjs → items-BPeXkhSe.mjs} +5 -5
- package/dist/{key-BPgr-uOm.mjs → key-DoqP1glp.mjs} +1 -1
- package/dist/{library-D2iGUx8x.mjs → library-C1RMcmjm.mjs} +5 -5
- package/dist/{library-9_e7RoW3.mjs → library-DlJjXXJT.mjs} +1 -1
- package/dist/{library-DpX_-UCK.mjs → library-DrbHqj17.mjs} +1 -1
- package/dist/{list-BIsh7CS4.mjs → list--qtST6Mu.mjs} +2 -2
- package/dist/{list-CVq_OaRN.mjs → list-BFAc6oZu.mjs} +2 -2
- package/dist/{list-CLK0ceIQ.mjs → list-BMOhV_vf.mjs} +2 -2
- package/dist/{list-CYWzH6SZ.mjs → list-BTKVHUkk.mjs} +5 -5
- package/dist/{list-D76iHfwo.mjs → list-BTbH-TVK.mjs} +5 -5
- package/dist/{list-CLkY7s9r.mjs → list-BYsQb175.mjs} +2 -2
- package/dist/{list-DbLN30Iz.mjs → list-BaM9JWY2.mjs} +3 -3
- package/dist/{list-Bg-NYdYo.mjs → list-Bjmqnc1r.mjs} +5 -5
- package/dist/{list-CzWbo_oA.mjs → list-BxUbbCRa.mjs} +2 -2
- package/dist/{list-C1X5JuzO.mjs → list-CZnf165W.mjs} +4 -4
- package/dist/{list-Cm0Qbs19.mjs → list-DCTZ3KMG.mjs} +3 -3
- package/dist/{list-Y9W9n4rh.mjs → list-DeEkR_mM.mjs} +2 -2
- package/dist/{list-BAHaze-O.mjs → list-Dfl-nxFI.mjs} +3 -3
- package/dist/{list-YyWMvzzr.mjs → list-Du0jDR1s.mjs} +4 -4
- package/dist/{list-BmGs9ZA6.mjs → list-DuS4ayN2.mjs} +2 -2
- package/dist/{list-CRV4Fon9.mjs → list-OpPH1899.mjs} +2 -2
- package/dist/{list-nU9V7QAo.mjs → list-Pse7z6Mw.mjs} +2 -2
- package/dist/{list-D5FJ09yJ.mjs → list-h1LmXpNZ.mjs} +4 -4
- package/dist/{list-ChATvCZv.mjs → list-hwcNqDVu.mjs} +2 -2
- package/dist/{list-gRSH0USz.mjs → list-ksxQw-0v.mjs} +2 -2
- package/dist/{list-BSm3_is3.mjs → list-rI68Y9Gz.mjs} +2 -2
- package/dist/{list-4Zir7Qa4.mjs → list-sdqp8e2x.mjs} +3 -3
- package/dist/{list-zImE-jdb.mjs → list-uQmmcjXD.mjs} +2 -2
- package/dist/{login-8xVwIW-u.mjs → login-KFeoZ4cp.mjs} +6 -6
- package/dist/{logout-DxTMO924.mjs → logout-ByJEvueB.mjs} +3 -3
- package/dist/{measure-C4S2coO7.mjs → measure-BJPVfAaG.mjs} +6 -6
- package/dist/{nano-id-C37LSdu-.mjs → nano-id-CZiRB0W_.mjs} +3 -3
- package/dist/{parameter-values-C4lSrNn_.mjs → parameter-values-B5s2INem.mjs} +5 -5
- package/dist/{parse-enum-Dh_pkHdD.mjs → parse-enum-Dm1BvZRN.mjs} +1 -1
- package/dist/{parse-id-DKKwr4c8.mjs → parse-id-DSHwgzAA.mjs} +1 -1
- package/dist/{parse-ref-01NRD9cO.mjs → parse-ref-CN-6HBFM.mjs} +1 -1
- package/dist/{parse-text-Bnmhu9uL.mjs → parse-text-C3VlFRgF.mjs} +1 -1
- package/dist/{path-BImEWndG.mjs → path-DO6KvEqL.mjs} +3 -3
- package/dist/poll-1TEUi8qv.mjs +73 -0
- package/dist/{predicates-RLoSqLcT.mjs → predicates-DQA0AsBx.mjs} +5 -1
- package/dist/{preflight-DxI4O7fK.mjs → preflight-CeXhEJfq.mjs} +3 -3
- package/dist/{process-BzhbQ7c6.mjs → process-DZcS6SKr.mjs} +1 -1
- package/dist/{publish-cJHKIiBC.mjs → publish-VqKsiioy.mjs} +5 -5
- package/dist/{query-VCxGhfTT.mjs → query-CfOj4dF5.mjs} +8 -8
- package/dist/{query-BdyzoLZW.mjs → query-D0iAwWIe.mjs} +5 -5
- package/dist/{registry-flag-pFusSlf8.mjs → registry-flag-CFPEqyNd.mjs} +3 -3
- package/dist/{remapping-D1Sa-xfO.mjs → remapping-CepD_wm5.mjs} +4 -4
- package/dist/{remove-collection-D-VC2Gw0.mjs → remove-collection-Dyu-svGv.mjs} +5 -5
- package/dist/{render-Bmgfe3yb.mjs → render-Ck41d-L0.mjs} +2 -2
- package/dist/{replace-CEopwhIh.mjs → replace-BSPrhltr.mjs} +4 -4
- package/dist/{requirement-check-B87F9671.mjs → requirement-check-CoX3mEdF.mjs} +10 -2
- package/dist/{rescan-values-CF-Dl6sN.mjs → rescan-values-Cc952DEH.mjs} +3 -3
- package/dist/{rescan-values-DQDupjHI.mjs → rescan-values-MLAz1ZbW.mjs} +5 -5
- package/dist/{run-DH72xxih.mjs → run-BIpGmnHS.mjs} +5 -5
- package/dist/{run-C3M2E0GK.mjs → run-CHMiJcwC.mjs} +3 -3
- package/dist/{run-Bu7XLdUh.mjs → run-Cc2HW3ZI.mjs} +5 -5
- package/dist/{run-BAupv3WM.mjs → run-D4uxDLy7.mjs} +5 -5
- package/dist/{runs-Sv7RD4Fq.mjs → runs-DUFlS3Z-.mjs} +3 -3
- package/dist/{runtime-C604gE-r.mjs → runtime-Hl006cLS.mjs} +68 -24
- package/dist/{scaffold-CmA20NoK.mjs → scaffold-DtcfaLeA.mjs} +7 -7
- package/dist/{schema-BWYgM6R4.mjs → schema-6P82WjNJ.mjs} +7 -7
- package/dist/{schema-tables-C9Sp4VWC.mjs → schema-tables-DkDCq2GB.mjs} +3 -3
- package/dist/{schemas-Nk7rDuaw.mjs → schemas-BdcK4Qcy.mjs} +3 -3
- package/dist/{sdk-version-Dk1-ILRc.mjs → sdk-version-DH2fl10p.mjs} +4 -4
- package/dist/{search-DYrl0gT0.mjs → search-COpkYln7.mjs} +5 -5
- package/dist/{search-b1w3LK09.mjs → search-kIoBsgMB.mjs} +5 -5
- package/dist/{segment-Bqtp0kFB.mjs → segment-X6wjQqtj.mjs} +6 -6
- package/dist/{send-ColF6-hL.mjs → send-B6n4B-Mb.mjs} +3 -3
- package/dist/{set-DSXN4cLO.mjs → set-CYRe1u4c.mjs} +3 -3
- package/dist/{set-active-BHCwRaZI.mjs → set-active-RoXnJkfD.mjs} +3 -3
- package/dist/{set-data-actions-B8QMEILh.mjs → set-data-actions-CRFOH_li.mjs} +6 -6
- package/dist/{set-enabled-DgBE9cdW.mjs → set-enabled-DfaCOQig.mjs} +4 -4
- package/dist/{set-sensitivity-DZXMFyj1.mjs → set-sensitivity-BRvy0pfV.mjs} +4 -4
- package/dist/{setting-DdB-4mgj.mjs → setting-DWdtp4lv.mjs} +4 -4
- package/dist/{setup-8Kdv5hzG.mjs → setup-DpHz8tm9.mjs} +2 -2
- package/dist/{skills-BVGZUFdg.mjs → skills-313T3aGC.mjs} +4 -4
- package/dist/{skills-Gq6uSx2f.mjs → skills-DuP1RI1W.mjs} +3 -3
- package/dist/{slug-DciR6pKq.mjs → slug-DhT4O0Aa.mjs} +1 -1
- package/dist/snippet-uDlfAY2R.mjs +19 -0
- package/dist/{stash-D7vPehrB.mjs → stash-DJ1nYTJS.mjs} +7 -7
- package/dist/{status-BXv6DNe1.mjs → status-DuRBpGQa.mjs} +3 -3
- package/dist/{status-MYpQhWUe.mjs → status-HUitbwTc.mjs} +5 -5
- package/dist/{subscription-BRGXG394.mjs → subscription-C_BRMkcY.mjs} +6 -6
- package/dist/{subscriptions-IGAziZPm.mjs → subscriptions-D2sw0LRD.mjs} +4 -4
- package/dist/{summary-nrM5fHQ2.mjs → summary-C4v7PVFE.mjs} +3 -3
- package/dist/{sync-schema-clOXGTeH.mjs → sync-schema-47WF7nm6.mjs} +6 -6
- package/dist/{sync-schema-Dz9wQd4G.mjs → sync-schema-CQS8hn4e.mjs} +3 -3
- package/dist/{sync-task-Fo5vCyyW.mjs → sync-task-DPFDTvEe.mjs} +2 -2
- package/dist/table-Bo663yFg.mjs +26 -0
- package/dist/{table-selector-flags-D7rbRFD9.mjs → table-selector-flags-BiFCN3f-.mjs} +3 -3
- package/dist/{text-oFZn63P5.mjs → text-D1q1NlLJ.mjs} +1 -1
- package/dist/timeline-Qg-9RjSW.mjs +21 -0
- package/dist/{timeline-event-zTlg0l93.mjs → timeline-event-Bia426Y4.mjs} +6 -6
- package/dist/transform-Catz8GdK.mjs +28 -0
- package/dist/transform-job-BcaheBK9.mjs +22 -0
- package/dist/{transform-tag-BAACrCIl.mjs → transform-tag-aP0kvj5-.mjs} +5 -5
- package/dist/transform-test-UNNeneMm.mjs +16 -0
- package/dist/{transforms-DJcALLGn.mjs → transforms-BpykgvzU.mjs} +3 -3
- package/dist/{transport-DfIZveGA.mjs → transport-I0zuxki5.mjs} +118 -47
- package/dist/{tree-BJBeUJ9Y.mjs → tree-DZ3YLCje.mjs} +4 -4
- package/dist/{unpublish-DD84rHRH.mjs → unpublish-BH-8N8S9.mjs} +3 -3
- package/dist/{unreferenced-TWCy-s5F.mjs → unreferenced-BGIPLLRG.mjs} +5 -5
- package/dist/{update-CuAoB110.mjs → update-9WG4Ks__.mjs} +6 -6
- package/dist/{update-DBseT7BB.mjs → update-BHAILm8s.mjs} +3 -3
- package/dist/{update-BboO0IUv.mjs → update-BdvA1vcE.mjs} +3 -3
- package/dist/{update-B4DzHQ-j.mjs → update-BlvNFo81.mjs} +3 -3
- package/dist/{update-ByN7IFld.mjs → update-Bq22f7Zx.mjs} +3 -3
- package/dist/{update-BBkKvDBy.mjs → update-CFZsL4Ic.mjs} +4 -4
- package/dist/{update-CFJR92_j2.mjs → update-CGJmAKuC2.mjs} +3 -3
- package/dist/{update-JFFsF7kU.mjs → update-ChMYUZQ8.mjs} +3 -3
- package/dist/{update-cvdd5OIM.mjs → update-CnDoasSQ.mjs} +5 -5
- package/dist/{update-DZQ5ZEpV.mjs → update-DEDzv1mA.mjs} +7 -7
- package/dist/{update-N-EjTy_6.mjs → update-DFBfTmhv.mjs} +4 -4
- package/dist/{update-YH57RzrK.mjs → update-DSPTxIe4.mjs} +5 -5
- package/dist/{update-COzu9X6G.mjs → update-DTNccf-s.mjs} +3 -3
- package/dist/{update-rBhrk13R.mjs → update-DTPwJ5xA.mjs} +6 -6
- package/dist/{update-De-fdx1H.mjs → update-DWbleEvw.mjs} +4 -4
- package/dist/{update-BhQa3TdY.mjs → update-Dnw9fBei.mjs} +3 -3
- package/dist/{update-GqB2gxF-.mjs → update-Dv4Y0Jyp.mjs} +3 -3
- package/dist/{update-Bu_yvXLE.mjs → update-Dyqk-Vqe.mjs} +4 -4
- package/dist/{update-dashcard-DZtQUBVb.mjs → update-dashcard-DJGaybcJ.mjs} +5 -5
- package/dist/{update-Bnak2DVK.mjs → update-t5WIAXSK.mjs} +3 -3
- package/dist/{upgrade-q-QAg5hL.mjs → upgrade-DGkndHKX.mjs} +5 -5
- package/dist/upload-51B4fVXD.mjs +13 -0
- package/dist/{upload-CHzuTcgy.mjs → upload-CnDHOsWN.mjs} +2 -2
- package/dist/{upload-CSFjeAL6.mjs → upload-CqTI_tAv.mjs} +3 -3
- package/dist/{uuid-BNhr57o_.mjs → uuid-C_Tp0KDF.mjs} +3 -3
- package/dist/{validate-xmlIkST4.mjs → validate-CvcqIGsS.mjs} +1 -1
- package/dist/{validate-query-DuK8pUmu.mjs → validate-query-D1LLmD9e.mjs} +2 -2
- package/dist/{values-BB4cTLim.mjs → values-DgFZCjtq.mjs} +3 -3
- package/dist/{verify-DLn_hvyT.mjs → verify-64UZkL-F.mjs} +3 -3
- package/dist/{verify-C85vwjR-.mjs → verify-CpfETbmC.mjs} +3 -3
- package/dist/{verify-mWoejtbQ.mjs → verify-DVKZxlxc.mjs} +4 -4
- package/dist/{wait-jszi7SI3.mjs → wait-DwbaWN87.mjs} +6 -6
- package/dist/{wait-flags-BhjQdHSI.mjs → wait-flags-BlkgkiZz.mjs} +2 -2
- package/dist/{yaml-CP5VvAqK.mjs → yaml-DKHMM0Qk.mjs} +1 -1
- package/package.json +1 -1
- package/skill-data/data-app/SKILL.md +4 -3
- package/dist/api-key-DDTTiZ-V.mjs +0 -13
- package/dist/card-CdVs1A7F.mjs +0 -25
- package/dist/collection-cuOHmg2x.mjs +0 -21
- package/dist/dashboard-DmzHMDNg.mjs +0 -35
- package/dist/data-action-xlWNyd_-.mjs +0 -24
- package/dist/dependency-Dr2i_220.mjs +0 -15
- package/dist/document-DISJSlag.mjs +0 -20
- package/dist/field-B2aEEVh7.mjs +0 -21
- package/dist/git-sync-BkLMpMFt.mjs +0 -29
- package/dist/git-sync-DP4wQFzm.mjs +0 -147
- package/dist/glossary-BKuLoz_5.mjs +0 -14
- package/dist/poll-DS8mUoSP.mjs +0 -46
- package/dist/snippet-RZ0EXUu6.mjs +0 -19
- package/dist/table-BZ3Gr7mc.mjs +0 -26
- package/dist/timeline-Bc7qsC-f.mjs +0 -21
- package/dist/transform-BeTeVVwe.mjs +0 -28
- package/dist/transform-job-B58u8FZl.mjs +0 -22
- package/dist/transform-test-DxNtkPnU.mjs +0 -16
- package/dist/upload-CtLEKvL6.mjs +0 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { R as CapabilityError,
|
|
1
|
+
import { _ as errorMessage, b as isNonInterruptFailure, f as PartialWriteError, i as isThenable, l as InternalError, m as TimeoutError, p as ResponseShapeError, r as isPlainObject, s as ConfigError, v as formatZodIssue } from "./predicates-DQA0AsBx.mjs";
|
|
2
|
+
import { R as CapabilityError, X as HttpError, Z as SyncRefusedError, at as parseJsonResult, i as methodRequirements, it as parseJsonOrPlain, r as isMethodKey, tt as errorBodyJson } from "./cli.mjs";
|
|
3
3
|
import { i as NotificationCardPayload, n as CARD_PAYLOAD_TYPE, r as Notification, t as AnyNotification } from "./notification-B5yMuPmo.mjs";
|
|
4
|
-
import { H as profileFromProperties, st as SessionProperties } from "./runtime-
|
|
4
|
+
import { H as profileFromProperties, W as combineAborts, ct as sessionSettingsSchema, st as SessionProperties } from "./runtime-Hl006cLS.mjs";
|
|
5
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-
|
|
7
|
-
import { n as createTransport } from "./transport-
|
|
6
|
+
import { n as featureFailures, r as supersedingFeature, t as checkFeatures } from "./requirement-check-CoX3mEdF.mjs";
|
|
7
|
+
import { n as createTransport } from "./transport-I0zuxki5.mjs";
|
|
8
8
|
import { i as CardDetail, o as CardQueryResult, t as Card } from "./card-BJRZ5D5Q.mjs";
|
|
9
9
|
import { t as gateInput } from "./input-gate-registry-Dh8QjKgW.mjs";
|
|
10
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";
|
|
@@ -12,21 +12,21 @@ import { r as ModerationReviewCreateInput, t as ModerationReview } from "./moder
|
|
|
12
12
|
import { i as ParameterValues, o as TemporalUnit } from "./parameter-Bucz3cLJ.mjs";
|
|
13
13
|
import { r as PivotExportFormat, t as DatasetQuery } from "./query-BKtMP5eH.mjs";
|
|
14
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-
|
|
15
|
+
import { c as DatabaseWithSettings, t as Database } from "./database-BSETP2o-.mjs";
|
|
16
16
|
import { t as Snippet } from "./snippet-CyKAgIZl.mjs";
|
|
17
|
-
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-
|
|
18
|
-
import { c as CollectionItem,
|
|
17
|
+
import { r as QueryMetadata, t as CompiledQuery } from "./dataset-a7Q_ocDR.mjs";
|
|
18
|
+
import { c as CollectionItem, h as CollectionTreeNode, m as CollectionSummary, r as Collection } from "./collection-875u7UiH.mjs";
|
|
19
19
|
import { t as ContentTranslationUploadResult } from "./content-translation-BrHOrmj9.mjs";
|
|
20
|
-
import { a as DashboardCreateInput, f as Dashcard, g as dashboardDetailSchema, r as DashboardCopy, t as Dashboard } from "./dashboard-
|
|
20
|
+
import { a as DashboardCreateInput, f as Dashcard, g as dashboardDetailSchema, r as DashboardCopy, t as Dashboard } from "./dashboard-D5BJZS3L.mjs";
|
|
21
21
|
import { l as dataActionSchema, n as DATA_ACTION_TABLE_GATE, s as DataActionExecuteResult, t as DATA_ACTION_COLLECTION_GATE } from "./data-action-DAw6WRTH.mjs";
|
|
22
22
|
import { a as DataAppEntry, n as DataApp, o as DataAppGeneratedFiles, t as DATA_APP_EDITING_GATE } from "./data-app-C7LHb5xd.mjs";
|
|
23
|
-
import {
|
|
24
|
-
import { i as DependencyEntity, s as DependencyGraph, t as BreakingSource, u as DependencyNode } from "./dependency-
|
|
25
|
-
import { t as Document } from "./document-
|
|
23
|
+
import { a as pollWithin, i as pollUntil, o as startDeadline, r as checkSchedule } from "./poll-1TEUi8qv.mjs";
|
|
24
|
+
import { i as DependencyEntity, s as DependencyGraph, t as BreakingSource, u as DependencyNode } from "./dependency-00_O1kxU.mjs";
|
|
25
|
+
import { t as Document } from "./document-ks1uxhBt.mjs";
|
|
26
26
|
import { i as EidTranslateResult } from "./eid-translation-Ba92VOHe.mjs";
|
|
27
|
-
import {
|
|
28
|
-
import { t as Glossary } from "./glossary-
|
|
29
|
-
import { a as libraryWireSchema, i as LibraryPublishTablesInput, n as LibraryCollectionInfo, o as toLibrary } from "./library-
|
|
27
|
+
import { _ as syncDirtyItemSchema, a as SyncExportPreflight, b as syncUnsyncedDependencySchema, g as isSyncTaskTerminal, n as SyncBranchCreated, r as SyncConnectionTested, t as RemoteSyncState, u as SyncSettingsUpdateResult, v as syncRemoteChangesSchema, y as syncTaskSchema } from "./git-sync-CfDVrtF4.mjs";
|
|
28
|
+
import { t as Glossary } from "./glossary-CnSPXHAd.mjs";
|
|
29
|
+
import { a as libraryWireSchema, i as LibraryPublishTablesInput, n as LibraryCollectionInfo, o as toLibrary } from "./library-DlJjXXJT.mjs";
|
|
30
30
|
import { t as Measure } from "./measure-BMWrX1ca.mjs";
|
|
31
31
|
import { o as SUBSCRIPTION_FILTERS_GATE, t as Pulse } from "./pulse-B2AmIWsO.mjs";
|
|
32
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";
|
|
@@ -306,8 +306,8 @@ function callRequirement(key, parameters, args) {
|
|
|
306
306
|
* The error a call failed with, as a `CapabilityError` carrying the server's answer when the server
|
|
307
307
|
* refused it for lacking one of the features `call` needs, and unchanged otherwise. The server's own
|
|
308
308
|
* refusal is the verdict; the profile only names what was missing. The explaining probe is bounded
|
|
309
|
-
* by its own timeout and the client's signal; the error stands when the probe fails
|
|
310
|
-
* interrupt surfaces as one.
|
|
309
|
+
* by its own timeout and the client's signal; the error stands when the probe fails or the client's
|
|
310
|
+
* guard refuses it, and an interrupt surfaces as one.
|
|
311
311
|
*/
|
|
312
312
|
async function explainRefusal(transport, call, error) {
|
|
313
313
|
if (!mayBeRefusal(call, error)) return error;
|
|
@@ -315,7 +315,7 @@ async function explainRefusal(transport, call, error) {
|
|
|
315
315
|
try {
|
|
316
316
|
profile = await transport.verifiedServer();
|
|
317
317
|
} catch (probeError) {
|
|
318
|
-
if (isNonInterruptFailure(probeError)) return error;
|
|
318
|
+
if (isNonInterruptFailure(probeError) || transport.refusedByGuard(probeError)) return error;
|
|
319
319
|
throw probeError;
|
|
320
320
|
}
|
|
321
321
|
const failure = explainedFailure(call, profile, error);
|
|
@@ -421,6 +421,24 @@ function collectionResource(transport) {
|
|
|
421
421
|
total: null
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* List the collections the caller can read, the Library and its children among them, as
|
|
426
|
+
* `CollectionSummary`, which reads no enum, so a collection of a type or namespace this client
|
|
427
|
+
* does not know fails nothing. `archived` lists the archived collections instead of the live
|
|
428
|
+
* ones, which also leaves out the root collection.
|
|
429
|
+
*/
|
|
430
|
+
async function summaries(params = {}, options = {}) {
|
|
431
|
+
return {
|
|
432
|
+
data: await transport.requestParsed(z.array(CollectionSummary), "/api/collection", {
|
|
433
|
+
...options,
|
|
434
|
+
query: {
|
|
435
|
+
archived: params.archived,
|
|
436
|
+
...INCLUDE_LIBRARY
|
|
437
|
+
}
|
|
438
|
+
}),
|
|
439
|
+
total: null
|
|
440
|
+
};
|
|
441
|
+
}
|
|
424
442
|
/** Get one collection by id, entity id, or the `root`/`trash` alias. */
|
|
425
443
|
async function get(ref, options = {}) {
|
|
426
444
|
return transport.requestParsed(Collection, `/api/collection/${refPath(ref)}`, { ...options });
|
|
@@ -483,6 +501,7 @@ function collectionResource(transport) {
|
|
|
483
501
|
}
|
|
484
502
|
return {
|
|
485
503
|
list,
|
|
504
|
+
summaries,
|
|
486
505
|
get,
|
|
487
506
|
create,
|
|
488
507
|
update,
|
|
@@ -998,6 +1017,7 @@ function databaseResource(transport) {
|
|
|
998
1017
|
* pass `wait` to poll the database until it reports its initial sync complete.
|
|
999
1018
|
*/
|
|
1000
1019
|
async function syncSchema(id, params = {}, options = {}) {
|
|
1020
|
+
checkSchedule(params.wait);
|
|
1001
1021
|
const ack = await transport.requestParsed(DatabaseTaskAck, `/api/database/${id}/sync_schema`, {
|
|
1002
1022
|
...options,
|
|
1003
1023
|
method: "POST"
|
|
@@ -1010,7 +1030,10 @@ function databaseResource(transport) {
|
|
|
1010
1030
|
const database = await pollUntil(async (signal) => transport.requestParsed(Database, `/api/database/${id}`, {
|
|
1011
1031
|
...options,
|
|
1012
1032
|
signal
|
|
1013
|
-
}), (candidate) => candidate.initial_sync_status === SYNC_COMPLETE,
|
|
1033
|
+
}), (candidate) => candidate.initial_sync_status === SYNC_COMPLETE, {
|
|
1034
|
+
...wait,
|
|
1035
|
+
signal: combineAborts(wait.signal, options.signal, transport.signal)
|
|
1036
|
+
});
|
|
1014
1037
|
return {
|
|
1015
1038
|
id,
|
|
1016
1039
|
status: ack.status,
|
|
@@ -1515,7 +1538,6 @@ const SyncScopeCollection = Collection.pick({
|
|
|
1515
1538
|
is_remote_synced: true
|
|
1516
1539
|
}).strip();
|
|
1517
1540
|
const SyncDirtyFlag = z.object({ is_dirty: z.boolean() });
|
|
1518
|
-
const SyncDirtyList = z.object({ dirty: z.array(SyncDirtyItem) });
|
|
1519
1541
|
const SyncBranchList = z.object({ items: z.array(z.string()) });
|
|
1520
1542
|
const SyncImportStarted = z.object({
|
|
1521
1543
|
status: z.literal("success"),
|
|
@@ -1532,6 +1554,15 @@ const SyncStashStarted = z.object({
|
|
|
1532
1554
|
task_id: z.number().int().positive()
|
|
1533
1555
|
});
|
|
1534
1556
|
const RemoteSyncSetting = z.string().nullable();
|
|
1557
|
+
const DirtyRefusalBody = z.object({ conflicts: z.literal(true) });
|
|
1558
|
+
const UnsyncedDependenciesBody = z.object({
|
|
1559
|
+
"error-code": z.literal("unsynced-dependencies"),
|
|
1560
|
+
unsynced_dependencies: z.array(syncUnsyncedDependencySchema)
|
|
1561
|
+
});
|
|
1562
|
+
const BranchMismatchBody = z.object({
|
|
1563
|
+
branch_mismatch: z.literal(true),
|
|
1564
|
+
current_branch: z.string().nullable()
|
|
1565
|
+
});
|
|
1535
1566
|
const RemoteSyncBranchProperty = SessionProperties.extend({ "remote-sync-branch": z.string().nullable().optional() });
|
|
1536
1567
|
const RemoteSyncUrlProperty = SessionProperties.extend({ "remote-sync-url": z.string().nullable().optional() });
|
|
1537
1568
|
const BRANCH_UNREADABLE_MESSAGE = "the remote-sync-branch setting is not readable: only admins see it, and a server without remote sync has none";
|
|
@@ -1547,13 +1578,64 @@ function isRemoteUnreadable(error) {
|
|
|
1547
1578
|
}
|
|
1548
1579
|
function gitSyncResource(transport) {
|
|
1549
1580
|
const { explain, refuse, refuseAfterReading } = explainer(transport, "gitSync");
|
|
1581
|
+
async function readingRefusal(request, call, options) {
|
|
1582
|
+
try {
|
|
1583
|
+
return await request;
|
|
1584
|
+
} catch (error) {
|
|
1585
|
+
if (!(error instanceof HttpError)) throw error;
|
|
1586
|
+
const refusal = await refusalOf(error, call, options);
|
|
1587
|
+
throw refusal === null ? error : new SyncRefusedError(error, refusal);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
async function refusalOf(error, call, options) {
|
|
1591
|
+
const body = errorBodyJson(error);
|
|
1592
|
+
if (error.status === 409) {
|
|
1593
|
+
const mismatch = BranchMismatchBody.safeParse(body);
|
|
1594
|
+
return mismatch.success ? {
|
|
1595
|
+
kind: "branch-mismatch",
|
|
1596
|
+
current_branch: mismatch.data.current_branch
|
|
1597
|
+
} : null;
|
|
1598
|
+
}
|
|
1599
|
+
if (error.status !== 400) return null;
|
|
1600
|
+
const unsynced = UnsyncedDependenciesBody.safeParse(body);
|
|
1601
|
+
if (unsynced.success) return {
|
|
1602
|
+
kind: "unsynced-dependencies",
|
|
1603
|
+
unsynced_dependencies: unsynced.data.unsynced_dependencies
|
|
1604
|
+
};
|
|
1605
|
+
if (call !== "import") return null;
|
|
1606
|
+
return DirtyRefusalBody.safeParse(body).success ? dirtyRefusal(body, options) : null;
|
|
1607
|
+
}
|
|
1608
|
+
async function dirtyRefusal(body, options) {
|
|
1609
|
+
let features;
|
|
1610
|
+
try {
|
|
1611
|
+
features = (await transport.server(options)).features;
|
|
1612
|
+
} catch (failure) {
|
|
1613
|
+
if (isNonInterruptFailure(failure) || transport.refusedByGuard(failure)) return null;
|
|
1614
|
+
throw failure;
|
|
1615
|
+
}
|
|
1616
|
+
if (!features.remoteSyncImportNamesDirtyObjects) return {
|
|
1617
|
+
kind: "dirty",
|
|
1618
|
+
dirty_objects: null
|
|
1619
|
+
};
|
|
1620
|
+
const read = z.object({ dirty_objects: z.array(syncDirtyItemSchema(features)) }).safeParse(body);
|
|
1621
|
+
return read.success ? {
|
|
1622
|
+
kind: "dirty",
|
|
1623
|
+
dirty_objects: read.data.dirty_objects
|
|
1624
|
+
} : null;
|
|
1625
|
+
}
|
|
1550
1626
|
/** Get the running or most recently finished sync task, or null when the server has none. */
|
|
1551
1627
|
async function currentTask(options = {}) {
|
|
1552
|
-
|
|
1628
|
+
const { features } = await transport.server(options);
|
|
1629
|
+
return fetchOptionalParsed(transport, "/api/ee/remote-sync/current-task", syncTaskSchema(features), options);
|
|
1553
1630
|
}
|
|
1554
|
-
/**
|
|
1631
|
+
/**
|
|
1632
|
+
* Request cancellation of the running sync task, and answer it in the state that left it. Some
|
|
1633
|
+
* servers end the task at once; others mark it `cancelled` and leave it `running` until its
|
|
1634
|
+
* worker next reports, so a caller that needs it ended waits for the task.
|
|
1635
|
+
*/
|
|
1555
1636
|
async function cancelTask(options = {}) {
|
|
1556
|
-
|
|
1637
|
+
const { features } = await transport.server(options);
|
|
1638
|
+
return transport.requestParsed(syncTaskSchema(features), "/api/ee/remote-sync/current-task/cancel", {
|
|
1557
1639
|
...options,
|
|
1558
1640
|
method: "POST"
|
|
1559
1641
|
});
|
|
@@ -1564,17 +1646,21 @@ function gitSyncResource(transport) {
|
|
|
1564
1646
|
}
|
|
1565
1647
|
/** List the objects whose local state differs from the remote. */
|
|
1566
1648
|
async function dirty(options = {}) {
|
|
1649
|
+
const { features } = await transport.server(options);
|
|
1650
|
+
const list = z.object({ dirty: z.array(syncDirtyItemSchema(features)) });
|
|
1567
1651
|
return {
|
|
1568
|
-
data: (await transport.requestParsed(
|
|
1652
|
+
data: (await transport.requestParsed(list, "/api/ee/remote-sync/dirty", options)).dirty,
|
|
1569
1653
|
total: null
|
|
1570
1654
|
};
|
|
1571
1655
|
}
|
|
1572
1656
|
/**
|
|
1573
|
-
* Compare the tracked remote branch against what Metabase last
|
|
1574
|
-
* comparison
|
|
1657
|
+
* Compare the tracked remote branch against what Metabase last synced. A server with
|
|
1658
|
+
* `remoteSyncChangesCache` caches the comparison, and `force-refresh` re-reads the remote instead;
|
|
1659
|
+
* one without it reads the remote on every call and drops the key, so every answer is fresh.
|
|
1575
1660
|
*/
|
|
1576
1661
|
async function hasRemoteChanges(params = {}, options = {}) {
|
|
1577
|
-
|
|
1662
|
+
const { features } = await transport.server(options);
|
|
1663
|
+
return transport.requestParsed(syncRemoteChangesSchema(features), "/api/ee/remote-sync/has-remote-changes", {
|
|
1578
1664
|
...options,
|
|
1579
1665
|
query: { "force-refresh": params["force-refresh"] }
|
|
1580
1666
|
});
|
|
@@ -1592,9 +1678,10 @@ function gitSyncResource(transport) {
|
|
|
1592
1678
|
* instance.
|
|
1593
1679
|
*/
|
|
1594
1680
|
async function importFromRemote(params = {}, options = {}) {
|
|
1681
|
+
checkSchedule(params.wait);
|
|
1595
1682
|
const expectedBranch = await expectedBranchFor(params.expected_branch, options);
|
|
1596
1683
|
await requireMerge(params.merge, options);
|
|
1597
|
-
const started = await transport.requestParsed(SyncImportStarted, "/api/ee/remote-sync/import", {
|
|
1684
|
+
const started = await readingRefusal(transport.requestParsed(SyncImportStarted, "/api/ee/remote-sync/import", {
|
|
1598
1685
|
...options,
|
|
1599
1686
|
method: "POST",
|
|
1600
1687
|
body: {
|
|
@@ -1603,7 +1690,7 @@ function gitSyncResource(transport) {
|
|
|
1603
1690
|
merge: params.merge,
|
|
1604
1691
|
expected_branch: expectedBranch
|
|
1605
1692
|
}
|
|
1606
|
-
});
|
|
1693
|
+
}), "import", options);
|
|
1607
1694
|
const message = started.message ?? null;
|
|
1608
1695
|
if (params.wait === void 0 || started.task_id === null) return {
|
|
1609
1696
|
message,
|
|
@@ -1645,9 +1732,10 @@ function gitSyncResource(transport) {
|
|
|
1645
1732
|
* changes in by a three-way merge instead, and `force` overwrites them.
|
|
1646
1733
|
*/
|
|
1647
1734
|
async function exportToRemote(params = {}, options = {}) {
|
|
1735
|
+
checkSchedule(params.wait);
|
|
1648
1736
|
const branchName = await exportBranchFor(params.branch, options);
|
|
1649
1737
|
await requireMerge(params.merge, options);
|
|
1650
|
-
const started = await transport.requestParsed(SyncExportStarted, "/api/ee/remote-sync/export", {
|
|
1738
|
+
const started = await readingRefusal(transport.requestParsed(SyncExportStarted, "/api/ee/remote-sync/export", {
|
|
1651
1739
|
...options,
|
|
1652
1740
|
method: "POST",
|
|
1653
1741
|
body: {
|
|
@@ -1656,7 +1744,7 @@ function gitSyncResource(transport) {
|
|
|
1656
1744
|
force: params.force,
|
|
1657
1745
|
merge: params.merge
|
|
1658
1746
|
}
|
|
1659
|
-
});
|
|
1747
|
+
}), "export", options);
|
|
1660
1748
|
const accepted = {
|
|
1661
1749
|
message: started.message,
|
|
1662
1750
|
task_id: started.task_id,
|
|
@@ -1675,16 +1763,17 @@ function gitSyncResource(transport) {
|
|
|
1675
1763
|
* otherwise.
|
|
1676
1764
|
*/
|
|
1677
1765
|
async function exportPreflight(params, options = {}) {
|
|
1678
|
-
return transport.requestParsed(SyncExportPreflight, "/api/ee/remote-sync/export-preflight", {
|
|
1766
|
+
return readingRefusal(transport.requestParsed(SyncExportPreflight, "/api/ee/remote-sync/export-preflight", {
|
|
1679
1767
|
...options,
|
|
1680
1768
|
query: { branch: params.branch }
|
|
1681
|
-
});
|
|
1769
|
+
}), "export", options);
|
|
1682
1770
|
}
|
|
1683
1771
|
/**
|
|
1684
1772
|
* Export Metabase's current content to a branch the remote does not have yet. The endpoint
|
|
1685
1773
|
* queues a task and returns at once; pass `wait` to poll that task to a terminal status.
|
|
1686
1774
|
*/
|
|
1687
1775
|
async function stash(params, options = {}) {
|
|
1776
|
+
checkSchedule(params.wait);
|
|
1688
1777
|
const started = await transport.requestParsed(SyncStashStarted, "/api/ee/remote-sync/stash", {
|
|
1689
1778
|
...options,
|
|
1690
1779
|
method: "POST",
|
|
@@ -1712,7 +1801,11 @@ function gitSyncResource(transport) {
|
|
|
1712
1801
|
total: null
|
|
1713
1802
|
};
|
|
1714
1803
|
}
|
|
1715
|
-
/**
|
|
1804
|
+
/**
|
|
1805
|
+
* Create a branch on the remote and point git-sync at it. Metabase 58 to 65 route it; a server
|
|
1806
|
+
* from v66 does not, and answers an `HttpError` of kind `route-missing`. There `stash` makes a
|
|
1807
|
+
* branch, holding Metabase's content.
|
|
1808
|
+
*/
|
|
1716
1809
|
async function createBranch(params, options = {}) {
|
|
1717
1810
|
return transport.requestParsed(SyncBranchCreated, "/api/ee/remote-sync/create-branch", {
|
|
1718
1811
|
...options,
|
|
@@ -1721,6 +1814,18 @@ function gitSyncResource(transport) {
|
|
|
1721
1814
|
});
|
|
1722
1815
|
}
|
|
1723
1816
|
/**
|
|
1817
|
+
* Check that the remote answers to the saved URL and token, or to those given, without saving
|
|
1818
|
+
* them. Admin only. A remote that cannot be reached, a URL the server does not take, or a remote
|
|
1819
|
+
* that is not set up is refused with 400, carrying the server's reason.
|
|
1820
|
+
*/
|
|
1821
|
+
async function testConnection(params = {}, options = {}) {
|
|
1822
|
+
return transport.requestParsed(SyncConnectionTested, "/api/ee/remote-sync/test-connection", {
|
|
1823
|
+
...options,
|
|
1824
|
+
method: "POST",
|
|
1825
|
+
body: params
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1724
1829
|
* Mark one collection as git-synced, or unmark it. The server cascades the flag to descendants
|
|
1725
1830
|
* by location prefix, and may queue an import task to bring the instance in line with the
|
|
1726
1831
|
* remote. A server without `remoteSyncCollectionsOnlyUpdate` validates every settings update as
|
|
@@ -1730,11 +1835,11 @@ function gitSyncResource(transport) {
|
|
|
1730
1835
|
* settings that are already empty.
|
|
1731
1836
|
*/
|
|
1732
1837
|
async function setCollectionSynced(collectionId, synced, options = {}) {
|
|
1733
|
-
return transport.requestParsed(SyncSettingsUpdateResult, "/api/ee/remote-sync/settings", {
|
|
1838
|
+
return readingRefusal(transport.requestParsed(SyncSettingsUpdateResult, "/api/ee/remote-sync/settings", {
|
|
1734
1839
|
...options,
|
|
1735
1840
|
method: "PUT",
|
|
1736
1841
|
body: await settingsUpdateBody({ [collectionId]: synced }, options)
|
|
1737
|
-
});
|
|
1842
|
+
}), "settings", options);
|
|
1738
1843
|
}
|
|
1739
1844
|
async function settingsUpdateBody(collections, options) {
|
|
1740
1845
|
const { features } = await transport.server(options);
|
|
@@ -1756,6 +1861,27 @@ function gitSyncResource(transport) {
|
|
|
1756
1861
|
"remote-sync-token": token
|
|
1757
1862
|
};
|
|
1758
1863
|
}
|
|
1864
|
+
/**
|
|
1865
|
+
* Configure the remote, the sync direction, the tracked branch, whether remote changes are
|
|
1866
|
+
* imported on their own, whether transforms are synced, and which collections are synced; a key
|
|
1867
|
+
* left out keeps its value. Admin only. A blank URL clears the remote. Send `remote-sync-url`
|
|
1868
|
+
* with the token, the direction or the branch: most servers check such an update against the URL
|
|
1869
|
+
* it carries and refuse it with 400 without one, and a server without
|
|
1870
|
+
* `remoteSyncCollectionsOnlyUpdate` checks every update that way. A read-write instance that
|
|
1871
|
+
* tracks a branch may refuse another `remote-sync-branch` with 400, leaving the switch to an
|
|
1872
|
+
* import of that branch. The server refuses with 400 while a sync task runs; one without
|
|
1873
|
+
* `remoteSyncCollectionsOnlyUpdate` saves the settings first and refuses only the import it would
|
|
1874
|
+
* start. On an instance left read-only the update starts an import, whose task id the answer
|
|
1875
|
+
* carries.
|
|
1876
|
+
*/
|
|
1877
|
+
async function updateSettings(params, options = {}) {
|
|
1878
|
+
if (params["remote-sync-transforms"] !== void 0) await transport.requireFeatures(["remoteSyncTransformsSetting"], options);
|
|
1879
|
+
return readingRefusal(transport.requestParsed(SyncSettingsUpdateResult, "/api/ee/remote-sync/settings", {
|
|
1880
|
+
...options,
|
|
1881
|
+
method: "PUT",
|
|
1882
|
+
body: params
|
|
1883
|
+
}), "settings", options);
|
|
1884
|
+
}
|
|
1759
1885
|
/** The collections currently in git-sync's scope. */
|
|
1760
1886
|
async function syncedCollections(options = {}) {
|
|
1761
1887
|
return {
|
|
@@ -1821,7 +1947,10 @@ function gitSyncResource(transport) {
|
|
|
1821
1947
|
return pollUntil(async (signal) => currentTask({
|
|
1822
1948
|
...options,
|
|
1823
1949
|
signal
|
|
1824
|
-
}), (task) => task === null || isSyncTaskTerminal(task.status),
|
|
1950
|
+
}), (task) => task === null || isSyncTaskTerminal(task.status), {
|
|
1951
|
+
...wait,
|
|
1952
|
+
signal: combineAborts(wait.signal, options.signal, transport.signal)
|
|
1953
|
+
});
|
|
1825
1954
|
}
|
|
1826
1955
|
return {
|
|
1827
1956
|
currentTask: explain("currentTask", currentTask),
|
|
@@ -1835,7 +1964,9 @@ function gitSyncResource(transport) {
|
|
|
1835
1964
|
stash: explain("stash", stash),
|
|
1836
1965
|
branches: explain("branches", branches),
|
|
1837
1966
|
createBranch: explain("createBranch", createBranch),
|
|
1967
|
+
testConnection: explain("testConnection", testConnection),
|
|
1838
1968
|
setCollectionSynced: explain("setCollectionSynced", setCollectionSynced),
|
|
1969
|
+
updateSettings: explain("updateSettings", updateSettings),
|
|
1839
1970
|
syncedCollections: refuse("syncedCollections", syncedCollections),
|
|
1840
1971
|
remoteUrl,
|
|
1841
1972
|
branch: refuseAfterReading("branch", RemoteSyncBranchProperty, branch),
|
|
@@ -1906,6 +2037,41 @@ function glossaryResource(transport) {
|
|
|
1906
2037
|
};
|
|
1907
2038
|
}
|
|
1908
2039
|
//#endregion
|
|
2040
|
+
//#region ../client/src/domain/health.ts
|
|
2041
|
+
const Health = z.object({
|
|
2042
|
+
status: z.string(),
|
|
2043
|
+
progress: z.number().min(0).max(1).optional()
|
|
2044
|
+
}).loose();
|
|
2045
|
+
Health.pick({
|
|
2046
|
+
status: true,
|
|
2047
|
+
progress: true
|
|
2048
|
+
}).strip();
|
|
2049
|
+
//#endregion
|
|
2050
|
+
//#region ../client/src/resources/health.ts
|
|
2051
|
+
function healthResource(transport) {
|
|
2052
|
+
/**
|
|
2053
|
+
* Check whether the server is up: `ok` once it has booted and reaches its app database, else
|
|
2054
|
+
* `initializing` with its `progress`, or why the app database is out of reach. Needs no
|
|
2055
|
+
* credential. Answers without retrying unless `retries` is set.
|
|
2056
|
+
*/
|
|
2057
|
+
async function get(options = {}) {
|
|
2058
|
+
try {
|
|
2059
|
+
return await transport.requestParsed(Health, "/api/health", {
|
|
2060
|
+
...options,
|
|
2061
|
+
retries: options.retries ?? 0
|
|
2062
|
+
});
|
|
2063
|
+
} catch (error) {
|
|
2064
|
+
if (!(error instanceof HttpError) || error.status !== 503) throw error;
|
|
2065
|
+
const { body } = error.developerDetail;
|
|
2066
|
+
if (body === null) throw error;
|
|
2067
|
+
const health = parseJsonResult(body, Health);
|
|
2068
|
+
if (!health.ok) throw error;
|
|
2069
|
+
return health.value;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
return { get };
|
|
2073
|
+
}
|
|
2074
|
+
//#endregion
|
|
1909
2075
|
//#region ../client/src/resources/library.ts
|
|
1910
2076
|
const LIBRARY_ROOT_PATH = "/api/ee/library/";
|
|
1911
2077
|
const PUBLISH_TABLES_PATH = "/api/ee/data-studio/table/publish-tables";
|
|
@@ -2364,6 +2530,17 @@ const PermissionsGraph = z.object({
|
|
|
2364
2530
|
revision: z.number().int().nonnegative(),
|
|
2365
2531
|
groups: z.record(z.string(), z.record(z.string(), DatabasePermissions))
|
|
2366
2532
|
}).loose();
|
|
2533
|
+
const PermissionGroup = z.object({
|
|
2534
|
+
id: z.number().int(),
|
|
2535
|
+
name: z.string(),
|
|
2536
|
+
magic_group_type: z.string().nullable(),
|
|
2537
|
+
member_count: z.number().int().nonnegative()
|
|
2538
|
+
}).loose();
|
|
2539
|
+
PermissionGroup.pick({
|
|
2540
|
+
id: true,
|
|
2541
|
+
name: true,
|
|
2542
|
+
magic_group_type: true
|
|
2543
|
+
}).strip();
|
|
2367
2544
|
//#endregion
|
|
2368
2545
|
//#region ../client/src/resources/permission.ts
|
|
2369
2546
|
function permissionResource(transport) {
|
|
@@ -2387,10 +2564,22 @@ function permissionResource(transport) {
|
|
|
2387
2564
|
async function groupGraph(id, options = {}) {
|
|
2388
2565
|
return transport.requestParsed(PermissionsGraph, `/api/permissions/graph/group/${id}`, { ...options });
|
|
2389
2566
|
}
|
|
2567
|
+
/**
|
|
2568
|
+
* List the permission groups, each with its member count. Needs an admin, the settings
|
|
2569
|
+
* application permission, or a group manager, who sees only the groups they manage.
|
|
2570
|
+
* `GET /api/permissions/group` answers a bare array.
|
|
2571
|
+
*/
|
|
2572
|
+
async function groups(options = {}) {
|
|
2573
|
+
return {
|
|
2574
|
+
data: await transport.requestParsed(z.array(PermissionGroup), "/api/permissions/group", { ...options }),
|
|
2575
|
+
total: null
|
|
2576
|
+
};
|
|
2577
|
+
}
|
|
2390
2578
|
return {
|
|
2391
2579
|
graph,
|
|
2392
2580
|
databaseGraph,
|
|
2393
|
-
groupGraph
|
|
2581
|
+
groupGraph,
|
|
2582
|
+
groups
|
|
2394
2583
|
};
|
|
2395
2584
|
}
|
|
2396
2585
|
//#endregion
|
|
@@ -2886,8 +3075,21 @@ function segmentResource(transport) {
|
|
|
2886
3075
|
archive
|
|
2887
3076
|
};
|
|
2888
3077
|
}
|
|
3078
|
+
z.object({
|
|
3079
|
+
username: z.string().min(1),
|
|
3080
|
+
password: z.string().min(1)
|
|
3081
|
+
}).strict();
|
|
3082
|
+
const Session = z.object({ id: z.string() }).loose();
|
|
3083
|
+
Session.pick({ id: true }).strip();
|
|
2889
3084
|
//#endregion
|
|
2890
3085
|
//#region ../client/src/resources/session.ts
|
|
3086
|
+
const SessionSettingsRead = SessionProperties.transform((properties, ctx) => {
|
|
3087
|
+
const { features } = profileFromProperties(properties);
|
|
3088
|
+
const parsed = sessionSettingsSchema(features).safeParse(properties);
|
|
3089
|
+
if (parsed.success) return parsed.data;
|
|
3090
|
+
for (const issue of parsed.error.issues) ctx.addIssue({ ...issue });
|
|
3091
|
+
return z.NEVER;
|
|
3092
|
+
});
|
|
2891
3093
|
function sessionResource(transport) {
|
|
2892
3094
|
/**
|
|
2893
3095
|
* Get the session properties: the settings the caller may read, among them the server's version
|
|
@@ -2896,7 +3098,32 @@ function sessionResource(transport) {
|
|
|
2896
3098
|
async function properties(options = {}) {
|
|
2897
3099
|
return transport.probe(SessionProperties, options);
|
|
2898
3100
|
}
|
|
2899
|
-
|
|
3101
|
+
/**
|
|
3102
|
+
* Get the settings a bootstrap reads from the session properties: the setup state, the site name,
|
|
3103
|
+
* the AI and MCP switches and remote sync, parsed by the shape of the server that answers. Read
|
|
3104
|
+
* afresh, never from a profile handed in.
|
|
3105
|
+
*/
|
|
3106
|
+
async function settings(options = {}) {
|
|
3107
|
+
return transport.probe(SessionSettingsRead, options);
|
|
3108
|
+
}
|
|
3109
|
+
/**
|
|
3110
|
+
* Log in with a username and password, answering the new session's id. A wrong password answers
|
|
3111
|
+
* 401. An account with a second factor is answered with a challenge rather than a session, and
|
|
3112
|
+
* one without where the instance requires a second factor with an enrollment; this method
|
|
3113
|
+
* reports either as a `ResponseShapeError`.
|
|
3114
|
+
*/
|
|
3115
|
+
async function create(params, options = {}) {
|
|
3116
|
+
return transport.requestParsed(Session, "/api/session", {
|
|
3117
|
+
...options,
|
|
3118
|
+
method: "POST",
|
|
3119
|
+
body: params
|
|
3120
|
+
});
|
|
3121
|
+
}
|
|
3122
|
+
return {
|
|
3123
|
+
properties,
|
|
3124
|
+
settings,
|
|
3125
|
+
create
|
|
3126
|
+
};
|
|
2900
3127
|
}
|
|
2901
3128
|
//#endregion
|
|
2902
3129
|
//#region ../client/src/resources/setting.ts
|
|
@@ -3265,6 +3492,101 @@ function describeCollectionAnswer(answered) {
|
|
|
3265
3492
|
return `the table stays in collection ${answered.value}`;
|
|
3266
3493
|
}
|
|
3267
3494
|
//#endregion
|
|
3495
|
+
//#region ../client/src/domain/task.ts
|
|
3496
|
+
const TaskRunType = z.enum([
|
|
3497
|
+
"subscription",
|
|
3498
|
+
"alert",
|
|
3499
|
+
"sync",
|
|
3500
|
+
"fingerprint"
|
|
3501
|
+
]);
|
|
3502
|
+
const TaskRunEntityType = z.enum([
|
|
3503
|
+
"database",
|
|
3504
|
+
"card",
|
|
3505
|
+
"dashboard"
|
|
3506
|
+
]);
|
|
3507
|
+
const TaskRunStatus = z.enum([
|
|
3508
|
+
"started",
|
|
3509
|
+
"success",
|
|
3510
|
+
"failed",
|
|
3511
|
+
"abandoned"
|
|
3512
|
+
]);
|
|
3513
|
+
const TaskRun = z.object({
|
|
3514
|
+
id: z.number().int(),
|
|
3515
|
+
run_type: TaskRunType,
|
|
3516
|
+
entity_type: TaskRunEntityType,
|
|
3517
|
+
entity_id: z.number().int(),
|
|
3518
|
+
started_at: z.string(),
|
|
3519
|
+
ended_at: z.string().nullable(),
|
|
3520
|
+
status: TaskRunStatus,
|
|
3521
|
+
entity_name: z.string().nullable(),
|
|
3522
|
+
task_count: z.number().int(),
|
|
3523
|
+
success_count: z.number().int(),
|
|
3524
|
+
failed_count: z.number().int()
|
|
3525
|
+
}).loose();
|
|
3526
|
+
TaskRun.pick({
|
|
3527
|
+
id: true,
|
|
3528
|
+
run_type: true,
|
|
3529
|
+
entity_type: true,
|
|
3530
|
+
entity_id: true,
|
|
3531
|
+
status: true,
|
|
3532
|
+
started_at: true,
|
|
3533
|
+
ended_at: true
|
|
3534
|
+
}).strip();
|
|
3535
|
+
const TaskHistoryStatus = z.enum([
|
|
3536
|
+
"started",
|
|
3537
|
+
"success",
|
|
3538
|
+
"failed",
|
|
3539
|
+
"unknown"
|
|
3540
|
+
]);
|
|
3541
|
+
const TaskHistoryDetails = z.object({ message: z.string().nullable().optional() }).loose();
|
|
3542
|
+
const TaskHistory = z.object({
|
|
3543
|
+
id: z.number().int(),
|
|
3544
|
+
task: z.string(),
|
|
3545
|
+
db_id: z.number().int().nullable(),
|
|
3546
|
+
started_at: z.string(),
|
|
3547
|
+
ended_at: z.string().nullable(),
|
|
3548
|
+
duration: z.number().int().nullable(),
|
|
3549
|
+
status: TaskHistoryStatus,
|
|
3550
|
+
task_details: TaskHistoryDetails.nullable()
|
|
3551
|
+
}).loose();
|
|
3552
|
+
const TaskRunWithTasks = TaskRun.extend({ tasks: z.array(TaskHistory) });
|
|
3553
|
+
//#endregion
|
|
3554
|
+
//#region ../client/src/resources/task.ts
|
|
3555
|
+
function taskResource(transport) {
|
|
3556
|
+
const { explain, explainWalk } = explainer(transport, "task");
|
|
3557
|
+
/**
|
|
3558
|
+
* Walk the background-job runs, such as database syncs and subscription sends, newest first,
|
|
3559
|
+
* each with the name of the entity it ran against and a count of its tasks. Needs the monitoring
|
|
3560
|
+
* application permission.
|
|
3561
|
+
*/
|
|
3562
|
+
async function* runPages(params = {}, options = {}) {
|
|
3563
|
+
yield* paginatePages(transport, "/api/task/runs", TaskRun, {
|
|
3564
|
+
query: {
|
|
3565
|
+
"run-type": params["run-type"],
|
|
3566
|
+
"entity-type": params["entity-type"],
|
|
3567
|
+
"entity-id": params["entity-id"],
|
|
3568
|
+
status: params.status,
|
|
3569
|
+
"started-at": params["started-at"]
|
|
3570
|
+
},
|
|
3571
|
+
...options.offset !== void 0 && { offset: options.offset },
|
|
3572
|
+
...options.max !== void 0 && { max: options.max },
|
|
3573
|
+
...options.pageSize !== void 0 && { pageSize: options.pageSize },
|
|
3574
|
+
...options.signal !== void 0 && { signal: options.signal }
|
|
3575
|
+
});
|
|
3576
|
+
}
|
|
3577
|
+
/**
|
|
3578
|
+
* Get a single task run with all its child tasks, oldest first. Needs the monitoring application
|
|
3579
|
+
* permission.
|
|
3580
|
+
*/
|
|
3581
|
+
async function run(id, options = {}) {
|
|
3582
|
+
return transport.requestParsed(TaskRunWithTasks, `/api/task/runs/${id}`, options);
|
|
3583
|
+
}
|
|
3584
|
+
return {
|
|
3585
|
+
runPages: explainWalk("runPages", runPages),
|
|
3586
|
+
run: explain("run", run)
|
|
3587
|
+
};
|
|
3588
|
+
}
|
|
3589
|
+
//#endregion
|
|
3268
3590
|
//#region ../client/src/resources/timeline-event.ts
|
|
3269
3591
|
function timelineEventResource(transport) {
|
|
3270
3592
|
/** Get one timeline event by id. */
|
|
@@ -3964,21 +4286,24 @@ function transformResource(transport) {
|
|
|
3964
4286
|
/**
|
|
3965
4287
|
* Start a run of a transform by id. The server queues the run and answers at once; `wait` polls
|
|
3966
4288
|
* it to a terminal status, and `syncTarget` follows that with the output table's registration.
|
|
3967
|
-
*
|
|
4289
|
+
* Both waits share the one deadline `wait.timeoutMs` sets, or none when it is `null`. A server
|
|
4290
|
+
* that answers no run id started nothing, and there is then nothing to poll.
|
|
3968
4291
|
*/
|
|
3969
4292
|
async function run(id, params = {}, options = {}) {
|
|
4293
|
+
const requested = params.syncTarget === true ? params.wait ?? {} : params.wait;
|
|
4294
|
+
const deadline = requested === void 0 ? null : startDeadline(requested);
|
|
3970
4295
|
const kickoff = await transport.requestParsed(TransformRunKickoff, `/api/transform/${id}/run`, {
|
|
3971
4296
|
...options,
|
|
3972
4297
|
method: "POST"
|
|
3973
4298
|
});
|
|
3974
|
-
|
|
3975
|
-
if (schedule === void 0 || kickoff.run_id === null) return {
|
|
4299
|
+
if (requested === void 0 || kickoff.run_id === null) return {
|
|
3976
4300
|
message: kickoff.message,
|
|
3977
4301
|
run_id: kickoff.run_id,
|
|
3978
4302
|
final: null
|
|
3979
4303
|
};
|
|
4304
|
+
const schedule = callWait(requested, options);
|
|
3980
4305
|
const runId = kickoff.run_id;
|
|
3981
|
-
const final = await
|
|
4306
|
+
const final = await pollWithin(deadline, async (signal) => getRun(runId, {
|
|
3982
4307
|
...options,
|
|
3983
4308
|
signal
|
|
3984
4309
|
}), (candidate) => isTransformRunTerminal(candidate.status), schedule);
|
|
@@ -3987,7 +4312,7 @@ function transformResource(transport) {
|
|
|
3987
4312
|
run_id: runId,
|
|
3988
4313
|
final
|
|
3989
4314
|
};
|
|
3990
|
-
const targetTableId = isTransformRunFailed(final.status) ? null : await awaitTargetTableId(id, schedule, options);
|
|
4315
|
+
const targetTableId = isTransformRunFailed(final.status) ? null : await awaitTargetTableId(id, deadline, schedule, options);
|
|
3991
4316
|
return {
|
|
3992
4317
|
message: kickoff.message,
|
|
3993
4318
|
run_id: runId,
|
|
@@ -3995,9 +4320,9 @@ function transformResource(transport) {
|
|
|
3995
4320
|
target_table_id: targetTableId
|
|
3996
4321
|
};
|
|
3997
4322
|
}
|
|
3998
|
-
async function awaitTargetTableId(id, wait, options) {
|
|
4323
|
+
async function awaitTargetTableId(id, deadline, wait, options) {
|
|
3999
4324
|
try {
|
|
4000
|
-
return (await
|
|
4325
|
+
return (await pollWithin(deadline, async (signal) => get(id, {
|
|
4001
4326
|
...options,
|
|
4002
4327
|
signal
|
|
4003
4328
|
}), (transform) => transform.target_table_id !== null, wait)).target_table_id;
|
|
@@ -4006,6 +4331,12 @@ function transformResource(transport) {
|
|
|
4006
4331
|
throw error;
|
|
4007
4332
|
}
|
|
4008
4333
|
}
|
|
4334
|
+
function callWait(wait, options) {
|
|
4335
|
+
return {
|
|
4336
|
+
...wait,
|
|
4337
|
+
signal: combineAborts(wait.signal, options.signal, transport.signal)
|
|
4338
|
+
};
|
|
4339
|
+
}
|
|
4009
4340
|
return {
|
|
4010
4341
|
list: explain("list", list),
|
|
4011
4342
|
get: explain("get", get),
|
|
@@ -4196,20 +4527,217 @@ CurrentUser.pick({
|
|
|
4196
4527
|
common_name: true,
|
|
4197
4528
|
is_superuser: true
|
|
4198
4529
|
}).strip();
|
|
4530
|
+
const User = z.object({
|
|
4531
|
+
id: z.number().int(),
|
|
4532
|
+
email: z.string(),
|
|
4533
|
+
first_name: z.string().nullable(),
|
|
4534
|
+
last_name: z.string().nullable(),
|
|
4535
|
+
common_name: z.string(),
|
|
4536
|
+
is_superuser: z.boolean().optional(),
|
|
4537
|
+
is_active: z.boolean().optional()
|
|
4538
|
+
}).loose();
|
|
4539
|
+
User.pick({
|
|
4540
|
+
id: true,
|
|
4541
|
+
email: true,
|
|
4542
|
+
common_name: true,
|
|
4543
|
+
is_superuser: true
|
|
4544
|
+
}).strip();
|
|
4545
|
+
z.enum([
|
|
4546
|
+
"active",
|
|
4547
|
+
"deactivated",
|
|
4548
|
+
"all"
|
|
4549
|
+
]);
|
|
4550
|
+
z.object({
|
|
4551
|
+
first_name: z.string().min(1).nullable().optional(),
|
|
4552
|
+
last_name: z.string().min(1).nullable().optional(),
|
|
4553
|
+
email: z.string(),
|
|
4554
|
+
password: z.string().min(1).nullable().optional()
|
|
4555
|
+
}).strict();
|
|
4199
4556
|
//#endregion
|
|
4200
4557
|
//#region ../client/src/resources/user.ts
|
|
4558
|
+
const UserList = z.object({
|
|
4559
|
+
data: z.array(User),
|
|
4560
|
+
total: z.number().int().nonnegative()
|
|
4561
|
+
});
|
|
4201
4562
|
function userResource(transport) {
|
|
4202
4563
|
/** Get the user the request's credentials authenticate as. */
|
|
4203
4564
|
async function current(options = {}) {
|
|
4204
4565
|
return transport.requestParsed(CurrentUser, "/api/user/current", { ...options });
|
|
4205
4566
|
}
|
|
4206
|
-
|
|
4567
|
+
/**
|
|
4568
|
+
* List the users, ordered by first name. Needs an admin, a data analyst or a group manager, who
|
|
4569
|
+
* sees the members of the groups they manage; a sandboxed user sees only themselves. Which
|
|
4570
|
+
* columns each user carries depends on the caller, as `User` says.
|
|
4571
|
+
*/
|
|
4572
|
+
async function list(params = {}, options = {}) {
|
|
4573
|
+
const response = await transport.requestParsed(UserList, "/api/user", {
|
|
4574
|
+
...options,
|
|
4575
|
+
query: {
|
|
4576
|
+
status: params.status,
|
|
4577
|
+
query: params.query,
|
|
4578
|
+
group_id: params.group_id
|
|
4579
|
+
}
|
|
4580
|
+
});
|
|
4581
|
+
return {
|
|
4582
|
+
data: response.data,
|
|
4583
|
+
total: response.total
|
|
4584
|
+
};
|
|
4585
|
+
}
|
|
4586
|
+
/**
|
|
4587
|
+
* Create a user and send the invite. Admin only. Without a password the account gets a random
|
|
4588
|
+
* one, so it can sign in only through the invite. A taken email answers 400 naming `email`.
|
|
4589
|
+
*/
|
|
4590
|
+
async function create(params, options = {}) {
|
|
4591
|
+
return transport.requestParsed(User, "/api/user", {
|
|
4592
|
+
...options,
|
|
4593
|
+
method: "POST",
|
|
4594
|
+
body: params
|
|
4595
|
+
});
|
|
4596
|
+
}
|
|
4597
|
+
return {
|
|
4598
|
+
current,
|
|
4599
|
+
list,
|
|
4600
|
+
create
|
|
4601
|
+
};
|
|
4602
|
+
}
|
|
4603
|
+
//#endregion
|
|
4604
|
+
//#region ../client/src/domain/workspace-instance.ts
|
|
4605
|
+
const WorkspaceInstanceOutput = z.object({
|
|
4606
|
+
db: z.string().nullable().optional(),
|
|
4607
|
+
schema: z.string().nullable().optional()
|
|
4608
|
+
}).loose();
|
|
4609
|
+
const WorkspaceInstanceDatabase = z.object({
|
|
4610
|
+
input_schemas: z.array(z.string()),
|
|
4611
|
+
output: WorkspaceInstanceOutput
|
|
4612
|
+
}).loose();
|
|
4613
|
+
const WorkspaceInstance = z.object({
|
|
4614
|
+
name: z.string(),
|
|
4615
|
+
databases: z.record(z.string(), WorkspaceInstanceDatabase),
|
|
4616
|
+
can_write: z.boolean()
|
|
4617
|
+
}).loose();
|
|
4618
|
+
WorkspaceInstance.pick({
|
|
4619
|
+
name: true,
|
|
4620
|
+
can_write: true
|
|
4621
|
+
}).strip();
|
|
4622
|
+
//#endregion
|
|
4623
|
+
//#region ../client/src/resources/workspace-instance.ts
|
|
4624
|
+
const WorkspaceInstanceEnvelope = z.object({ data: WorkspaceInstance.nullable() }).loose();
|
|
4625
|
+
function workspaceInstanceResource(transport) {
|
|
4626
|
+
const { explain } = explainer(transport, "workspaceInstance");
|
|
4627
|
+
/**
|
|
4628
|
+
* The workspace loaded on this instance, from its `config.yml` at boot or set at runtime; admins
|
|
4629
|
+
* only. `null` when none is loaded, as on a manager-only instance. `can_write` is `false` when
|
|
4630
|
+
* deployment config set the workspace, which then cannot be changed at runtime.
|
|
4631
|
+
*/
|
|
4632
|
+
async function current(options = {}) {
|
|
4633
|
+
return (await transport.requestParsed(WorkspaceInstanceEnvelope, "/api/ee/workspace-instance/current", { ...options })).data;
|
|
4634
|
+
}
|
|
4635
|
+
return { current: explain("current", current) };
|
|
4636
|
+
}
|
|
4637
|
+
//#endregion
|
|
4638
|
+
//#region ../client/src/domain/workspace.ts
|
|
4639
|
+
const WorkspaceDatabaseStatus = z.enum([
|
|
4640
|
+
"unprovisioned",
|
|
4641
|
+
"provisioning",
|
|
4642
|
+
"provisioned",
|
|
4643
|
+
"deprovisioning"
|
|
4644
|
+
]);
|
|
4645
|
+
const WorkspaceDatabase = z.object({
|
|
4646
|
+
database_id: z.number().int(),
|
|
4647
|
+
input_schemas: z.array(z.string()),
|
|
4648
|
+
output_namespace: z.string(),
|
|
4649
|
+
status: WorkspaceDatabaseStatus
|
|
4650
|
+
}).loose();
|
|
4651
|
+
const WorkspaceDatabaseCompact = WorkspaceDatabase.pick({
|
|
4652
|
+
database_id: true,
|
|
4653
|
+
status: true
|
|
4654
|
+
}).strip();
|
|
4655
|
+
const WorkspaceCreator = z.object({
|
|
4656
|
+
id: z.number().int(),
|
|
4657
|
+
first_name: z.string().nullable(),
|
|
4658
|
+
last_name: z.string().nullable(),
|
|
4659
|
+
email: z.string(),
|
|
4660
|
+
common_name: z.string().nullable().optional()
|
|
4661
|
+
}).loose();
|
|
4662
|
+
const Workspace = z.object({
|
|
4663
|
+
id: z.number().int().positive(),
|
|
4664
|
+
name: z.string(),
|
|
4665
|
+
creator: WorkspaceCreator.nullable(),
|
|
4666
|
+
created_at: z.string(),
|
|
4667
|
+
updated_at: z.string(),
|
|
4668
|
+
databases: z.array(WorkspaceDatabase).optional()
|
|
4669
|
+
}).loose();
|
|
4670
|
+
Workspace.pick({
|
|
4671
|
+
id: true,
|
|
4672
|
+
name: true
|
|
4673
|
+
}).strip().extend({ databases: z.array(WorkspaceDatabaseCompact).optional() });
|
|
4674
|
+
z.object({
|
|
4675
|
+
name: z.string().min(1),
|
|
4676
|
+
database_ids: z.array(z.number().int().positive()).min(1)
|
|
4677
|
+
}).strict();
|
|
4678
|
+
//#endregion
|
|
4679
|
+
//#region ../client/src/resources/workspace-manager.ts
|
|
4680
|
+
const WORKSPACE_MANAGER_PATH = "/api/ee/workspace-manager";
|
|
4681
|
+
function workspaceManagerResource(transport) {
|
|
4682
|
+
const { explain } = explainer(transport, "workspaceManager");
|
|
4683
|
+
/** List all workspaces, each with its databases; admins only. `GET /api/ee/workspace-manager` answers a bare array. */
|
|
4684
|
+
async function list(options = {}) {
|
|
4685
|
+
return {
|
|
4686
|
+
data: await transport.requestParsed(z.array(Workspace), WORKSPACE_MANAGER_PATH, { ...options }),
|
|
4687
|
+
total: null
|
|
4688
|
+
};
|
|
4689
|
+
}
|
|
4690
|
+
/** Get a single workspace by id. */
|
|
4691
|
+
async function get(id, options = {}) {
|
|
4692
|
+
return transport.requestParsed(Workspace, `${WORKSPACE_MANAGER_PATH}/${id}`, { ...options });
|
|
4693
|
+
}
|
|
4694
|
+
/**
|
|
4695
|
+
* Create a workspace attached to the given databases, each of which must be eligible for
|
|
4696
|
+
* workspaces, and provision it. The server provisions every database before it answers, so the
|
|
4697
|
+
* caller sets a `timeoutMs` long enough for that. A provisioning failure whose cleanup also fails
|
|
4698
|
+
* answers the workspace with its databases `unprovisioned`, to be torn down by a delete.
|
|
4699
|
+
*/
|
|
4700
|
+
async function create(params, options = {}) {
|
|
4701
|
+
return transport.requestParsed(Workspace, WORKSPACE_MANAGER_PATH, {
|
|
4702
|
+
...options,
|
|
4703
|
+
method: "POST",
|
|
4704
|
+
body: params
|
|
4705
|
+
});
|
|
4706
|
+
}
|
|
4707
|
+
/**
|
|
4708
|
+
* Delete a workspace, tearing down every database's warehouse isolation first. When any teardown
|
|
4709
|
+
* fails the workspace is kept with the failed databases, so the delete can be retried.
|
|
4710
|
+
*/
|
|
4711
|
+
async function remove(id, options = {}) {
|
|
4712
|
+
await transport.requestRaw(`${WORKSPACE_MANAGER_PATH}/${id}`, {
|
|
4713
|
+
...options,
|
|
4714
|
+
method: "DELETE",
|
|
4715
|
+
expectContentType: "binary"
|
|
4716
|
+
});
|
|
4717
|
+
}
|
|
4718
|
+
/**
|
|
4719
|
+
* The workspace's developer-instance config, the YAML a Metabase boots from. It holds the
|
|
4720
|
+
* workspace's warehouse login. The server refuses with 409 while any of its databases is not
|
|
4721
|
+
* `provisioned`.
|
|
4722
|
+
*/
|
|
4723
|
+
async function config(id, options = {}) {
|
|
4724
|
+
return (await transport.requestRaw(`${WORKSPACE_MANAGER_PATH}/${id}/config`, {
|
|
4725
|
+
...options,
|
|
4726
|
+
expectContentType: "binary"
|
|
4727
|
+
})).text();
|
|
4728
|
+
}
|
|
4729
|
+
return {
|
|
4730
|
+
list: explain("list", list),
|
|
4731
|
+
get: explain("get", get),
|
|
4732
|
+
create: explain("create", create),
|
|
4733
|
+
delete: explain("delete", remove),
|
|
4734
|
+
config: explain("config", config)
|
|
4735
|
+
};
|
|
4207
4736
|
}
|
|
4208
4737
|
//#endregion
|
|
4209
4738
|
//#region ../client/src/client.ts
|
|
4210
4739
|
var client_exports = /* @__PURE__ */ __exportAll({ createClient: () => createClient });
|
|
4211
|
-
function
|
|
4212
|
-
const transport = createTransport(config, options);
|
|
4740
|
+
function surfaceOn(transport) {
|
|
4213
4741
|
return {
|
|
4214
4742
|
apiKey: apiKeyResource(transport),
|
|
4215
4743
|
card: cardResource(transport),
|
|
@@ -4227,6 +4755,7 @@ function createClient(config, options) {
|
|
|
4227
4755
|
field: fieldResource(transport),
|
|
4228
4756
|
gitSync: gitSyncResource(transport),
|
|
4229
4757
|
glossary: glossaryResource(transport),
|
|
4758
|
+
health: healthResource(transport),
|
|
4230
4759
|
library: libraryResource(transport),
|
|
4231
4760
|
measure: measureResource(transport),
|
|
4232
4761
|
metric: metricResource(transport),
|
|
@@ -4243,6 +4772,7 @@ function createClient(config, options) {
|
|
|
4243
4772
|
setup: setupResource(transport),
|
|
4244
4773
|
snippet: snippetResource(transport),
|
|
4245
4774
|
table: tableResource(transport),
|
|
4775
|
+
task: taskResource(transport),
|
|
4246
4776
|
timeline: timelineResource(transport),
|
|
4247
4777
|
timelineEvent: timelineEventResource(transport),
|
|
4248
4778
|
transform: transformResource(transport),
|
|
@@ -4254,6 +4784,8 @@ function createClient(config, options) {
|
|
|
4254
4784
|
transformTest: transformTestResource(transport),
|
|
4255
4785
|
upload: uploadResource(transport),
|
|
4256
4786
|
user: userResource(transport),
|
|
4787
|
+
workspaceInstance: workspaceInstanceResource(transport),
|
|
4788
|
+
workspaceManager: workspaceManagerResource(transport),
|
|
4257
4789
|
server: transport.server,
|
|
4258
4790
|
verifiedServer: transport.verifiedServer,
|
|
4259
4791
|
probesSettled: transport.probesSettled,
|
|
@@ -4262,5 +4794,70 @@ function createClient(config, options) {
|
|
|
4262
4794
|
requestStream: transport.requestStream
|
|
4263
4795
|
};
|
|
4264
4796
|
}
|
|
4797
|
+
function createClient(config, options) {
|
|
4798
|
+
const observers = options.onError === void 0 ? [] : [options.onError];
|
|
4799
|
+
return clientOn(createTransport(config, options), observers);
|
|
4800
|
+
}
|
|
4801
|
+
function clientOn(transport, observers) {
|
|
4802
|
+
const client = {
|
|
4803
|
+
...surfaceOn(transport),
|
|
4804
|
+
with: (derived) => {
|
|
4805
|
+
const inherited = derived.onError === void 0 ? observers : [derived.onError, ...observers];
|
|
4806
|
+
return clientOn(transport.with(derived), inherited);
|
|
4807
|
+
}
|
|
4808
|
+
};
|
|
4809
|
+
return observers.length === 0 ? client : observed(client, observers);
|
|
4810
|
+
}
|
|
4811
|
+
function observed(surface, observers) {
|
|
4812
|
+
const namespaces = /* @__PURE__ */ new Map();
|
|
4813
|
+
return new Proxy(surface, { get(target, property, receiver) {
|
|
4814
|
+
const value = Reflect.get(target, property, receiver);
|
|
4815
|
+
if (typeof value === "function") return (...args) => observedCall(() => Reflect.apply(value, target, args), observers);
|
|
4816
|
+
if (typeof value !== "object" || value === null) return value;
|
|
4817
|
+
const known = namespaces.get(property);
|
|
4818
|
+
if (known !== void 0) return known;
|
|
4819
|
+
const namespace = observed(value, observers);
|
|
4820
|
+
namespaces.set(property, namespace);
|
|
4821
|
+
return namespace;
|
|
4822
|
+
} });
|
|
4823
|
+
}
|
|
4824
|
+
function observedCall(call, observers) {
|
|
4825
|
+
let result;
|
|
4826
|
+
try {
|
|
4827
|
+
result = call();
|
|
4828
|
+
} catch (error) {
|
|
4829
|
+
throw shown(error, observers);
|
|
4830
|
+
}
|
|
4831
|
+
if (result instanceof Promise) return result.catch((error) => {
|
|
4832
|
+
throw shown(error, observers);
|
|
4833
|
+
});
|
|
4834
|
+
if (isAsyncIterable(result)) return observedWalk(result, observers);
|
|
4835
|
+
return result;
|
|
4836
|
+
}
|
|
4837
|
+
async function* observedWalk(walk, observers) {
|
|
4838
|
+
try {
|
|
4839
|
+
yield* walk;
|
|
4840
|
+
} catch (error) {
|
|
4841
|
+
throw shown(error, observers);
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
function shown(error, observers) {
|
|
4845
|
+
let first = null;
|
|
4846
|
+
for (const observer of observers) try {
|
|
4847
|
+
showTo(observer, error);
|
|
4848
|
+
} catch (thrown) {
|
|
4849
|
+
first ??= { thrown };
|
|
4850
|
+
}
|
|
4851
|
+
return first === null ? error : first.thrown;
|
|
4852
|
+
}
|
|
4853
|
+
function showTo(observer, error) {
|
|
4854
|
+
const answer = observer(error);
|
|
4855
|
+
if (!isThenable(answer)) return;
|
|
4856
|
+
Promise.resolve(answer).catch(() => void 0);
|
|
4857
|
+
throw new ConfigError("An error observer answered a promise. An observer runs synchronously and is not awaited.");
|
|
4858
|
+
}
|
|
4859
|
+
function isAsyncIterable(value) {
|
|
4860
|
+
return typeof value === "object" && value !== null && Symbol.asyncIterator in value && typeof value[Symbol.asyncIterator] === "function";
|
|
4861
|
+
}
|
|
4265
4862
|
//#endregion
|
|
4266
4863
|
export { createClient as n, client_exports as t };
|