@metabase/cli 0.2.1 → 0.2.2-alpha.extract-api-client.27e2241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1715
- package/dist/add-collection-B3Ty8SzB.mjs +36 -0
- package/dist/alert-DT-ee7yf.mjs +23 -0
- package/dist/alerts-Bf2RH_p_.mjs +43 -0
- package/dist/{append-BgDaYJW9.mjs → append-DFzQRPMd.mjs} +7 -12
- package/dist/{archive-DFCu5hVG.mjs → archive-4tmm946K.mjs} +8 -17
- package/dist/{archive-Bv59HYsU.mjs → archive-B6eXiyER.mjs} +7 -13
- package/dist/{archive-BM9HjJHQ.mjs → archive-BxNPHxOY.mjs} +7 -13
- package/dist/archive-ByvA49Kz.mjs +34 -0
- package/dist/{archive-Oh1iZu2y.mjs → archive-C7w49Grr.mjs} +7 -16
- package/dist/{archive-EoYl-lS-.mjs → archive-Cd29QC0c.mjs} +7 -13
- package/dist/{archive-BZpXnQSu.mjs → archive-ChORH5JH.mjs} +7 -13
- package/dist/archive-CwAdlv63.mjs +33 -0
- package/dist/{archive-BncW2dGw.mjs → archive-Dr9Xnx_Z.mjs} +7 -15
- package/dist/{archive-BCPA0HhV.mjs → archive-gid9Y09v.mjs} +8 -17
- package/dist/{archive-Czzktgho.mjs → archive-lQqs13Uz.mjs} +7 -13
- package/dist/auth-Dltxua89.mjs +19 -0
- package/dist/{body-DKcQw7G5.mjs → body-Cur4NJt9.mjs} +5 -8
- package/dist/{body-flags-CgHgJBRC.mjs → body-flags-AqKpN01Y.mjs} +1 -2
- package/dist/{branches-CCmtr3W8.mjs → branches-DchlyU0i.mjs} +7 -13
- package/dist/{cancel-72y10-Rg.mjs → cancel-BMQa5R1Z.mjs} +5 -12
- package/dist/{cancel-task-CGwdz91O.mjs → cancel-task-C5CU1pxU.mjs} +6 -10
- package/dist/card-CHI2bmds.mjs +24 -0
- package/dist/{card-B8G5jQQT.mjs → card-DZxRmver.mjs} +21 -48
- package/dist/card-zyUkr2nS.mjs +44 -0
- package/dist/cards-SccWvRQD.mjs +34 -0
- package/dist/cli.mjs +675 -81
- package/dist/client-BqhzKdLM.mjs +2194 -0
- package/dist/collection-CGoVLvcD.mjs +58 -0
- package/dist/collection-CY0AB99E.mjs +20 -0
- package/dist/{collection-CFoLPrY5.mjs → collection-CfulNRBG.mjs} +20 -63
- package/dist/{collection-namespace-C7mr_a8H.mjs → collection-namespace-GwydWBF3.mjs} +3 -5
- package/dist/{create-pTnveKkm.mjs → create-BNQ_DytP.mjs} +8 -15
- package/dist/{create-QYctYGSa.mjs → create-BOLwWt8Q.mjs} +9 -17
- package/dist/{create-C_WqoOf5.mjs → create-Beh-2uoN.mjs} +8 -15
- package/dist/{create-C3DThF9E.mjs → create-C79vErX0.mjs} +9 -20
- package/dist/{create-nXlnVzXl.mjs → create-CAQV2g6V.mjs} +9 -16
- package/dist/{create-E7XhC0gJ.mjs → create-CAWytBE5.mjs} +9 -17
- package/dist/{create-CPEOSxIH.mjs → create-CCh_LyW9.mjs} +8 -15
- package/dist/{create-7pbf5Wu0.mjs → create-CD008jdE.mjs} +13 -28
- package/dist/create-CHQx7jq4.mjs +45 -0
- package/dist/create-DF4QtgDL.mjs +44 -0
- package/dist/{create-CaWFrPRU.mjs → create-DJmXXQoq.mjs} +10 -18
- package/dist/{create-Brh8WCa3.mjs → create-DV-Ln5Mo.mjs} +8 -15
- package/dist/create-branch-CYo6jZth.mjs +35 -0
- package/dist/{create-U_XDwsIX.mjs → create-i14Wv3Tj.mjs} +8 -15
- package/dist/{create-BDY38_Kr.mjs → create-tQbnuz-I.mjs} +8 -15
- package/dist/{create-DFyZCXQD.mjs → create-zeveFdnd.mjs} +6 -10
- package/dist/cron-LKRffEC-.mjs +5 -0
- package/dist/{csv-CR2qhmC6.mjs → csv-B2Jgb1GM.mjs} +7 -19
- package/dist/{current-task-MUHaiHIg.mjs → current-task-MpBFGttd.mjs} +7 -12
- package/dist/{dashboard-B-MTpfeS.mjs → dashboard-BCpSq_G-.mjs} +9 -60
- package/dist/dashboard-BHJBoaG7.mjs +33 -0
- package/dist/dashboard-CsIFFpzK.mjs +58 -0
- package/dist/database-B19qlLKZ.mjs +38 -0
- package/dist/database-C8G6ZKG0.mjs +26 -0
- package/dist/db-DsfojyeH.mjs +24 -0
- package/dist/{delete-B58Cng0p.mjs → delete-B8e01xAG.mjs} +6 -11
- package/dist/{delete-CW3dYmuT.mjs → delete-BApOjQvl.mjs} +6 -11
- package/dist/{delete-doa3R-c5.mjs → delete-Ck0q4Dzp.mjs} +6 -11
- package/dist/{delete-BKMOtpjs.mjs → delete-DFmX7jTp.mjs} +6 -11
- package/dist/{delete-BMa26SzX.mjs → delete-Ob06PPie.mjs} +6 -11
- package/dist/{delete-runtime-_YOukDRC.mjs → delete-runtime-D74s6vhu.mjs} +6 -13
- package/dist/{delete-table-D_tjBZPd.mjs → delete-table-DuyhGrvA.mjs} +6 -11
- package/dist/{dependencies-BR_4um7h.mjs → dependencies-Bj3QrGIm.mjs} +10 -13
- package/dist/dirty-DNYoM6Bp.mjs +31 -0
- package/dist/document-BbskZPTT.mjs +19 -0
- package/dist/{document-CL4ML5FN.mjs → document-Cd2mmqCp.mjs} +5 -33
- package/dist/document-D6OybtP2.mjs +29 -0
- package/dist/{eid-DSOk7Khb.mjs → eid-WTZmDdsr.mjs} +12 -54
- package/dist/eid-translation-zEHtr5Oc.mjs +35 -0
- package/dist/{embedding-CKdw8q7p.mjs → embedding-i-KqpefC.mjs} +2 -4
- package/dist/events-Bn7jh5lP.mjs +39 -0
- package/dist/export-BjfoZRDJ.mjs +66 -0
- package/dist/field-BPsNa-TO.mjs +80 -0
- package/dist/{field-DsXTeqBy.mjs → field-Cr2DPUG9.mjs} +2 -81
- package/dist/field-Zau6Hc6X.mjs +18 -0
- package/dist/fields-CBBa-Prp.mjs +34 -0
- package/dist/{get-CHAH_F37.mjs → get-00lyLv6R.mjs} +7 -11
- package/dist/{get-T85qZgnv.mjs → get-B7sMgsFs.mjs} +7 -11
- package/dist/get-B_xdF1kq.mjs +31 -0
- package/dist/{get-DT2MOZ8L.mjs → get-ByBOq30r.mjs} +7 -11
- package/dist/get-Bz99dAxK.mjs +35 -0
- package/dist/get-C2-Q3iQ5.mjs +31 -0
- package/dist/get-CDJFVvhj.mjs +35 -0
- package/dist/get-CDMGbgrh.mjs +31 -0
- package/dist/get-CnbUCzDM.mjs +31 -0
- package/dist/{get-DtvzjfjG.mjs → get-CvI--9S_.mjs} +16 -12
- package/dist/{get-CH_JmPc-.mjs → get-DRvsATp-.mjs} +7 -11
- package/dist/{get-CgZ5qjQx.mjs → get-DY03Azx9.mjs} +6 -10
- package/dist/get-DYO1kywc.mjs +32 -0
- package/dist/{get-BSdOE5J4.mjs → get-D_h-G9bn.mjs} +7 -11
- package/dist/get-DdsoHaKH.mjs +31 -0
- package/dist/{get-DRK5-UdU.mjs → get-DkWO0EI0.mjs} +7 -11
- package/dist/{get-43Smv3RI.mjs → get-Dmj9Ygz1.mjs} +7 -17
- package/dist/get-DmpB6J9g.mjs +31 -0
- package/dist/{get-nZW0W7Ui.mjs → get-Dn9ZiSZr.mjs} +8 -16
- package/dist/{get-run-Cwia6e0d.mjs → get-run-Cnux9ln0.mjs} +7 -11
- package/dist/git-sync-BDnxPrqU.mjs +104 -0
- package/dist/git-sync-DxD_ng48.mjs +136 -0
- package/dist/git-sync-MQQYRYLg.mjs +28 -0
- package/dist/{group-CILtQqCL.mjs → group-DBM87IgC.mjs} +2 -4
- package/dist/has-remote-changes-C684Redh.mjs +35 -0
- package/dist/import-Rmmttboo.mjs +56 -0
- package/dist/{input-DzbvxKYU.mjs → input-DH9i67x_.mjs} +6 -11
- package/dist/{is-dirty-CHbUJ-bh.mjs → is-dirty-DYeJYhBz.mjs} +4 -8
- package/dist/{items-DN63mjpF.mjs → items-CQlPXBXE.mjs} +13 -29
- package/dist/key-BEhqIzIQ.mjs +10 -0
- package/dist/{library-DF2qx50w.mjs → library-Bsm5KsFF.mjs} +6 -9
- package/dist/library-ClLgrAXy.mjs +19 -0
- package/dist/library-DfYAT2Ep.mjs +21 -0
- package/dist/{list-n2PY3OIx.mjs → list-B4hJuMhA.mjs} +11 -27
- package/dist/list-B8nAGwP4.mjs +48 -0
- package/dist/list-BOET6zhP.mjs +36 -0
- package/dist/list-BP3MPq-M.mjs +36 -0
- package/dist/list-BpFp9Wre.mjs +28 -0
- package/dist/list-BtkWNtvY.mjs +34 -0
- package/dist/list-BtmsNOEn.mjs +28 -0
- package/dist/list-BzVTHOoH.mjs +28 -0
- package/dist/list-C5Zs8nrb.mjs +28 -0
- package/dist/list-CKK-s3Ty.mjs +28 -0
- package/dist/list-CMpoc2TN.mjs +70 -0
- package/dist/list-CNUiF8Z7.mjs +28 -0
- package/dist/list-CQDprvW0.mjs +39 -0
- package/dist/{list-C7TqbWG1.mjs → list-CQwOgIlj.mjs} +10 -24
- package/dist/list-DE9FM957.mjs +28 -0
- package/dist/{list-De82cXvn.mjs → list-DF2rvoO1.mjs} +22 -14
- package/dist/list-DMKDsBRd.mjs +38 -0
- package/dist/{list-B3HoSfYj.mjs → list-UhpKG6_m.mjs} +15 -15
- package/dist/{login-jy9rbYev.mjs → login-CGHeSjlP.mjs} +47 -52
- package/dist/{logout-CRbk1SuY.mjs → logout-DAxOlbv4.mjs} +7 -12
- package/dist/measure-4P0bOlZ3.mjs +29 -0
- package/dist/measure-BsYv0p26.mjs +22 -0
- package/dist/{measure-S9WszHre.mjs → measure-CtfjqJFP.mjs} +3 -30
- package/dist/network-error-CEb9ymDW.mjs +423 -0
- package/dist/notification-DaA4bBHW.mjs +138 -0
- package/dist/notification-Fcq1fIPw.mjs +67 -0
- package/dist/{parameter-BZ6y-Gfs.mjs → parameter-DUKR8NXo.mjs} +2 -11
- package/dist/{parameter-values-CcgcG3S5.mjs → parameter-values-CJTdqd8c.mjs} +17 -11
- package/dist/{parse-enum-C_2lGr3g.mjs → parse-enum-D0Jfm_Bz.mjs} +2 -4
- package/dist/{parse-id-CD54Chc5.mjs → parse-id-C_jmKFaa.mjs} +2 -4
- package/dist/{parse-ref-BLgKEEF-.mjs → parse-ref-ibKVB0J4.mjs} +3 -5
- package/dist/{path-CPMr1RJO.mjs → path-B5gHvrYL.mjs} +8 -9
- package/dist/{poll-DVF9EnEb.mjs → poll-75SvT7Zv.mjs} +11 -15
- package/dist/predicates-Bkm2IoeX.mjs +170 -0
- package/dist/preflight-YpPQo-sa.mjs +29 -0
- package/dist/{process-HDPKLS_z.mjs → process-DBOOrmET.mjs} +4 -6
- package/dist/publish-DijrxaCW.mjs +75 -0
- package/dist/pulse-BmsDenXm.mjs +133 -0
- package/dist/pulse-DhG6I9mI.mjs +57 -0
- package/dist/{query-Cxh9hmrP.mjs → query-BbqECzmF.mjs} +20 -44
- package/dist/{query-B3HDIsJ-.mjs → query-Dc__-KJH.mjs} +13 -24
- package/dist/{query-result-Drvjv7DD.mjs → query-result-DBDwk8TS.mjs} +4 -8
- package/dist/remove-collection-BOnxYvhj.mjs +36 -0
- package/dist/{render-CkuFkWlQ.mjs → render-CI93iP0I.mjs} +9 -11
- package/dist/{replace-BwvKDNur.mjs → replace-Cq4CxVa-.mjs} +7 -12
- package/dist/rescan-values-Dr_j416g.mjs +31 -0
- package/dist/revision-message-flag-8TCHYJV6.mjs +8 -0
- package/dist/run-C3DkS6NP.mjs +82 -0
- package/dist/{run-yrpSF6VL.mjs → run-DdGJ544X.mjs} +8 -18
- package/dist/runs-CUNWiidL.mjs +38 -0
- package/dist/runtime-DiKyBxOw.mjs +1007 -0
- package/dist/{schema-tables-ChBYz4mO.mjs → schema-tables-CV386fnC.mjs} +10 -14
- package/dist/{schemas-C2crnVML.mjs → schemas-DM-UqZBQ.mjs} +8 -12
- package/dist/search-DFBwUc6d.mjs +44 -0
- package/dist/{search-DnGEh6sZ.mjs → search-DmGScXs8.mjs} +14 -73
- package/dist/segment-BzUGM2Fr.mjs +22 -0
- package/dist/segment-C_gl5ag6.mjs +29 -0
- package/dist/{segment-BPb1H6DW.mjs → segment-OsrbUDzw.mjs} +3 -30
- package/dist/{selectors-Ll_TRxl5.mjs → selectors-DGDn0Hto.mjs} +4 -6
- package/dist/send-CVxxEpDB.mjs +49 -0
- package/dist/{set-tHsHXRGV.mjs → set-DFolTjbd.mjs} +10 -20
- package/dist/{set-active-qqDoBh_Z.mjs → set-active-BD8L1lPX.mjs} +7 -18
- package/dist/setting-CwRYgHYN.mjs +35 -0
- package/dist/setting-DTiLCW8g.mjs +22 -0
- package/dist/setting-DyhaeICs.mjs +17 -0
- package/dist/setup-BbDQN8fe.mjs +44 -0
- package/dist/setup-CO7QV-ao.mjs +21 -0
- package/dist/signal-CMd0EFUa.mjs +16 -0
- package/dist/{skills-rnvVgau4.mjs → skills--vK6J-e4.mjs} +4 -6
- package/dist/{skills-BKuiGkc1.mjs → skills-DTCrMcix.mjs} +13 -19
- package/dist/{snippet-DWiXNy4T.mjs → snippet-CyKAgIZl.mjs} +3 -32
- package/dist/snippet-DRwKb2x7.mjs +19 -0
- package/dist/snippet-oJLaYW9V.mjs +29 -0
- package/dist/stash-D0S4JmAz.mjs +61 -0
- package/dist/status-BhswxJL1.mjs +85 -0
- package/dist/{status-B5ar0uXc.mjs → status-hL1am-HV.mjs} +6 -8
- package/dist/subscription-_d5fB45F.mjs +22 -0
- package/dist/subscriptions-s4TF6Ax3.mjs +42 -0
- package/dist/summary-BytbDz6e.mjs +7 -0
- package/dist/summary-CsPvcUwW.mjs +31 -0
- package/dist/sync-schema-DaZ_MV-u.mjs +35 -0
- package/dist/sync-task-BACcrs0i.mjs +37 -0
- package/dist/{table-C3RIKiYM.mjs → table-CeeTJgQb.mjs} +4 -38
- package/dist/table-CsIJNPFf.mjs +37 -0
- package/dist/table-DYoC1kPn.mjs +18 -0
- package/dist/{timeline-BCTRThc-.mjs → timeline-CCSU2qOS.mjs} +2 -66
- package/dist/timeline-event-CNQdCTDg.mjs +19 -0
- package/dist/timeline-uDCmwGFT.mjs +66 -0
- package/dist/timeline-xlDbEKWg.mjs +21 -0
- package/dist/transform-Bs0EWijQ.mjs +28 -0
- package/dist/{transform-BVHYzWpK.mjs → transform-D3QX0jxA.mjs} +28 -74
- package/dist/transform-DoTyyXAu.mjs +74 -0
- package/dist/transform-job-50GZHhKH.mjs +37 -0
- package/dist/transform-job-BcLChRup.mjs +22 -0
- package/dist/{transform-job-CjsAXMej.mjs → transform-job-DRrK28IH.mjs} +14 -41
- package/dist/{transform-tag--IBQ-8Ij.mjs → transform-tag-CcElGp3C.mjs} +2 -21
- package/dist/transform-tag-Dmb4u3-Q.mjs +21 -0
- package/dist/transform-tag-_tgwlsdB.mjs +18 -0
- package/dist/{transforms-CLkv3e81.mjs → transforms-oU4zizbO.mjs} +10 -13
- package/dist/{tree-CB2IURsX.mjs → tree-CH-f3bjP.mjs} +6 -10
- package/dist/{unpublish-BkZldbkP.mjs → unpublish-BUl9RU5C.mjs} +7 -18
- package/dist/{update-B1dkPypu.mjs → update-BCS5FxKr.mjs} +11 -19
- package/dist/{update-8bTrglfc.mjs → update-BZPllQoR.mjs} +9 -16
- package/dist/{update-BacyVaLu.mjs → update-BiFDBcEH.mjs} +9 -16
- package/dist/update-BzMDeZiU.mjs +50 -0
- package/dist/{update-B4atxTx0.mjs → update-C4YJQFDS.mjs} +9 -16
- package/dist/{update-CGWTX1Z0.mjs → update-CHNSUHK4.mjs} +9 -16
- package/dist/{update-D7Ia9Qrt.mjs → update-CO4m4wH3.mjs} +10 -21
- package/dist/{update-CO9uCJxV.mjs → update-CVPAwJaH.mjs} +10 -18
- package/dist/{update-BHC3pwzR.mjs → update-CmDTljK-.mjs} +9 -16
- package/dist/{update-iY9WZqy0.mjs → update-CvOO8TED.mjs} +9 -17
- package/dist/{update-Cyxjg496.mjs → update-D-NE60AV.mjs} +9 -16
- package/dist/{update-D80GWpWl.mjs → update-Nfi44RrE.mjs} +10 -18
- package/dist/update-bD_Jh5-s.mjs +51 -0
- package/dist/{update-DajyWtBN.mjs → update-cYkvbqK8.mjs} +9 -16
- package/dist/update-dashcard-C3TuYO_k.mjs +50 -0
- package/dist/{update-BghbOcv6.mjs → update-tX9mKBN_.mjs} +10 -21
- package/dist/{upgrade-CXoNQ4FH.mjs → upgrade-DXMV4AyP.mjs} +37 -44
- package/dist/upload-CH632qW6.mjs +46 -0
- package/dist/upload-DAtxBBms.mjs +13 -0
- package/dist/upload-Dey_8rLf.mjs +13 -0
- package/dist/{uuid-D6dao_q4.mjs → uuid-BJkDWj9p.mjs} +5 -7
- package/dist/validate-BWchyW0V.mjs +1469 -0
- package/dist/{validate-query-D1N30wJ7.mjs → validate-query-DaGYSmpQ.mjs} +4 -5
- package/dist/{values-DIBAgSyz.mjs → values-Dxf1JEoA.mjs} +8 -13
- package/dist/verify-K96rItG5.mjs +89 -0
- package/dist/{wait-CW1OawkI.mjs → wait-DoMDH226.mjs} +10 -18
- package/dist/{wait-flags-DvNU8ahZ.mjs → wait-flags-DWEF9tX4.mjs} +14 -11
- package/dist/window-BkvrP0gB.mjs +64 -0
- package/package.json +5 -35
- package/skill-data/core/SKILL.md +31 -26
- package/skill-data/dashboard/SKILL.md +6 -2
- package/skill-data/document/SKILL.md +2 -2
- package/skill-data/git-sync/SKILL.md +20 -5
- package/skill-data/notification/SKILL.md +157 -0
- package/skill-data/transform/SKILL.md +1 -1
- package/.claude-plugin/marketplace.json +0 -19
- package/dist/add-collection-C8ZTPlIE.mjs +0 -9
- package/dist/add-collection-CUBn11d4.mjs +0 -60
- package/dist/auth-hgAnMUfi.mjs +0 -22
- package/dist/capabilities-DOTcPraV.mjs +0 -684
- package/dist/card-Ct-q_C4S.mjs +0 -26
- package/dist/cards-CYSyvN7Z.mjs +0 -38
- package/dist/cli.d.mts +0 -1
- package/dist/collection-K82kJWdj.mjs +0 -23
- package/dist/command-augment-D9pI9Vbh.mjs +0 -11
- package/dist/create-branch-DPE6itiS.mjs +0 -57
- package/dist/dashboard-B1iRSUBI.mjs +0 -35
- package/dist/database-CIbVSfua.mjs +0 -61
- package/dist/db-eWy7A-H3.mjs +0 -27
- package/dist/dirty-BKCg6oVN.mjs +0 -35
- package/dist/document-CVxhTnUD.mjs +0 -22
- package/dist/events-Dxm7me47.mjs +0 -44
- package/dist/export-Gb_wfZpt.mjs +0 -103
- package/dist/field-BTCw6voJ.mjs +0 -21
- package/dist/fields-hZeq6IF2.mjs +0 -37
- package/dist/get--rGDVyje.mjs +0 -35
- package/dist/get-7Np_G2je.mjs +0 -35
- package/dist/get-CP3lrIYi.mjs +0 -49
- package/dist/get-CuPCE_AG.mjs +0 -35
- package/dist/get-DB6Y9igl.mjs +0 -41
- package/dist/get-DWzMR8sn.mjs +0 -35
- package/dist/get-DZatHVdn.mjs +0 -38
- package/dist/git-sync-Cjrx2meo.mjs +0 -31
- package/dist/has-remote-changes-CIIib71u.mjs +0 -67
- package/dist/import-D9ID9Mz4.mjs +0 -94
- package/dist/is-dirty-DY5Zhsbk.mjs +0 -8
- package/dist/key-BnGRTX8U.mjs +0 -17
- package/dist/list-B1sdMz6m.mjs +0 -31
- package/dist/list-BSxMFDMR.mjs +0 -31
- package/dist/list-BeqcZVSn.mjs +0 -39
- package/dist/list-C0344yqi.mjs +0 -52
- package/dist/list-C5Ir-96z.mjs +0 -49
- package/dist/list-C6YpaUpC.mjs +0 -39
- package/dist/list-CQN2BpaW.mjs +0 -31
- package/dist/list-CY-jpBNE.mjs +0 -31
- package/dist/list-CkTsOOA7.mjs +0 -39
- package/dist/list-CvS68tLn.mjs +0 -31
- package/dist/list-KDHLmoUx.mjs +0 -31
- package/dist/list-MqqHcBvD.mjs +0 -31
- package/dist/measure-CPqisgyf.mjs +0 -25
- package/dist/paginate-CMqbqhMC.mjs +0 -49
- package/dist/poll-task-CpHGQOd5.mjs +0 -194
- package/dist/preflight-xhwEOHAt.mjs +0 -90
- package/dist/prompt-BgkWNgIR.mjs +0 -52
- package/dist/publish-xVPABwE8.mjs +0 -65
- package/dist/remove-collection-_a4uIlLB.mjs +0 -42
- package/dist/requests-qyh002pL.mjs +0 -96
- package/dist/rescan-values-Bd0Joerq.mjs +0 -40
- package/dist/resolve-Ct084wx3.mjs +0 -84
- package/dist/revision-message-flag-CHzX0cqV.mjs +0 -11
- package/dist/run-BfpKUjqL.mjs +0 -135
- package/dist/runs-D_08Ma08.mjs +0 -53
- package/dist/runtime-Ab96yYlM.mjs +0 -1695
- package/dist/segment-DyVTZSIM.mjs +0 -25
- package/dist/setting-B9xSyMf6.mjs +0 -20
- package/dist/setting-Cko6bE_w.mjs +0 -55
- package/dist/setup-CXGcyTuv.mjs +0 -71
- package/dist/snippet-C4h-GMUf.mjs +0 -22
- package/dist/stash-DxmpBS7x.mjs +0 -108
- package/dist/status-D5CR1SrS.mjs +0 -69
- package/dist/summary-BEEJl2O1.mjs +0 -40
- package/dist/sync-schema-B5HDpmrp.mjs +0 -54
- package/dist/table-DHmaW3Ec.mjs +0 -21
- package/dist/timeline-B0R6-dm8.mjs +0 -24
- package/dist/timeline-event-BVDTt-pM.mjs +0 -22
- package/dist/transform-Cq2_muWO.mjs +0 -31
- package/dist/transform-job-BpebgMnq.mjs +0 -25
- package/dist/transform-tag-B1xnFa9w.mjs +0 -21
- package/dist/update-dashcard-DLq7ihNO.mjs +0 -73
- package/dist/upload-D3eiApa0.mjs +0 -16
- package/dist/validate-Cqa14t7o.mjs +0 -1496
- package/dist/verify-DvhZWmS2.mjs +0 -79
|
@@ -0,0 +1,1469 @@
|
|
|
1
|
+
import { h as escapeJsonPointerSegment, i as ConfigError, t as isPlainObject } from "./predicates-Bkm2IoeX.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import Ajv2020 from "ajv/dist/2020.js";
|
|
4
|
+
import addFormats from "ajv-formats";
|
|
5
|
+
//#region src/core/schema/data/schemas/common/parameter.json
|
|
6
|
+
var parameter_default = {
|
|
7
|
+
title: "Parameter",
|
|
8
|
+
description: "A filter control parameter for cards and dashboards. Parameters allow users to interactively filter data via UI controls.\n",
|
|
9
|
+
type: "object",
|
|
10
|
+
required: [
|
|
11
|
+
"id",
|
|
12
|
+
"name",
|
|
13
|
+
"slug",
|
|
14
|
+
"type"
|
|
15
|
+
],
|
|
16
|
+
properties: {
|
|
17
|
+
"id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"description": "Unique identifier within the dashboard or card. UUIDs are recommended, but Metabase accepts any unique non-empty string.\n"
|
|
21
|
+
},
|
|
22
|
+
"name": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Display name"
|
|
25
|
+
},
|
|
26
|
+
"slug": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "URL-friendly identifier"
|
|
29
|
+
},
|
|
30
|
+
"type": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Filter widget type: string/=, string/!=, string/contains, string/starts-with, string/ends-with, number/=, number/!=, number/>=, number/<=, number/between, date/single, date/range, date/month-year, date/quarter-year, date/relative, date/all-options, boolean/=, temporal-unit\n"
|
|
33
|
+
},
|
|
34
|
+
"default": { "description": "Default value (type depends on filter type)" },
|
|
35
|
+
"required": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"description": "Whether a value is required"
|
|
38
|
+
},
|
|
39
|
+
"sectionId": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "UI section grouping. Restricts which columns are available for mapping. For id — only PK and FK columns. For location — only location columns (country, city, etc.). Normally matches the first part of the parameter type.\n",
|
|
42
|
+
"enum": [
|
|
43
|
+
"string",
|
|
44
|
+
"number",
|
|
45
|
+
"date",
|
|
46
|
+
"boolean",
|
|
47
|
+
"temporal-unit",
|
|
48
|
+
"id",
|
|
49
|
+
"location"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"temporal_units": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"description": "Allowed temporal units (for temporal-unit type)",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"enum": [
|
|
58
|
+
"minute",
|
|
59
|
+
"hour",
|
|
60
|
+
"day",
|
|
61
|
+
"week",
|
|
62
|
+
"month",
|
|
63
|
+
"quarter",
|
|
64
|
+
"year"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"values_query_type": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"list",
|
|
72
|
+
"search",
|
|
73
|
+
"none"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"values_source_type": {
|
|
77
|
+
"type": ["string", "null"],
|
|
78
|
+
"enum": [
|
|
79
|
+
null,
|
|
80
|
+
"card",
|
|
81
|
+
"static-list"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"values_source_config": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"description": "Source configuration. For static-list: {values: [[val, label], ...]}. For card: {card_id, value_field, label_field}.\n",
|
|
87
|
+
"properties": {
|
|
88
|
+
"values": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"description": "Static list of [value, label] pairs"
|
|
91
|
+
},
|
|
92
|
+
"card_id": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "Card entity_id to source values from"
|
|
95
|
+
},
|
|
96
|
+
"value_field": { "description": "Field clause for extracting values from card results" },
|
|
97
|
+
"label_field": { "description": "Field clause for extracting labels from card results" }
|
|
98
|
+
},
|
|
99
|
+
"additionalProperties": true
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
$defs: { "parameter_target": {
|
|
103
|
+
"description": "Parameter target for dashboard parameter mappings. Uses legacy MBQL format: [field, Field-FK, null-or-options].\n",
|
|
104
|
+
"type": "array",
|
|
105
|
+
"minItems": 2,
|
|
106
|
+
"allOf": [
|
|
107
|
+
{
|
|
108
|
+
"if": { "prefixItems": [{ "const": "dimension" }] },
|
|
109
|
+
"then": {
|
|
110
|
+
"prefixItems": [{ "const": "dimension" }, {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"minItems": 2,
|
|
113
|
+
"allOf": [
|
|
114
|
+
{
|
|
115
|
+
"if": { "prefixItems": [{ "const": "field" }] },
|
|
116
|
+
"then": { "$ref": "ref.yaml#/$defs/legacy_field_ref" }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"if": { "prefixItems": [{ "const": "expression" }] },
|
|
120
|
+
"then": { "$ref": "ref.yaml#/$defs/legacy_expression_ref" }
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"if": { "prefixItems": [{ "const": "template-tag" }] },
|
|
124
|
+
"then": {
|
|
125
|
+
"prefixItems": [{ "const": "template-tag" }, { "type": "string" }],
|
|
126
|
+
"minItems": 2,
|
|
127
|
+
"maxItems": 2
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}],
|
|
132
|
+
"items": { "anyOf": [{
|
|
133
|
+
"type": "object",
|
|
134
|
+
"properties": { "stage-number": { "type": "integer" } }
|
|
135
|
+
}, { "type": "null" }] },
|
|
136
|
+
"maxItems": 3
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"if": { "prefixItems": [{ "const": "variable" }] },
|
|
141
|
+
"then": {
|
|
142
|
+
"prefixItems": [{ "const": "variable" }, {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"prefixItems": [{ "const": "template-tag" }, { "type": "string" }],
|
|
145
|
+
"minItems": 2,
|
|
146
|
+
"maxItems": 2
|
|
147
|
+
}],
|
|
148
|
+
"minItems": 2,
|
|
149
|
+
"maxItems": 2
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"if": { "prefixItems": [{ "const": "text-tag" }] },
|
|
154
|
+
"then": {
|
|
155
|
+
"prefixItems": [{ "const": "text-tag" }, { "type": "string" }],
|
|
156
|
+
"minItems": 2,
|
|
157
|
+
"maxItems": 2
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
} }
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/core/schema/data/schemas/common/query.json
|
|
165
|
+
var query_default = {
|
|
166
|
+
title: "Query",
|
|
167
|
+
description: "A query definition in serialized pMBQL format. Contains a flat list of stages (no recursive source-query nesting). Each stage is either an MBQL structured stage or a native SQL stage.\n",
|
|
168
|
+
type: "object",
|
|
169
|
+
required: [
|
|
170
|
+
"lib/type",
|
|
171
|
+
"database",
|
|
172
|
+
"stages"
|
|
173
|
+
],
|
|
174
|
+
properties: {
|
|
175
|
+
"lib/type": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"const": "mbql/query"
|
|
178
|
+
},
|
|
179
|
+
"database": { "$ref": "id.yaml#/$defs/database_id" },
|
|
180
|
+
"stages": {
|
|
181
|
+
"type": "array",
|
|
182
|
+
"minItems": 1,
|
|
183
|
+
"items": { "$ref": "#/$defs/stage" }
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
$defs: {
|
|
187
|
+
"options": {
|
|
188
|
+
"description": "Base options object for pMBQL clauses. Always present as the second element of every clause array. Empty {} when no options apply.\n",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"properties": {
|
|
191
|
+
"base-type": { "type": "string" },
|
|
192
|
+
"effective-type": { "type": "string" },
|
|
193
|
+
"lib/uuid": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"format": "uuid"
|
|
196
|
+
},
|
|
197
|
+
"lib/expression-name": { "type": "string" }
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"case_sensitive_options": {
|
|
201
|
+
"description": "Options for string filter operators.",
|
|
202
|
+
"allOf": [{ "$ref": "#/$defs/options" }, {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"properties": { "case-sensitive": { "type": "boolean" } }
|
|
205
|
+
}]
|
|
206
|
+
},
|
|
207
|
+
"time_interval_options": {
|
|
208
|
+
"description": "Options for the time-interval operator.",
|
|
209
|
+
"allOf": [{ "$ref": "#/$defs/options" }, {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"properties": { "include-current": { "type": "boolean" } }
|
|
212
|
+
}]
|
|
213
|
+
},
|
|
214
|
+
"datetime_parse_options": {
|
|
215
|
+
"description": "Options for the datetime parsing operator.",
|
|
216
|
+
"allOf": [{ "$ref": "#/$defs/options" }, {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": { "mode": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": [
|
|
221
|
+
"iso",
|
|
222
|
+
"simple",
|
|
223
|
+
"unix-seconds",
|
|
224
|
+
"unix-milliseconds",
|
|
225
|
+
"unix-microseconds",
|
|
226
|
+
"unix-nanoseconds",
|
|
227
|
+
"iso-bytes",
|
|
228
|
+
"simple-bytes"
|
|
229
|
+
]
|
|
230
|
+
} }
|
|
231
|
+
}]
|
|
232
|
+
},
|
|
233
|
+
"stage": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"required": ["lib/type"],
|
|
236
|
+
"allOf": [{
|
|
237
|
+
"if": { "properties": { "lib/type": { "const": "mbql.stage/mbql" } } },
|
|
238
|
+
"then": { "$ref": "#/$defs/mbql_stage" }
|
|
239
|
+
}, {
|
|
240
|
+
"if": { "properties": { "lib/type": { "const": "mbql.stage/native" } } },
|
|
241
|
+
"then": { "$ref": "#/$defs/native_stage" }
|
|
242
|
+
}]
|
|
243
|
+
},
|
|
244
|
+
"mbql_stage": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"lib/type": { "const": "mbql.stage/mbql" },
|
|
248
|
+
"source-table": { "$ref": "id.yaml#/$defs/table_id" },
|
|
249
|
+
"source-card": { "$ref": "id.yaml#/$defs/entity_id" },
|
|
250
|
+
"joins": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": { "$ref": "#/$defs/join" }
|
|
253
|
+
},
|
|
254
|
+
"expressions": {
|
|
255
|
+
"type": "array",
|
|
256
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
257
|
+
},
|
|
258
|
+
"fields": {
|
|
259
|
+
"type": "array",
|
|
260
|
+
"items": {
|
|
261
|
+
"type": "array",
|
|
262
|
+
"allOf": [{
|
|
263
|
+
"if": { "prefixItems": [{ "const": "field" }] },
|
|
264
|
+
"then": { "$ref": "ref.yaml#/$defs/field_ref" }
|
|
265
|
+
}, {
|
|
266
|
+
"if": { "prefixItems": [{ "const": "expression" }] },
|
|
267
|
+
"then": { "$ref": "ref.yaml#/$defs/expression_ref" }
|
|
268
|
+
}]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"filters": {
|
|
272
|
+
"type": "array",
|
|
273
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
274
|
+
},
|
|
275
|
+
"aggregation": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
278
|
+
},
|
|
279
|
+
"breakout": {
|
|
280
|
+
"type": "array",
|
|
281
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
282
|
+
},
|
|
283
|
+
"order-by": {
|
|
284
|
+
"type": "array",
|
|
285
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
286
|
+
},
|
|
287
|
+
"limit": { "type": ["integer", "null"] }
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"expression": {
|
|
291
|
+
"description": "An MBQL expression clause. Either a literal value or an array [operator, options, ...args] where options is always an object.\n",
|
|
292
|
+
"type": [
|
|
293
|
+
"string",
|
|
294
|
+
"number",
|
|
295
|
+
"boolean",
|
|
296
|
+
"null",
|
|
297
|
+
"array"
|
|
298
|
+
],
|
|
299
|
+
"if": { "type": "array" },
|
|
300
|
+
"then": {
|
|
301
|
+
"minItems": 1,
|
|
302
|
+
"allOf": [
|
|
303
|
+
{
|
|
304
|
+
"if": { "prefixItems": [{ "const": "field" }] },
|
|
305
|
+
"then": { "$ref": "ref.yaml#/$defs/field_ref" }
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"if": { "prefixItems": [{ "const": "expression" }] },
|
|
309
|
+
"then": { "$ref": "ref.yaml#/$defs/expression_ref" }
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"if": { "prefixItems": [{ "const": "aggregation" }] },
|
|
313
|
+
"then": { "$ref": "ref.yaml#/$defs/aggregation_ref" }
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"if": { "prefixItems": [{ "const": "metric" }] },
|
|
317
|
+
"then": { "$ref": "ref.yaml#/$defs/metric_ref" }
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"if": { "prefixItems": [{ "const": "measure" }] },
|
|
321
|
+
"then": { "$ref": "ref.yaml#/$defs/measure_ref" }
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"if": { "prefixItems": [{ "const": "segment" }] },
|
|
325
|
+
"then": { "$ref": "ref.yaml#/$defs/segment_ref" }
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"if": { "prefixItems": [{ "const": "value" }] },
|
|
329
|
+
"then": {
|
|
330
|
+
"prefixItems": [
|
|
331
|
+
{ "const": "value" },
|
|
332
|
+
{ "$ref": "#/$defs/options" },
|
|
333
|
+
{ "type": [
|
|
334
|
+
"string",
|
|
335
|
+
"number",
|
|
336
|
+
"boolean"
|
|
337
|
+
] }
|
|
338
|
+
],
|
|
339
|
+
"minItems": 3,
|
|
340
|
+
"maxItems": 3
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"if": { "prefixItems": [{ "enum": [
|
|
345
|
+
"+",
|
|
346
|
+
"-",
|
|
347
|
+
"*",
|
|
348
|
+
"/"
|
|
349
|
+
] }] },
|
|
350
|
+
"then": {
|
|
351
|
+
"prefixItems": [
|
|
352
|
+
{ "enum": [
|
|
353
|
+
"+",
|
|
354
|
+
"-",
|
|
355
|
+
"*",
|
|
356
|
+
"/"
|
|
357
|
+
] },
|
|
358
|
+
{ "$ref": "#/$defs/options" },
|
|
359
|
+
{ "$ref": "#/$defs/expression" }
|
|
360
|
+
],
|
|
361
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
362
|
+
"minItems": 3
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"if": { "prefixItems": [{ "enum": ["and", "or"] }] },
|
|
367
|
+
"then": {
|
|
368
|
+
"prefixItems": [
|
|
369
|
+
{ "enum": ["and", "or"] },
|
|
370
|
+
{ "$ref": "#/$defs/options" },
|
|
371
|
+
{ "$ref": "#/$defs/expression" },
|
|
372
|
+
{ "$ref": "#/$defs/expression" }
|
|
373
|
+
],
|
|
374
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
375
|
+
"minItems": 4
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"if": { "prefixItems": [{ "const": "not" }] },
|
|
380
|
+
"then": {
|
|
381
|
+
"prefixItems": [
|
|
382
|
+
{ "const": "not" },
|
|
383
|
+
{ "$ref": "#/$defs/options" },
|
|
384
|
+
{ "$ref": "#/$defs/expression" }
|
|
385
|
+
],
|
|
386
|
+
"minItems": 3,
|
|
387
|
+
"maxItems": 3
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"if": { "prefixItems": [{ "enum": [
|
|
392
|
+
"=",
|
|
393
|
+
"!=",
|
|
394
|
+
"<",
|
|
395
|
+
">",
|
|
396
|
+
"<=",
|
|
397
|
+
">="
|
|
398
|
+
] }] },
|
|
399
|
+
"then": {
|
|
400
|
+
"prefixItems": [
|
|
401
|
+
{ "enum": [
|
|
402
|
+
"=",
|
|
403
|
+
"!=",
|
|
404
|
+
"<",
|
|
405
|
+
">",
|
|
406
|
+
"<=",
|
|
407
|
+
">="
|
|
408
|
+
] },
|
|
409
|
+
{ "$ref": "#/$defs/options" },
|
|
410
|
+
{ "$ref": "#/$defs/expression" },
|
|
411
|
+
{ "$ref": "#/$defs/expression" }
|
|
412
|
+
],
|
|
413
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
414
|
+
"minItems": 4
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"if": { "prefixItems": [{ "enum": ["in", "not-in"] }] },
|
|
419
|
+
"then": {
|
|
420
|
+
"prefixItems": [
|
|
421
|
+
{ "enum": ["in", "not-in"] },
|
|
422
|
+
{ "$ref": "#/$defs/options" },
|
|
423
|
+
{ "$ref": "#/$defs/expression" },
|
|
424
|
+
{ "$ref": "#/$defs/expression" }
|
|
425
|
+
],
|
|
426
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
427
|
+
"minItems": 4
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"if": { "prefixItems": [{ "const": "between" }] },
|
|
432
|
+
"then": {
|
|
433
|
+
"prefixItems": [
|
|
434
|
+
{ "const": "between" },
|
|
435
|
+
{ "$ref": "#/$defs/options" },
|
|
436
|
+
{ "$ref": "#/$defs/expression" },
|
|
437
|
+
{ "$ref": "#/$defs/expression" },
|
|
438
|
+
{ "$ref": "#/$defs/expression" }
|
|
439
|
+
],
|
|
440
|
+
"minItems": 5,
|
|
441
|
+
"maxItems": 5
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"if": { "prefixItems": [{ "const": "inside" }] },
|
|
446
|
+
"then": {
|
|
447
|
+
"prefixItems": [
|
|
448
|
+
{ "const": "inside" },
|
|
449
|
+
{ "$ref": "#/$defs/options" },
|
|
450
|
+
{ "$ref": "#/$defs/expression" },
|
|
451
|
+
{ "$ref": "#/$defs/expression" },
|
|
452
|
+
{ "type": "number" },
|
|
453
|
+
{ "type": "number" },
|
|
454
|
+
{ "type": "number" },
|
|
455
|
+
{ "type": "number" }
|
|
456
|
+
],
|
|
457
|
+
"minItems": 8,
|
|
458
|
+
"maxItems": 8
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"if": { "prefixItems": [{ "enum": [
|
|
463
|
+
"is-null",
|
|
464
|
+
"not-null",
|
|
465
|
+
"is-empty",
|
|
466
|
+
"not-empty"
|
|
467
|
+
] }] },
|
|
468
|
+
"then": {
|
|
469
|
+
"prefixItems": [
|
|
470
|
+
{ "enum": [
|
|
471
|
+
"is-null",
|
|
472
|
+
"not-null",
|
|
473
|
+
"is-empty",
|
|
474
|
+
"not-empty"
|
|
475
|
+
] },
|
|
476
|
+
{ "$ref": "#/$defs/options" },
|
|
477
|
+
{ "$ref": "#/$defs/expression" }
|
|
478
|
+
],
|
|
479
|
+
"minItems": 3,
|
|
480
|
+
"maxItems": 3
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"if": { "prefixItems": [{ "enum": [
|
|
485
|
+
"contains",
|
|
486
|
+
"does-not-contain",
|
|
487
|
+
"starts-with",
|
|
488
|
+
"ends-with"
|
|
489
|
+
] }] },
|
|
490
|
+
"then": {
|
|
491
|
+
"prefixItems": [
|
|
492
|
+
{ "enum": [
|
|
493
|
+
"contains",
|
|
494
|
+
"does-not-contain",
|
|
495
|
+
"starts-with",
|
|
496
|
+
"ends-with"
|
|
497
|
+
] },
|
|
498
|
+
{ "$ref": "#/$defs/case_sensitive_options" },
|
|
499
|
+
{ "$ref": "#/$defs/expression" },
|
|
500
|
+
{ "$ref": "#/$defs/expression" }
|
|
501
|
+
],
|
|
502
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
503
|
+
"minItems": 4
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"if": { "prefixItems": [{ "const": "time-interval" }] },
|
|
508
|
+
"then": {
|
|
509
|
+
"prefixItems": [
|
|
510
|
+
{ "const": "time-interval" },
|
|
511
|
+
{ "$ref": "#/$defs/time_interval_options" },
|
|
512
|
+
{ "$ref": "#/$defs/expression" },
|
|
513
|
+
{
|
|
514
|
+
"if": { "type": "integer" },
|
|
515
|
+
"then": { "type": "integer" },
|
|
516
|
+
"else": { "enum": [
|
|
517
|
+
"current",
|
|
518
|
+
"last",
|
|
519
|
+
"next"
|
|
520
|
+
] }
|
|
521
|
+
},
|
|
522
|
+
{ "$ref": "temporal_bucketing.yaml#/$defs/datetime_truncation_unit" }
|
|
523
|
+
],
|
|
524
|
+
"minItems": 5,
|
|
525
|
+
"maxItems": 5
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"if": { "prefixItems": [{ "const": "relative-time-interval" }] },
|
|
530
|
+
"then": {
|
|
531
|
+
"prefixItems": [
|
|
532
|
+
{ "const": "relative-time-interval" },
|
|
533
|
+
{ "$ref": "#/$defs/options" },
|
|
534
|
+
{ "$ref": "#/$defs/expression" },
|
|
535
|
+
{ "type": "integer" },
|
|
536
|
+
{ "$ref": "temporal_bucketing.yaml#/$defs/datetime_truncation_unit" },
|
|
537
|
+
{ "type": "integer" },
|
|
538
|
+
{ "$ref": "temporal_bucketing.yaml#/$defs/datetime_truncation_unit" }
|
|
539
|
+
],
|
|
540
|
+
"minItems": 7,
|
|
541
|
+
"maxItems": 7
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"if": { "prefixItems": [{ "enum": ["now", "today"] }] },
|
|
546
|
+
"then": {
|
|
547
|
+
"prefixItems": [{ "enum": ["now", "today"] }, { "$ref": "#/$defs/options" }],
|
|
548
|
+
"minItems": 2,
|
|
549
|
+
"maxItems": 2
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"if": { "prefixItems": [{ "const": "interval" }] },
|
|
554
|
+
"then": {
|
|
555
|
+
"prefixItems": [
|
|
556
|
+
{ "const": "interval" },
|
|
557
|
+
{ "$ref": "#/$defs/options" },
|
|
558
|
+
{ "type": "integer" },
|
|
559
|
+
{ "$ref": "temporal_bucketing.yaml#/$defs/datetime_truncation_unit" }
|
|
560
|
+
],
|
|
561
|
+
"minItems": 4,
|
|
562
|
+
"maxItems": 4
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"if": { "prefixItems": [{ "enum": [
|
|
567
|
+
"abs",
|
|
568
|
+
"ceil",
|
|
569
|
+
"floor",
|
|
570
|
+
"round",
|
|
571
|
+
"sqrt",
|
|
572
|
+
"exp",
|
|
573
|
+
"log",
|
|
574
|
+
"length",
|
|
575
|
+
"trim",
|
|
576
|
+
"ltrim",
|
|
577
|
+
"rtrim",
|
|
578
|
+
"upper",
|
|
579
|
+
"lower",
|
|
580
|
+
"host",
|
|
581
|
+
"domain",
|
|
582
|
+
"subdomain",
|
|
583
|
+
"path",
|
|
584
|
+
"get-year",
|
|
585
|
+
"get-quarter",
|
|
586
|
+
"get-month",
|
|
587
|
+
"get-day",
|
|
588
|
+
"get-hour",
|
|
589
|
+
"get-minute",
|
|
590
|
+
"get-second",
|
|
591
|
+
"text",
|
|
592
|
+
"integer",
|
|
593
|
+
"float",
|
|
594
|
+
"day-name",
|
|
595
|
+
"month-name",
|
|
596
|
+
"quarter-name",
|
|
597
|
+
"date"
|
|
598
|
+
] }] },
|
|
599
|
+
"then": {
|
|
600
|
+
"prefixItems": [
|
|
601
|
+
{ "enum": [
|
|
602
|
+
"abs",
|
|
603
|
+
"ceil",
|
|
604
|
+
"floor",
|
|
605
|
+
"round",
|
|
606
|
+
"sqrt",
|
|
607
|
+
"exp",
|
|
608
|
+
"log",
|
|
609
|
+
"length",
|
|
610
|
+
"trim",
|
|
611
|
+
"ltrim",
|
|
612
|
+
"rtrim",
|
|
613
|
+
"upper",
|
|
614
|
+
"lower",
|
|
615
|
+
"host",
|
|
616
|
+
"domain",
|
|
617
|
+
"subdomain",
|
|
618
|
+
"path",
|
|
619
|
+
"get-year",
|
|
620
|
+
"get-quarter",
|
|
621
|
+
"get-month",
|
|
622
|
+
"get-day",
|
|
623
|
+
"get-hour",
|
|
624
|
+
"get-minute",
|
|
625
|
+
"get-second",
|
|
626
|
+
"text",
|
|
627
|
+
"integer",
|
|
628
|
+
"float",
|
|
629
|
+
"day-name",
|
|
630
|
+
"month-name",
|
|
631
|
+
"quarter-name",
|
|
632
|
+
"date"
|
|
633
|
+
] },
|
|
634
|
+
{ "$ref": "#/$defs/options" },
|
|
635
|
+
{ "$ref": "#/$defs/expression" }
|
|
636
|
+
],
|
|
637
|
+
"minItems": 3,
|
|
638
|
+
"maxItems": 3
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"if": { "prefixItems": [{ "const": "datetime" }] },
|
|
643
|
+
"then": {
|
|
644
|
+
"prefixItems": [
|
|
645
|
+
{ "const": "datetime" },
|
|
646
|
+
{ "$ref": "#/$defs/datetime_parse_options" },
|
|
647
|
+
{ "$ref": "#/$defs/expression" }
|
|
648
|
+
],
|
|
649
|
+
"minItems": 3,
|
|
650
|
+
"maxItems": 3
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"if": { "prefixItems": [{ "enum": ["get-day-of-week", "get-week"] }] },
|
|
655
|
+
"then": {
|
|
656
|
+
"prefixItems": [
|
|
657
|
+
{ "enum": ["get-day-of-week", "get-week"] },
|
|
658
|
+
{ "$ref": "#/$defs/options" },
|
|
659
|
+
{ "$ref": "#/$defs/expression" },
|
|
660
|
+
{
|
|
661
|
+
"type": "string",
|
|
662
|
+
"enum": [
|
|
663
|
+
"iso",
|
|
664
|
+
"us",
|
|
665
|
+
"instance"
|
|
666
|
+
]
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
"minItems": 3,
|
|
670
|
+
"maxItems": 4
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"if": { "prefixItems": [{ "const": "power" }] },
|
|
675
|
+
"then": {
|
|
676
|
+
"prefixItems": [
|
|
677
|
+
{ "const": "power" },
|
|
678
|
+
{ "$ref": "#/$defs/options" },
|
|
679
|
+
{ "$ref": "#/$defs/expression" },
|
|
680
|
+
{ "$ref": "#/$defs/expression" }
|
|
681
|
+
],
|
|
682
|
+
"minItems": 4,
|
|
683
|
+
"maxItems": 4
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"if": { "prefixItems": [{ "enum": ["replace", "split-part"] }] },
|
|
688
|
+
"then": {
|
|
689
|
+
"prefixItems": [
|
|
690
|
+
{ "enum": ["replace", "split-part"] },
|
|
691
|
+
{ "$ref": "#/$defs/options" },
|
|
692
|
+
{ "$ref": "#/$defs/expression" },
|
|
693
|
+
{ "$ref": "#/$defs/expression" },
|
|
694
|
+
{ "$ref": "#/$defs/expression" }
|
|
695
|
+
],
|
|
696
|
+
"minItems": 5,
|
|
697
|
+
"maxItems": 5
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"if": { "prefixItems": [{ "const": "substring" }] },
|
|
702
|
+
"then": {
|
|
703
|
+
"prefixItems": [
|
|
704
|
+
{ "const": "substring" },
|
|
705
|
+
{ "$ref": "#/$defs/options" },
|
|
706
|
+
{ "$ref": "#/$defs/expression" },
|
|
707
|
+
{ "$ref": "#/$defs/expression" },
|
|
708
|
+
{ "$ref": "#/$defs/expression" }
|
|
709
|
+
],
|
|
710
|
+
"minItems": 4,
|
|
711
|
+
"maxItems": 5
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"if": { "prefixItems": [{ "const": "collate" }] },
|
|
716
|
+
"then": {
|
|
717
|
+
"prefixItems": [
|
|
718
|
+
{ "const": "collate" },
|
|
719
|
+
{ "$ref": "#/$defs/options" },
|
|
720
|
+
{ "$ref": "#/$defs/expression" },
|
|
721
|
+
{ "type": "string" }
|
|
722
|
+
],
|
|
723
|
+
"minItems": 4,
|
|
724
|
+
"maxItems": 4
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"if": { "prefixItems": [{ "const": "regex-match-first" }] },
|
|
729
|
+
"then": {
|
|
730
|
+
"prefixItems": [
|
|
731
|
+
{ "const": "regex-match-first" },
|
|
732
|
+
{ "$ref": "#/$defs/options" },
|
|
733
|
+
{ "$ref": "#/$defs/expression" },
|
|
734
|
+
{ "type": "string" }
|
|
735
|
+
],
|
|
736
|
+
"minItems": 4,
|
|
737
|
+
"maxItems": 4
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"if": { "prefixItems": [{ "const": "concat" }] },
|
|
742
|
+
"then": {
|
|
743
|
+
"prefixItems": [
|
|
744
|
+
{ "const": "concat" },
|
|
745
|
+
{ "$ref": "#/$defs/options" },
|
|
746
|
+
{ "$ref": "#/$defs/expression" },
|
|
747
|
+
{ "$ref": "#/$defs/expression" }
|
|
748
|
+
],
|
|
749
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
750
|
+
"minItems": 4
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"if": { "prefixItems": [{ "const": "coalesce" }] },
|
|
755
|
+
"then": {
|
|
756
|
+
"prefixItems": [
|
|
757
|
+
{ "const": "coalesce" },
|
|
758
|
+
{ "$ref": "#/$defs/options" },
|
|
759
|
+
{ "$ref": "#/$defs/expression" },
|
|
760
|
+
{ "$ref": "#/$defs/expression" }
|
|
761
|
+
],
|
|
762
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
763
|
+
"minItems": 4
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"if": { "prefixItems": [{ "enum": ["datetime-add", "datetime-subtract"] }] },
|
|
768
|
+
"then": {
|
|
769
|
+
"prefixItems": [
|
|
770
|
+
{ "enum": ["datetime-add", "datetime-subtract"] },
|
|
771
|
+
{ "$ref": "#/$defs/options" },
|
|
772
|
+
{ "$ref": "#/$defs/expression" },
|
|
773
|
+
{ "type": "integer" },
|
|
774
|
+
{ "$ref": "temporal_bucketing.yaml#/$defs/datetime_truncation_unit" }
|
|
775
|
+
],
|
|
776
|
+
"minItems": 5,
|
|
777
|
+
"maxItems": 5
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"if": { "prefixItems": [{ "const": "datetime-diff" }] },
|
|
782
|
+
"then": {
|
|
783
|
+
"prefixItems": [
|
|
784
|
+
{ "const": "datetime-diff" },
|
|
785
|
+
{ "$ref": "#/$defs/options" },
|
|
786
|
+
{ "$ref": "#/$defs/expression" },
|
|
787
|
+
{ "$ref": "#/$defs/expression" },
|
|
788
|
+
{ "$ref": "#/$defs/datetime_diff_unit" }
|
|
789
|
+
],
|
|
790
|
+
"minItems": 5,
|
|
791
|
+
"maxItems": 5
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"if": { "prefixItems": [{ "const": "convert-timezone" }] },
|
|
796
|
+
"then": {
|
|
797
|
+
"prefixItems": [
|
|
798
|
+
{ "const": "convert-timezone" },
|
|
799
|
+
{ "$ref": "#/$defs/options" },
|
|
800
|
+
{ "$ref": "#/$defs/expression" },
|
|
801
|
+
{ "type": "string" },
|
|
802
|
+
{ "type": "string" }
|
|
803
|
+
],
|
|
804
|
+
"minItems": 4,
|
|
805
|
+
"maxItems": 5
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"if": { "prefixItems": [{ "const": "temporal-extract" }] },
|
|
810
|
+
"then": {
|
|
811
|
+
"prefixItems": [
|
|
812
|
+
{ "const": "temporal-extract" },
|
|
813
|
+
{ "$ref": "#/$defs/options" },
|
|
814
|
+
{ "$ref": "#/$defs/expression" },
|
|
815
|
+
{ "$ref": "temporal_bucketing.yaml#/$defs/datetime_extraction_unit" },
|
|
816
|
+
{
|
|
817
|
+
"type": "string",
|
|
818
|
+
"enum": [
|
|
819
|
+
"iso",
|
|
820
|
+
"us",
|
|
821
|
+
"instance"
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
"minItems": 4,
|
|
826
|
+
"maxItems": 5
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"if": { "prefixItems": [{ "enum": ["count", "cum-count"] }] },
|
|
831
|
+
"then": {
|
|
832
|
+
"prefixItems": [{ "enum": ["count", "cum-count"] }, { "$ref": "#/$defs/options" }],
|
|
833
|
+
"items": { "$ref": "#/$defs/expression" },
|
|
834
|
+
"minItems": 2,
|
|
835
|
+
"maxItems": 3
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"if": { "prefixItems": [{ "enum": [
|
|
840
|
+
"sum",
|
|
841
|
+
"avg",
|
|
842
|
+
"min",
|
|
843
|
+
"max",
|
|
844
|
+
"distinct",
|
|
845
|
+
"stddev",
|
|
846
|
+
"var",
|
|
847
|
+
"median",
|
|
848
|
+
"cum-sum"
|
|
849
|
+
] }] },
|
|
850
|
+
"then": {
|
|
851
|
+
"prefixItems": [
|
|
852
|
+
{ "enum": [
|
|
853
|
+
"sum",
|
|
854
|
+
"avg",
|
|
855
|
+
"min",
|
|
856
|
+
"max",
|
|
857
|
+
"distinct",
|
|
858
|
+
"stddev",
|
|
859
|
+
"var",
|
|
860
|
+
"median",
|
|
861
|
+
"cum-sum"
|
|
862
|
+
] },
|
|
863
|
+
{ "$ref": "#/$defs/options" },
|
|
864
|
+
{ "$ref": "#/$defs/expression" }
|
|
865
|
+
],
|
|
866
|
+
"minItems": 3,
|
|
867
|
+
"maxItems": 3
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"if": { "prefixItems": [{ "const": "percentile" }] },
|
|
872
|
+
"then": {
|
|
873
|
+
"prefixItems": [
|
|
874
|
+
{ "const": "percentile" },
|
|
875
|
+
{ "$ref": "#/$defs/options" },
|
|
876
|
+
{ "$ref": "#/$defs/expression" },
|
|
877
|
+
{ "type": "number" }
|
|
878
|
+
],
|
|
879
|
+
"minItems": 4,
|
|
880
|
+
"maxItems": 4
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"if": { "prefixItems": [{ "enum": ["count-where", "share"] }] },
|
|
885
|
+
"then": {
|
|
886
|
+
"prefixItems": [
|
|
887
|
+
{ "enum": ["count-where", "share"] },
|
|
888
|
+
{ "$ref": "#/$defs/options" },
|
|
889
|
+
{ "$ref": "#/$defs/expression" }
|
|
890
|
+
],
|
|
891
|
+
"minItems": 3,
|
|
892
|
+
"maxItems": 3
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"if": { "prefixItems": [{ "enum": ["sum-where", "distinct-where"] }] },
|
|
897
|
+
"then": {
|
|
898
|
+
"prefixItems": [
|
|
899
|
+
{ "enum": ["sum-where", "distinct-where"] },
|
|
900
|
+
{ "$ref": "#/$defs/options" },
|
|
901
|
+
{ "$ref": "#/$defs/expression" },
|
|
902
|
+
{ "$ref": "#/$defs/expression" }
|
|
903
|
+
],
|
|
904
|
+
"minItems": 4,
|
|
905
|
+
"maxItems": 4
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"if": { "prefixItems": [{ "enum": ["case", "if"] }] },
|
|
910
|
+
"then": {
|
|
911
|
+
"prefixItems": [
|
|
912
|
+
{ "enum": ["case", "if"] },
|
|
913
|
+
{ "$ref": "#/$defs/options" },
|
|
914
|
+
{
|
|
915
|
+
"type": "array",
|
|
916
|
+
"items": {
|
|
917
|
+
"type": "array",
|
|
918
|
+
"prefixItems": [{ "$ref": "#/$defs/expression" }, { "$ref": "#/$defs/expression" }],
|
|
919
|
+
"minItems": 2,
|
|
920
|
+
"maxItems": 2
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
{ "$ref": "#/$defs/expression" }
|
|
924
|
+
],
|
|
925
|
+
"minItems": 3,
|
|
926
|
+
"maxItems": 4
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"if": { "prefixItems": [{ "const": "offset" }] },
|
|
931
|
+
"then": {
|
|
932
|
+
"prefixItems": [
|
|
933
|
+
{ "const": "offset" },
|
|
934
|
+
{ "$ref": "#/$defs/options" },
|
|
935
|
+
{ "$ref": "#/$defs/expression" },
|
|
936
|
+
{ "type": "integer" }
|
|
937
|
+
],
|
|
938
|
+
"minItems": 4,
|
|
939
|
+
"maxItems": 4
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"if": { "prefixItems": [{ "enum": ["asc", "desc"] }] },
|
|
944
|
+
"then": {
|
|
945
|
+
"prefixItems": [
|
|
946
|
+
{ "enum": ["asc", "desc"] },
|
|
947
|
+
{ "$ref": "#/$defs/options" },
|
|
948
|
+
{ "$ref": "#/$defs/expression" }
|
|
949
|
+
],
|
|
950
|
+
"minItems": 3,
|
|
951
|
+
"maxItems": 3
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
]
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
"datetime_diff_unit": {
|
|
958
|
+
"type": "string",
|
|
959
|
+
"enum": [
|
|
960
|
+
"second",
|
|
961
|
+
"minute",
|
|
962
|
+
"hour",
|
|
963
|
+
"day",
|
|
964
|
+
"week",
|
|
965
|
+
"month",
|
|
966
|
+
"quarter",
|
|
967
|
+
"year"
|
|
968
|
+
]
|
|
969
|
+
},
|
|
970
|
+
"join": {
|
|
971
|
+
"type": "object",
|
|
972
|
+
"required": [
|
|
973
|
+
"stages",
|
|
974
|
+
"conditions",
|
|
975
|
+
"alias"
|
|
976
|
+
],
|
|
977
|
+
"properties": {
|
|
978
|
+
"stages": {
|
|
979
|
+
"type": "array",
|
|
980
|
+
"minItems": 1,
|
|
981
|
+
"items": { "$ref": "#/$defs/stage" }
|
|
982
|
+
},
|
|
983
|
+
"conditions": {
|
|
984
|
+
"type": "array",
|
|
985
|
+
"minItems": 1,
|
|
986
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
987
|
+
},
|
|
988
|
+
"alias": { "type": "string" },
|
|
989
|
+
"strategy": {
|
|
990
|
+
"type": "string",
|
|
991
|
+
"enum": [
|
|
992
|
+
"left-join",
|
|
993
|
+
"right-join",
|
|
994
|
+
"inner-join",
|
|
995
|
+
"full-join"
|
|
996
|
+
]
|
|
997
|
+
},
|
|
998
|
+
"fields": {
|
|
999
|
+
"if": { "type": "string" },
|
|
1000
|
+
"then": { "enum": ["all", "none"] },
|
|
1001
|
+
"else": {
|
|
1002
|
+
"type": "array",
|
|
1003
|
+
"items": { "$ref": "#/$defs/expression" }
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
"native_stage": {
|
|
1009
|
+
"type": "object",
|
|
1010
|
+
"required": ["lib/type", "native"],
|
|
1011
|
+
"properties": {
|
|
1012
|
+
"lib/type": { "const": "mbql.stage/native" },
|
|
1013
|
+
"native": { "type": "string" },
|
|
1014
|
+
"template-tags": {
|
|
1015
|
+
"type": "object",
|
|
1016
|
+
"additionalProperties": { "$ref": "#/$defs/template_tag" }
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
"template_tag": {
|
|
1021
|
+
"type": "object",
|
|
1022
|
+
"required": [
|
|
1023
|
+
"type",
|
|
1024
|
+
"name",
|
|
1025
|
+
"id"
|
|
1026
|
+
],
|
|
1027
|
+
"properties": {
|
|
1028
|
+
"type": {
|
|
1029
|
+
"type": "string",
|
|
1030
|
+
"enum": [
|
|
1031
|
+
"text",
|
|
1032
|
+
"number",
|
|
1033
|
+
"date",
|
|
1034
|
+
"boolean",
|
|
1035
|
+
"dimension",
|
|
1036
|
+
"temporal-unit",
|
|
1037
|
+
"card",
|
|
1038
|
+
"snippet",
|
|
1039
|
+
"table"
|
|
1040
|
+
]
|
|
1041
|
+
},
|
|
1042
|
+
"name": { "type": "string" },
|
|
1043
|
+
"id": {
|
|
1044
|
+
"type": "string",
|
|
1045
|
+
"format": "uuid"
|
|
1046
|
+
},
|
|
1047
|
+
"display-name": { "type": "string" },
|
|
1048
|
+
"default": { "description": "Default value (type depends on tag type)" },
|
|
1049
|
+
"required": { "type": "boolean" }
|
|
1050
|
+
},
|
|
1051
|
+
"allOf": [
|
|
1052
|
+
{
|
|
1053
|
+
"if": { "properties": { "type": { "const": "dimension" } } },
|
|
1054
|
+
"then": {
|
|
1055
|
+
"required": ["dimension", "widget-type"],
|
|
1056
|
+
"properties": {
|
|
1057
|
+
"dimension": { "$ref": "#/$defs/expression" },
|
|
1058
|
+
"widget-type": { "type": "string" },
|
|
1059
|
+
"options": { "type": "object" },
|
|
1060
|
+
"alias": { "type": "string" }
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"if": { "properties": { "type": { "const": "temporal-unit" } } },
|
|
1066
|
+
"then": {
|
|
1067
|
+
"required": ["dimension"],
|
|
1068
|
+
"properties": {
|
|
1069
|
+
"dimension": { "$ref": "#/$defs/expression" },
|
|
1070
|
+
"alias": { "type": "string" }
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"if": { "properties": { "type": { "const": "card" } } },
|
|
1076
|
+
"then": {
|
|
1077
|
+
"required": ["card-id"],
|
|
1078
|
+
"properties": { "card-id": { "$ref": "id.yaml#/$defs/entity_id" } }
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"if": { "properties": { "type": { "const": "snippet" } } },
|
|
1083
|
+
"then": {
|
|
1084
|
+
"required": ["snippet-name", "snippet-id"],
|
|
1085
|
+
"properties": {
|
|
1086
|
+
"snippet-name": { "type": "string" },
|
|
1087
|
+
"snippet-id": { "$ref": "id.yaml#/$defs/entity_id" }
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"if": { "properties": { "type": { "const": "table" } } },
|
|
1093
|
+
"then": {
|
|
1094
|
+
"required": ["table-id"],
|
|
1095
|
+
"properties": {
|
|
1096
|
+
"table-id": { "$ref": "id.yaml#/$defs/table_id" },
|
|
1097
|
+
"emit-alias": { "type": "boolean" }
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region src/core/schema/data/schemas/common/ref.json
|
|
1107
|
+
var ref_default = {
|
|
1108
|
+
title: "Ref",
|
|
1109
|
+
description: "Column and entity reference types used in MBQL expressions, parameter mappings, and visualization settings. Options are always the second element (an object, never null).\n",
|
|
1110
|
+
$defs: {
|
|
1111
|
+
"field_options": {
|
|
1112
|
+
"description": "Options for field refs.",
|
|
1113
|
+
"allOf": [{ "$ref": "query.yaml#/$defs/options" }, {
|
|
1114
|
+
"type": "object",
|
|
1115
|
+
"properties": {
|
|
1116
|
+
"temporal-unit": { "$ref": "temporal_bucketing.yaml#/$defs/datetime_bucketing_unit" },
|
|
1117
|
+
"join-alias": { "type": "string" },
|
|
1118
|
+
"binning": {
|
|
1119
|
+
"type": "object",
|
|
1120
|
+
"required": ["strategy"],
|
|
1121
|
+
"properties": { "strategy": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"enum": [
|
|
1124
|
+
"default",
|
|
1125
|
+
"num-bins",
|
|
1126
|
+
"bin-width"
|
|
1127
|
+
]
|
|
1128
|
+
} },
|
|
1129
|
+
"allOf": [{
|
|
1130
|
+
"if": { "properties": { "strategy": { "const": "bin-width" } } },
|
|
1131
|
+
"then": {
|
|
1132
|
+
"required": ["bin-width"],
|
|
1133
|
+
"properties": { "bin-width": {
|
|
1134
|
+
"type": "number",
|
|
1135
|
+
"exclusiveMinimum": 0
|
|
1136
|
+
} }
|
|
1137
|
+
}
|
|
1138
|
+
}, {
|
|
1139
|
+
"if": { "properties": { "strategy": { "const": "num-bins" } } },
|
|
1140
|
+
"then": {
|
|
1141
|
+
"required": ["num-bins"],
|
|
1142
|
+
"properties": { "num-bins": {
|
|
1143
|
+
"type": "integer",
|
|
1144
|
+
"minimum": 1
|
|
1145
|
+
} }
|
|
1146
|
+
}
|
|
1147
|
+
}]
|
|
1148
|
+
},
|
|
1149
|
+
"source-field": { "$ref": "id.yaml#/$defs/field_id" },
|
|
1150
|
+
"source-field-name": { "type": "string" },
|
|
1151
|
+
"source-field-join-alias": { "type": "string" }
|
|
1152
|
+
}
|
|
1153
|
+
}]
|
|
1154
|
+
},
|
|
1155
|
+
"field_ref": {
|
|
1156
|
+
"description": "[field, options, Field-FK-or-name]",
|
|
1157
|
+
"type": "array",
|
|
1158
|
+
"prefixItems": [
|
|
1159
|
+
{ "const": "field" },
|
|
1160
|
+
{ "$ref": "#/$defs/field_options" },
|
|
1161
|
+
{
|
|
1162
|
+
"if": { "type": "array" },
|
|
1163
|
+
"then": { "$ref": "id.yaml#/$defs/field_id" }
|
|
1164
|
+
}
|
|
1165
|
+
],
|
|
1166
|
+
"minItems": 3,
|
|
1167
|
+
"maxItems": 3
|
|
1168
|
+
},
|
|
1169
|
+
"expression_ref": {
|
|
1170
|
+
"description": "[expression, options, name]",
|
|
1171
|
+
"type": "array",
|
|
1172
|
+
"prefixItems": [
|
|
1173
|
+
{ "const": "expression" },
|
|
1174
|
+
{ "$ref": "query.yaml#/$defs/options" },
|
|
1175
|
+
{ "type": "string" }
|
|
1176
|
+
],
|
|
1177
|
+
"minItems": 3,
|
|
1178
|
+
"maxItems": 3
|
|
1179
|
+
},
|
|
1180
|
+
"aggregation_ref": {
|
|
1181
|
+
"description": "[aggregation, options, uuid] — uuid matches the lib/uuid on the aggregation clause",
|
|
1182
|
+
"type": "array",
|
|
1183
|
+
"prefixItems": [
|
|
1184
|
+
{ "const": "aggregation" },
|
|
1185
|
+
{ "$ref": "query.yaml#/$defs/options" },
|
|
1186
|
+
{
|
|
1187
|
+
"type": "string",
|
|
1188
|
+
"format": "uuid"
|
|
1189
|
+
}
|
|
1190
|
+
],
|
|
1191
|
+
"minItems": 3,
|
|
1192
|
+
"maxItems": 3
|
|
1193
|
+
},
|
|
1194
|
+
"metric_ref": {
|
|
1195
|
+
"description": "[metric, options, entity_id]",
|
|
1196
|
+
"type": "array",
|
|
1197
|
+
"prefixItems": [
|
|
1198
|
+
{ "const": "metric" },
|
|
1199
|
+
{ "$ref": "query.yaml#/$defs/options" },
|
|
1200
|
+
{ "type": "string" }
|
|
1201
|
+
],
|
|
1202
|
+
"minItems": 3,
|
|
1203
|
+
"maxItems": 3
|
|
1204
|
+
},
|
|
1205
|
+
"measure_ref": {
|
|
1206
|
+
"description": "[measure, options, entity_id]",
|
|
1207
|
+
"type": "array",
|
|
1208
|
+
"prefixItems": [
|
|
1209
|
+
{ "const": "measure" },
|
|
1210
|
+
{ "$ref": "query.yaml#/$defs/options" },
|
|
1211
|
+
{ "type": "string" }
|
|
1212
|
+
],
|
|
1213
|
+
"minItems": 3,
|
|
1214
|
+
"maxItems": 3
|
|
1215
|
+
},
|
|
1216
|
+
"segment_ref": {
|
|
1217
|
+
"description": "[segment, options, entity_id]",
|
|
1218
|
+
"type": "array",
|
|
1219
|
+
"prefixItems": [
|
|
1220
|
+
{ "const": "segment" },
|
|
1221
|
+
{ "$ref": "query.yaml#/$defs/options" },
|
|
1222
|
+
{ "type": "string" }
|
|
1223
|
+
],
|
|
1224
|
+
"minItems": 3,
|
|
1225
|
+
"maxItems": 3
|
|
1226
|
+
},
|
|
1227
|
+
"legacy_field_ref": {
|
|
1228
|
+
"description": "[field, Field-FK-or-name, null-or-options] — legacy format used in parameter targets",
|
|
1229
|
+
"type": "array",
|
|
1230
|
+
"prefixItems": [
|
|
1231
|
+
{ "const": "field" },
|
|
1232
|
+
{
|
|
1233
|
+
"if": { "type": "array" },
|
|
1234
|
+
"then": { "$ref": "id.yaml#/$defs/field_id" }
|
|
1235
|
+
},
|
|
1236
|
+
{ "type": ["object", "null"] }
|
|
1237
|
+
],
|
|
1238
|
+
"minItems": 3,
|
|
1239
|
+
"maxItems": 3
|
|
1240
|
+
},
|
|
1241
|
+
"legacy_expression_ref": {
|
|
1242
|
+
"description": "[expression, name] or [expression, name, null-or-options] — legacy format used in parameter targets",
|
|
1243
|
+
"type": "array",
|
|
1244
|
+
"prefixItems": [
|
|
1245
|
+
{ "const": "expression" },
|
|
1246
|
+
{ "type": "string" },
|
|
1247
|
+
{ "type": ["object", "null"] }
|
|
1248
|
+
],
|
|
1249
|
+
"minItems": 2,
|
|
1250
|
+
"maxItems": 3
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
//#endregion
|
|
1255
|
+
//#region src/core/schema/data/schemas/common/temporal_bucketing.json
|
|
1256
|
+
var temporal_bucketing_default = {
|
|
1257
|
+
title: "Temporal Bucketing",
|
|
1258
|
+
description: "Datetime truncation, extraction, and bucketing unit definitions.",
|
|
1259
|
+
$defs: {
|
|
1260
|
+
"datetime_truncation_unit": {
|
|
1261
|
+
"description": "Truncation units — truncate a datetime to a boundary. Also used for intervals and datetime arithmetic.\n",
|
|
1262
|
+
"type": "string",
|
|
1263
|
+
"enum": [
|
|
1264
|
+
"millisecond",
|
|
1265
|
+
"second",
|
|
1266
|
+
"minute",
|
|
1267
|
+
"hour",
|
|
1268
|
+
"day",
|
|
1269
|
+
"week",
|
|
1270
|
+
"month",
|
|
1271
|
+
"quarter",
|
|
1272
|
+
"year"
|
|
1273
|
+
]
|
|
1274
|
+
},
|
|
1275
|
+
"datetime_extraction_unit": {
|
|
1276
|
+
"description": "Extraction units — extract a numeric component from a datetime.\n",
|
|
1277
|
+
"type": "string",
|
|
1278
|
+
"enum": [
|
|
1279
|
+
"second-of-minute",
|
|
1280
|
+
"minute-of-hour",
|
|
1281
|
+
"hour-of-day",
|
|
1282
|
+
"day-of-week",
|
|
1283
|
+
"day-of-week-iso",
|
|
1284
|
+
"day-of-month",
|
|
1285
|
+
"day-of-year",
|
|
1286
|
+
"week-of-year",
|
|
1287
|
+
"week-of-year-iso",
|
|
1288
|
+
"week-of-year-us",
|
|
1289
|
+
"week-of-year-instance",
|
|
1290
|
+
"month-of-year",
|
|
1291
|
+
"quarter-of-year",
|
|
1292
|
+
"year-of-era"
|
|
1293
|
+
]
|
|
1294
|
+
},
|
|
1295
|
+
"datetime_bucketing_unit": {
|
|
1296
|
+
"description": "All datetime units — truncation + extraction + default. Used for field temporal-unit option.\n",
|
|
1297
|
+
"anyOf": [
|
|
1298
|
+
{ "const": "default" },
|
|
1299
|
+
{ "$ref": "#/$defs/datetime_truncation_unit" },
|
|
1300
|
+
{ "$ref": "#/$defs/datetime_extraction_unit" }
|
|
1301
|
+
]
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
//#endregion
|
|
1306
|
+
//#region src/core/schema/validate.ts
|
|
1307
|
+
const ValidationIssue = z.object({
|
|
1308
|
+
path: z.string(),
|
|
1309
|
+
message: z.string()
|
|
1310
|
+
});
|
|
1311
|
+
z.object({
|
|
1312
|
+
ok: z.boolean(),
|
|
1313
|
+
errors: z.array(ValidationIssue)
|
|
1314
|
+
});
|
|
1315
|
+
const POSITIVE_INTEGER = {
|
|
1316
|
+
type: "integer",
|
|
1317
|
+
minimum: 1
|
|
1318
|
+
};
|
|
1319
|
+
const idSchema = {
|
|
1320
|
+
title: "ID",
|
|
1321
|
+
description: "MBQL identifier $defs — every id is a positive integer.",
|
|
1322
|
+
$defs: {
|
|
1323
|
+
entity_id: POSITIVE_INTEGER,
|
|
1324
|
+
user_id: POSITIVE_INTEGER,
|
|
1325
|
+
database_id: POSITIVE_INTEGER,
|
|
1326
|
+
table_id: POSITIVE_INTEGER,
|
|
1327
|
+
field_id: POSITIVE_INTEGER
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
let validator = null;
|
|
1331
|
+
function getValidator() {
|
|
1332
|
+
if (validator !== null) return validator;
|
|
1333
|
+
const ajv = new Ajv2020({
|
|
1334
|
+
allErrors: true,
|
|
1335
|
+
strictTuples: false,
|
|
1336
|
+
allowUnionTypes: true
|
|
1337
|
+
});
|
|
1338
|
+
addFormats(ajv);
|
|
1339
|
+
ajv.addSchema(idSchema, "id.yaml");
|
|
1340
|
+
ajv.addSchema(parameter_default, "parameter.yaml");
|
|
1341
|
+
ajv.addSchema(ref_default, "ref.yaml");
|
|
1342
|
+
ajv.addSchema(temporal_bucketing_default, "temporal_bucketing.yaml");
|
|
1343
|
+
ajv.addSchema(query_default, "query.yaml");
|
|
1344
|
+
const compiled = ajv.getSchema("query.yaml");
|
|
1345
|
+
if (compiled === void 0) throw new Error("internal: query.yaml validator not registered");
|
|
1346
|
+
validator = compiled;
|
|
1347
|
+
return validator;
|
|
1348
|
+
}
|
|
1349
|
+
const UUID_HINT_MESSAGE = "must be a UUID v4 (RFC 4122) — run `mb uuid` (or `mb uuid --count N`) to mint one. The MBQL 5 schema rejects placeholder strings (`a1`, `uuid-1`, etc.); agents must call the CLI for UUIDs rather than authoring them.";
|
|
1350
|
+
const FIELD_SLOT1_HINT_MESSAGE = "must be the field options object — MBQL 5 field refs are [\"field\", {options}, fieldId]; the legacy MBQL 4 shape [\"field\", id, opts] is not accepted here. (Tip: `mb uuid` mints `lib/uuid` strings if you need them.)";
|
|
1351
|
+
function clauseSlot1HintMessage(operator, slot1) {
|
|
1352
|
+
return `must be the clause options object — every MBQL 5 clause is ["${operator}", {options}, ...args]; got ${describeJsonValue(slot1)} at index 1`;
|
|
1353
|
+
}
|
|
1354
|
+
const FormatErrorParams = z.object({ format: z.string() });
|
|
1355
|
+
function isUuidFormatIssue(issue) {
|
|
1356
|
+
if (issue.keyword !== "format") return false;
|
|
1357
|
+
const parsed = FormatErrorParams.safeParse(issue.params);
|
|
1358
|
+
return parsed.success && parsed.data.format === "uuid";
|
|
1359
|
+
}
|
|
1360
|
+
function runValidator(validatorFn, value) {
|
|
1361
|
+
if (validatorFn(value)) return {
|
|
1362
|
+
ok: true,
|
|
1363
|
+
errors: []
|
|
1364
|
+
};
|
|
1365
|
+
const overrides = collectMessageOverrides(value);
|
|
1366
|
+
return {
|
|
1367
|
+
ok: false,
|
|
1368
|
+
errors: (validatorFn.errors ?? []).map((issue) => {
|
|
1369
|
+
if (issue.message === void 0) throw new Error(`Ajv issue at ${issue.instancePath} has no message`);
|
|
1370
|
+
const path = issue.instancePath === "" ? "/" : issue.instancePath;
|
|
1371
|
+
if (isUuidFormatIssue(issue)) return {
|
|
1372
|
+
path,
|
|
1373
|
+
message: UUID_HINT_MESSAGE
|
|
1374
|
+
};
|
|
1375
|
+
return {
|
|
1376
|
+
path,
|
|
1377
|
+
message: overrides.get(path) ?? issue.message
|
|
1378
|
+
};
|
|
1379
|
+
})
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
function collectMessageOverrides(root) {
|
|
1383
|
+
const overrides = /* @__PURE__ */ new Map();
|
|
1384
|
+
visit(root, "");
|
|
1385
|
+
return overrides;
|
|
1386
|
+
function visit(node, path) {
|
|
1387
|
+
if (Array.isArray(node)) {
|
|
1388
|
+
const slot1 = clauseSlot1Message(node);
|
|
1389
|
+
if (slot1 !== null) overrides.set(`${path}/1`, slot1);
|
|
1390
|
+
const slot2 = refSlot2Message(node);
|
|
1391
|
+
if (slot2 !== null) overrides.set(`${path}/2`, slot2);
|
|
1392
|
+
for (let index = 0; index < node.length; index += 1) visit(node[index], `${path}/${index}`);
|
|
1393
|
+
return;
|
|
1394
|
+
}
|
|
1395
|
+
if (!isPlainObject(node)) return;
|
|
1396
|
+
for (const key of Object.keys(node)) visit(node[key], `${path}/${escapeJsonPointerSegment(key)}`);
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
function clauseSlot1Message(clause) {
|
|
1400
|
+
if (clause.length < 2) return null;
|
|
1401
|
+
const operator = clause[0];
|
|
1402
|
+
if (typeof operator !== "string") return null;
|
|
1403
|
+
const slot1 = clause[1];
|
|
1404
|
+
if (isPlainObject(slot1)) return null;
|
|
1405
|
+
if (operator === "field") return FIELD_SLOT1_HINT_MESSAGE;
|
|
1406
|
+
return clauseSlot1HintMessage(operator, slot1);
|
|
1407
|
+
}
|
|
1408
|
+
function refSlot2Message(clause) {
|
|
1409
|
+
if (clause.length !== 3) return null;
|
|
1410
|
+
const kind = clause[0];
|
|
1411
|
+
if (typeof kind !== "string") return null;
|
|
1412
|
+
if (typeof clause[2] === "string") return null;
|
|
1413
|
+
return refHintForKind(kind);
|
|
1414
|
+
}
|
|
1415
|
+
function refHintForKind(kind) {
|
|
1416
|
+
switch (kind) {
|
|
1417
|
+
case "aggregation": return "must be the target aggregation's lib/uuid (string), not a numeric position";
|
|
1418
|
+
case "expression": return "must be the target expression's name (string), not a numeric position";
|
|
1419
|
+
default: return null;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
function describeJsonValue(value) {
|
|
1423
|
+
if (value === null) return "null";
|
|
1424
|
+
if (Array.isArray(value)) return "array";
|
|
1425
|
+
if (typeof value === "string") return `string ${JSON.stringify(value)}`;
|
|
1426
|
+
if (typeof value === "number" || typeof value === "boolean") return `${typeof value} ${String(value)}`;
|
|
1427
|
+
return typeof value;
|
|
1428
|
+
}
|
|
1429
|
+
function validateQuery(value) {
|
|
1430
|
+
return runValidator(getValidator(), value);
|
|
1431
|
+
}
|
|
1432
|
+
function isMbql5Query(value) {
|
|
1433
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
1434
|
+
return "lib/type" in value && value["lib/type"] === "mbql/query";
|
|
1435
|
+
}
|
|
1436
|
+
function isLegacyEnvelopeWrappingMbql5(value) {
|
|
1437
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
1438
|
+
if (!("type" in value) || value["type"] !== "query") return false;
|
|
1439
|
+
if (!("query" in value)) return false;
|
|
1440
|
+
const inner = value["query"];
|
|
1441
|
+
if (typeof inner !== "object" || inner === null || Array.isArray(inner)) return false;
|
|
1442
|
+
return "lib/type" in inner && inner["lib/type"] === "mbql/query";
|
|
1443
|
+
}
|
|
1444
|
+
function assertNotLegacyEnvelopeWrappingMbql5(value, options) {
|
|
1445
|
+
if (!isLegacyEnvelopeWrappingMbql5(value)) return;
|
|
1446
|
+
throw new ConfigError(`${options.contextLabel}: MBQL 5 query nested inside a legacy {type:"query", query:…} envelope. For MBQL 5, ${options.bodyNoun} is the mbql/query value itself: {"lib/type":"mbql/query", database:N, stages:[…]}.`);
|
|
1447
|
+
}
|
|
1448
|
+
z.object({
|
|
1449
|
+
schema: z.unknown(),
|
|
1450
|
+
defs: z.object({
|
|
1451
|
+
"id.yaml": z.unknown(),
|
|
1452
|
+
"parameter.yaml": z.unknown(),
|
|
1453
|
+
"ref.yaml": z.unknown(),
|
|
1454
|
+
"temporal_bucketing.yaml": z.unknown()
|
|
1455
|
+
})
|
|
1456
|
+
});
|
|
1457
|
+
function getQuerySchemaBundle() {
|
|
1458
|
+
return {
|
|
1459
|
+
schema: query_default,
|
|
1460
|
+
defs: {
|
|
1461
|
+
"id.yaml": idSchema,
|
|
1462
|
+
"parameter.yaml": parameter_default,
|
|
1463
|
+
"ref.yaml": ref_default,
|
|
1464
|
+
"temporal_bucketing.yaml": temporal_bucketing_default
|
|
1465
|
+
}
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
//#endregion
|
|
1469
|
+
export { validateQuery as i, getQuerySchemaBundle as n, isMbql5Query as r, assertNotLegacyEnvelopeWrappingMbql5 as t };
|