@malloy-publisher/sdk 0.0.382-dev → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/README.md +115 -95
  2. package/TREE_SHAKING.md +16 -11
  3. package/bunfig.toml +7 -0
  4. package/dist/ServerProvider-Cn_LhKda.cjs.js +1 -0
  5. package/dist/ServerProvider-sfabtriY.es.js +4076 -0
  6. package/dist/client/api.d.ts +3773 -1515
  7. package/dist/client/configuration.d.ts +1 -1
  8. package/dist/client/index.cjs.js +1 -1
  9. package/dist/client/index.d.ts +1 -1
  10. package/dist/client/index.es.js +86 -59
  11. package/dist/components/Connections/EditConnectionDialog.d.ts +2 -1
  12. package/dist/components/Connections/common.d.ts +8 -2
  13. package/dist/components/Dashboard/Dashboard.d.ts +62 -0
  14. package/dist/components/Dashboard/DashboardTile.d.ts +57 -0
  15. package/dist/components/Dashboard/index.d.ts +2 -0
  16. package/dist/components/DataAppViewer/DataAppViewer.d.ts +23 -0
  17. package/dist/components/DataAppViewer/index.d.ts +1 -0
  18. package/dist/components/Environment/Environment.d.ts +6 -0
  19. package/dist/components/Environment/index.d.ts +2 -0
  20. package/dist/components/Home/AddEnvironmentDialog.d.ts +1 -0
  21. package/dist/components/Home/DeleteEnvironmentDialog.d.ts +5 -0
  22. package/dist/components/Home/EditEnvironmentDialog.d.ts +7 -0
  23. package/dist/components/Home/Home.d.ts +2 -2
  24. package/dist/components/Materializations/CreateEnvMaterializationDialog.d.ts +14 -0
  25. package/dist/components/Materializations/CreateMaterializationDialog.d.ts +10 -0
  26. package/dist/components/Materializations/DeleteMaterializationDialog.d.ts +7 -0
  27. package/dist/components/Materializations/EnvironmentMaterializations.d.ts +7 -0
  28. package/dist/components/Materializations/ManifestView.d.ts +13 -0
  29. package/dist/components/Materializations/MaterializationDetailDialog.d.ts +9 -0
  30. package/dist/components/Materializations/MaterializationRunsList.d.ts +15 -0
  31. package/dist/components/Materializations/Materializations.d.ts +7 -0
  32. package/dist/components/Materializations/ScheduleCard.d.ts +20 -0
  33. package/dist/components/Materializations/SectionLabel.d.ts +10 -0
  34. package/dist/components/Materializations/SetScheduleDialog.d.ts +11 -0
  35. package/dist/components/Materializations/TriggerChip.d.ts +10 -0
  36. package/dist/components/Materializations/cron.d.ts +23 -0
  37. package/dist/components/Materializations/index.d.ts +2 -0
  38. package/dist/components/Materializations/utils.d.ts +46 -0
  39. package/dist/components/Notebook/Notebook.d.ts +47 -4
  40. package/dist/components/Notebook/NotebookCell.d.ts +37 -1
  41. package/dist/components/Notebook/runPlan.d.ts +29 -0
  42. package/dist/components/Notebook/types.d.ts +10 -0
  43. package/dist/components/Package/ContentTypeIcon.d.ts +31 -0
  44. package/dist/components/Package/Package.d.ts +1 -4
  45. package/dist/components/RenderedResult/RenderedResult.d.ts +7 -1
  46. package/dist/components/RenderedResult/ResultContainer.d.ts +5 -1
  47. package/dist/components/RenderedResult/renderLogs.d.ts +6 -0
  48. package/dist/components/ResultsDialog.d.ts +6 -1
  49. package/dist/components/ServerProvider.d.ts +28 -4
  50. package/dist/components/click_helper.d.ts +10 -1
  51. package/dist/components/drill/index.d.ts +3 -0
  52. package/dist/components/drill/markDrillableCells.d.ts +55 -0
  53. package/dist/components/drill/resolveDrill.d.ts +139 -0
  54. package/dist/components/drill/useDrill.d.ts +63 -0
  55. package/dist/components/given/GivenInput.d.ts +52 -0
  56. package/dist/components/given/GivensPanel.d.ts +47 -0
  57. package/dist/components/given/filterValue.d.ts +97 -0
  58. package/dist/components/given/index.d.ts +2 -0
  59. package/dist/components/given/paramCodec.d.ts +60 -0
  60. package/dist/components/given/utils.d.ts +17 -0
  61. package/dist/components/highlighter.d.ts +6 -1
  62. package/dist/components/index.d.ts +7 -2
  63. package/dist/components/styles.d.ts +47 -0
  64. package/dist/constants/docLinks.d.ts +12 -0
  65. package/dist/{core-YNpOLuB1.cjs.js → core-CqRKhtoy.cjs.js} +1 -1
  66. package/dist/{core-CjeTkq8O.es.js → core-DyU47reh.es.js} +1 -1
  67. package/dist/github-dark-BKL9xNgN.cjs.js +1 -0
  68. package/dist/github-dark-DenFmJkN.es.js +4 -0
  69. package/dist/hooks/givenValue.d.ts +10 -0
  70. package/dist/hooks/index.d.ts +4 -0
  71. package/dist/hooks/useDimensionFiltersFromSpec.d.ts +3 -3
  72. package/dist/hooks/useDimensionFiltersQuery.d.ts +3 -3
  73. package/dist/hooks/useDimensionalFilterRangeData.d.ts +4 -4
  74. package/dist/hooks/useGivensState.d.ts +64 -0
  75. package/dist/hooks/useModelGivens.d.ts +10 -0
  76. package/dist/hooks/useSuggestOptions.d.ts +78 -0
  77. package/dist/{index-DRDu9kIV.es.js → index-CAkFE4Ol.es.js} +41278 -28504
  78. package/dist/index-DD4b_bt0.cjs.js +356 -0
  79. package/dist/index.cjs.js +1 -1
  80. package/dist/index.d.ts +4 -1
  81. package/dist/index.es.js +79 -48
  82. package/dist/malloy-explorer.css +12 -1
  83. package/dist/sdk.css +1 -1
  84. package/dist/theme/ThemeContext.d.ts +45 -0
  85. package/dist/theme/buildMalloyExplicitTheme.d.ts +34 -0
  86. package/dist/theme/buildTableCssVars.d.ts +41 -0
  87. package/dist/theme/buildVegaThemeOverride.d.ts +16 -0
  88. package/dist/theme/defaults.d.ts +7 -0
  89. package/dist/theme/index.d.ts +8 -0
  90. package/dist/theme/keys.d.ts +20 -0
  91. package/dist/theme/readChartAnnotations.d.ts +23 -0
  92. package/dist/theme/resolveTheme.d.ts +22 -0
  93. package/dist/theme/types.d.ts +70 -0
  94. package/dist/utils/dataAppEmbed.d.ts +44 -0
  95. package/dist/utils/formatting.d.ts +1 -1
  96. package/dist/utils/malloyString.d.ts +7 -0
  97. package/dist/utils/parsing.d.ts +2 -2
  98. package/dist/utils/queryClient.d.ts +5 -0
  99. package/package.json +19 -8
  100. package/src/client-entry.ts +3 -0
  101. package/src/components/AnalyzePackageButton.tsx +9 -3
  102. package/src/components/ApiErrorDisplay.tsx +3 -0
  103. package/src/components/Connections/AddConnectionDialog.tsx +132 -25
  104. package/src/components/Connections/DeleteConnectionDialog.tsx +14 -3
  105. package/src/components/Connections/EditConnectionDialog.tsx +167 -37
  106. package/src/components/Connections/common.ts +94 -3
  107. package/src/components/DOMElement/DOMElement.tsx +3 -0
  108. package/src/components/DOMElement/index.ts +3 -0
  109. package/src/components/Dashboard/Dashboard.spec.tsx +216 -0
  110. package/src/components/Dashboard/Dashboard.tsx +458 -0
  111. package/src/components/Dashboard/DashboardTile.spec.tsx +81 -0
  112. package/src/components/Dashboard/DashboardTile.tsx +199 -0
  113. package/src/components/Dashboard/index.ts +5 -0
  114. package/src/components/Dashboard/tileGridColumn.spec.ts +35 -0
  115. package/src/components/DataAppViewer/DataAppViewer.tsx +214 -0
  116. package/src/components/DataAppViewer/index.ts +4 -0
  117. package/src/components/{Project → Environment}/About.tsx +11 -4
  118. package/src/components/Environment/AddPackageDialog.tsx +202 -0
  119. package/src/components/{Project → Environment}/ConnectionExplorer.tsx +17 -14
  120. package/src/components/Environment/Connections.tsx +391 -0
  121. package/src/components/{Project → Environment}/DeletePackageDialog.tsx +8 -4
  122. package/src/components/{Project → Environment}/EditPackageDialog.tsx +21 -13
  123. package/src/components/Environment/Environment.tsx +89 -0
  124. package/src/components/Environment/Packages.tsx +206 -0
  125. package/src/components/Environment/index.ts +5 -0
  126. package/src/components/Home/{AddProjectDialog.tsx → AddEnvironmentDialog.tsx} +25 -19
  127. package/src/components/Home/{DeleteProjectDialog.tsx → DeleteEnvironmentDialog.tsx} +20 -15
  128. package/src/components/Home/{EditProjectDialog.tsx → EditEnvironmentDialog.tsx} +35 -28
  129. package/src/components/Home/Home.tsx +386 -408
  130. package/src/components/Home/index.ts +3 -0
  131. package/src/components/Loading.tsx +3 -0
  132. package/src/components/Materializations/CreateEnvMaterializationDialog.tsx +179 -0
  133. package/src/components/Materializations/CreateMaterializationDialog.tsx +112 -0
  134. package/src/components/Materializations/DeleteMaterializationDialog.tsx +109 -0
  135. package/src/components/Materializations/EnvironmentMaterializations.tsx +267 -0
  136. package/src/components/Materializations/ManifestView.tsx +87 -0
  137. package/src/components/Materializations/MaterializationDetailDialog.tsx +259 -0
  138. package/src/components/Materializations/MaterializationRunsList.tsx +256 -0
  139. package/src/components/Materializations/Materializations.tsx +355 -0
  140. package/src/components/Materializations/ScheduleCard.tsx +231 -0
  141. package/src/components/Materializations/SectionLabel.tsx +30 -0
  142. package/src/components/Materializations/SetScheduleDialog.tsx +162 -0
  143. package/src/components/Materializations/TriggerChip.tsx +44 -0
  144. package/src/components/Materializations/cron.ts +124 -0
  145. package/src/components/Materializations/index.ts +5 -0
  146. package/src/components/Materializations/utils.ts +145 -0
  147. package/src/components/Model/Model.tsx +44 -2
  148. package/src/components/Model/ModelCell.tsx +14 -5
  149. package/src/components/Model/ModelExplorer.tsx +3 -0
  150. package/src/components/Model/ModelExplorerDialog.tsx +4 -1
  151. package/src/components/Model/SourcesExplorer.tsx +9 -6
  152. package/src/components/Model/index.ts +3 -0
  153. package/src/components/Model/useModelData.ts +6 -3
  154. package/src/components/Notebook/Notebook.spec.tsx +88 -0
  155. package/src/components/Notebook/Notebook.tsx +476 -339
  156. package/src/components/Notebook/NotebookCell.tsx +264 -25
  157. package/src/components/Notebook/index.ts +3 -0
  158. package/src/components/Notebook/runPlan.spec.ts +155 -0
  159. package/src/components/Notebook/runPlan.ts +67 -0
  160. package/src/components/Notebook/types.ts +14 -0
  161. package/src/components/Package/ContentTypeIcon.spec.ts +91 -0
  162. package/src/components/Package/ContentTypeIcon.tsx +177 -0
  163. package/src/components/Package/FileTreeView.tsx +3 -0
  164. package/src/components/Package/Models.tsx +7 -4
  165. package/src/components/Package/Package.spec.tsx +113 -0
  166. package/src/components/Package/Package.tsx +692 -59
  167. package/src/components/Package/index.ts +3 -0
  168. package/src/components/QueryResult/QueryResult.tsx +17 -8
  169. package/src/components/QueryResult/index.ts +3 -0
  170. package/src/components/RenderedResult/RenderedResult.tsx +725 -67
  171. package/src/components/RenderedResult/ResultContainer.tsx +71 -2
  172. package/src/components/RenderedResult/index.ts +3 -0
  173. package/src/components/RenderedResult/renderLogs.spec.ts +58 -0
  174. package/src/components/RenderedResult/renderLogs.ts +43 -0
  175. package/src/components/ResultsDialog.tsx +13 -1
  176. package/src/components/ServerProvider.tsx +175 -51
  177. package/src/components/Workbook/BrowserWorkbookStorage.ts +3 -0
  178. package/src/components/Workbook/EditableMalloyCell.tsx +3 -0
  179. package/src/components/Workbook/ModelPicker.tsx +7 -4
  180. package/src/components/Workbook/MutableCell.tsx +10 -5
  181. package/src/components/Workbook/Workbook.tsx +8 -5
  182. package/src/components/Workbook/WorkbookList.tsx +3 -0
  183. package/src/components/Workbook/WorkbookManager.ts +3 -0
  184. package/src/components/Workbook/WorkbookStorage.ts +3 -0
  185. package/src/components/Workbook/WorkbookStorageProvider.tsx +3 -0
  186. package/src/components/Workbook/index.ts +3 -0
  187. package/src/components/click_helper.ts +17 -1
  188. package/src/components/drill/index.ts +28 -0
  189. package/src/components/drill/markDrillableCells.dom.spec.ts +313 -0
  190. package/src/components/drill/markDrillableCells.spec.ts +109 -0
  191. package/src/components/drill/markDrillableCells.ts +314 -0
  192. package/src/components/drill/resolveDrill.spec.ts +449 -0
  193. package/src/components/drill/resolveDrill.ts +375 -0
  194. package/src/components/drill/useDrill.tsx +203 -0
  195. package/src/components/filter/DimensionFilter.tsx +3 -0
  196. package/src/components/filter/index.ts +3 -0
  197. package/src/components/filter/utils.ts +16 -5
  198. package/src/components/given/GivenInput.spec.tsx +689 -0
  199. package/src/components/given/GivenInput.tsx +801 -0
  200. package/src/components/given/GivensPanel.spec.tsx +175 -0
  201. package/src/components/given/GivensPanel.tsx +195 -0
  202. package/src/components/given/filterValue.spec.ts +364 -0
  203. package/src/components/given/filterValue.ts +207 -0
  204. package/src/components/given/index.ts +9 -0
  205. package/src/components/given/paramCodec.spec.ts +857 -0
  206. package/src/components/given/paramCodec.ts +483 -0
  207. package/src/components/given/utils.spec.ts +60 -0
  208. package/src/components/given/utils.ts +79 -0
  209. package/src/components/highlighter.ts +22 -5
  210. package/src/components/index.ts +10 -2
  211. package/src/components/styles.ts +82 -33
  212. package/src/constants/docLinks.spec.ts +54 -0
  213. package/src/constants/docLinks.ts +46 -0
  214. package/src/hooks/givenValue.ts +13 -0
  215. package/src/hooks/index.ts +13 -0
  216. package/src/hooks/useDimensionFilters.ts +4 -7
  217. package/src/hooks/useDimensionFiltersFromSpec.ts +8 -5
  218. package/src/hooks/useDimensionFiltersQuery.ts +10 -13
  219. package/src/hooks/useDimensionalFilterRangeData.ts +11 -14
  220. package/src/hooks/useGivensState.spec.ts +449 -0
  221. package/src/hooks/useGivensState.ts +340 -0
  222. package/src/hooks/useModelGivens.ts +29 -0
  223. package/src/hooks/useQueryWithApiError.ts +3 -0
  224. package/src/hooks/useRawQueryData.ts +6 -3
  225. package/src/hooks/useSuggestOptions.dom.spec.ts +91 -0
  226. package/src/hooks/useSuggestOptions.spec.ts +112 -0
  227. package/src/hooks/useSuggestOptions.ts +268 -0
  228. package/src/index.ts +10 -1
  229. package/src/react-app-env.d.ts +3 -0
  230. package/src/theme/ThemeContext.tsx +86 -0
  231. package/src/theme/buildMalloyExplicitTheme.ts +61 -0
  232. package/src/theme/buildTableCssVars.spec.ts +86 -0
  233. package/src/theme/buildTableCssVars.ts +98 -0
  234. package/src/theme/buildVegaThemeOverride.spec.ts +56 -0
  235. package/src/theme/buildVegaThemeOverride.ts +47 -0
  236. package/src/theme/defaults.ts +78 -0
  237. package/src/theme/index.ts +11 -0
  238. package/src/theme/keys.ts +32 -0
  239. package/src/theme/readChartAnnotations.spec.ts +58 -0
  240. package/src/theme/readChartAnnotations.ts +69 -0
  241. package/src/theme/resolveTheme.spec.ts +160 -0
  242. package/src/theme/resolveTheme.ts +121 -0
  243. package/src/theme/types.ts +79 -0
  244. package/src/utils/dataAppEmbed.spec.ts +63 -0
  245. package/src/utils/dataAppEmbed.ts +84 -0
  246. package/src/utils/formatting.spec.ts +25 -21
  247. package/src/utils/formatting.ts +11 -7
  248. package/src/utils/malloyString.spec.ts +24 -0
  249. package/src/utils/malloyString.ts +12 -0
  250. package/src/utils/parsing.spec.ts +26 -19
  251. package/src/utils/parsing.ts +11 -6
  252. package/src/utils/queryClient.ts +17 -0
  253. package/test/README.md +185 -0
  254. package/test/serverProvider.tsx +72 -0
  255. package/test/setup.ts +29 -0
  256. package/tsconfig.json +12 -1
  257. package/tsconfig.spec.json +22 -0
  258. package/vite.config.ts +3 -0
  259. package/dist/ServerProvider-lOQXDlqB.cjs.js +0 -1
  260. package/dist/ServerProvider-on-8FH5Z.es.js +0 -3060
  261. package/dist/components/Home/AddProjectDialog.d.ts +0 -1
  262. package/dist/components/Home/DeleteProjectDialog.d.ts +0 -5
  263. package/dist/components/Home/EditProjectDialog.d.ts +0 -7
  264. package/dist/components/Package/Config.d.ts +0 -5
  265. package/dist/components/Package/Databases.d.ts +0 -5
  266. package/dist/components/Package/Notebooks.d.ts +0 -6
  267. package/dist/components/Project/Project.d.ts +0 -6
  268. package/dist/components/Project/index.d.ts +0 -2
  269. package/dist/index-BOLBP6_i.cjs.js +0 -233
  270. package/src/components/Package/Config.tsx +0 -97
  271. package/src/components/Package/Connections.tsx +0 -373
  272. package/src/components/Package/Databases.tsx +0 -228
  273. package/src/components/Package/Notebooks.tsx +0 -77
  274. package/src/components/Project/AddPackageDialog.tsx +0 -159
  275. package/src/components/Project/Packages.tsx +0 -191
  276. package/src/components/Project/Project.tsx +0 -52
  277. package/src/components/Project/index.ts +0 -2
  278. /package/dist/components/{Project → Environment}/About.d.ts +0 -0
  279. /package/dist/components/{Project → Environment}/AddPackageDialog.d.ts +0 -0
  280. /package/dist/components/{Project → Environment}/ConnectionExplorer.d.ts +0 -0
  281. /package/dist/components/{Package → Environment}/Connections.d.ts +0 -0
  282. /package/dist/components/{Project → Environment}/DeletePackageDialog.d.ts +0 -0
  283. /package/dist/components/{Project → Environment}/EditPackageDialog.d.ts +0 -0
  284. /package/dist/components/{Project → Environment}/Packages.d.ts +0 -0
@@ -0,0 +1,4076 @@
1
+ import { jsx as F } from "react/jsx-runtime";
2
+ import { QueryClient as ce, QueryClientProvider as ie, useQuery as de } from "@tanstack/react-query";
3
+ import h from "axios";
4
+ import { useMemo as f, createContext as G, useContext as Y, useState as _, useEffect as pe, useCallback as me } from "react";
5
+ import { styled as y, Card as J, CardContent as K, CardMedia as he } from "@mui/material";
6
+ const u = "http://localhost/api/v0".replace(/\/+$/, "");
7
+ class I {
8
+ constructor(n, e = u, t = h) {
9
+ this.basePath = e, this.axios = t, n && (this.configuration = n, this.basePath = n.basePath ?? e);
10
+ }
11
+ configuration;
12
+ }
13
+ class ue extends Error {
14
+ constructor(n, e) {
15
+ super(e), this.field = n, this.name = "RequiredError";
16
+ }
17
+ }
18
+ const g = {}, b = "https://example.com", m = function(l, n, e) {
19
+ if (e == null)
20
+ throw new ue(n, `Required parameter ${n} was null or undefined when calling ${l}.`);
21
+ };
22
+ function q(l, n, e = "") {
23
+ n != null && (typeof n == "object" ? Array.isArray(n) ? n.forEach((t) => q(l, t, e)) : Object.keys(n).forEach(
24
+ (t) => q(l, n[t], `${e}${e !== "" ? "." : ""}${t}`)
25
+ ) : l.has(e) ? l.append(e, n) : l.set(e, n));
26
+ }
27
+ const P = function(l, ...n) {
28
+ const e = new URLSearchParams(l.search);
29
+ q(e, n), l.search = e.toString();
30
+ }, k = function(l, n, e) {
31
+ const t = typeof l != "string";
32
+ return (t && e && e.isJsonMime ? e.isJsonMime(n.headers["Content-Type"]) : t) ? JSON.stringify(l !== void 0 ? l : {}) : l || "";
33
+ }, v = function(l) {
34
+ return l.pathname + l.search + l.hash;
35
+ }, V = function(l, n, e, t) {
36
+ return (a = n, r = e) => {
37
+ const o = { ...l.options, url: (a.defaults.baseURL ? "" : t?.basePath ?? r) + l.url };
38
+ return a.request(o);
39
+ };
40
+ }, aa = {
41
+ Bigquery: "bigquery",
42
+ Snowflake: "snowflake",
43
+ Postgres: "postgres",
44
+ Gcs: "gcs",
45
+ S3: "s3",
46
+ Azure: "azure"
47
+ }, ta = {
48
+ ServicePrincipal: "service_principal",
49
+ SasToken: "sas_token"
50
+ }, ra = {
51
+ Error: "error",
52
+ Warn: "warn",
53
+ Debug: "debug"
54
+ }, na = {
55
+ Append: "append",
56
+ File: "file",
57
+ Package: "package"
58
+ }, oa = {
59
+ Success: "success",
60
+ Error: "error"
61
+ }, sa = {
62
+ Postgres: "postgres",
63
+ Bigquery: "bigquery",
64
+ Snowflake: "snowflake",
65
+ Trino: "trino",
66
+ Databricks: "databricks",
67
+ Mysql: "mysql",
68
+ Duckdb: "duckdb",
69
+ Motherduck: "motherduck",
70
+ Ducklake: "ducklake",
71
+ Publisher: "publisher"
72
+ }, la = {
73
+ Ssh: "ssh"
74
+ }, ca = {
75
+ Ok: "ok",
76
+ Failed: "failed"
77
+ }, ia = {
78
+ Viewport: "viewport"
79
+ }, da = {
80
+ Embedded: "embedded",
81
+ Materialized: "materialized"
82
+ }, pa = {
83
+ Equal: "equal",
84
+ In: "in",
85
+ Like: "like",
86
+ GreaterThan: "greater_than",
87
+ LessThan: "less_than"
88
+ }, ma = {
89
+ Live: "live",
90
+ StaleOk: "stale_ok",
91
+ Fail: "fail"
92
+ }, ha = {
93
+ Select: "select",
94
+ Multiselect: "multiselect"
95
+ }, ua = {
96
+ Merge: "merge",
97
+ RangeReplace: "range_replace"
98
+ }, ga = {
99
+ Debug: "debug",
100
+ Info: "info",
101
+ Warn: "warn",
102
+ Error: "error"
103
+ }, ba = {
104
+ Persist: "persist",
105
+ Preaggregate: "preaggregate"
106
+ }, Pa = {
107
+ Live: "live",
108
+ StaleOk: "stale_ok",
109
+ Fail: "fail"
110
+ }, va = {
111
+ Delta: "delta",
112
+ Full: "full",
113
+ None: "none"
114
+ }, Va = {
115
+ Pending: "PENDING",
116
+ ManifestRowsReady: "MANIFEST_ROWS_READY",
117
+ ManifestFileReady: "MANIFEST_FILE_READY",
118
+ Failed: "FAILED",
119
+ Cancelled: "CANCELLED"
120
+ }, Oa = {
121
+ Markdown: "markdown",
122
+ Code: "code"
123
+ }, Sa = {
124
+ Markdown: "markdown",
125
+ Code: "code"
126
+ }, ka = {
127
+ Version: "version",
128
+ Package: "package"
129
+ }, ya = {
130
+ Declared: "declared",
131
+ All: "all"
132
+ }, Ca = {
133
+ Unbound: "unbound",
134
+ Bound: "bound",
135
+ LiveFallback: "live_fallback"
136
+ }, Ia = {
137
+ Error: "error",
138
+ Warn: "warn"
139
+ }, xa = {
140
+ Persist: "persist",
141
+ Preaggregate: "preaggregate"
142
+ }, Aa = {
143
+ Disable: "disable",
144
+ NoVerify: "no-verify",
145
+ VerifyCa: "verify-ca",
146
+ VerifyFull: "verify-full"
147
+ }, Ra = {
148
+ Interactive: "interactive",
149
+ Materialize: "materialize",
150
+ Index: "index",
151
+ Ops: "ops"
152
+ }, Na = {
153
+ Query: "query",
154
+ ServerDefault: "server_default"
155
+ }, Ta = {
156
+ Storage: "storage",
157
+ LiveFallback: "live_fallback"
158
+ }, Ua = {
159
+ Snapshot: "SNAPSHOT",
160
+ Copy: "COPY"
161
+ }, wa = {
162
+ Storage: "storage",
163
+ Colocated: "colocated",
164
+ Preaggregate: "preaggregate"
165
+ }, Ea = {
166
+ FreeParameter: "free_parameter",
167
+ Given: "given",
168
+ Authorize: "authorize",
169
+ NotDuckdbPortable: "not_duckdb_portable",
170
+ PublicSurfaceUnknown: "public_surface_unknown"
171
+ }, Ma = {
172
+ Publish: "publish",
173
+ OnDemand: "on_demand",
174
+ Scheduler: "scheduler"
175
+ }, fa = {
176
+ Config: "config",
177
+ CredentialChain: "credential_chain"
178
+ }, Ba = {
179
+ Initializing: "initializing",
180
+ Serving: "serving",
181
+ Draining: "draining",
182
+ Throttled: "throttled"
183
+ }, Fa = {
184
+ Light: "light",
185
+ Dark: "dark",
186
+ Auto: "auto"
187
+ }, ge = function(l) {
188
+ return {
189
+ /**
190
+ * Creates a new database connection in the specified environment.
191
+ * @summary Create a new database connection
192
+ * @param {string} environmentName Name of the environment
193
+ * @param {string} connectionName Name of the connection
194
+ * @param {Connection} connection
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ createConnection: async (n, e, t, a = {}) => {
199
+ m("createConnection", "environmentName", n), m("createConnection", "connectionName", e), m("createConnection", "connection", t);
200
+ const r = "/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), o = new URL(r, b);
201
+ let s;
202
+ l && (s = l.baseOptions);
203
+ const c = { method: "POST", ...s, ...a }, i = {}, d = {};
204
+ i["Content-Type"] = "application/json", P(o, d);
205
+ let p = s && s.headers ? s.headers : {};
206
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
207
+ url: v(o),
208
+ options: c
209
+ };
210
+ },
211
+ /**
212
+ * Permanently deletes a database connection from the environment.
213
+ * @summary Delete a database connection
214
+ * @param {string} environmentName Name of the environment
215
+ * @param {string} connectionName Name of the connection to delete
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ */
219
+ deleteConnection: async (n, e, t = {}) => {
220
+ m("deleteConnection", "environmentName", n), m("deleteConnection", "connectionName", e);
221
+ const a = "/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), r = new URL(a, b);
222
+ let o;
223
+ l && (o = l.baseOptions);
224
+ const s = { method: "DELETE", ...o, ...t }, c = {};
225
+ P(r, {});
226
+ let d = o && o.headers ? o.headers : {};
227
+ return s.headers = { ...c, ...d, ...t.headers }, {
228
+ url: v(r),
229
+ options: s
230
+ };
231
+ },
232
+ /**
233
+ * Retrieves detailed information about a specific database connection within an environment. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
234
+ * @summary Get connection details
235
+ * @param {string} environmentName Name of the environment
236
+ * @param {string} connectionName Name of the connection
237
+ * @param {*} [options] Override http request option.
238
+ * @throws {RequiredError}
239
+ */
240
+ getConnection: async (n, e, t = {}) => {
241
+ m("getConnection", "environmentName", n), m("getConnection", "connectionName", e);
242
+ const a = "/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), r = new URL(a, b);
243
+ let o;
244
+ l && (o = l.baseOptions);
245
+ const s = { method: "GET", ...o, ...t }, c = {};
246
+ P(r, {});
247
+ let d = o && o.headers ? o.headers : {};
248
+ return s.headers = { ...c, ...d, ...t.headers }, {
249
+ url: v(r),
250
+ options: s
251
+ };
252
+ },
253
+ /**
254
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
255
+ * @summary Get table details from database
256
+ * @param {string} environmentName Name of the environment
257
+ * @param {string} connectionName Name of the connection
258
+ * @param {string} schemaName Name of the schema
259
+ * @param {string} tablePath Full path to the table
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ getTable: async (n, e, t, a, r = {}) => {
264
+ m("getTable", "environmentName", n), m("getTable", "connectionName", e), m("getTable", "schemaName", t), m("getTable", "tablePath", a);
265
+ const o = "/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))).replace("{schemaName}", encodeURIComponent(String(t))).replace("{tablePath}", encodeURIComponent(String(a))), s = new URL(o, b);
266
+ let c;
267
+ l && (c = l.baseOptions);
268
+ const i = { method: "GET", ...c, ...r }, d = {};
269
+ P(s, {});
270
+ let O = c && c.headers ? c.headers : {};
271
+ return i.headers = { ...d, ...O, ...r.headers }, {
272
+ url: v(s),
273
+ options: i
274
+ };
275
+ },
276
+ /**
277
+ * Retrieves a table from the specified database schema, resolved in the context of the named package.
278
+ * @summary Get table details from database (per-package)
279
+ * @param {string} environmentName Name of the environment
280
+ * @param {string} packageName Name of the package whose connection context to use
281
+ * @param {string} connectionName Name of the connection
282
+ * @param {string} schemaName Name of the schema
283
+ * @param {string} tablePath Full path to the table
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ */
287
+ getTableInPackage: async (n, e, t, a, r, o = {}) => {
288
+ m("getTableInPackage", "environmentName", n), m("getTableInPackage", "packageName", e), m("getTableInPackage", "connectionName", t), m("getTableInPackage", "schemaName", a), m("getTableInPackage", "tablePath", r);
289
+ const s = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{connectionName}", encodeURIComponent(String(t))).replace("{schemaName}", encodeURIComponent(String(a))).replace("{tablePath}", encodeURIComponent(String(r))), c = new URL(s, b);
290
+ let i;
291
+ l && (i = l.baseOptions);
292
+ const d = { method: "GET", ...i, ...o }, p = {};
293
+ P(c, {});
294
+ let C = i && i.headers ? i.headers : {};
295
+ return d.headers = { ...p, ...C, ...o.headers }, {
296
+ url: v(c),
297
+ options: d
298
+ };
299
+ },
300
+ /**
301
+ * Retrieves a list of all database connections configured for the specified environment. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within an environment.
302
+ * @summary List environment database connections
303
+ * @param {string} environmentName Name of the environment
304
+ * @param {*} [options] Override http request option.
305
+ * @throws {RequiredError}
306
+ */
307
+ listConnections: async (n, e = {}) => {
308
+ m("listConnections", "environmentName", n);
309
+ const t = "/environments/{environmentName}/connections".replace("{environmentName}", encodeURIComponent(String(n))), a = new URL(t, b);
310
+ let r;
311
+ l && (r = l.baseOptions);
312
+ const o = { method: "GET", ...r, ...e }, s = {};
313
+ P(a, {});
314
+ let i = r && r.headers ? r.headers : {};
315
+ return o.headers = { ...s, ...i, ...e.headers }, {
316
+ url: v(a),
317
+ options: o
318
+ };
319
+ },
320
+ /**
321
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
322
+ * @summary List database schemas
323
+ * @param {string} environmentName Name of the environment
324
+ * @param {string} connectionName Name of the connection
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ listSchemas: async (n, e, t = {}) => {
329
+ m("listSchemas", "environmentName", n), m("listSchemas", "connectionName", e);
330
+ const a = "/environments/{environmentName}/connections/{connectionName}/schemas".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), r = new URL(a, b);
331
+ let o;
332
+ l && (o = l.baseOptions);
333
+ const s = { method: "GET", ...o, ...t }, c = {};
334
+ P(r, {});
335
+ let d = o && o.headers ? o.headers : {};
336
+ return s.headers = { ...c, ...d, ...t.headers }, {
337
+ url: v(r),
338
+ options: s
339
+ };
340
+ },
341
+ /**
342
+ * Retrieves a list of all schemas (databases) available in the specified connection, resolved in the context of the named package. Required for `connectionName=\"duckdb\"`, which is per-package; works for any other connection name as well (resolution falls through to the environment).
343
+ * @summary List database schemas (per-package)
344
+ * @param {string} environmentName Name of the environment
345
+ * @param {string} packageName Name of the package whose connection context to use
346
+ * @param {string} connectionName Name of the connection
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ */
350
+ listSchemasInPackage: async (n, e, t, a = {}) => {
351
+ m("listSchemasInPackage", "environmentName", n), m("listSchemasInPackage", "packageName", e), m("listSchemasInPackage", "connectionName", t);
352
+ const r = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{connectionName}", encodeURIComponent(String(t))), o = new URL(r, b);
353
+ let s;
354
+ l && (s = l.baseOptions);
355
+ const c = { method: "GET", ...s, ...a }, i = {};
356
+ P(o, {});
357
+ let p = s && s.headers ? s.headers : {};
358
+ return c.headers = { ...i, ...p, ...a.headers }, {
359
+ url: v(o),
360
+ options: c
361
+ };
362
+ },
363
+ /**
364
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
365
+ * @summary List tables in database
366
+ * @param {string} environmentName Name of the environment
367
+ * @param {string} connectionName Name of the connection
368
+ * @param {string} schemaName Name of the schema
369
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ */
373
+ listTables: async (n, e, t, a, r = {}) => {
374
+ m("listTables", "environmentName", n), m("listTables", "connectionName", e), m("listTables", "schemaName", t);
375
+ const o = "/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))).replace("{schemaName}", encodeURIComponent(String(t))), s = new URL(o, b);
376
+ let c;
377
+ l && (c = l.baseOptions);
378
+ const i = { method: "GET", ...c, ...r }, d = {}, p = {};
379
+ a && (p.tableNames = a), P(s, p);
380
+ let O = c && c.headers ? c.headers : {};
381
+ return i.headers = { ...d, ...O, ...r.headers }, {
382
+ url: v(s),
383
+ options: i
384
+ };
385
+ },
386
+ /**
387
+ * Retrieves a list of all tables and views available in the specified database schema, resolved in the context of the named package.
388
+ * @summary List tables in database (per-package)
389
+ * @param {string} environmentName Name of the environment
390
+ * @param {string} packageName Name of the package whose connection context to use
391
+ * @param {string} connectionName Name of the connection
392
+ * @param {string} schemaName Name of the schema
393
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ listTablesInPackage: async (n, e, t, a, r, o = {}) => {
398
+ m("listTablesInPackage", "environmentName", n), m("listTablesInPackage", "packageName", e), m("listTablesInPackage", "connectionName", t), m("listTablesInPackage", "schemaName", a);
399
+ const s = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{connectionName}", encodeURIComponent(String(t))).replace("{schemaName}", encodeURIComponent(String(a))), c = new URL(s, b);
400
+ let i;
401
+ l && (i = l.baseOptions);
402
+ const d = { method: "GET", ...i, ...o }, p = {}, O = {};
403
+ r && (O.tableNames = r), P(c, O);
404
+ let C = i && i.headers ? i.headers : {};
405
+ return d.headers = { ...p, ...C, ...o.headers }, {
406
+ url: v(c),
407
+ options: d
408
+ };
409
+ },
410
+ /**
411
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
412
+ * @summary Execute SQL query
413
+ * @param {string} environmentName Name of the environment
414
+ * @param {string} connectionName Name of the connection
415
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ postQuerydata: async (n, e, t, a = {}) => {
420
+ m("postQuerydata", "environmentName", n), m("postQuerydata", "connectionName", e), m("postQuerydata", "postQuerydataRequest", t);
421
+ const r = "/environments/{environmentName}/connections/{connectionName}/sqlQuery".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), o = new URL(r, b);
422
+ let s;
423
+ l && (s = l.baseOptions);
424
+ const c = { method: "POST", ...s, ...a }, i = {}, d = {};
425
+ i["Content-Type"] = "application/json", P(o, d);
426
+ let p = s && s.headers ? s.headers : {};
427
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
428
+ url: v(o),
429
+ options: c
430
+ };
431
+ },
432
+ /**
433
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
434
+ * @summary Execute SQL query (per-package)
435
+ * @param {string} environmentName Name of the environment
436
+ * @param {string} packageName Name of the package whose connection context to use
437
+ * @param {string} connectionName Name of the connection
438
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ */
442
+ postQuerydataInPackage: async (n, e, t, a, r = {}) => {
443
+ m("postQuerydataInPackage", "environmentName", n), m("postQuerydataInPackage", "packageName", e), m("postQuerydataInPackage", "connectionName", t), m("postQuerydataInPackage", "postQuerydataRequest", a);
444
+ const o = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlQuery".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{connectionName}", encodeURIComponent(String(t))), s = new URL(o, b);
445
+ let c;
446
+ l && (c = l.baseOptions);
447
+ const i = { method: "POST", ...c, ...r }, d = {}, p = {};
448
+ d["Content-Type"] = "application/json", P(s, p);
449
+ let O = c && c.headers ? c.headers : {};
450
+ return i.headers = { ...d, ...O, ...r.headers }, i.data = k(a, i, l), {
451
+ url: v(s),
452
+ options: i
453
+ };
454
+ },
455
+ /**
456
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
457
+ * @summary Create SQL source from statement
458
+ * @param {string} environmentName Name of the environment
459
+ * @param {string} connectionName Name of the connection
460
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ postSqlsource: async (n, e, t, a = {}) => {
465
+ m("postSqlsource", "environmentName", n), m("postSqlsource", "connectionName", e), m("postSqlsource", "postSqlsourceRequest", t);
466
+ const r = "/environments/{environmentName}/connections/{connectionName}/sqlSource".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), o = new URL(r, b);
467
+ let s;
468
+ l && (s = l.baseOptions);
469
+ const c = { method: "POST", ...s, ...a }, i = {}, d = {};
470
+ i["Content-Type"] = "application/json", P(o, d);
471
+ let p = s && s.headers ? s.headers : {};
472
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
473
+ url: v(o),
474
+ options: c
475
+ };
476
+ },
477
+ /**
478
+ * Creates a Malloy source from a SQL statement using the specified connection, resolved in the context of the named package.
479
+ * @summary Create SQL source from statement (per-package)
480
+ * @param {string} environmentName Name of the environment
481
+ * @param {string} packageName Name of the package whose connection context to use
482
+ * @param {string} connectionName Name of the connection
483
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ */
487
+ postSqlsourceInPackage: async (n, e, t, a, r = {}) => {
488
+ m("postSqlsourceInPackage", "environmentName", n), m("postSqlsourceInPackage", "packageName", e), m("postSqlsourceInPackage", "connectionName", t), m("postSqlsourceInPackage", "postSqlsourceRequest", a);
489
+ const o = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlSource".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{connectionName}", encodeURIComponent(String(t))), s = new URL(o, b);
490
+ let c;
491
+ l && (c = l.baseOptions);
492
+ const i = { method: "POST", ...c, ...r }, d = {}, p = {};
493
+ d["Content-Type"] = "application/json", P(s, p);
494
+ let O = c && c.headers ? c.headers : {};
495
+ return i.headers = { ...d, ...O, ...r.headers }, i.data = k(a, i, l), {
496
+ url: v(s),
497
+ options: i
498
+ };
499
+ },
500
+ /**
501
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
502
+ * @summary Create temporary table
503
+ * @param {string} environmentName Name of the environment
504
+ * @param {string} connectionName Name of the connection
505
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
506
+ * @param {*} [options] Override http request option.
507
+ * @throws {RequiredError}
508
+ */
509
+ postTemporarytable: async (n, e, t, a = {}) => {
510
+ m("postTemporarytable", "environmentName", n), m("postTemporarytable", "connectionName", e), m("postTemporarytable", "postSqlsourceRequest", t);
511
+ const r = "/environments/{environmentName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), o = new URL(r, b);
512
+ let s;
513
+ l && (s = l.baseOptions);
514
+ const c = { method: "POST", ...s, ...a }, i = {}, d = {};
515
+ i["Content-Type"] = "application/json", P(o, d);
516
+ let p = s && s.headers ? s.headers : {};
517
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
518
+ url: v(o),
519
+ options: c
520
+ };
521
+ },
522
+ /**
523
+ * Creates a temporary table from a SQL statement using the specified database connection, resolved in the context of the named package.
524
+ * @summary Create temporary table (per-package)
525
+ * @param {string} environmentName Name of the environment
526
+ * @param {string} packageName Name of the package whose connection context to use
527
+ * @param {string} connectionName Name of the connection
528
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
529
+ * @param {*} [options] Override http request option.
530
+ * @throws {RequiredError}
531
+ */
532
+ postTemporarytableInPackage: async (n, e, t, a, r = {}) => {
533
+ m("postTemporarytableInPackage", "environmentName", n), m("postTemporarytableInPackage", "packageName", e), m("postTemporarytableInPackage", "connectionName", t), m("postTemporarytableInPackage", "postSqlsourceRequest", a);
534
+ const o = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{connectionName}", encodeURIComponent(String(t))), s = new URL(o, b);
535
+ let c;
536
+ l && (c = l.baseOptions);
537
+ const i = { method: "POST", ...c, ...r }, d = {}, p = {};
538
+ d["Content-Type"] = "application/json", P(s, p);
539
+ let O = c && c.headers ? c.headers : {};
540
+ return i.headers = { ...d, ...O, ...r.headers }, i.data = k(a, i, l), {
541
+ url: v(s),
542
+ options: i
543
+ };
544
+ },
545
+ /**
546
+ * Updates the configuration of an existing database connection.
547
+ * @summary Update an existing database connection
548
+ * @param {string} environmentName Name of the environment
549
+ * @param {string} connectionName Name of the connection to update
550
+ * @param {UpdateConnectionRequest} updateConnectionRequest
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ updateConnection: async (n, e, t, a = {}) => {
555
+ m("updateConnection", "environmentName", n), m("updateConnection", "connectionName", e), m("updateConnection", "updateConnectionRequest", t);
556
+ const r = "/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{connectionName}", encodeURIComponent(String(e))), o = new URL(r, b);
557
+ let s;
558
+ l && (s = l.baseOptions);
559
+ const c = { method: "PATCH", ...s, ...a }, i = {}, d = {};
560
+ i["Content-Type"] = "application/json", P(o, d);
561
+ let p = s && s.headers ? s.headers : {};
562
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
563
+ url: v(o),
564
+ options: c
565
+ };
566
+ }
567
+ };
568
+ }, S = function(l) {
569
+ const n = ge(l);
570
+ return {
571
+ /**
572
+ * Creates a new database connection in the specified environment.
573
+ * @summary Create a new database connection
574
+ * @param {string} environmentName Name of the environment
575
+ * @param {string} connectionName Name of the connection
576
+ * @param {Connection} connection
577
+ * @param {*} [options] Override http request option.
578
+ * @throws {RequiredError}
579
+ */
580
+ async createConnection(e, t, a, r) {
581
+ const o = await n.createConnection(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ConnectionsApi.createConnection"]?.[s]?.url;
582
+ return (i, d) => V(o, h, u, l)(i, c || d);
583
+ },
584
+ /**
585
+ * Permanently deletes a database connection from the environment.
586
+ * @summary Delete a database connection
587
+ * @param {string} environmentName Name of the environment
588
+ * @param {string} connectionName Name of the connection to delete
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ async deleteConnection(e, t, a) {
593
+ const r = await n.deleteConnection(e, t, a), o = l?.serverIndex ?? 0, s = g["ConnectionsApi.deleteConnection"]?.[o]?.url;
594
+ return (c, i) => V(r, h, u, l)(c, s || i);
595
+ },
596
+ /**
597
+ * Retrieves detailed information about a specific database connection within an environment. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
598
+ * @summary Get connection details
599
+ * @param {string} environmentName Name of the environment
600
+ * @param {string} connectionName Name of the connection
601
+ * @param {*} [options] Override http request option.
602
+ * @throws {RequiredError}
603
+ */
604
+ async getConnection(e, t, a) {
605
+ const r = await n.getConnection(e, t, a), o = l?.serverIndex ?? 0, s = g["ConnectionsApi.getConnection"]?.[o]?.url;
606
+ return (c, i) => V(r, h, u, l)(c, s || i);
607
+ },
608
+ /**
609
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
610
+ * @summary Get table details from database
611
+ * @param {string} environmentName Name of the environment
612
+ * @param {string} connectionName Name of the connection
613
+ * @param {string} schemaName Name of the schema
614
+ * @param {string} tablePath Full path to the table
615
+ * @param {*} [options] Override http request option.
616
+ * @throws {RequiredError}
617
+ */
618
+ async getTable(e, t, a, r, o) {
619
+ const s = await n.getTable(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ConnectionsApi.getTable"]?.[c]?.url;
620
+ return (d, p) => V(s, h, u, l)(d, i || p);
621
+ },
622
+ /**
623
+ * Retrieves a table from the specified database schema, resolved in the context of the named package.
624
+ * @summary Get table details from database (per-package)
625
+ * @param {string} environmentName Name of the environment
626
+ * @param {string} packageName Name of the package whose connection context to use
627
+ * @param {string} connectionName Name of the connection
628
+ * @param {string} schemaName Name of the schema
629
+ * @param {string} tablePath Full path to the table
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ async getTableInPackage(e, t, a, r, o, s) {
634
+ const c = await n.getTableInPackage(e, t, a, r, o, s), i = l?.serverIndex ?? 0, d = g["ConnectionsApi.getTableInPackage"]?.[i]?.url;
635
+ return (p, O) => V(c, h, u, l)(p, d || O);
636
+ },
637
+ /**
638
+ * Retrieves a list of all database connections configured for the specified environment. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within an environment.
639
+ * @summary List environment database connections
640
+ * @param {string} environmentName Name of the environment
641
+ * @param {*} [options] Override http request option.
642
+ * @throws {RequiredError}
643
+ */
644
+ async listConnections(e, t) {
645
+ const a = await n.listConnections(e, t), r = l?.serverIndex ?? 0, o = g["ConnectionsApi.listConnections"]?.[r]?.url;
646
+ return (s, c) => V(a, h, u, l)(s, o || c);
647
+ },
648
+ /**
649
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
650
+ * @summary List database schemas
651
+ * @param {string} environmentName Name of the environment
652
+ * @param {string} connectionName Name of the connection
653
+ * @param {*} [options] Override http request option.
654
+ * @throws {RequiredError}
655
+ */
656
+ async listSchemas(e, t, a) {
657
+ const r = await n.listSchemas(e, t, a), o = l?.serverIndex ?? 0, s = g["ConnectionsApi.listSchemas"]?.[o]?.url;
658
+ return (c, i) => V(r, h, u, l)(c, s || i);
659
+ },
660
+ /**
661
+ * Retrieves a list of all schemas (databases) available in the specified connection, resolved in the context of the named package. Required for `connectionName=\"duckdb\"`, which is per-package; works for any other connection name as well (resolution falls through to the environment).
662
+ * @summary List database schemas (per-package)
663
+ * @param {string} environmentName Name of the environment
664
+ * @param {string} packageName Name of the package whose connection context to use
665
+ * @param {string} connectionName Name of the connection
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ async listSchemasInPackage(e, t, a, r) {
670
+ const o = await n.listSchemasInPackage(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ConnectionsApi.listSchemasInPackage"]?.[s]?.url;
671
+ return (i, d) => V(o, h, u, l)(i, c || d);
672
+ },
673
+ /**
674
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
675
+ * @summary List tables in database
676
+ * @param {string} environmentName Name of the environment
677
+ * @param {string} connectionName Name of the connection
678
+ * @param {string} schemaName Name of the schema
679
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
680
+ * @param {*} [options] Override http request option.
681
+ * @throws {RequiredError}
682
+ */
683
+ async listTables(e, t, a, r, o) {
684
+ const s = await n.listTables(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ConnectionsApi.listTables"]?.[c]?.url;
685
+ return (d, p) => V(s, h, u, l)(d, i || p);
686
+ },
687
+ /**
688
+ * Retrieves a list of all tables and views available in the specified database schema, resolved in the context of the named package.
689
+ * @summary List tables in database (per-package)
690
+ * @param {string} environmentName Name of the environment
691
+ * @param {string} packageName Name of the package whose connection context to use
692
+ * @param {string} connectionName Name of the connection
693
+ * @param {string} schemaName Name of the schema
694
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ */
698
+ async listTablesInPackage(e, t, a, r, o, s) {
699
+ const c = await n.listTablesInPackage(e, t, a, r, o, s), i = l?.serverIndex ?? 0, d = g["ConnectionsApi.listTablesInPackage"]?.[i]?.url;
700
+ return (p, O) => V(c, h, u, l)(p, d || O);
701
+ },
702
+ /**
703
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
704
+ * @summary Execute SQL query
705
+ * @param {string} environmentName Name of the environment
706
+ * @param {string} connectionName Name of the connection
707
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ */
711
+ async postQuerydata(e, t, a, r) {
712
+ const o = await n.postQuerydata(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ConnectionsApi.postQuerydata"]?.[s]?.url;
713
+ return (i, d) => V(o, h, u, l)(i, c || d);
714
+ },
715
+ /**
716
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
717
+ * @summary Execute SQL query (per-package)
718
+ * @param {string} environmentName Name of the environment
719
+ * @param {string} packageName Name of the package whose connection context to use
720
+ * @param {string} connectionName Name of the connection
721
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
722
+ * @param {*} [options] Override http request option.
723
+ * @throws {RequiredError}
724
+ */
725
+ async postQuerydataInPackage(e, t, a, r, o) {
726
+ const s = await n.postQuerydataInPackage(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ConnectionsApi.postQuerydataInPackage"]?.[c]?.url;
727
+ return (d, p) => V(s, h, u, l)(d, i || p);
728
+ },
729
+ /**
730
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
731
+ * @summary Create SQL source from statement
732
+ * @param {string} environmentName Name of the environment
733
+ * @param {string} connectionName Name of the connection
734
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
735
+ * @param {*} [options] Override http request option.
736
+ * @throws {RequiredError}
737
+ */
738
+ async postSqlsource(e, t, a, r) {
739
+ const o = await n.postSqlsource(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ConnectionsApi.postSqlsource"]?.[s]?.url;
740
+ return (i, d) => V(o, h, u, l)(i, c || d);
741
+ },
742
+ /**
743
+ * Creates a Malloy source from a SQL statement using the specified connection, resolved in the context of the named package.
744
+ * @summary Create SQL source from statement (per-package)
745
+ * @param {string} environmentName Name of the environment
746
+ * @param {string} packageName Name of the package whose connection context to use
747
+ * @param {string} connectionName Name of the connection
748
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
749
+ * @param {*} [options] Override http request option.
750
+ * @throws {RequiredError}
751
+ */
752
+ async postSqlsourceInPackage(e, t, a, r, o) {
753
+ const s = await n.postSqlsourceInPackage(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ConnectionsApi.postSqlsourceInPackage"]?.[c]?.url;
754
+ return (d, p) => V(s, h, u, l)(d, i || p);
755
+ },
756
+ /**
757
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
758
+ * @summary Create temporary table
759
+ * @param {string} environmentName Name of the environment
760
+ * @param {string} connectionName Name of the connection
761
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
762
+ * @param {*} [options] Override http request option.
763
+ * @throws {RequiredError}
764
+ */
765
+ async postTemporarytable(e, t, a, r) {
766
+ const o = await n.postTemporarytable(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ConnectionsApi.postTemporarytable"]?.[s]?.url;
767
+ return (i, d) => V(o, h, u, l)(i, c || d);
768
+ },
769
+ /**
770
+ * Creates a temporary table from a SQL statement using the specified database connection, resolved in the context of the named package.
771
+ * @summary Create temporary table (per-package)
772
+ * @param {string} environmentName Name of the environment
773
+ * @param {string} packageName Name of the package whose connection context to use
774
+ * @param {string} connectionName Name of the connection
775
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
776
+ * @param {*} [options] Override http request option.
777
+ * @throws {RequiredError}
778
+ */
779
+ async postTemporarytableInPackage(e, t, a, r, o) {
780
+ const s = await n.postTemporarytableInPackage(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ConnectionsApi.postTemporarytableInPackage"]?.[c]?.url;
781
+ return (d, p) => V(s, h, u, l)(d, i || p);
782
+ },
783
+ /**
784
+ * Updates the configuration of an existing database connection.
785
+ * @summary Update an existing database connection
786
+ * @param {string} environmentName Name of the environment
787
+ * @param {string} connectionName Name of the connection to update
788
+ * @param {UpdateConnectionRequest} updateConnectionRequest
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ */
792
+ async updateConnection(e, t, a, r) {
793
+ const o = await n.updateConnection(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ConnectionsApi.updateConnection"]?.[s]?.url;
794
+ return (i, d) => V(o, h, u, l)(i, c || d);
795
+ }
796
+ };
797
+ }, Qa = function(l, n, e) {
798
+ const t = S(l);
799
+ return {
800
+ /**
801
+ * Creates a new database connection in the specified environment.
802
+ * @summary Create a new database connection
803
+ * @param {string} environmentName Name of the environment
804
+ * @param {string} connectionName Name of the connection
805
+ * @param {Connection} connection
806
+ * @param {*} [options] Override http request option.
807
+ * @throws {RequiredError}
808
+ */
809
+ createConnection(a, r, o, s) {
810
+ return t.createConnection(a, r, o, s).then((c) => c(e, n));
811
+ },
812
+ /**
813
+ * Permanently deletes a database connection from the environment.
814
+ * @summary Delete a database connection
815
+ * @param {string} environmentName Name of the environment
816
+ * @param {string} connectionName Name of the connection to delete
817
+ * @param {*} [options] Override http request option.
818
+ * @throws {RequiredError}
819
+ */
820
+ deleteConnection(a, r, o) {
821
+ return t.deleteConnection(a, r, o).then((s) => s(e, n));
822
+ },
823
+ /**
824
+ * Retrieves detailed information about a specific database connection within an environment. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
825
+ * @summary Get connection details
826
+ * @param {string} environmentName Name of the environment
827
+ * @param {string} connectionName Name of the connection
828
+ * @param {*} [options] Override http request option.
829
+ * @throws {RequiredError}
830
+ */
831
+ getConnection(a, r, o) {
832
+ return t.getConnection(a, r, o).then((s) => s(e, n));
833
+ },
834
+ /**
835
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
836
+ * @summary Get table details from database
837
+ * @param {string} environmentName Name of the environment
838
+ * @param {string} connectionName Name of the connection
839
+ * @param {string} schemaName Name of the schema
840
+ * @param {string} tablePath Full path to the table
841
+ * @param {*} [options] Override http request option.
842
+ * @throws {RequiredError}
843
+ */
844
+ getTable(a, r, o, s, c) {
845
+ return t.getTable(a, r, o, s, c).then((i) => i(e, n));
846
+ },
847
+ /**
848
+ * Retrieves a table from the specified database schema, resolved in the context of the named package.
849
+ * @summary Get table details from database (per-package)
850
+ * @param {string} environmentName Name of the environment
851
+ * @param {string} packageName Name of the package whose connection context to use
852
+ * @param {string} connectionName Name of the connection
853
+ * @param {string} schemaName Name of the schema
854
+ * @param {string} tablePath Full path to the table
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ */
858
+ getTableInPackage(a, r, o, s, c, i) {
859
+ return t.getTableInPackage(a, r, o, s, c, i).then((d) => d(e, n));
860
+ },
861
+ /**
862
+ * Retrieves a list of all database connections configured for the specified environment. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within an environment.
863
+ * @summary List environment database connections
864
+ * @param {string} environmentName Name of the environment
865
+ * @param {*} [options] Override http request option.
866
+ * @throws {RequiredError}
867
+ */
868
+ listConnections(a, r) {
869
+ return t.listConnections(a, r).then((o) => o(e, n));
870
+ },
871
+ /**
872
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
873
+ * @summary List database schemas
874
+ * @param {string} environmentName Name of the environment
875
+ * @param {string} connectionName Name of the connection
876
+ * @param {*} [options] Override http request option.
877
+ * @throws {RequiredError}
878
+ */
879
+ listSchemas(a, r, o) {
880
+ return t.listSchemas(a, r, o).then((s) => s(e, n));
881
+ },
882
+ /**
883
+ * Retrieves a list of all schemas (databases) available in the specified connection, resolved in the context of the named package. Required for `connectionName=\"duckdb\"`, which is per-package; works for any other connection name as well (resolution falls through to the environment).
884
+ * @summary List database schemas (per-package)
885
+ * @param {string} environmentName Name of the environment
886
+ * @param {string} packageName Name of the package whose connection context to use
887
+ * @param {string} connectionName Name of the connection
888
+ * @param {*} [options] Override http request option.
889
+ * @throws {RequiredError}
890
+ */
891
+ listSchemasInPackage(a, r, o, s) {
892
+ return t.listSchemasInPackage(a, r, o, s).then((c) => c(e, n));
893
+ },
894
+ /**
895
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
896
+ * @summary List tables in database
897
+ * @param {string} environmentName Name of the environment
898
+ * @param {string} connectionName Name of the connection
899
+ * @param {string} schemaName Name of the schema
900
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ */
904
+ listTables(a, r, o, s, c) {
905
+ return t.listTables(a, r, o, s, c).then((i) => i(e, n));
906
+ },
907
+ /**
908
+ * Retrieves a list of all tables and views available in the specified database schema, resolved in the context of the named package.
909
+ * @summary List tables in database (per-package)
910
+ * @param {string} environmentName Name of the environment
911
+ * @param {string} packageName Name of the package whose connection context to use
912
+ * @param {string} connectionName Name of the connection
913
+ * @param {string} schemaName Name of the schema
914
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
915
+ * @param {*} [options] Override http request option.
916
+ * @throws {RequiredError}
917
+ */
918
+ listTablesInPackage(a, r, o, s, c, i) {
919
+ return t.listTablesInPackage(a, r, o, s, c, i).then((d) => d(e, n));
920
+ },
921
+ /**
922
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
923
+ * @summary Execute SQL query
924
+ * @param {string} environmentName Name of the environment
925
+ * @param {string} connectionName Name of the connection
926
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
927
+ * @param {*} [options] Override http request option.
928
+ * @throws {RequiredError}
929
+ */
930
+ postQuerydata(a, r, o, s) {
931
+ return t.postQuerydata(a, r, o, s).then((c) => c(e, n));
932
+ },
933
+ /**
934
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
935
+ * @summary Execute SQL query (per-package)
936
+ * @param {string} environmentName Name of the environment
937
+ * @param {string} packageName Name of the package whose connection context to use
938
+ * @param {string} connectionName Name of the connection
939
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
940
+ * @param {*} [options] Override http request option.
941
+ * @throws {RequiredError}
942
+ */
943
+ postQuerydataInPackage(a, r, o, s, c) {
944
+ return t.postQuerydataInPackage(a, r, o, s, c).then((i) => i(e, n));
945
+ },
946
+ /**
947
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
948
+ * @summary Create SQL source from statement
949
+ * @param {string} environmentName Name of the environment
950
+ * @param {string} connectionName Name of the connection
951
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
952
+ * @param {*} [options] Override http request option.
953
+ * @throws {RequiredError}
954
+ */
955
+ postSqlsource(a, r, o, s) {
956
+ return t.postSqlsource(a, r, o, s).then((c) => c(e, n));
957
+ },
958
+ /**
959
+ * Creates a Malloy source from a SQL statement using the specified connection, resolved in the context of the named package.
960
+ * @summary Create SQL source from statement (per-package)
961
+ * @param {string} environmentName Name of the environment
962
+ * @param {string} packageName Name of the package whose connection context to use
963
+ * @param {string} connectionName Name of the connection
964
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
965
+ * @param {*} [options] Override http request option.
966
+ * @throws {RequiredError}
967
+ */
968
+ postSqlsourceInPackage(a, r, o, s, c) {
969
+ return t.postSqlsourceInPackage(a, r, o, s, c).then((i) => i(e, n));
970
+ },
971
+ /**
972
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
973
+ * @summary Create temporary table
974
+ * @param {string} environmentName Name of the environment
975
+ * @param {string} connectionName Name of the connection
976
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
977
+ * @param {*} [options] Override http request option.
978
+ * @throws {RequiredError}
979
+ */
980
+ postTemporarytable(a, r, o, s) {
981
+ return t.postTemporarytable(a, r, o, s).then((c) => c(e, n));
982
+ },
983
+ /**
984
+ * Creates a temporary table from a SQL statement using the specified database connection, resolved in the context of the named package.
985
+ * @summary Create temporary table (per-package)
986
+ * @param {string} environmentName Name of the environment
987
+ * @param {string} packageName Name of the package whose connection context to use
988
+ * @param {string} connectionName Name of the connection
989
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
990
+ * @param {*} [options] Override http request option.
991
+ * @throws {RequiredError}
992
+ */
993
+ postTemporarytableInPackage(a, r, o, s, c) {
994
+ return t.postTemporarytableInPackage(a, r, o, s, c).then((i) => i(e, n));
995
+ },
996
+ /**
997
+ * Updates the configuration of an existing database connection.
998
+ * @summary Update an existing database connection
999
+ * @param {string} environmentName Name of the environment
1000
+ * @param {string} connectionName Name of the connection to update
1001
+ * @param {UpdateConnectionRequest} updateConnectionRequest
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ updateConnection(a, r, o, s) {
1006
+ return t.updateConnection(a, r, o, s).then((c) => c(e, n));
1007
+ }
1008
+ };
1009
+ };
1010
+ class be extends I {
1011
+ /**
1012
+ * Creates a new database connection in the specified environment.
1013
+ * @summary Create a new database connection
1014
+ * @param {string} environmentName Name of the environment
1015
+ * @param {string} connectionName Name of the connection
1016
+ * @param {Connection} connection
1017
+ * @param {*} [options] Override http request option.
1018
+ * @throws {RequiredError}
1019
+ * @memberof ConnectionsApi
1020
+ */
1021
+ createConnection(n, e, t, a) {
1022
+ return S(this.configuration).createConnection(n, e, t, a).then((r) => r(this.axios, this.basePath));
1023
+ }
1024
+ /**
1025
+ * Permanently deletes a database connection from the environment.
1026
+ * @summary Delete a database connection
1027
+ * @param {string} environmentName Name of the environment
1028
+ * @param {string} connectionName Name of the connection to delete
1029
+ * @param {*} [options] Override http request option.
1030
+ * @throws {RequiredError}
1031
+ * @memberof ConnectionsApi
1032
+ */
1033
+ deleteConnection(n, e, t) {
1034
+ return S(this.configuration).deleteConnection(n, e, t).then((a) => a(this.axios, this.basePath));
1035
+ }
1036
+ /**
1037
+ * Retrieves detailed information about a specific database connection within an environment. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
1038
+ * @summary Get connection details
1039
+ * @param {string} environmentName Name of the environment
1040
+ * @param {string} connectionName Name of the connection
1041
+ * @param {*} [options] Override http request option.
1042
+ * @throws {RequiredError}
1043
+ * @memberof ConnectionsApi
1044
+ */
1045
+ getConnection(n, e, t) {
1046
+ return S(this.configuration).getConnection(n, e, t).then((a) => a(this.axios, this.basePath));
1047
+ }
1048
+ /**
1049
+ * Retrieves a table from the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed. The tablePath is the full path to the table, including the schema name.
1050
+ * @summary Get table details from database
1051
+ * @param {string} environmentName Name of the environment
1052
+ * @param {string} connectionName Name of the connection
1053
+ * @param {string} schemaName Name of the schema
1054
+ * @param {string} tablePath Full path to the table
1055
+ * @param {*} [options] Override http request option.
1056
+ * @throws {RequiredError}
1057
+ * @memberof ConnectionsApi
1058
+ */
1059
+ getTable(n, e, t, a, r) {
1060
+ return S(this.configuration).getTable(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
1061
+ }
1062
+ /**
1063
+ * Retrieves a table from the specified database schema, resolved in the context of the named package.
1064
+ * @summary Get table details from database (per-package)
1065
+ * @param {string} environmentName Name of the environment
1066
+ * @param {string} packageName Name of the package whose connection context to use
1067
+ * @param {string} connectionName Name of the connection
1068
+ * @param {string} schemaName Name of the schema
1069
+ * @param {string} tablePath Full path to the table
1070
+ * @param {*} [options] Override http request option.
1071
+ * @throws {RequiredError}
1072
+ * @memberof ConnectionsApi
1073
+ */
1074
+ getTableInPackage(n, e, t, a, r, o) {
1075
+ return S(this.configuration).getTableInPackage(n, e, t, a, r, o).then((s) => s(this.axios, this.basePath));
1076
+ }
1077
+ /**
1078
+ * Retrieves a list of all database connections configured for the specified environment. Each connection includes its configuration, type, and status information. This endpoint is useful for discovering available data sources within an environment.
1079
+ * @summary List environment database connections
1080
+ * @param {string} environmentName Name of the environment
1081
+ * @param {*} [options] Override http request option.
1082
+ * @throws {RequiredError}
1083
+ * @memberof ConnectionsApi
1084
+ */
1085
+ listConnections(n, e) {
1086
+ return S(this.configuration).listConnections(n, e).then((t) => t(this.axios, this.basePath));
1087
+ }
1088
+ /**
1089
+ * Retrieves a list of all schemas (databases) available in the specified connection. Each schema includes metadata such as name, description, and whether it\'s the default schema. This endpoint is useful for exploring the database structure and discovering available data sources.
1090
+ * @summary List database schemas
1091
+ * @param {string} environmentName Name of the environment
1092
+ * @param {string} connectionName Name of the connection
1093
+ * @param {*} [options] Override http request option.
1094
+ * @throws {RequiredError}
1095
+ * @memberof ConnectionsApi
1096
+ */
1097
+ listSchemas(n, e, t) {
1098
+ return S(this.configuration).listSchemas(n, e, t).then((a) => a(this.axios, this.basePath));
1099
+ }
1100
+ /**
1101
+ * Retrieves a list of all schemas (databases) available in the specified connection, resolved in the context of the named package. Required for `connectionName=\"duckdb\"`, which is per-package; works for any other connection name as well (resolution falls through to the environment).
1102
+ * @summary List database schemas (per-package)
1103
+ * @param {string} environmentName Name of the environment
1104
+ * @param {string} packageName Name of the package whose connection context to use
1105
+ * @param {string} connectionName Name of the connection
1106
+ * @param {*} [options] Override http request option.
1107
+ * @throws {RequiredError}
1108
+ * @memberof ConnectionsApi
1109
+ */
1110
+ listSchemasInPackage(n, e, t, a) {
1111
+ return S(this.configuration).listSchemasInPackage(n, e, t, a).then((r) => r(this.axios, this.basePath));
1112
+ }
1113
+ /**
1114
+ * Retrieves a list of all tables and views available in the specified database schema. This endpoint is useful for discovering available data sources and exploring the database structure. The schema must exist in the connection for this operation to succeed.
1115
+ * @summary List tables in database
1116
+ * @param {string} environmentName Name of the environment
1117
+ * @param {string} connectionName Name of the connection
1118
+ * @param {string} schemaName Name of the schema
1119
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
1120
+ * @param {*} [options] Override http request option.
1121
+ * @throws {RequiredError}
1122
+ * @memberof ConnectionsApi
1123
+ */
1124
+ listTables(n, e, t, a, r) {
1125
+ return S(this.configuration).listTables(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
1126
+ }
1127
+ /**
1128
+ * Retrieves a list of all tables and views available in the specified database schema, resolved in the context of the named package.
1129
+ * @summary List tables in database (per-package)
1130
+ * @param {string} environmentName Name of the environment
1131
+ * @param {string} packageName Name of the package whose connection context to use
1132
+ * @param {string} connectionName Name of the connection
1133
+ * @param {string} schemaName Name of the schema
1134
+ * @param {Array<string>} [tableNames] List of table names to filter results. When provided, only returns metadata for the specified tables. When omitted, returns all tables in the schema.
1135
+ * @param {*} [options] Override http request option.
1136
+ * @throws {RequiredError}
1137
+ * @memberof ConnectionsApi
1138
+ */
1139
+ listTablesInPackage(n, e, t, a, r, o) {
1140
+ return S(this.configuration).listTablesInPackage(n, e, t, a, r, o).then((s) => s(this.axios, this.basePath));
1141
+ }
1142
+ /**
1143
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
1144
+ * @summary Execute SQL query
1145
+ * @param {string} environmentName Name of the environment
1146
+ * @param {string} connectionName Name of the connection
1147
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
1148
+ * @param {*} [options] Override http request option.
1149
+ * @throws {RequiredError}
1150
+ * @memberof ConnectionsApi
1151
+ */
1152
+ postQuerydata(n, e, t, a) {
1153
+ return S(this.configuration).postQuerydata(n, e, t, a).then((r) => r(this.axios, this.basePath));
1154
+ }
1155
+ /**
1156
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
1157
+ * @summary Execute SQL query (per-package)
1158
+ * @param {string} environmentName Name of the environment
1159
+ * @param {string} packageName Name of the package whose connection context to use
1160
+ * @param {string} connectionName Name of the connection
1161
+ * @param {PostQuerydataRequest} postQuerydataRequest SQL statement to execute
1162
+ * @param {*} [options] Override http request option.
1163
+ * @throws {RequiredError}
1164
+ * @memberof ConnectionsApi
1165
+ */
1166
+ postQuerydataInPackage(n, e, t, a, r) {
1167
+ return S(this.configuration).postQuerydataInPackage(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
1168
+ }
1169
+ /**
1170
+ * Creates a Malloy source from a SQL statement using the specified database connection. The SQL statement is executed to generate a source definition that can be used in Malloy models.
1171
+ * @summary Create SQL source from statement
1172
+ * @param {string} environmentName Name of the environment
1173
+ * @param {string} connectionName Name of the connection
1174
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
1175
+ * @param {*} [options] Override http request option.
1176
+ * @throws {RequiredError}
1177
+ * @memberof ConnectionsApi
1178
+ */
1179
+ postSqlsource(n, e, t, a) {
1180
+ return S(this.configuration).postSqlsource(n, e, t, a).then((r) => r(this.axios, this.basePath));
1181
+ }
1182
+ /**
1183
+ * Creates a Malloy source from a SQL statement using the specified connection, resolved in the context of the named package.
1184
+ * @summary Create SQL source from statement (per-package)
1185
+ * @param {string} environmentName Name of the environment
1186
+ * @param {string} packageName Name of the package whose connection context to use
1187
+ * @param {string} connectionName Name of the connection
1188
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to fetch the SQL source
1189
+ * @param {*} [options] Override http request option.
1190
+ * @throws {RequiredError}
1191
+ * @memberof ConnectionsApi
1192
+ */
1193
+ postSqlsourceInPackage(n, e, t, a, r) {
1194
+ return S(this.configuration).postSqlsourceInPackage(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
1195
+ }
1196
+ /**
1197
+ * Creates a temporary table from a SQL statement using the specified database connection. Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
1198
+ * @summary Create temporary table
1199
+ * @param {string} environmentName Name of the environment
1200
+ * @param {string} connectionName Name of the connection
1201
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
1202
+ * @param {*} [options] Override http request option.
1203
+ * @throws {RequiredError}
1204
+ * @memberof ConnectionsApi
1205
+ */
1206
+ postTemporarytable(n, e, t, a) {
1207
+ return S(this.configuration).postTemporarytable(n, e, t, a).then((r) => r(this.axios, this.basePath));
1208
+ }
1209
+ /**
1210
+ * Creates a temporary table from a SQL statement using the specified database connection, resolved in the context of the named package.
1211
+ * @summary Create temporary table (per-package)
1212
+ * @param {string} environmentName Name of the environment
1213
+ * @param {string} packageName Name of the package whose connection context to use
1214
+ * @param {string} connectionName Name of the connection
1215
+ * @param {PostSqlsourceRequest} postSqlsourceRequest SQL statement to create the temporary table
1216
+ * @param {*} [options] Override http request option.
1217
+ * @throws {RequiredError}
1218
+ * @memberof ConnectionsApi
1219
+ */
1220
+ postTemporarytableInPackage(n, e, t, a, r) {
1221
+ return S(this.configuration).postTemporarytableInPackage(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
1222
+ }
1223
+ /**
1224
+ * Updates the configuration of an existing database connection.
1225
+ * @summary Update an existing database connection
1226
+ * @param {string} environmentName Name of the environment
1227
+ * @param {string} connectionName Name of the connection to update
1228
+ * @param {UpdateConnectionRequest} updateConnectionRequest
1229
+ * @param {*} [options] Override http request option.
1230
+ * @throws {RequiredError}
1231
+ * @memberof ConnectionsApi
1232
+ */
1233
+ updateConnection(n, e, t, a) {
1234
+ return S(this.configuration).updateConnection(n, e, t, a).then((r) => r(this.axios, this.basePath));
1235
+ }
1236
+ }
1237
+ const Pe = function(l) {
1238
+ return {
1239
+ /**
1240
+ * Validates a database connection configuration without adding it to any environment. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to an environment. Useful for troubleshooting connection issues and validating configurations during setup.
1241
+ * @summary Test database connection configuration
1242
+ * @param {Connection} connection
1243
+ * @param {*} [options] Override http request option.
1244
+ * @throws {RequiredError}
1245
+ */
1246
+ testConnectionConfiguration: async (n, e = {}) => {
1247
+ m("testConnectionConfiguration", "connection", n);
1248
+ const t = "/connections/test", a = new URL(t, b);
1249
+ let r;
1250
+ l && (r = l.baseOptions);
1251
+ const o = { method: "POST", ...r, ...e }, s = {}, c = {};
1252
+ s["Content-Type"] = "application/json", P(a, c);
1253
+ let i = r && r.headers ? r.headers : {};
1254
+ return o.headers = { ...s, ...i, ...e.headers }, o.data = k(n, o, l), {
1255
+ url: v(a),
1256
+ options: o
1257
+ };
1258
+ }
1259
+ };
1260
+ }, X = function(l) {
1261
+ const n = Pe(l);
1262
+ return {
1263
+ /**
1264
+ * Validates a database connection configuration without adding it to any environment. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to an environment. Useful for troubleshooting connection issues and validating configurations during setup.
1265
+ * @summary Test database connection configuration
1266
+ * @param {Connection} connection
1267
+ * @param {*} [options] Override http request option.
1268
+ * @throws {RequiredError}
1269
+ */
1270
+ async testConnectionConfiguration(e, t) {
1271
+ const a = await n.testConnectionConfiguration(e, t), r = l?.serverIndex ?? 0, o = g["ConnectionsTestApi.testConnectionConfiguration"]?.[r]?.url;
1272
+ return (s, c) => V(a, h, u, l)(s, o || c);
1273
+ }
1274
+ };
1275
+ }, $a = function(l, n, e) {
1276
+ const t = X(l);
1277
+ return {
1278
+ /**
1279
+ * Validates a database connection configuration without adding it to any environment. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to an environment. Useful for troubleshooting connection issues and validating configurations during setup.
1280
+ * @summary Test database connection configuration
1281
+ * @param {Connection} connection
1282
+ * @param {*} [options] Override http request option.
1283
+ * @throws {RequiredError}
1284
+ */
1285
+ testConnectionConfiguration(a, r) {
1286
+ return t.testConnectionConfiguration(a, r).then((o) => o(e, n));
1287
+ }
1288
+ };
1289
+ };
1290
+ class za extends I {
1291
+ /**
1292
+ * Validates a database connection configuration without adding it to any environment. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to an environment. Useful for troubleshooting connection issues and validating configurations during setup.
1293
+ * @summary Test database connection configuration
1294
+ * @param {Connection} connection
1295
+ * @param {*} [options] Override http request option.
1296
+ * @throws {RequiredError}
1297
+ * @memberof ConnectionsTestApi
1298
+ */
1299
+ testConnectionConfiguration(n, e) {
1300
+ return X(this.configuration).testConnectionConfiguration(n, e).then((t) => t(this.axios, this.basePath));
1301
+ }
1302
+ }
1303
+ const ve = function(l) {
1304
+ return {
1305
+ /**
1306
+ * Retrieves everything a viewer needs to render one dashboard: the artifact tag\'s declarations plus the control contract derived from the givens its query references. Running the dashboard needs no further endpoint — its query, each tile, and each control\'s suggest query all run through the model query endpoint with `givens`, using the manifest\'s `path` as the model.
1307
+ * @summary Get a dashboard manifest
1308
+ * @param {string} environmentName Name of the environment
1309
+ * @param {string} packageName Name of the package
1310
+ * @param {string} dashboardName The dashboard\&#39;s name: its filename basename. Conventionally letters, digits, \&quot;-\&quot; and \&quot;_\&quot;, and a package is warned when one of its SERVED dashboards falls outside that. A dashboard withheld by curation gets no naming finding, because the naming check runs after the curation gate and a withheld dashboard is already reported as withheld. It is NOT constrained to it, because the name comes from a filename rather than being chosen: a file such as &#x60;dashboards/v1.2.malloy&#x60; is served, and its published &#x60;resource&#x60; carries the name percent-encoded. Send it percent-encoded.
1311
+ * @param {string} [versionId] Version identifier for the package
1312
+ * @param {*} [options] Override http request option.
1313
+ * @throws {RequiredError}
1314
+ */
1315
+ getDashboard: async (n, e, t, a, r = {}) => {
1316
+ m("getDashboard", "environmentName", n), m("getDashboard", "packageName", e), m("getDashboard", "dashboardName", t);
1317
+ const o = "/environments/{environmentName}/packages/{packageName}/dashboards/{dashboardName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{dashboardName}", encodeURIComponent(String(t))), s = new URL(o, b);
1318
+ let c;
1319
+ l && (c = l.baseOptions);
1320
+ const i = { method: "GET", ...c, ...r }, d = {}, p = {};
1321
+ a !== void 0 && (p.versionId = a), P(s, p);
1322
+ let O = c && c.headers ? c.headers : {};
1323
+ return i.headers = { ...d, ...O, ...r.headers }, {
1324
+ url: v(s),
1325
+ options: i
1326
+ };
1327
+ },
1328
+ /**
1329
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1330
+ * @summary List package dashboards
1331
+ * @param {string} environmentName Name of the environment
1332
+ * @param {string} packageName Name of the package
1333
+ * @param {string} [versionId] Version identifier for the package
1334
+ * @param {*} [options] Override http request option.
1335
+ * @throws {RequiredError}
1336
+ */
1337
+ listDashboards: async (n, e, t, a = {}) => {
1338
+ m("listDashboards", "environmentName", n), m("listDashboards", "packageName", e);
1339
+ const r = "/environments/{environmentName}/packages/{packageName}/dashboards".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), o = new URL(r, b);
1340
+ let s;
1341
+ l && (s = l.baseOptions);
1342
+ const c = { method: "GET", ...s, ...a }, i = {}, d = {};
1343
+ t !== void 0 && (d.versionId = t), P(o, d);
1344
+ let p = s && s.headers ? s.headers : {};
1345
+ return c.headers = { ...i, ...p, ...a.headers }, {
1346
+ url: v(o),
1347
+ options: c
1348
+ };
1349
+ }
1350
+ };
1351
+ }, D = function(l) {
1352
+ const n = ve(l);
1353
+ return {
1354
+ /**
1355
+ * Retrieves everything a viewer needs to render one dashboard: the artifact tag\'s declarations plus the control contract derived from the givens its query references. Running the dashboard needs no further endpoint — its query, each tile, and each control\'s suggest query all run through the model query endpoint with `givens`, using the manifest\'s `path` as the model.
1356
+ * @summary Get a dashboard manifest
1357
+ * @param {string} environmentName Name of the environment
1358
+ * @param {string} packageName Name of the package
1359
+ * @param {string} dashboardName The dashboard\&#39;s name: its filename basename. Conventionally letters, digits, \&quot;-\&quot; and \&quot;_\&quot;, and a package is warned when one of its SERVED dashboards falls outside that. A dashboard withheld by curation gets no naming finding, because the naming check runs after the curation gate and a withheld dashboard is already reported as withheld. It is NOT constrained to it, because the name comes from a filename rather than being chosen: a file such as &#x60;dashboards/v1.2.malloy&#x60; is served, and its published &#x60;resource&#x60; carries the name percent-encoded. Send it percent-encoded.
1360
+ * @param {string} [versionId] Version identifier for the package
1361
+ * @param {*} [options] Override http request option.
1362
+ * @throws {RequiredError}
1363
+ */
1364
+ async getDashboard(e, t, a, r, o) {
1365
+ const s = await n.getDashboard(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["DashboardsApi.getDashboard"]?.[c]?.url;
1366
+ return (d, p) => V(s, h, u, l)(d, i || p);
1367
+ },
1368
+ /**
1369
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1370
+ * @summary List package dashboards
1371
+ * @param {string} environmentName Name of the environment
1372
+ * @param {string} packageName Name of the package
1373
+ * @param {string} [versionId] Version identifier for the package
1374
+ * @param {*} [options] Override http request option.
1375
+ * @throws {RequiredError}
1376
+ */
1377
+ async listDashboards(e, t, a, r) {
1378
+ const o = await n.listDashboards(e, t, a, r), s = l?.serverIndex ?? 0, c = g["DashboardsApi.listDashboards"]?.[s]?.url;
1379
+ return (i, d) => V(o, h, u, l)(i, c || d);
1380
+ }
1381
+ };
1382
+ }, qa = function(l, n, e) {
1383
+ const t = D(l);
1384
+ return {
1385
+ /**
1386
+ * Retrieves everything a viewer needs to render one dashboard: the artifact tag\'s declarations plus the control contract derived from the givens its query references. Running the dashboard needs no further endpoint — its query, each tile, and each control\'s suggest query all run through the model query endpoint with `givens`, using the manifest\'s `path` as the model.
1387
+ * @summary Get a dashboard manifest
1388
+ * @param {string} environmentName Name of the environment
1389
+ * @param {string} packageName Name of the package
1390
+ * @param {string} dashboardName The dashboard\&#39;s name: its filename basename. Conventionally letters, digits, \&quot;-\&quot; and \&quot;_\&quot;, and a package is warned when one of its SERVED dashboards falls outside that. A dashboard withheld by curation gets no naming finding, because the naming check runs after the curation gate and a withheld dashboard is already reported as withheld. It is NOT constrained to it, because the name comes from a filename rather than being chosen: a file such as &#x60;dashboards/v1.2.malloy&#x60; is served, and its published &#x60;resource&#x60; carries the name percent-encoded. Send it percent-encoded.
1391
+ * @param {string} [versionId] Version identifier for the package
1392
+ * @param {*} [options] Override http request option.
1393
+ * @throws {RequiredError}
1394
+ */
1395
+ getDashboard(a, r, o, s, c) {
1396
+ return t.getDashboard(a, r, o, s, c).then((i) => i(e, n));
1397
+ },
1398
+ /**
1399
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1400
+ * @summary List package dashboards
1401
+ * @param {string} environmentName Name of the environment
1402
+ * @param {string} packageName Name of the package
1403
+ * @param {string} [versionId] Version identifier for the package
1404
+ * @param {*} [options] Override http request option.
1405
+ * @throws {RequiredError}
1406
+ */
1407
+ listDashboards(a, r, o, s) {
1408
+ return t.listDashboards(a, r, o, s).then((c) => c(e, n));
1409
+ }
1410
+ };
1411
+ };
1412
+ class Ve extends I {
1413
+ /**
1414
+ * Retrieves everything a viewer needs to render one dashboard: the artifact tag\'s declarations plus the control contract derived from the givens its query references. Running the dashboard needs no further endpoint — its query, each tile, and each control\'s suggest query all run through the model query endpoint with `givens`, using the manifest\'s `path` as the model.
1415
+ * @summary Get a dashboard manifest
1416
+ * @param {string} environmentName Name of the environment
1417
+ * @param {string} packageName Name of the package
1418
+ * @param {string} dashboardName The dashboard\&#39;s name: its filename basename. Conventionally letters, digits, \&quot;-\&quot; and \&quot;_\&quot;, and a package is warned when one of its SERVED dashboards falls outside that. A dashboard withheld by curation gets no naming finding, because the naming check runs after the curation gate and a withheld dashboard is already reported as withheld. It is NOT constrained to it, because the name comes from a filename rather than being chosen: a file such as &#x60;dashboards/v1.2.malloy&#x60; is served, and its published &#x60;resource&#x60; carries the name percent-encoded. Send it percent-encoded.
1419
+ * @param {string} [versionId] Version identifier for the package
1420
+ * @param {*} [options] Override http request option.
1421
+ * @throws {RequiredError}
1422
+ * @memberof DashboardsApi
1423
+ */
1424
+ getDashboard(n, e, t, a, r) {
1425
+ return D(this.configuration).getDashboard(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
1426
+ }
1427
+ /**
1428
+ * Lists the dashboards in the specified package — every `.malloy` file in the package\'s `dashboards/` directory that carries an `# artifact` (or model-level `## artifact`) annotation. A file in that directory with no artifact tag is a shared include and is not listed, whether or not it compiles. A tagged dashboard that failed to compile is listed carrying its `error` where that state can arise at all, so a broken dashboard is visibly broken rather than silently absent. In practice it rarely does: a package whose model fails to compile is not loaded, and a reload that would break one is refused and leaves the previously loaded package serving, so `error` is only reachable on the paths that keep per-model placeholders. Treat it as present-but-uncommon rather than the normal way a broken dashboard surfaces. When the package curates its query surface (`queryableSources: \"declared\"`), a dashboard whose entry file is not in `explores` is omitted, because its query and given names would not be runnable; the omission is reported in the package\'s `warnings` as of the last load. A metadata `PATCH` that TIGHTENS curation takes effect on this listing immediately; one that relaxes it takes effect on the next package reload, because the withheld dashboards were never built into the cached set. Either way the matching warning is computed at load, so after a `PATCH` it appears only once the package reloads. Where the boundary is active at all, which needs `explores` declared AND `queryableSources` left at `\"declared\"`, being listed does not by itself guarantee the dashboard runs: the queryable sources are the union of every listed file\'s `export {}` closure, so a dashboard whose tiles read a source that only an UNLISTED file exports is still served while those queries are refused. The fix is to list that file too, or to re-export the source from one already listed. It is served rather than withheld because withholding on a guess would hide dashboards that do work. Under `\"all\"` nothing is refused, so the situation does not arise.
1429
+ * @summary List package dashboards
1430
+ * @param {string} environmentName Name of the environment
1431
+ * @param {string} packageName Name of the package
1432
+ * @param {string} [versionId] Version identifier for the package
1433
+ * @param {*} [options] Override http request option.
1434
+ * @throws {RequiredError}
1435
+ * @memberof DashboardsApi
1436
+ */
1437
+ listDashboards(n, e, t, a) {
1438
+ return D(this.configuration).listDashboards(n, e, t, a).then((r) => r(this.axios, this.basePath));
1439
+ }
1440
+ }
1441
+ const Oe = function(l) {
1442
+ return {
1443
+ /**
1444
+ * Retrieves a list of all in-package HTML data apps (static pages served from the package\'s public/ directory) within the specified package. Each entry includes the relative path, the package name, a canonical resource URL, and the title (extracted from the file\'s <title> tag, falling back to the path). Used by the Publisher SPA to surface a clickable \"Data Apps\" section on the package detail view, and by anyone who wants to discover a package\'s data apps programmatically without scraping the directory. Recursive depth is capped server-side to keep this cheap on large packages.
1445
+ * @summary List package data apps
1446
+ * @param {string} environmentName Name of the environment
1447
+ * @param {string} packageName Name of the package
1448
+ * @param {*} [options] Override http request option.
1449
+ * @throws {RequiredError}
1450
+ */
1451
+ listDataApps: async (n, e, t = {}) => {
1452
+ m("listDataApps", "environmentName", n), m("listDataApps", "packageName", e);
1453
+ const a = "/environments/{environmentName}/packages/{packageName}/data-apps".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), r = new URL(a, b);
1454
+ let o;
1455
+ l && (o = l.baseOptions);
1456
+ const s = { method: "GET", ...o, ...t }, c = {};
1457
+ P(r, {});
1458
+ let d = o && o.headers ? o.headers : {};
1459
+ return s.headers = { ...c, ...d, ...t.headers }, {
1460
+ url: v(r),
1461
+ options: s
1462
+ };
1463
+ }
1464
+ };
1465
+ }, Z = function(l) {
1466
+ const n = Oe(l);
1467
+ return {
1468
+ /**
1469
+ * Retrieves a list of all in-package HTML data apps (static pages served from the package\'s public/ directory) within the specified package. Each entry includes the relative path, the package name, a canonical resource URL, and the title (extracted from the file\'s <title> tag, falling back to the path). Used by the Publisher SPA to surface a clickable \"Data Apps\" section on the package detail view, and by anyone who wants to discover a package\'s data apps programmatically without scraping the directory. Recursive depth is capped server-side to keep this cheap on large packages.
1470
+ * @summary List package data apps
1471
+ * @param {string} environmentName Name of the environment
1472
+ * @param {string} packageName Name of the package
1473
+ * @param {*} [options] Override http request option.
1474
+ * @throws {RequiredError}
1475
+ */
1476
+ async listDataApps(e, t, a) {
1477
+ const r = await n.listDataApps(e, t, a), o = l?.serverIndex ?? 0, s = g["DataAppsApi.listDataApps"]?.[o]?.url;
1478
+ return (c, i) => V(r, h, u, l)(c, s || i);
1479
+ }
1480
+ };
1481
+ }, Da = function(l, n, e) {
1482
+ const t = Z(l);
1483
+ return {
1484
+ /**
1485
+ * Retrieves a list of all in-package HTML data apps (static pages served from the package\'s public/ directory) within the specified package. Each entry includes the relative path, the package name, a canonical resource URL, and the title (extracted from the file\'s <title> tag, falling back to the path). Used by the Publisher SPA to surface a clickable \"Data Apps\" section on the package detail view, and by anyone who wants to discover a package\'s data apps programmatically without scraping the directory. Recursive depth is capped server-side to keep this cheap on large packages.
1486
+ * @summary List package data apps
1487
+ * @param {string} environmentName Name of the environment
1488
+ * @param {string} packageName Name of the package
1489
+ * @param {*} [options] Override http request option.
1490
+ * @throws {RequiredError}
1491
+ */
1492
+ listDataApps(a, r, o) {
1493
+ return t.listDataApps(a, r, o).then((s) => s(e, n));
1494
+ }
1495
+ };
1496
+ };
1497
+ class Se extends I {
1498
+ /**
1499
+ * Retrieves a list of all in-package HTML data apps (static pages served from the package\'s public/ directory) within the specified package. Each entry includes the relative path, the package name, a canonical resource URL, and the title (extracted from the file\'s <title> tag, falling back to the path). Used by the Publisher SPA to surface a clickable \"Data Apps\" section on the package detail view, and by anyone who wants to discover a package\'s data apps programmatically without scraping the directory. Recursive depth is capped server-side to keep this cheap on large packages.
1500
+ * @summary List package data apps
1501
+ * @param {string} environmentName Name of the environment
1502
+ * @param {string} packageName Name of the package
1503
+ * @param {*} [options] Override http request option.
1504
+ * @throws {RequiredError}
1505
+ * @memberof DataAppsApi
1506
+ */
1507
+ listDataApps(n, e, t) {
1508
+ return Z(this.configuration).listDataApps(n, e, t).then((a) => a(this.axios, this.basePath));
1509
+ }
1510
+ }
1511
+ const ke = function(l) {
1512
+ return {
1513
+ /**
1514
+ * Retrieves a list of all embedded databases within the specified package. These are typically local data files read by DuckDB in place (.parquet, .csv, and .xlsx) that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1515
+ * @summary List embedded databases
1516
+ * @param {string} environmentName Name of the environment
1517
+ * @param {string} packageName Name of the package
1518
+ * @param {string} [versionId] Version identifier for the package
1519
+ * @param {*} [options] Override http request option.
1520
+ * @throws {RequiredError}
1521
+ */
1522
+ listDatabases: async (n, e, t, a = {}) => {
1523
+ m("listDatabases", "environmentName", n), m("listDatabases", "packageName", e);
1524
+ const r = "/environments/{environmentName}/packages/{packageName}/databases".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), o = new URL(r, b);
1525
+ let s;
1526
+ l && (s = l.baseOptions);
1527
+ const c = { method: "GET", ...s, ...a }, i = {}, d = {};
1528
+ t !== void 0 && (d.versionId = t), P(o, d);
1529
+ let p = s && s.headers ? s.headers : {};
1530
+ return c.headers = { ...i, ...p, ...a.headers }, {
1531
+ url: v(o),
1532
+ options: c
1533
+ };
1534
+ }
1535
+ };
1536
+ }, ee = function(l) {
1537
+ const n = ke(l);
1538
+ return {
1539
+ /**
1540
+ * Retrieves a list of all embedded databases within the specified package. These are typically local data files read by DuckDB in place (.parquet, .csv, and .xlsx) that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1541
+ * @summary List embedded databases
1542
+ * @param {string} environmentName Name of the environment
1543
+ * @param {string} packageName Name of the package
1544
+ * @param {string} [versionId] Version identifier for the package
1545
+ * @param {*} [options] Override http request option.
1546
+ * @throws {RequiredError}
1547
+ */
1548
+ async listDatabases(e, t, a, r) {
1549
+ const o = await n.listDatabases(e, t, a, r), s = l?.serverIndex ?? 0, c = g["DatabasesApi.listDatabases"]?.[s]?.url;
1550
+ return (i, d) => V(o, h, u, l)(i, c || d);
1551
+ }
1552
+ };
1553
+ }, La = function(l, n, e) {
1554
+ const t = ee(l);
1555
+ return {
1556
+ /**
1557
+ * Retrieves a list of all embedded databases within the specified package. These are typically local data files read by DuckDB in place (.parquet, .csv, and .xlsx) that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1558
+ * @summary List embedded databases
1559
+ * @param {string} environmentName Name of the environment
1560
+ * @param {string} packageName Name of the package
1561
+ * @param {string} [versionId] Version identifier for the package
1562
+ * @param {*} [options] Override http request option.
1563
+ * @throws {RequiredError}
1564
+ */
1565
+ listDatabases(a, r, o, s) {
1566
+ return t.listDatabases(a, r, o, s).then((c) => c(e, n));
1567
+ }
1568
+ };
1569
+ };
1570
+ class ye extends I {
1571
+ /**
1572
+ * Retrieves a list of all embedded databases within the specified package. These are typically local data files read by DuckDB in place (.parquet, .csv, and .xlsx) that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
1573
+ * @summary List embedded databases
1574
+ * @param {string} environmentName Name of the environment
1575
+ * @param {string} packageName Name of the package
1576
+ * @param {string} [versionId] Version identifier for the package
1577
+ * @param {*} [options] Override http request option.
1578
+ * @throws {RequiredError}
1579
+ * @memberof DatabasesApi
1580
+ */
1581
+ listDatabases(n, e, t, a) {
1582
+ return ee(this.configuration).listDatabases(n, e, t, a).then((r) => r(this.axios, this.basePath));
1583
+ }
1584
+ }
1585
+ const Ce = function(l) {
1586
+ return {
1587
+ /**
1588
+ * Creates a new Malloy environment with the specified configuration. An environment serves as a container for packages, connections, and other resources. The environment will be initialized with the provided metadata and can immediately accept packages and connections.
1589
+ * @summary Create a new environment
1590
+ * @param {Environment} environment
1591
+ * @param {*} [options] Override http request option.
1592
+ * @throws {RequiredError}
1593
+ */
1594
+ createEnvironment: async (n, e = {}) => {
1595
+ m("createEnvironment", "environment", n);
1596
+ const t = "/environments", a = new URL(t, b);
1597
+ let r;
1598
+ l && (r = l.baseOptions);
1599
+ const o = { method: "POST", ...r, ...e }, s = {}, c = {};
1600
+ s["Content-Type"] = "application/json", P(a, c);
1601
+ let i = r && r.headers ? r.headers : {};
1602
+ return o.headers = { ...s, ...i, ...e.headers }, o.data = k(n, o, l), {
1603
+ url: v(a),
1604
+ options: o
1605
+ };
1606
+ },
1607
+ /**
1608
+ * Permanently deletes an environment and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The environment must exist and be accessible for deletion.
1609
+ * @summary Delete an environment
1610
+ * @param {string} environmentName Name of the environment
1611
+ * @param {*} [options] Override http request option.
1612
+ * @throws {RequiredError}
1613
+ */
1614
+ deleteEnvironment: async (n, e = {}) => {
1615
+ m("deleteEnvironment", "environmentName", n);
1616
+ const t = "/environments/{environmentName}".replace("{environmentName}", encodeURIComponent(String(n))), a = new URL(t, b);
1617
+ let r;
1618
+ l && (r = l.baseOptions);
1619
+ const o = { method: "DELETE", ...r, ...e }, s = {};
1620
+ P(a, {});
1621
+ let i = r && r.headers ? r.headers : {};
1622
+ return o.headers = { ...s, ...i, ...e.headers }, {
1623
+ url: v(a),
1624
+ options: o
1625
+ };
1626
+ },
1627
+ /**
1628
+ * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
1629
+ * @summary Get environment details and metadata
1630
+ * @param {string} environmentName Name of the environment
1631
+ * @param {boolean} [reload] Load / reload the environment before returning result
1632
+ * @param {*} [options] Override http request option.
1633
+ * @throws {RequiredError}
1634
+ */
1635
+ getEnvironment: async (n, e, t = {}) => {
1636
+ m("getEnvironment", "environmentName", n);
1637
+ const a = "/environments/{environmentName}".replace("{environmentName}", encodeURIComponent(String(n))), r = new URL(a, b);
1638
+ let o;
1639
+ l && (o = l.baseOptions);
1640
+ const s = { method: "GET", ...o, ...t }, c = {}, i = {};
1641
+ e !== void 0 && (i.reload = e), P(r, i);
1642
+ let d = o && o.headers ? o.headers : {};
1643
+ return s.headers = { ...c, ...d, ...t.headers }, {
1644
+ url: v(r),
1645
+ options: s
1646
+ };
1647
+ },
1648
+ /**
1649
+ * Retrieves a list of all environments currently hosted on this Malloy Publisher server. Each environment contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available environments and their basic information.
1650
+ * @summary List all available environments
1651
+ * @param {*} [options] Override http request option.
1652
+ * @throws {RequiredError}
1653
+ */
1654
+ listEnvironments: async (n = {}) => {
1655
+ const e = "/environments", t = new URL(e, b);
1656
+ let a;
1657
+ l && (a = l.baseOptions);
1658
+ const r = { method: "GET", ...a, ...n }, o = {};
1659
+ P(t, {});
1660
+ let c = a && a.headers ? a.headers : {};
1661
+ return r.headers = { ...o, ...c, ...n.headers }, {
1662
+ url: v(t),
1663
+ options: r
1664
+ };
1665
+ },
1666
+ /**
1667
+ * Updates the configuration and metadata of an existing environment. This allows you to modify environment settings, update the README, change the location, or update other environment-level properties. The environment must exist and be accessible.
1668
+ * @summary Update environment configuration
1669
+ * @param {string} environmentName Name of the environment
1670
+ * @param {Environment} environment
1671
+ * @param {*} [options] Override http request option.
1672
+ * @throws {RequiredError}
1673
+ */
1674
+ updateEnvironment: async (n, e, t = {}) => {
1675
+ m("updateEnvironment", "environmentName", n), m("updateEnvironment", "environment", e);
1676
+ const a = "/environments/{environmentName}".replace("{environmentName}", encodeURIComponent(String(n))), r = new URL(a, b);
1677
+ let o;
1678
+ l && (o = l.baseOptions);
1679
+ const s = { method: "PATCH", ...o, ...t }, c = {}, i = {};
1680
+ c["Content-Type"] = "application/json", P(r, i);
1681
+ let d = o && o.headers ? o.headers : {};
1682
+ return s.headers = { ...c, ...d, ...t.headers }, s.data = k(e, s, l), {
1683
+ url: v(r),
1684
+ options: s
1685
+ };
1686
+ }
1687
+ };
1688
+ }, N = function(l) {
1689
+ const n = Ce(l);
1690
+ return {
1691
+ /**
1692
+ * Creates a new Malloy environment with the specified configuration. An environment serves as a container for packages, connections, and other resources. The environment will be initialized with the provided metadata and can immediately accept packages and connections.
1693
+ * @summary Create a new environment
1694
+ * @param {Environment} environment
1695
+ * @param {*} [options] Override http request option.
1696
+ * @throws {RequiredError}
1697
+ */
1698
+ async createEnvironment(e, t) {
1699
+ const a = await n.createEnvironment(e, t), r = l?.serverIndex ?? 0, o = g["EnvironmentsApi.createEnvironment"]?.[r]?.url;
1700
+ return (s, c) => V(a, h, u, l)(s, o || c);
1701
+ },
1702
+ /**
1703
+ * Permanently deletes an environment and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The environment must exist and be accessible for deletion.
1704
+ * @summary Delete an environment
1705
+ * @param {string} environmentName Name of the environment
1706
+ * @param {*} [options] Override http request option.
1707
+ * @throws {RequiredError}
1708
+ */
1709
+ async deleteEnvironment(e, t) {
1710
+ const a = await n.deleteEnvironment(e, t), r = l?.serverIndex ?? 0, o = g["EnvironmentsApi.deleteEnvironment"]?.[r]?.url;
1711
+ return (s, c) => V(a, h, u, l)(s, o || c);
1712
+ },
1713
+ /**
1714
+ * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
1715
+ * @summary Get environment details and metadata
1716
+ * @param {string} environmentName Name of the environment
1717
+ * @param {boolean} [reload] Load / reload the environment before returning result
1718
+ * @param {*} [options] Override http request option.
1719
+ * @throws {RequiredError}
1720
+ */
1721
+ async getEnvironment(e, t, a) {
1722
+ const r = await n.getEnvironment(e, t, a), o = l?.serverIndex ?? 0, s = g["EnvironmentsApi.getEnvironment"]?.[o]?.url;
1723
+ return (c, i) => V(r, h, u, l)(c, s || i);
1724
+ },
1725
+ /**
1726
+ * Retrieves a list of all environments currently hosted on this Malloy Publisher server. Each environment contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available environments and their basic information.
1727
+ * @summary List all available environments
1728
+ * @param {*} [options] Override http request option.
1729
+ * @throws {RequiredError}
1730
+ */
1731
+ async listEnvironments(e) {
1732
+ const t = await n.listEnvironments(e), a = l?.serverIndex ?? 0, r = g["EnvironmentsApi.listEnvironments"]?.[a]?.url;
1733
+ return (o, s) => V(t, h, u, l)(o, r || s);
1734
+ },
1735
+ /**
1736
+ * Updates the configuration and metadata of an existing environment. This allows you to modify environment settings, update the README, change the location, or update other environment-level properties. The environment must exist and be accessible.
1737
+ * @summary Update environment configuration
1738
+ * @param {string} environmentName Name of the environment
1739
+ * @param {Environment} environment
1740
+ * @param {*} [options] Override http request option.
1741
+ * @throws {RequiredError}
1742
+ */
1743
+ async updateEnvironment(e, t, a) {
1744
+ const r = await n.updateEnvironment(e, t, a), o = l?.serverIndex ?? 0, s = g["EnvironmentsApi.updateEnvironment"]?.[o]?.url;
1745
+ return (c, i) => V(r, h, u, l)(c, s || i);
1746
+ }
1747
+ };
1748
+ }, ja = function(l, n, e) {
1749
+ const t = N(l);
1750
+ return {
1751
+ /**
1752
+ * Creates a new Malloy environment with the specified configuration. An environment serves as a container for packages, connections, and other resources. The environment will be initialized with the provided metadata and can immediately accept packages and connections.
1753
+ * @summary Create a new environment
1754
+ * @param {Environment} environment
1755
+ * @param {*} [options] Override http request option.
1756
+ * @throws {RequiredError}
1757
+ */
1758
+ createEnvironment(a, r) {
1759
+ return t.createEnvironment(a, r).then((o) => o(e, n));
1760
+ },
1761
+ /**
1762
+ * Permanently deletes an environment and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The environment must exist and be accessible for deletion.
1763
+ * @summary Delete an environment
1764
+ * @param {string} environmentName Name of the environment
1765
+ * @param {*} [options] Override http request option.
1766
+ * @throws {RequiredError}
1767
+ */
1768
+ deleteEnvironment(a, r) {
1769
+ return t.deleteEnvironment(a, r).then((o) => o(e, n));
1770
+ },
1771
+ /**
1772
+ * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
1773
+ * @summary Get environment details and metadata
1774
+ * @param {string} environmentName Name of the environment
1775
+ * @param {boolean} [reload] Load / reload the environment before returning result
1776
+ * @param {*} [options] Override http request option.
1777
+ * @throws {RequiredError}
1778
+ */
1779
+ getEnvironment(a, r, o) {
1780
+ return t.getEnvironment(a, r, o).then((s) => s(e, n));
1781
+ },
1782
+ /**
1783
+ * Retrieves a list of all environments currently hosted on this Malloy Publisher server. Each environment contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available environments and their basic information.
1784
+ * @summary List all available environments
1785
+ * @param {*} [options] Override http request option.
1786
+ * @throws {RequiredError}
1787
+ */
1788
+ listEnvironments(a) {
1789
+ return t.listEnvironments(a).then((r) => r(e, n));
1790
+ },
1791
+ /**
1792
+ * Updates the configuration and metadata of an existing environment. This allows you to modify environment settings, update the README, change the location, or update other environment-level properties. The environment must exist and be accessible.
1793
+ * @summary Update environment configuration
1794
+ * @param {string} environmentName Name of the environment
1795
+ * @param {Environment} environment
1796
+ * @param {*} [options] Override http request option.
1797
+ * @throws {RequiredError}
1798
+ */
1799
+ updateEnvironment(a, r, o) {
1800
+ return t.updateEnvironment(a, r, o).then((s) => s(e, n));
1801
+ }
1802
+ };
1803
+ };
1804
+ class Ie extends I {
1805
+ /**
1806
+ * Creates a new Malloy environment with the specified configuration. An environment serves as a container for packages, connections, and other resources. The environment will be initialized with the provided metadata and can immediately accept packages and connections.
1807
+ * @summary Create a new environment
1808
+ * @param {Environment} environment
1809
+ * @param {*} [options] Override http request option.
1810
+ * @throws {RequiredError}
1811
+ * @memberof EnvironmentsApi
1812
+ */
1813
+ createEnvironment(n, e) {
1814
+ return N(this.configuration).createEnvironment(n, e).then((t) => t(this.axios, this.basePath));
1815
+ }
1816
+ /**
1817
+ * Permanently deletes an environment and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The environment must exist and be accessible for deletion.
1818
+ * @summary Delete an environment
1819
+ * @param {string} environmentName Name of the environment
1820
+ * @param {*} [options] Override http request option.
1821
+ * @throws {RequiredError}
1822
+ * @memberof EnvironmentsApi
1823
+ */
1824
+ deleteEnvironment(n, e) {
1825
+ return N(this.configuration).deleteEnvironment(n, e).then((t) => t(this.axios, this.basePath));
1826
+ }
1827
+ /**
1828
+ * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
1829
+ * @summary Get environment details and metadata
1830
+ * @param {string} environmentName Name of the environment
1831
+ * @param {boolean} [reload] Load / reload the environment before returning result
1832
+ * @param {*} [options] Override http request option.
1833
+ * @throws {RequiredError}
1834
+ * @memberof EnvironmentsApi
1835
+ */
1836
+ getEnvironment(n, e, t) {
1837
+ return N(this.configuration).getEnvironment(n, e, t).then((a) => a(this.axios, this.basePath));
1838
+ }
1839
+ /**
1840
+ * Retrieves a list of all environments currently hosted on this Malloy Publisher server. Each environment contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available environments and their basic information.
1841
+ * @summary List all available environments
1842
+ * @param {*} [options] Override http request option.
1843
+ * @throws {RequiredError}
1844
+ * @memberof EnvironmentsApi
1845
+ */
1846
+ listEnvironments(n) {
1847
+ return N(this.configuration).listEnvironments(n).then((e) => e(this.axios, this.basePath));
1848
+ }
1849
+ /**
1850
+ * Updates the configuration and metadata of an existing environment. This allows you to modify environment settings, update the README, change the location, or update other environment-level properties. The environment must exist and be accessible.
1851
+ * @summary Update environment configuration
1852
+ * @param {string} environmentName Name of the environment
1853
+ * @param {Environment} environment
1854
+ * @param {*} [options] Override http request option.
1855
+ * @throws {RequiredError}
1856
+ * @memberof EnvironmentsApi
1857
+ */
1858
+ updateEnvironment(n, e, t) {
1859
+ return N(this.configuration).updateEnvironment(n, e, t).then((a) => a(this.axios, this.basePath));
1860
+ }
1861
+ }
1862
+ const xe = function(l) {
1863
+ return {
1864
+ /**
1865
+ * Creates a materialization and starts building. Behavior depends on the request body (see CreateMaterializationRequest): * Orchestrated build — supply `buildInstructions`. The publisher builds directly into the caller-assigned names derived from the package\'s already-compiled build plan (read off `Package.buildPlan`). Returns the materialization already building. * Auto-run (standalone, default) — omit `buildInstructions`; the publisher self-assigns names and runs all phases in one pass.
1866
+ * @summary Create a materialization
1867
+ * @param {string} environmentName Name of the environment
1868
+ * @param {string} packageName Name of the package
1869
+ * @param {CreateMaterializationRequest} [createMaterializationRequest]
1870
+ * @param {*} [options] Override http request option.
1871
+ * @throws {RequiredError}
1872
+ */
1873
+ createMaterialization: async (n, e, t, a = {}) => {
1874
+ m("createMaterialization", "environmentName", n), m("createMaterialization", "packageName", e);
1875
+ const r = "/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), o = new URL(r, b);
1876
+ let s;
1877
+ l && (s = l.baseOptions);
1878
+ const c = { method: "POST", ...s, ...a }, i = {}, d = {};
1879
+ i["Content-Type"] = "application/json", P(o, d);
1880
+ let p = s && s.headers ? s.headers : {};
1881
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
1882
+ url: v(o),
1883
+ options: c
1884
+ };
1885
+ },
1886
+ /**
1887
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
1888
+ * @summary Delete a materialization
1889
+ * @param {string} environmentName Name of the environment
1890
+ * @param {string} packageName Name of the package
1891
+ * @param {string} materializationId ID of the materialization
1892
+ * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC).
1893
+ * @param {*} [options] Override http request option.
1894
+ * @throws {RequiredError}
1895
+ */
1896
+ deleteMaterialization: async (n, e, t, a, r = {}) => {
1897
+ m("deleteMaterialization", "environmentName", n), m("deleteMaterialization", "packageName", e), m("deleteMaterialization", "materializationId", t);
1898
+ const o = "/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{materializationId}", encodeURIComponent(String(t))), s = new URL(o, b);
1899
+ let c;
1900
+ l && (c = l.baseOptions);
1901
+ const i = { method: "DELETE", ...c, ...r }, d = {}, p = {};
1902
+ a !== void 0 && (p.dropTables = a), P(s, p);
1903
+ let O = c && c.headers ? c.headers : {};
1904
+ return i.headers = { ...d, ...O, ...r.headers }, {
1905
+ url: v(s),
1906
+ options: i
1907
+ };
1908
+ },
1909
+ /**
1910
+ *
1911
+ * @summary Get a specific materialization
1912
+ * @param {string} environmentName Name of the environment
1913
+ * @param {string} packageName Name of the package
1914
+ * @param {string} materializationId ID of the materialization
1915
+ * @param {*} [options] Override http request option.
1916
+ * @throws {RequiredError}
1917
+ */
1918
+ getMaterialization: async (n, e, t, a = {}) => {
1919
+ m("getMaterialization", "environmentName", n), m("getMaterialization", "packageName", e), m("getMaterialization", "materializationId", t);
1920
+ const r = "/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{materializationId}", encodeURIComponent(String(t))), o = new URL(r, b);
1921
+ let s;
1922
+ l && (s = l.baseOptions);
1923
+ const c = { method: "GET", ...s, ...a }, i = {};
1924
+ P(o, {});
1925
+ let p = s && s.headers ? s.headers : {};
1926
+ return c.headers = { ...i, ...p, ...a.headers }, {
1927
+ url: v(o),
1928
+ options: c
1929
+ };
1930
+ },
1931
+ /**
1932
+ * Returns every materialization across all packages in the environment, ordered by most recent first. Each item carries its `packageName`, so an environment-scoped view can group or label by package. This is the collection-level sibling of the per-package `/packages/{packageName}/materializations` list; the literal `materializations` segment is matched ahead of `{packageName}`, so `materializations` cannot be used as a package name.
1933
+ * @summary List all materializations in an environment
1934
+ * @param {string} environmentName Name of the environment
1935
+ * @param {number} [limit] Maximum number of materializations to return
1936
+ * @param {number} [offset] Number of materializations to skip
1937
+ * @param {*} [options] Override http request option.
1938
+ * @throws {RequiredError}
1939
+ */
1940
+ listEnvironmentMaterializations: async (n, e, t, a = {}) => {
1941
+ m("listEnvironmentMaterializations", "environmentName", n);
1942
+ const r = "/environments/{environmentName}/packages/materializations".replace("{environmentName}", encodeURIComponent(String(n))), o = new URL(r, b);
1943
+ let s;
1944
+ l && (s = l.baseOptions);
1945
+ const c = { method: "GET", ...s, ...a }, i = {}, d = {};
1946
+ e !== void 0 && (d.limit = e), t !== void 0 && (d.offset = t), P(o, d);
1947
+ let p = s && s.headers ? s.headers : {};
1948
+ return c.headers = { ...i, ...p, ...a.headers }, {
1949
+ url: v(o),
1950
+ options: c
1951
+ };
1952
+ },
1953
+ /**
1954
+ * Returns the materialization history for the package, ordered by most recent first.
1955
+ * @summary List materializations for a package
1956
+ * @param {string} environmentName Name of the environment
1957
+ * @param {string} packageName Name of the package
1958
+ * @param {number} [limit] Maximum number of materializations to return
1959
+ * @param {number} [offset] Number of materializations to skip
1960
+ * @param {*} [options] Override http request option.
1961
+ * @throws {RequiredError}
1962
+ */
1963
+ listMaterializations: async (n, e, t, a, r = {}) => {
1964
+ m("listMaterializations", "environmentName", n), m("listMaterializations", "packageName", e);
1965
+ const o = "/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), s = new URL(o, b);
1966
+ let c;
1967
+ l && (c = l.baseOptions);
1968
+ const i = { method: "GET", ...c, ...r }, d = {}, p = {};
1969
+ t !== void 0 && (p.limit = t), a !== void 0 && (p.offset = a), P(s, p);
1970
+ let O = c && c.headers ? c.headers : {};
1971
+ return i.headers = { ...d, ...O, ...r.headers }, {
1972
+ url: v(s),
1973
+ options: i
1974
+ };
1975
+ },
1976
+ /**
1977
+ * Performs an action on a materialization. The action is specified via the `action` query parameter: * `stop` - Cancels a PENDING or building materialization. Returns 200.
1978
+ * @summary Perform an action on a materialization
1979
+ * @param {string} environmentName Name of the environment
1980
+ * @param {string} packageName Name of the package
1981
+ * @param {string} materializationId ID of the materialization
1982
+ * @param {MaterializationActionActionEnum} action Action to perform on the materialization
1983
+ * @param {*} [options] Override http request option.
1984
+ * @throws {RequiredError}
1985
+ */
1986
+ materializationAction: async (n, e, t, a, r = {}) => {
1987
+ m("materializationAction", "environmentName", n), m("materializationAction", "packageName", e), m("materializationAction", "materializationId", t), m("materializationAction", "action", a);
1988
+ const o = "/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{materializationId}", encodeURIComponent(String(t))), s = new URL(o, b);
1989
+ let c;
1990
+ l && (c = l.baseOptions);
1991
+ const i = { method: "POST", ...c, ...r }, d = {}, p = {};
1992
+ a !== void 0 && (p.action = a), P(s, p);
1993
+ let O = c && c.headers ? c.headers : {};
1994
+ return i.headers = { ...d, ...O, ...r.headers }, {
1995
+ url: v(s),
1996
+ options: i
1997
+ };
1998
+ }
1999
+ };
2000
+ }, A = function(l) {
2001
+ const n = xe(l);
2002
+ return {
2003
+ /**
2004
+ * Creates a materialization and starts building. Behavior depends on the request body (see CreateMaterializationRequest): * Orchestrated build — supply `buildInstructions`. The publisher builds directly into the caller-assigned names derived from the package\'s already-compiled build plan (read off `Package.buildPlan`). Returns the materialization already building. * Auto-run (standalone, default) — omit `buildInstructions`; the publisher self-assigns names and runs all phases in one pass.
2005
+ * @summary Create a materialization
2006
+ * @param {string} environmentName Name of the environment
2007
+ * @param {string} packageName Name of the package
2008
+ * @param {CreateMaterializationRequest} [createMaterializationRequest]
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ */
2012
+ async createMaterialization(e, t, a, r) {
2013
+ const o = await n.createMaterialization(e, t, a, r), s = l?.serverIndex ?? 0, c = g["MaterializationsApi.createMaterialization"]?.[s]?.url;
2014
+ return (i, d) => V(o, h, u, l)(i, c || d);
2015
+ },
2016
+ /**
2017
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
2018
+ * @summary Delete a materialization
2019
+ * @param {string} environmentName Name of the environment
2020
+ * @param {string} packageName Name of the package
2021
+ * @param {string} materializationId ID of the materialization
2022
+ * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC).
2023
+ * @param {*} [options] Override http request option.
2024
+ * @throws {RequiredError}
2025
+ */
2026
+ async deleteMaterialization(e, t, a, r, o) {
2027
+ const s = await n.deleteMaterialization(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["MaterializationsApi.deleteMaterialization"]?.[c]?.url;
2028
+ return (d, p) => V(s, h, u, l)(d, i || p);
2029
+ },
2030
+ /**
2031
+ *
2032
+ * @summary Get a specific materialization
2033
+ * @param {string} environmentName Name of the environment
2034
+ * @param {string} packageName Name of the package
2035
+ * @param {string} materializationId ID of the materialization
2036
+ * @param {*} [options] Override http request option.
2037
+ * @throws {RequiredError}
2038
+ */
2039
+ async getMaterialization(e, t, a, r) {
2040
+ const o = await n.getMaterialization(e, t, a, r), s = l?.serverIndex ?? 0, c = g["MaterializationsApi.getMaterialization"]?.[s]?.url;
2041
+ return (i, d) => V(o, h, u, l)(i, c || d);
2042
+ },
2043
+ /**
2044
+ * Returns every materialization across all packages in the environment, ordered by most recent first. Each item carries its `packageName`, so an environment-scoped view can group or label by package. This is the collection-level sibling of the per-package `/packages/{packageName}/materializations` list; the literal `materializations` segment is matched ahead of `{packageName}`, so `materializations` cannot be used as a package name.
2045
+ * @summary List all materializations in an environment
2046
+ * @param {string} environmentName Name of the environment
2047
+ * @param {number} [limit] Maximum number of materializations to return
2048
+ * @param {number} [offset] Number of materializations to skip
2049
+ * @param {*} [options] Override http request option.
2050
+ * @throws {RequiredError}
2051
+ */
2052
+ async listEnvironmentMaterializations(e, t, a, r) {
2053
+ const o = await n.listEnvironmentMaterializations(e, t, a, r), s = l?.serverIndex ?? 0, c = g["MaterializationsApi.listEnvironmentMaterializations"]?.[s]?.url;
2054
+ return (i, d) => V(o, h, u, l)(i, c || d);
2055
+ },
2056
+ /**
2057
+ * Returns the materialization history for the package, ordered by most recent first.
2058
+ * @summary List materializations for a package
2059
+ * @param {string} environmentName Name of the environment
2060
+ * @param {string} packageName Name of the package
2061
+ * @param {number} [limit] Maximum number of materializations to return
2062
+ * @param {number} [offset] Number of materializations to skip
2063
+ * @param {*} [options] Override http request option.
2064
+ * @throws {RequiredError}
2065
+ */
2066
+ async listMaterializations(e, t, a, r, o) {
2067
+ const s = await n.listMaterializations(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["MaterializationsApi.listMaterializations"]?.[c]?.url;
2068
+ return (d, p) => V(s, h, u, l)(d, i || p);
2069
+ },
2070
+ /**
2071
+ * Performs an action on a materialization. The action is specified via the `action` query parameter: * `stop` - Cancels a PENDING or building materialization. Returns 200.
2072
+ * @summary Perform an action on a materialization
2073
+ * @param {string} environmentName Name of the environment
2074
+ * @param {string} packageName Name of the package
2075
+ * @param {string} materializationId ID of the materialization
2076
+ * @param {MaterializationActionActionEnum} action Action to perform on the materialization
2077
+ * @param {*} [options] Override http request option.
2078
+ * @throws {RequiredError}
2079
+ */
2080
+ async materializationAction(e, t, a, r, o) {
2081
+ const s = await n.materializationAction(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["MaterializationsApi.materializationAction"]?.[c]?.url;
2082
+ return (d, p) => V(s, h, u, l)(d, i || p);
2083
+ }
2084
+ };
2085
+ }, Ha = function(l, n, e) {
2086
+ const t = A(l);
2087
+ return {
2088
+ /**
2089
+ * Creates a materialization and starts building. Behavior depends on the request body (see CreateMaterializationRequest): * Orchestrated build — supply `buildInstructions`. The publisher builds directly into the caller-assigned names derived from the package\'s already-compiled build plan (read off `Package.buildPlan`). Returns the materialization already building. * Auto-run (standalone, default) — omit `buildInstructions`; the publisher self-assigns names and runs all phases in one pass.
2090
+ * @summary Create a materialization
2091
+ * @param {string} environmentName Name of the environment
2092
+ * @param {string} packageName Name of the package
2093
+ * @param {CreateMaterializationRequest} [createMaterializationRequest]
2094
+ * @param {*} [options] Override http request option.
2095
+ * @throws {RequiredError}
2096
+ */
2097
+ createMaterialization(a, r, o, s) {
2098
+ return t.createMaterialization(a, r, o, s).then((c) => c(e, n));
2099
+ },
2100
+ /**
2101
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
2102
+ * @summary Delete a materialization
2103
+ * @param {string} environmentName Name of the environment
2104
+ * @param {string} packageName Name of the package
2105
+ * @param {string} materializationId ID of the materialization
2106
+ * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC).
2107
+ * @param {*} [options] Override http request option.
2108
+ * @throws {RequiredError}
2109
+ */
2110
+ deleteMaterialization(a, r, o, s, c) {
2111
+ return t.deleteMaterialization(a, r, o, s, c).then((i) => i(e, n));
2112
+ },
2113
+ /**
2114
+ *
2115
+ * @summary Get a specific materialization
2116
+ * @param {string} environmentName Name of the environment
2117
+ * @param {string} packageName Name of the package
2118
+ * @param {string} materializationId ID of the materialization
2119
+ * @param {*} [options] Override http request option.
2120
+ * @throws {RequiredError}
2121
+ */
2122
+ getMaterialization(a, r, o, s) {
2123
+ return t.getMaterialization(a, r, o, s).then((c) => c(e, n));
2124
+ },
2125
+ /**
2126
+ * Returns every materialization across all packages in the environment, ordered by most recent first. Each item carries its `packageName`, so an environment-scoped view can group or label by package. This is the collection-level sibling of the per-package `/packages/{packageName}/materializations` list; the literal `materializations` segment is matched ahead of `{packageName}`, so `materializations` cannot be used as a package name.
2127
+ * @summary List all materializations in an environment
2128
+ * @param {string} environmentName Name of the environment
2129
+ * @param {number} [limit] Maximum number of materializations to return
2130
+ * @param {number} [offset] Number of materializations to skip
2131
+ * @param {*} [options] Override http request option.
2132
+ * @throws {RequiredError}
2133
+ */
2134
+ listEnvironmentMaterializations(a, r, o, s) {
2135
+ return t.listEnvironmentMaterializations(a, r, o, s).then((c) => c(e, n));
2136
+ },
2137
+ /**
2138
+ * Returns the materialization history for the package, ordered by most recent first.
2139
+ * @summary List materializations for a package
2140
+ * @param {string} environmentName Name of the environment
2141
+ * @param {string} packageName Name of the package
2142
+ * @param {number} [limit] Maximum number of materializations to return
2143
+ * @param {number} [offset] Number of materializations to skip
2144
+ * @param {*} [options] Override http request option.
2145
+ * @throws {RequiredError}
2146
+ */
2147
+ listMaterializations(a, r, o, s, c) {
2148
+ return t.listMaterializations(a, r, o, s, c).then((i) => i(e, n));
2149
+ },
2150
+ /**
2151
+ * Performs an action on a materialization. The action is specified via the `action` query parameter: * `stop` - Cancels a PENDING or building materialization. Returns 200.
2152
+ * @summary Perform an action on a materialization
2153
+ * @param {string} environmentName Name of the environment
2154
+ * @param {string} packageName Name of the package
2155
+ * @param {string} materializationId ID of the materialization
2156
+ * @param {MaterializationActionActionEnum} action Action to perform on the materialization
2157
+ * @param {*} [options] Override http request option.
2158
+ * @throws {RequiredError}
2159
+ */
2160
+ materializationAction(a, r, o, s, c) {
2161
+ return t.materializationAction(a, r, o, s, c).then((i) => i(e, n));
2162
+ }
2163
+ };
2164
+ };
2165
+ class Ae extends I {
2166
+ /**
2167
+ * Creates a materialization and starts building. Behavior depends on the request body (see CreateMaterializationRequest): * Orchestrated build — supply `buildInstructions`. The publisher builds directly into the caller-assigned names derived from the package\'s already-compiled build plan (read off `Package.buildPlan`). Returns the materialization already building. * Auto-run (standalone, default) — omit `buildInstructions`; the publisher self-assigns names and runs all phases in one pass.
2168
+ * @summary Create a materialization
2169
+ * @param {string} environmentName Name of the environment
2170
+ * @param {string} packageName Name of the package
2171
+ * @param {CreateMaterializationRequest} [createMaterializationRequest]
2172
+ * @param {*} [options] Override http request option.
2173
+ * @throws {RequiredError}
2174
+ * @memberof MaterializationsApi
2175
+ */
2176
+ createMaterialization(n, e, t, a) {
2177
+ return A(this.configuration).createMaterialization(n, e, t, a).then((r) => r(this.axios, this.basePath));
2178
+ }
2179
+ /**
2180
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
2181
+ * @summary Delete a materialization
2182
+ * @param {string} environmentName Name of the environment
2183
+ * @param {string} packageName Name of the package
2184
+ * @param {string} materializationId ID of the materialization
2185
+ * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC).
2186
+ * @param {*} [options] Override http request option.
2187
+ * @throws {RequiredError}
2188
+ * @memberof MaterializationsApi
2189
+ */
2190
+ deleteMaterialization(n, e, t, a, r) {
2191
+ return A(this.configuration).deleteMaterialization(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2192
+ }
2193
+ /**
2194
+ *
2195
+ * @summary Get a specific materialization
2196
+ * @param {string} environmentName Name of the environment
2197
+ * @param {string} packageName Name of the package
2198
+ * @param {string} materializationId ID of the materialization
2199
+ * @param {*} [options] Override http request option.
2200
+ * @throws {RequiredError}
2201
+ * @memberof MaterializationsApi
2202
+ */
2203
+ getMaterialization(n, e, t, a) {
2204
+ return A(this.configuration).getMaterialization(n, e, t, a).then((r) => r(this.axios, this.basePath));
2205
+ }
2206
+ /**
2207
+ * Returns every materialization across all packages in the environment, ordered by most recent first. Each item carries its `packageName`, so an environment-scoped view can group or label by package. This is the collection-level sibling of the per-package `/packages/{packageName}/materializations` list; the literal `materializations` segment is matched ahead of `{packageName}`, so `materializations` cannot be used as a package name.
2208
+ * @summary List all materializations in an environment
2209
+ * @param {string} environmentName Name of the environment
2210
+ * @param {number} [limit] Maximum number of materializations to return
2211
+ * @param {number} [offset] Number of materializations to skip
2212
+ * @param {*} [options] Override http request option.
2213
+ * @throws {RequiredError}
2214
+ * @memberof MaterializationsApi
2215
+ */
2216
+ listEnvironmentMaterializations(n, e, t, a) {
2217
+ return A(this.configuration).listEnvironmentMaterializations(n, e, t, a).then((r) => r(this.axios, this.basePath));
2218
+ }
2219
+ /**
2220
+ * Returns the materialization history for the package, ordered by most recent first.
2221
+ * @summary List materializations for a package
2222
+ * @param {string} environmentName Name of the environment
2223
+ * @param {string} packageName Name of the package
2224
+ * @param {number} [limit] Maximum number of materializations to return
2225
+ * @param {number} [offset] Number of materializations to skip
2226
+ * @param {*} [options] Override http request option.
2227
+ * @throws {RequiredError}
2228
+ * @memberof MaterializationsApi
2229
+ */
2230
+ listMaterializations(n, e, t, a, r) {
2231
+ return A(this.configuration).listMaterializations(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2232
+ }
2233
+ /**
2234
+ * Performs an action on a materialization. The action is specified via the `action` query parameter: * `stop` - Cancels a PENDING or building materialization. Returns 200.
2235
+ * @summary Perform an action on a materialization
2236
+ * @param {string} environmentName Name of the environment
2237
+ * @param {string} packageName Name of the package
2238
+ * @param {string} materializationId ID of the materialization
2239
+ * @param {MaterializationActionActionEnum} action Action to perform on the materialization
2240
+ * @param {*} [options] Override http request option.
2241
+ * @throws {RequiredError}
2242
+ * @memberof MaterializationsApi
2243
+ */
2244
+ materializationAction(n, e, t, a, r) {
2245
+ return A(this.configuration).materializationAction(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2246
+ }
2247
+ }
2248
+ const _a = {
2249
+ Stop: "stop"
2250
+ }, Re = function(l) {
2251
+ return {
2252
+ /**
2253
+ * Compiles Malloy source code in the context of a specific model file. The submitted source is appended to the full model content, giving it access to all sources, imports, and queries defined in the model. Relative imports resolve correctly against sibling model files. Returns compilation status and any problems (errors or warnings) found.
2254
+ * @summary Compile Malloy source code
2255
+ * @param {string} environmentName Name of the environment
2256
+ * @param {string} packageName Name of the package
2257
+ * @param {string} path Path to the model within the package (used to resolve relative imports)
2258
+ * @param {CompileRequest} compileRequest
2259
+ * @param {*} [options] Override http request option.
2260
+ * @throws {RequiredError}
2261
+ */
2262
+ compileModelSource: async (n, e, t, a, r = {}) => {
2263
+ m("compileModelSource", "environmentName", n), m("compileModelSource", "packageName", e), m("compileModelSource", "path", t), m("compileModelSource", "compileRequest", a);
2264
+ const o = "/environments/{environmentName}/packages/{packageName}/models/{path}/compile".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{path}", encodeURIComponent(String(t))), s = new URL(o, b);
2265
+ let c;
2266
+ l && (c = l.baseOptions);
2267
+ const i = { method: "POST", ...c, ...r }, d = {}, p = {};
2268
+ d["Content-Type"] = "application/json", P(s, p);
2269
+ let O = c && c.headers ? c.headers : {};
2270
+ return i.headers = { ...d, ...O, ...r.headers }, i.data = k(a, i, l), {
2271
+ url: v(s),
2272
+ options: i
2273
+ };
2274
+ },
2275
+ /**
2276
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
2277
+ * @summary Execute Malloy query
2278
+ * @param {string} environmentName Name of the environment
2279
+ * @param {string} packageName Name of the package
2280
+ * @param {string} path Path to the model within the package
2281
+ * @param {QueryRequest} queryRequest
2282
+ * @param {*} [options] Override http request option.
2283
+ * @throws {RequiredError}
2284
+ */
2285
+ executeQueryModel: async (n, e, t, a, r = {}) => {
2286
+ m("executeQueryModel", "environmentName", n), m("executeQueryModel", "packageName", e), m("executeQueryModel", "path", t), m("executeQueryModel", "queryRequest", a);
2287
+ const o = "/environments/{environmentName}/packages/{packageName}/models/{path}/query".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{path}", encodeURIComponent(String(t))), s = new URL(o, b);
2288
+ let c;
2289
+ l && (c = l.baseOptions);
2290
+ const i = { method: "POST", ...c, ...r }, d = {}, p = {};
2291
+ d["Content-Type"] = "application/json", P(s, p);
2292
+ let O = c && c.headers ? c.headers : {};
2293
+ return i.headers = { ...d, ...O, ...r.headers }, i.data = k(a, i, l), {
2294
+ url: v(s),
2295
+ options: i
2296
+ };
2297
+ },
2298
+ /**
2299
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
2300
+ * @summary Get compiled Malloy model
2301
+ * @param {string} environmentName Name of the environment
2302
+ * @param {string} packageName Name of the package
2303
+ * @param {string} path Path to the model within the package
2304
+ * @param {string} [versionId] Version identifier for the package
2305
+ * @param {*} [options] Override http request option.
2306
+ * @throws {RequiredError}
2307
+ */
2308
+ getModel: async (n, e, t, a, r = {}) => {
2309
+ m("getModel", "environmentName", n), m("getModel", "packageName", e), m("getModel", "path", t);
2310
+ const o = "/environments/{environmentName}/packages/{packageName}/models/{path}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{path}", encodeURIComponent(String(t))), s = new URL(o, b);
2311
+ let c;
2312
+ l && (c = l.baseOptions);
2313
+ const i = { method: "GET", ...c, ...r }, d = {}, p = {};
2314
+ a !== void 0 && (p.versionId = a), P(s, p);
2315
+ let O = c && c.headers ? c.headers : {};
2316
+ return i.headers = { ...d, ...O, ...r.headers }, {
2317
+ url: v(s),
2318
+ options: i
2319
+ };
2320
+ },
2321
+ /**
2322
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
2323
+ * @summary List package models
2324
+ * @param {string} environmentName Name of the environment
2325
+ * @param {string} packageName Name of the package
2326
+ * @param {string} [versionId] Version identifier for the package
2327
+ * @param {*} [options] Override http request option.
2328
+ * @throws {RequiredError}
2329
+ */
2330
+ listModels: async (n, e, t, a = {}) => {
2331
+ m("listModels", "environmentName", n), m("listModels", "packageName", e);
2332
+ const r = "/environments/{environmentName}/packages/{packageName}/models".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), o = new URL(r, b);
2333
+ let s;
2334
+ l && (s = l.baseOptions);
2335
+ const c = { method: "GET", ...s, ...a }, i = {}, d = {};
2336
+ t !== void 0 && (d.versionId = t), P(o, d);
2337
+ let p = s && s.headers ? s.headers : {};
2338
+ return c.headers = { ...i, ...p, ...a.headers }, {
2339
+ url: v(o),
2340
+ options: c
2341
+ };
2342
+ }
2343
+ };
2344
+ }, w = function(l) {
2345
+ const n = Re(l);
2346
+ return {
2347
+ /**
2348
+ * Compiles Malloy source code in the context of a specific model file. The submitted source is appended to the full model content, giving it access to all sources, imports, and queries defined in the model. Relative imports resolve correctly against sibling model files. Returns compilation status and any problems (errors or warnings) found.
2349
+ * @summary Compile Malloy source code
2350
+ * @param {string} environmentName Name of the environment
2351
+ * @param {string} packageName Name of the package
2352
+ * @param {string} path Path to the model within the package (used to resolve relative imports)
2353
+ * @param {CompileRequest} compileRequest
2354
+ * @param {*} [options] Override http request option.
2355
+ * @throws {RequiredError}
2356
+ */
2357
+ async compileModelSource(e, t, a, r, o) {
2358
+ const s = await n.compileModelSource(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ModelsApi.compileModelSource"]?.[c]?.url;
2359
+ return (d, p) => V(s, h, u, l)(d, i || p);
2360
+ },
2361
+ /**
2362
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
2363
+ * @summary Execute Malloy query
2364
+ * @param {string} environmentName Name of the environment
2365
+ * @param {string} packageName Name of the package
2366
+ * @param {string} path Path to the model within the package
2367
+ * @param {QueryRequest} queryRequest
2368
+ * @param {*} [options] Override http request option.
2369
+ * @throws {RequiredError}
2370
+ */
2371
+ async executeQueryModel(e, t, a, r, o) {
2372
+ const s = await n.executeQueryModel(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ModelsApi.executeQueryModel"]?.[c]?.url;
2373
+ return (d, p) => V(s, h, u, l)(d, i || p);
2374
+ },
2375
+ /**
2376
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
2377
+ * @summary Get compiled Malloy model
2378
+ * @param {string} environmentName Name of the environment
2379
+ * @param {string} packageName Name of the package
2380
+ * @param {string} path Path to the model within the package
2381
+ * @param {string} [versionId] Version identifier for the package
2382
+ * @param {*} [options] Override http request option.
2383
+ * @throws {RequiredError}
2384
+ */
2385
+ async getModel(e, t, a, r, o) {
2386
+ const s = await n.getModel(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["ModelsApi.getModel"]?.[c]?.url;
2387
+ return (d, p) => V(s, h, u, l)(d, i || p);
2388
+ },
2389
+ /**
2390
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
2391
+ * @summary List package models
2392
+ * @param {string} environmentName Name of the environment
2393
+ * @param {string} packageName Name of the package
2394
+ * @param {string} [versionId] Version identifier for the package
2395
+ * @param {*} [options] Override http request option.
2396
+ * @throws {RequiredError}
2397
+ */
2398
+ async listModels(e, t, a, r) {
2399
+ const o = await n.listModels(e, t, a, r), s = l?.serverIndex ?? 0, c = g["ModelsApi.listModels"]?.[s]?.url;
2400
+ return (i, d) => V(o, h, u, l)(i, c || d);
2401
+ }
2402
+ };
2403
+ }, Wa = function(l, n, e) {
2404
+ const t = w(l);
2405
+ return {
2406
+ /**
2407
+ * Compiles Malloy source code in the context of a specific model file. The submitted source is appended to the full model content, giving it access to all sources, imports, and queries defined in the model. Relative imports resolve correctly against sibling model files. Returns compilation status and any problems (errors or warnings) found.
2408
+ * @summary Compile Malloy source code
2409
+ * @param {string} environmentName Name of the environment
2410
+ * @param {string} packageName Name of the package
2411
+ * @param {string} path Path to the model within the package (used to resolve relative imports)
2412
+ * @param {CompileRequest} compileRequest
2413
+ * @param {*} [options] Override http request option.
2414
+ * @throws {RequiredError}
2415
+ */
2416
+ compileModelSource(a, r, o, s, c) {
2417
+ return t.compileModelSource(a, r, o, s, c).then((i) => i(e, n));
2418
+ },
2419
+ /**
2420
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
2421
+ * @summary Execute Malloy query
2422
+ * @param {string} environmentName Name of the environment
2423
+ * @param {string} packageName Name of the package
2424
+ * @param {string} path Path to the model within the package
2425
+ * @param {QueryRequest} queryRequest
2426
+ * @param {*} [options] Override http request option.
2427
+ * @throws {RequiredError}
2428
+ */
2429
+ executeQueryModel(a, r, o, s, c) {
2430
+ return t.executeQueryModel(a, r, o, s, c).then((i) => i(e, n));
2431
+ },
2432
+ /**
2433
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
2434
+ * @summary Get compiled Malloy model
2435
+ * @param {string} environmentName Name of the environment
2436
+ * @param {string} packageName Name of the package
2437
+ * @param {string} path Path to the model within the package
2438
+ * @param {string} [versionId] Version identifier for the package
2439
+ * @param {*} [options] Override http request option.
2440
+ * @throws {RequiredError}
2441
+ */
2442
+ getModel(a, r, o, s, c) {
2443
+ return t.getModel(a, r, o, s, c).then((i) => i(e, n));
2444
+ },
2445
+ /**
2446
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
2447
+ * @summary List package models
2448
+ * @param {string} environmentName Name of the environment
2449
+ * @param {string} packageName Name of the package
2450
+ * @param {string} [versionId] Version identifier for the package
2451
+ * @param {*} [options] Override http request option.
2452
+ * @throws {RequiredError}
2453
+ */
2454
+ listModels(a, r, o, s) {
2455
+ return t.listModels(a, r, o, s).then((c) => c(e, n));
2456
+ }
2457
+ };
2458
+ };
2459
+ class Ne extends I {
2460
+ /**
2461
+ * Compiles Malloy source code in the context of a specific model file. The submitted source is appended to the full model content, giving it access to all sources, imports, and queries defined in the model. Relative imports resolve correctly against sibling model files. Returns compilation status and any problems (errors or warnings) found.
2462
+ * @summary Compile Malloy source code
2463
+ * @param {string} environmentName Name of the environment
2464
+ * @param {string} packageName Name of the package
2465
+ * @param {string} path Path to the model within the package (used to resolve relative imports)
2466
+ * @param {CompileRequest} compileRequest
2467
+ * @param {*} [options] Override http request option.
2468
+ * @throws {RequiredError}
2469
+ * @memberof ModelsApi
2470
+ */
2471
+ compileModelSource(n, e, t, a, r) {
2472
+ return w(this.configuration).compileModelSource(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2473
+ }
2474
+ /**
2475
+ * Executes a Malloy query against a model and returns the results. The query can be specified as a raw Malloy query string or by referencing a named query within the model. This endpoint supports both ad-hoc queries and predefined model queries, making it flexible for various use cases including data exploration, reporting, and application integration.
2476
+ * @summary Execute Malloy query
2477
+ * @param {string} environmentName Name of the environment
2478
+ * @param {string} packageName Name of the package
2479
+ * @param {string} path Path to the model within the package
2480
+ * @param {QueryRequest} queryRequest
2481
+ * @param {*} [options] Override http request option.
2482
+ * @throws {RequiredError}
2483
+ * @memberof ModelsApi
2484
+ */
2485
+ executeQueryModel(n, e, t, a, r) {
2486
+ return w(this.configuration).executeQueryModel(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2487
+ }
2488
+ /**
2489
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications.
2490
+ * @summary Get compiled Malloy model
2491
+ * @param {string} environmentName Name of the environment
2492
+ * @param {string} packageName Name of the package
2493
+ * @param {string} path Path to the model within the package
2494
+ * @param {string} [versionId] Version identifier for the package
2495
+ * @param {*} [options] Override http request option.
2496
+ * @throws {RequiredError}
2497
+ * @memberof ModelsApi
2498
+ */
2499
+ getModel(n, e, t, a, r) {
2500
+ return w(this.configuration).getModel(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2501
+ }
2502
+ /**
2503
+ * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
2504
+ * @summary List package models
2505
+ * @param {string} environmentName Name of the environment
2506
+ * @param {string} packageName Name of the package
2507
+ * @param {string} [versionId] Version identifier for the package
2508
+ * @param {*} [options] Override http request option.
2509
+ * @throws {RequiredError}
2510
+ * @memberof ModelsApi
2511
+ */
2512
+ listModels(n, e, t, a) {
2513
+ return w(this.configuration).listModels(n, e, t, a).then((r) => r(this.axios, this.basePath));
2514
+ }
2515
+ }
2516
+ const Te = function(l) {
2517
+ return {
2518
+ /**
2519
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content.
2520
+ * @summary Execute a specific notebook cell
2521
+ * @param {string} environmentName Name of the environment
2522
+ * @param {string} packageName Name of the package
2523
+ * @param {string} path Path to notebook within the package
2524
+ * @param {number} cellIndex Index of the cell to execute (0-based)
2525
+ * @param {string} [versionId] Version identifier for the package
2526
+ * @param {string} [filterParams] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. Targets the deprecated &#x60;#(filter)&#x60; annotation path. See docs/givens.md for migration recipes. JSON-encoded filter parameter values keyed by filter name.
2527
+ * @param {ExecuteNotebookCellBypassFiltersEnum} [bypassFilters] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. See docs/givens.md for migration recipes. When true, skip filter injection entirely.
2528
+ * @param {string} [givens] A &#x60;GivenValues&#x60; object, JSON-encoded so it can travel in a query string. Values are typed as &#x60;GivenValues&#x60; describes them, not string-encoded as &#x60;EncodedGivenValues&#x60; would be. The parameter keeps its name for compatibility; the schema it carries is the one named here.
2529
+ * @param {*} [options] Override http request option.
2530
+ * @throws {RequiredError}
2531
+ */
2532
+ executeNotebookCell: async (n, e, t, a, r, o, s, c, i = {}) => {
2533
+ m("executeNotebookCell", "environmentName", n), m("executeNotebookCell", "packageName", e), m("executeNotebookCell", "path", t), m("executeNotebookCell", "cellIndex", a);
2534
+ const d = "/environments/{environmentName}/packages/{packageName}/notebooks/{path}/cells/{cellIndex}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{path}", encodeURIComponent(String(t))).replace("{cellIndex}", encodeURIComponent(String(a))), p = new URL(d, b);
2535
+ let O;
2536
+ l && (O = l.baseOptions);
2537
+ const C = { method: "GET", ...O, ...i }, U = {}, x = {};
2538
+ r !== void 0 && (x.versionId = r), o !== void 0 && (x.filter_params = o), s !== void 0 && (x.bypass_filters = s), c !== void 0 && (x.givens = c), P(p, x);
2539
+ let $ = O && O.headers ? O.headers : {};
2540
+ return C.headers = { ...U, ...$, ...i.headers }, {
2541
+ url: v(p),
2542
+ options: C
2543
+ };
2544
+ },
2545
+ /**
2546
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
2547
+ * @summary Get Malloy notebook cells
2548
+ * @param {string} environmentName Name of the environment
2549
+ * @param {string} packageName Name of the package
2550
+ * @param {string} path Path to notebook within the package.
2551
+ * @param {string} [versionId] Version identifier for the package
2552
+ * @param {*} [options] Override http request option.
2553
+ * @throws {RequiredError}
2554
+ */
2555
+ getNotebook: async (n, e, t, a, r = {}) => {
2556
+ m("getNotebook", "environmentName", n), m("getNotebook", "packageName", e), m("getNotebook", "path", t);
2557
+ const o = "/environments/{environmentName}/packages/{packageName}/notebooks/{path}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))).replace("{path}", encodeURIComponent(String(t))), s = new URL(o, b);
2558
+ let c;
2559
+ l && (c = l.baseOptions);
2560
+ const i = { method: "GET", ...c, ...r }, d = {}, p = {};
2561
+ a !== void 0 && (p.versionId = a), P(s, p);
2562
+ let O = c && c.headers ? c.headers : {};
2563
+ return i.headers = { ...d, ...O, ...r.headers }, {
2564
+ url: v(s),
2565
+ options: i
2566
+ };
2567
+ },
2568
+ /**
2569
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
2570
+ * @summary List package notebooks
2571
+ * @param {string} environmentName Name of the environment
2572
+ * @param {string} packageName Name of the package
2573
+ * @param {string} [versionId] Version identifier for the package
2574
+ * @param {*} [options] Override http request option.
2575
+ * @throws {RequiredError}
2576
+ */
2577
+ listNotebooks: async (n, e, t, a = {}) => {
2578
+ m("listNotebooks", "environmentName", n), m("listNotebooks", "packageName", e);
2579
+ const r = "/environments/{environmentName}/packages/{packageName}/notebooks".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), o = new URL(r, b);
2580
+ let s;
2581
+ l && (s = l.baseOptions);
2582
+ const c = { method: "GET", ...s, ...a }, i = {}, d = {};
2583
+ t !== void 0 && (d.versionId = t), P(o, d);
2584
+ let p = s && s.headers ? s.headers : {};
2585
+ return c.headers = { ...i, ...p, ...a.headers }, {
2586
+ url: v(o),
2587
+ options: c
2588
+ };
2589
+ }
2590
+ };
2591
+ }, Q = function(l) {
2592
+ const n = Te(l);
2593
+ return {
2594
+ /**
2595
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content.
2596
+ * @summary Execute a specific notebook cell
2597
+ * @param {string} environmentName Name of the environment
2598
+ * @param {string} packageName Name of the package
2599
+ * @param {string} path Path to notebook within the package
2600
+ * @param {number} cellIndex Index of the cell to execute (0-based)
2601
+ * @param {string} [versionId] Version identifier for the package
2602
+ * @param {string} [filterParams] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. Targets the deprecated &#x60;#(filter)&#x60; annotation path. See docs/givens.md for migration recipes. JSON-encoded filter parameter values keyed by filter name.
2603
+ * @param {ExecuteNotebookCellBypassFiltersEnum} [bypassFilters] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. See docs/givens.md for migration recipes. When true, skip filter injection entirely.
2604
+ * @param {string} [givens] A &#x60;GivenValues&#x60; object, JSON-encoded so it can travel in a query string. Values are typed as &#x60;GivenValues&#x60; describes them, not string-encoded as &#x60;EncodedGivenValues&#x60; would be. The parameter keeps its name for compatibility; the schema it carries is the one named here.
2605
+ * @param {*} [options] Override http request option.
2606
+ * @throws {RequiredError}
2607
+ */
2608
+ async executeNotebookCell(e, t, a, r, o, s, c, i, d) {
2609
+ const p = await n.executeNotebookCell(e, t, a, r, o, s, c, i, d), O = l?.serverIndex ?? 0, C = g["NotebooksApi.executeNotebookCell"]?.[O]?.url;
2610
+ return (U, x) => V(p, h, u, l)(U, C || x);
2611
+ },
2612
+ /**
2613
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
2614
+ * @summary Get Malloy notebook cells
2615
+ * @param {string} environmentName Name of the environment
2616
+ * @param {string} packageName Name of the package
2617
+ * @param {string} path Path to notebook within the package.
2618
+ * @param {string} [versionId] Version identifier for the package
2619
+ * @param {*} [options] Override http request option.
2620
+ * @throws {RequiredError}
2621
+ */
2622
+ async getNotebook(e, t, a, r, o) {
2623
+ const s = await n.getNotebook(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["NotebooksApi.getNotebook"]?.[c]?.url;
2624
+ return (d, p) => V(s, h, u, l)(d, i || p);
2625
+ },
2626
+ /**
2627
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
2628
+ * @summary List package notebooks
2629
+ * @param {string} environmentName Name of the environment
2630
+ * @param {string} packageName Name of the package
2631
+ * @param {string} [versionId] Version identifier for the package
2632
+ * @param {*} [options] Override http request option.
2633
+ * @throws {RequiredError}
2634
+ */
2635
+ async listNotebooks(e, t, a, r) {
2636
+ const o = await n.listNotebooks(e, t, a, r), s = l?.serverIndex ?? 0, c = g["NotebooksApi.listNotebooks"]?.[s]?.url;
2637
+ return (i, d) => V(o, h, u, l)(i, c || d);
2638
+ }
2639
+ };
2640
+ }, Ga = function(l, n, e) {
2641
+ const t = Q(l);
2642
+ return {
2643
+ /**
2644
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content.
2645
+ * @summary Execute a specific notebook cell
2646
+ * @param {string} environmentName Name of the environment
2647
+ * @param {string} packageName Name of the package
2648
+ * @param {string} path Path to notebook within the package
2649
+ * @param {number} cellIndex Index of the cell to execute (0-based)
2650
+ * @param {string} [versionId] Version identifier for the package
2651
+ * @param {string} [filterParams] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. Targets the deprecated &#x60;#(filter)&#x60; annotation path. See docs/givens.md for migration recipes. JSON-encoded filter parameter values keyed by filter name.
2652
+ * @param {ExecuteNotebookCellBypassFiltersEnum} [bypassFilters] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. See docs/givens.md for migration recipes. When true, skip filter injection entirely.
2653
+ * @param {string} [givens] A &#x60;GivenValues&#x60; object, JSON-encoded so it can travel in a query string. Values are typed as &#x60;GivenValues&#x60; describes them, not string-encoded as &#x60;EncodedGivenValues&#x60; would be. The parameter keeps its name for compatibility; the schema it carries is the one named here.
2654
+ * @param {*} [options] Override http request option.
2655
+ * @throws {RequiredError}
2656
+ */
2657
+ executeNotebookCell(a, r, o, s, c, i, d, p, O) {
2658
+ return t.executeNotebookCell(a, r, o, s, c, i, d, p, O).then((C) => C(e, n));
2659
+ },
2660
+ /**
2661
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
2662
+ * @summary Get Malloy notebook cells
2663
+ * @param {string} environmentName Name of the environment
2664
+ * @param {string} packageName Name of the package
2665
+ * @param {string} path Path to notebook within the package.
2666
+ * @param {string} [versionId] Version identifier for the package
2667
+ * @param {*} [options] Override http request option.
2668
+ * @throws {RequiredError}
2669
+ */
2670
+ getNotebook(a, r, o, s, c) {
2671
+ return t.getNotebook(a, r, o, s, c).then((i) => i(e, n));
2672
+ },
2673
+ /**
2674
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
2675
+ * @summary List package notebooks
2676
+ * @param {string} environmentName Name of the environment
2677
+ * @param {string} packageName Name of the package
2678
+ * @param {string} [versionId] Version identifier for the package
2679
+ * @param {*} [options] Override http request option.
2680
+ * @throws {RequiredError}
2681
+ */
2682
+ listNotebooks(a, r, o, s) {
2683
+ return t.listNotebooks(a, r, o, s).then((c) => c(e, n));
2684
+ }
2685
+ };
2686
+ };
2687
+ class Ue extends I {
2688
+ /**
2689
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content.
2690
+ * @summary Execute a specific notebook cell
2691
+ * @param {string} environmentName Name of the environment
2692
+ * @param {string} packageName Name of the package
2693
+ * @param {string} path Path to notebook within the package
2694
+ * @param {number} cellIndex Index of the cell to execute (0-based)
2695
+ * @param {string} [versionId] Version identifier for the package
2696
+ * @param {string} [filterParams] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. Targets the deprecated &#x60;#(filter)&#x60; annotation path. See docs/givens.md for migration recipes. JSON-encoded filter parameter values keyed by filter name.
2697
+ * @param {ExecuteNotebookCellBypassFiltersEnum} [bypassFilters] **DEPRECATED**: Use &#x60;givens&#x60; (native Malloy runtime parameters) instead. See docs/givens.md for migration recipes. When true, skip filter injection entirely.
2698
+ * @param {string} [givens] A &#x60;GivenValues&#x60; object, JSON-encoded so it can travel in a query string. Values are typed as &#x60;GivenValues&#x60; describes them, not string-encoded as &#x60;EncodedGivenValues&#x60; would be. The parameter keeps its name for compatibility; the schema it carries is the one named here.
2699
+ * @param {*} [options] Override http request option.
2700
+ * @throws {RequiredError}
2701
+ * @memberof NotebooksApi
2702
+ */
2703
+ executeNotebookCell(n, e, t, a, r, o, s, c, i) {
2704
+ return Q(this.configuration).executeNotebookCell(n, e, t, a, r, o, s, c, i).then((d) => d(this.axios, this.basePath));
2705
+ }
2706
+ /**
2707
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
2708
+ * @summary Get Malloy notebook cells
2709
+ * @param {string} environmentName Name of the environment
2710
+ * @param {string} packageName Name of the package
2711
+ * @param {string} path Path to notebook within the package.
2712
+ * @param {string} [versionId] Version identifier for the package
2713
+ * @param {*} [options] Override http request option.
2714
+ * @throws {RequiredError}
2715
+ * @memberof NotebooksApi
2716
+ */
2717
+ getNotebook(n, e, t, a, r) {
2718
+ return Q(this.configuration).getNotebook(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
2719
+ }
2720
+ /**
2721
+ * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
2722
+ * @summary List package notebooks
2723
+ * @param {string} environmentName Name of the environment
2724
+ * @param {string} packageName Name of the package
2725
+ * @param {string} [versionId] Version identifier for the package
2726
+ * @param {*} [options] Override http request option.
2727
+ * @throws {RequiredError}
2728
+ * @memberof NotebooksApi
2729
+ */
2730
+ listNotebooks(n, e, t, a) {
2731
+ return Q(this.configuration).listNotebooks(n, e, t, a).then((r) => r(this.axios, this.basePath));
2732
+ }
2733
+ }
2734
+ const Ya = {
2735
+ True: "true",
2736
+ False: "false"
2737
+ }, we = function(l) {
2738
+ return {
2739
+ /**
2740
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
2741
+ * @summary Create a new package
2742
+ * @param {string} environmentName Name of the environment
2743
+ * @param {Package} _package
2744
+ * @param {*} [options] Override http request option.
2745
+ * @throws {RequiredError}
2746
+ */
2747
+ createPackage: async (n, e, t = {}) => {
2748
+ m("createPackage", "environmentName", n), m("createPackage", "_package", e);
2749
+ const a = "/environments/{environmentName}/packages".replace("{environmentName}", encodeURIComponent(String(n))), r = new URL(a, b);
2750
+ let o;
2751
+ l && (o = l.baseOptions);
2752
+ const s = { method: "POST", ...o, ...t }, c = {}, i = {};
2753
+ c["Content-Type"] = "application/json", P(r, i);
2754
+ let d = o && o.headers ? o.headers : {};
2755
+ return s.headers = { ...c, ...d, ...t.headers }, s.data = k(e, s, l), {
2756
+ url: v(r),
2757
+ options: s
2758
+ };
2759
+ },
2760
+ /**
2761
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
2762
+ * @summary Delete a package
2763
+ * @param {string} environmentName Name of the environment
2764
+ * @param {string} packageName Name of the package
2765
+ * @param {*} [options] Override http request option.
2766
+ * @throws {RequiredError}
2767
+ */
2768
+ deletePackage: async (n, e, t = {}) => {
2769
+ m("deletePackage", "environmentName", n), m("deletePackage", "packageName", e);
2770
+ const a = "/environments/{environmentName}/packages/{packageName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), r = new URL(a, b);
2771
+ let o;
2772
+ l && (o = l.baseOptions);
2773
+ const s = { method: "DELETE", ...o, ...t }, c = {};
2774
+ P(r, {});
2775
+ let d = o && o.headers ? o.headers : {};
2776
+ return s.headers = { ...c, ...d, ...t.headers }, {
2777
+ url: v(r),
2778
+ options: s
2779
+ };
2780
+ },
2781
+ /**
2782
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
2783
+ * @summary Get package details and metadata
2784
+ * @param {string} environmentName Name of the environment
2785
+ * @param {string} packageName Package name
2786
+ * @param {string} [versionId] Version identifier for the package
2787
+ * @param {boolean} [reload] Load / reload the package before returning result
2788
+ * @param {*} [options] Override http request option.
2789
+ * @throws {RequiredError}
2790
+ */
2791
+ getPackage: async (n, e, t, a, r = {}) => {
2792
+ m("getPackage", "environmentName", n), m("getPackage", "packageName", e);
2793
+ const o = "/environments/{environmentName}/packages/{packageName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), s = new URL(o, b);
2794
+ let c;
2795
+ l && (c = l.baseOptions);
2796
+ const i = { method: "GET", ...c, ...r }, d = {}, p = {};
2797
+ t !== void 0 && (p.versionId = t), a !== void 0 && (p.reload = a), P(s, p);
2798
+ let O = c && c.headers ? c.headers : {};
2799
+ return i.headers = { ...d, ...O, ...r.headers }, {
2800
+ url: v(s),
2801
+ options: i
2802
+ };
2803
+ },
2804
+ /**
2805
+ * Retrieves a list of all Malloy packages within the specified environment. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
2806
+ * @summary List environment packages
2807
+ * @param {string} environmentName Name of the environment
2808
+ * @param {*} [options] Override http request option.
2809
+ * @throws {RequiredError}
2810
+ */
2811
+ listPackages: async (n, e = {}) => {
2812
+ m("listPackages", "environmentName", n);
2813
+ const t = "/environments/{environmentName}/packages".replace("{environmentName}", encodeURIComponent(String(n))), a = new URL(t, b);
2814
+ let r;
2815
+ l && (r = l.baseOptions);
2816
+ const o = { method: "GET", ...r, ...e }, s = {};
2817
+ P(a, {});
2818
+ let i = r && r.headers ? r.headers : {};
2819
+ return o.headers = { ...s, ...i, ...e.headers }, {
2820
+ url: v(a),
2821
+ options: o
2822
+ };
2823
+ },
2824
+ /**
2825
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
2826
+ * @summary Update package configuration
2827
+ * @param {string} environmentName Name of the environment
2828
+ * @param {string} packageName Name of the package
2829
+ * @param {Package} _package
2830
+ * @param {*} [options] Override http request option.
2831
+ * @throws {RequiredError}
2832
+ */
2833
+ updatePackage: async (n, e, t, a = {}) => {
2834
+ m("updatePackage", "environmentName", n), m("updatePackage", "packageName", e), m("updatePackage", "_package", t);
2835
+ const r = "/environments/{environmentName}/packages/{packageName}".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), o = new URL(r, b);
2836
+ let s;
2837
+ l && (s = l.baseOptions);
2838
+ const c = { method: "PATCH", ...s, ...a }, i = {}, d = {};
2839
+ i["Content-Type"] = "application/json", P(o, d);
2840
+ let p = s && s.headers ? s.headers : {};
2841
+ return c.headers = { ...i, ...p, ...a.headers }, c.data = k(t, c, l), {
2842
+ url: v(o),
2843
+ options: c
2844
+ };
2845
+ }
2846
+ };
2847
+ }, T = function(l) {
2848
+ const n = we(l);
2849
+ return {
2850
+ /**
2851
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
2852
+ * @summary Create a new package
2853
+ * @param {string} environmentName Name of the environment
2854
+ * @param {Package} _package
2855
+ * @param {*} [options] Override http request option.
2856
+ * @throws {RequiredError}
2857
+ */
2858
+ async createPackage(e, t, a) {
2859
+ const r = await n.createPackage(e, t, a), o = l?.serverIndex ?? 0, s = g["PackagesApi.createPackage"]?.[o]?.url;
2860
+ return (c, i) => V(r, h, u, l)(c, s || i);
2861
+ },
2862
+ /**
2863
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
2864
+ * @summary Delete a package
2865
+ * @param {string} environmentName Name of the environment
2866
+ * @param {string} packageName Name of the package
2867
+ * @param {*} [options] Override http request option.
2868
+ * @throws {RequiredError}
2869
+ */
2870
+ async deletePackage(e, t, a) {
2871
+ const r = await n.deletePackage(e, t, a), o = l?.serverIndex ?? 0, s = g["PackagesApi.deletePackage"]?.[o]?.url;
2872
+ return (c, i) => V(r, h, u, l)(c, s || i);
2873
+ },
2874
+ /**
2875
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
2876
+ * @summary Get package details and metadata
2877
+ * @param {string} environmentName Name of the environment
2878
+ * @param {string} packageName Package name
2879
+ * @param {string} [versionId] Version identifier for the package
2880
+ * @param {boolean} [reload] Load / reload the package before returning result
2881
+ * @param {*} [options] Override http request option.
2882
+ * @throws {RequiredError}
2883
+ */
2884
+ async getPackage(e, t, a, r, o) {
2885
+ const s = await n.getPackage(e, t, a, r, o), c = l?.serverIndex ?? 0, i = g["PackagesApi.getPackage"]?.[c]?.url;
2886
+ return (d, p) => V(s, h, u, l)(d, i || p);
2887
+ },
2888
+ /**
2889
+ * Retrieves a list of all Malloy packages within the specified environment. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
2890
+ * @summary List environment packages
2891
+ * @param {string} environmentName Name of the environment
2892
+ * @param {*} [options] Override http request option.
2893
+ * @throws {RequiredError}
2894
+ */
2895
+ async listPackages(e, t) {
2896
+ const a = await n.listPackages(e, t), r = l?.serverIndex ?? 0, o = g["PackagesApi.listPackages"]?.[r]?.url;
2897
+ return (s, c) => V(a, h, u, l)(s, o || c);
2898
+ },
2899
+ /**
2900
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
2901
+ * @summary Update package configuration
2902
+ * @param {string} environmentName Name of the environment
2903
+ * @param {string} packageName Name of the package
2904
+ * @param {Package} _package
2905
+ * @param {*} [options] Override http request option.
2906
+ * @throws {RequiredError}
2907
+ */
2908
+ async updatePackage(e, t, a, r) {
2909
+ const o = await n.updatePackage(e, t, a, r), s = l?.serverIndex ?? 0, c = g["PackagesApi.updatePackage"]?.[s]?.url;
2910
+ return (i, d) => V(o, h, u, l)(i, c || d);
2911
+ }
2912
+ };
2913
+ }, Ja = function(l, n, e) {
2914
+ const t = T(l);
2915
+ return {
2916
+ /**
2917
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
2918
+ * @summary Create a new package
2919
+ * @param {string} environmentName Name of the environment
2920
+ * @param {Package} _package
2921
+ * @param {*} [options] Override http request option.
2922
+ * @throws {RequiredError}
2923
+ */
2924
+ createPackage(a, r, o) {
2925
+ return t.createPackage(a, r, o).then((s) => s(e, n));
2926
+ },
2927
+ /**
2928
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
2929
+ * @summary Delete a package
2930
+ * @param {string} environmentName Name of the environment
2931
+ * @param {string} packageName Name of the package
2932
+ * @param {*} [options] Override http request option.
2933
+ * @throws {RequiredError}
2934
+ */
2935
+ deletePackage(a, r, o) {
2936
+ return t.deletePackage(a, r, o).then((s) => s(e, n));
2937
+ },
2938
+ /**
2939
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
2940
+ * @summary Get package details and metadata
2941
+ * @param {string} environmentName Name of the environment
2942
+ * @param {string} packageName Package name
2943
+ * @param {string} [versionId] Version identifier for the package
2944
+ * @param {boolean} [reload] Load / reload the package before returning result
2945
+ * @param {*} [options] Override http request option.
2946
+ * @throws {RequiredError}
2947
+ */
2948
+ getPackage(a, r, o, s, c) {
2949
+ return t.getPackage(a, r, o, s, c).then((i) => i(e, n));
2950
+ },
2951
+ /**
2952
+ * Retrieves a list of all Malloy packages within the specified environment. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
2953
+ * @summary List environment packages
2954
+ * @param {string} environmentName Name of the environment
2955
+ * @param {*} [options] Override http request option.
2956
+ * @throws {RequiredError}
2957
+ */
2958
+ listPackages(a, r) {
2959
+ return t.listPackages(a, r).then((o) => o(e, n));
2960
+ },
2961
+ /**
2962
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
2963
+ * @summary Update package configuration
2964
+ * @param {string} environmentName Name of the environment
2965
+ * @param {string} packageName Name of the package
2966
+ * @param {Package} _package
2967
+ * @param {*} [options] Override http request option.
2968
+ * @throws {RequiredError}
2969
+ */
2970
+ updatePackage(a, r, o, s) {
2971
+ return t.updatePackage(a, r, o, s).then((c) => c(e, n));
2972
+ }
2973
+ };
2974
+ };
2975
+ class Ee extends I {
2976
+ /**
2977
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
2978
+ * @summary Create a new package
2979
+ * @param {string} environmentName Name of the environment
2980
+ * @param {Package} _package
2981
+ * @param {*} [options] Override http request option.
2982
+ * @throws {RequiredError}
2983
+ * @memberof PackagesApi
2984
+ */
2985
+ createPackage(n, e, t) {
2986
+ return T(this.configuration).createPackage(n, e, t).then((a) => a(this.axios, this.basePath));
2987
+ }
2988
+ /**
2989
+ * Permanently deletes a package and all its associated resources including models, notebooks, databases, and metadata. This operation cannot be undone, so use with caution. The package must exist and be accessible for deletion.
2990
+ * @summary Delete a package
2991
+ * @param {string} environmentName Name of the environment
2992
+ * @param {string} packageName Name of the package
2993
+ * @param {*} [options] Override http request option.
2994
+ * @throws {RequiredError}
2995
+ * @memberof PackagesApi
2996
+ */
2997
+ deletePackage(n, e, t) {
2998
+ return T(this.configuration).deletePackage(n, e, t).then((a) => a(this.axios, this.basePath));
2999
+ }
3000
+ /**
3001
+ * Retrieves detailed information about a specific package, including its models, notebooks, databases, and metadata. The reload parameter can be used to refresh the package state from disk before returning the information. The versionId parameter allows access to specific package versions.
3002
+ * @summary Get package details and metadata
3003
+ * @param {string} environmentName Name of the environment
3004
+ * @param {string} packageName Package name
3005
+ * @param {string} [versionId] Version identifier for the package
3006
+ * @param {boolean} [reload] Load / reload the package before returning result
3007
+ * @param {*} [options] Override http request option.
3008
+ * @throws {RequiredError}
3009
+ * @memberof PackagesApi
3010
+ */
3011
+ getPackage(n, e, t, a, r) {
3012
+ return T(this.configuration).getPackage(n, e, t, a, r).then((o) => o(this.axios, this.basePath));
3013
+ }
3014
+ /**
3015
+ * Retrieves a list of all Malloy packages within the specified environment. Each package contains models, notebooks, databases, and other resources. This endpoint is useful for discovering available packages and their basic metadata.
3016
+ * @summary List environment packages
3017
+ * @param {string} environmentName Name of the environment
3018
+ * @param {*} [options] Override http request option.
3019
+ * @throws {RequiredError}
3020
+ * @memberof PackagesApi
3021
+ */
3022
+ listPackages(n, e) {
3023
+ return T(this.configuration).listPackages(n, e).then((t) => t(this.axios, this.basePath));
3024
+ }
3025
+ /**
3026
+ * Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
3027
+ * @summary Update package configuration
3028
+ * @param {string} environmentName Name of the environment
3029
+ * @param {string} packageName Name of the package
3030
+ * @param {Package} _package
3031
+ * @param {*} [options] Override http request option.
3032
+ * @throws {RequiredError}
3033
+ * @memberof PackagesApi
3034
+ */
3035
+ updatePackage(n, e, t, a) {
3036
+ return T(this.configuration).updatePackage(n, e, t, a).then((r) => r(this.axios, this.basePath));
3037
+ }
3038
+ }
3039
+ const Me = function(l) {
3040
+ return {
3041
+ /**
3042
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
3043
+ * @summary Reset the instance theme to the boot seed or default
3044
+ * @param {*} [options] Override http request option.
3045
+ * @throws {RequiredError}
3046
+ */
3047
+ deleteTheme: async (n = {}) => {
3048
+ const e = "/theme", t = new URL(e, b);
3049
+ let a;
3050
+ l && (a = l.baseOptions);
3051
+ const r = { method: "DELETE", ...a, ...n }, o = {};
3052
+ P(t, {});
3053
+ let c = a && a.headers ? a.headers : {};
3054
+ return r.headers = { ...o, ...c, ...n.headers }, {
3055
+ url: v(t),
3056
+ options: r
3057
+ };
3058
+ },
3059
+ /**
3060
+ * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
3061
+ * @summary Get server status and health information
3062
+ * @param {*} [options] Override http request option.
3063
+ * @throws {RequiredError}
3064
+ */
3065
+ getStatus: async (n = {}) => {
3066
+ const e = "/status", t = new URL(e, b);
3067
+ let a;
3068
+ l && (a = l.baseOptions);
3069
+ const r = { method: "GET", ...a, ...n }, o = {};
3070
+ P(t, {});
3071
+ let c = a && a.headers ? a.headers : {};
3072
+ return r.headers = { ...o, ...c, ...n.headers }, {
3073
+ url: v(t),
3074
+ options: r
3075
+ };
3076
+ },
3077
+ /**
3078
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
3079
+ * @summary Get the active instance theme
3080
+ * @param {*} [options] Override http request option.
3081
+ * @throws {RequiredError}
3082
+ */
3083
+ getTheme: async (n = {}) => {
3084
+ const e = "/theme", t = new URL(e, b);
3085
+ let a;
3086
+ l && (a = l.baseOptions);
3087
+ const r = { method: "GET", ...a, ...n }, o = {};
3088
+ P(t, {});
3089
+ let c = a && a.headers ? a.headers : {};
3090
+ return r.headers = { ...o, ...c, ...n.headers }, {
3091
+ url: v(t),
3092
+ options: r
3093
+ };
3094
+ },
3095
+ /**
3096
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
3097
+ * @summary Save the instance theme
3098
+ * @param {Theme} theme
3099
+ * @param {*} [options] Override http request option.
3100
+ * @throws {RequiredError}
3101
+ */
3102
+ updateTheme: async (n, e = {}) => {
3103
+ m("updateTheme", "theme", n);
3104
+ const t = "/theme", a = new URL(t, b);
3105
+ let r;
3106
+ l && (r = l.baseOptions);
3107
+ const o = { method: "PUT", ...r, ...e }, s = {}, c = {};
3108
+ s["Content-Type"] = "application/json", P(a, c);
3109
+ let i = r && r.headers ? r.headers : {};
3110
+ return o.headers = { ...s, ...i, ...e.headers }, o.data = k(n, o, l), {
3111
+ url: v(a),
3112
+ options: o
3113
+ };
3114
+ }
3115
+ };
3116
+ }, E = function(l) {
3117
+ const n = Me(l);
3118
+ return {
3119
+ /**
3120
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
3121
+ * @summary Reset the instance theme to the boot seed or default
3122
+ * @param {*} [options] Override http request option.
3123
+ * @throws {RequiredError}
3124
+ */
3125
+ async deleteTheme(e) {
3126
+ const t = await n.deleteTheme(e), a = l?.serverIndex ?? 0, r = g["PublisherApi.deleteTheme"]?.[a]?.url;
3127
+ return (o, s) => V(t, h, u, l)(o, r || s);
3128
+ },
3129
+ /**
3130
+ * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
3131
+ * @summary Get server status and health information
3132
+ * @param {*} [options] Override http request option.
3133
+ * @throws {RequiredError}
3134
+ */
3135
+ async getStatus(e) {
3136
+ const t = await n.getStatus(e), a = l?.serverIndex ?? 0, r = g["PublisherApi.getStatus"]?.[a]?.url;
3137
+ return (o, s) => V(t, h, u, l)(o, r || s);
3138
+ },
3139
+ /**
3140
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
3141
+ * @summary Get the active instance theme
3142
+ * @param {*} [options] Override http request option.
3143
+ * @throws {RequiredError}
3144
+ */
3145
+ async getTheme(e) {
3146
+ const t = await n.getTheme(e), a = l?.serverIndex ?? 0, r = g["PublisherApi.getTheme"]?.[a]?.url;
3147
+ return (o, s) => V(t, h, u, l)(o, r || s);
3148
+ },
3149
+ /**
3150
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
3151
+ * @summary Save the instance theme
3152
+ * @param {Theme} theme
3153
+ * @param {*} [options] Override http request option.
3154
+ * @throws {RequiredError}
3155
+ */
3156
+ async updateTheme(e, t) {
3157
+ const a = await n.updateTheme(e, t), r = l?.serverIndex ?? 0, o = g["PublisherApi.updateTheme"]?.[r]?.url;
3158
+ return (s, c) => V(a, h, u, l)(s, o || c);
3159
+ }
3160
+ };
3161
+ }, Ka = function(l, n, e) {
3162
+ const t = E(l);
3163
+ return {
3164
+ /**
3165
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
3166
+ * @summary Reset the instance theme to the boot seed or default
3167
+ * @param {*} [options] Override http request option.
3168
+ * @throws {RequiredError}
3169
+ */
3170
+ deleteTheme(a) {
3171
+ return t.deleteTheme(a).then((r) => r(e, n));
3172
+ },
3173
+ /**
3174
+ * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
3175
+ * @summary Get server status and health information
3176
+ * @param {*} [options] Override http request option.
3177
+ * @throws {RequiredError}
3178
+ */
3179
+ getStatus(a) {
3180
+ return t.getStatus(a).then((r) => r(e, n));
3181
+ },
3182
+ /**
3183
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
3184
+ * @summary Get the active instance theme
3185
+ * @param {*} [options] Override http request option.
3186
+ * @throws {RequiredError}
3187
+ */
3188
+ getTheme(a) {
3189
+ return t.getTheme(a).then((r) => r(e, n));
3190
+ },
3191
+ /**
3192
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
3193
+ * @summary Save the instance theme
3194
+ * @param {Theme} theme
3195
+ * @param {*} [options] Override http request option.
3196
+ * @throws {RequiredError}
3197
+ */
3198
+ updateTheme(a, r) {
3199
+ return t.updateTheme(a, r).then((o) => o(e, n));
3200
+ }
3201
+ };
3202
+ };
3203
+ class fe extends I {
3204
+ /**
3205
+ * Drops the saved theme from the server. The next GET returns either the publisher.config.json boot seed (if present) or an empty object. Rejected with 403 when publisher.config.json has frozenConfig=true.
3206
+ * @summary Reset the instance theme to the boot seed or default
3207
+ * @param {*} [options] Override http request option.
3208
+ * @throws {RequiredError}
3209
+ * @memberof PublisherApi
3210
+ */
3211
+ deleteTheme(n) {
3212
+ return E(this.configuration).deleteTheme(n).then((e) => e(this.axios, this.basePath));
3213
+ }
3214
+ /**
3215
+ * Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
3216
+ * @summary Get server status and health information
3217
+ * @param {*} [options] Override http request option.
3218
+ * @throws {RequiredError}
3219
+ * @memberof PublisherApi
3220
+ */
3221
+ getStatus(n) {
3222
+ return E(this.configuration).getStatus(n).then((e) => e(this.axios, this.basePath));
3223
+ }
3224
+ /**
3225
+ * Returns the theme used by the Malloy renderer for charts/tables/dashboards. Reflects edits made via the in-app Theme Editor (persisted to the server\'s internal DuckDB metadata store via the shared StorageManager). Empty object when no theme has been configured.
3226
+ * @summary Get the active instance theme
3227
+ * @param {*} [options] Override http request option.
3228
+ * @throws {RequiredError}
3229
+ * @memberof PublisherApi
3230
+ */
3231
+ getTheme(n) {
3232
+ return E(this.configuration).getTheme(n).then((e) => e(this.axios, this.basePath));
3233
+ }
3234
+ /**
3235
+ * Persists the supplied theme as the new instance theme. Returns the saved theme. Rejected with 403 when publisher.config.json has frozenConfig=true.
3236
+ * @summary Save the instance theme
3237
+ * @param {Theme} theme
3238
+ * @param {*} [options] Override http request option.
3239
+ * @throws {RequiredError}
3240
+ * @memberof PublisherApi
3241
+ */
3242
+ updateTheme(n, e) {
3243
+ return E(this.configuration).updateTheme(n, e).then((t) => t(this.axios, this.basePath));
3244
+ }
3245
+ }
3246
+ const Be = function(l) {
3247
+ return {
3248
+ /**
3249
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which environment is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
3250
+ * @summary Get watch mode status
3251
+ * @param {*} [options] Override http request option.
3252
+ * @throws {RequiredError}
3253
+ */
3254
+ getWatchStatus: async (n = {}) => {
3255
+ const e = "/watch-mode/status", t = new URL(e, b);
3256
+ let a;
3257
+ l && (a = l.baseOptions);
3258
+ const r = { method: "GET", ...a, ...n }, o = {};
3259
+ P(t, {});
3260
+ let c = a && a.headers ? a.headers : {};
3261
+ return r.headers = { ...o, ...c, ...n.headers }, {
3262
+ url: v(t),
3263
+ options: r
3264
+ };
3265
+ },
3266
+ /**
3267
+ * Initiates file watching for the specified environment. This enables real-time monitoring of file changes within the environment directory, allowing for automatic reloading and updates during development. Only one environment can be watched at a time.
3268
+ * @summary Start file watching
3269
+ * @param {StartWatchRequest} startWatchRequest
3270
+ * @param {*} [options] Override http request option.
3271
+ * @throws {RequiredError}
3272
+ */
3273
+ startWatching: async (n, e = {}) => {
3274
+ m("startWatching", "startWatchRequest", n);
3275
+ const t = "/watch-mode/start", a = new URL(t, b);
3276
+ let r;
3277
+ l && (r = l.baseOptions);
3278
+ const o = { method: "POST", ...r, ...e }, s = {}, c = {};
3279
+ s["Content-Type"] = "application/json", P(a, c);
3280
+ let i = r && r.headers ? r.headers : {};
3281
+ return o.headers = { ...s, ...i, ...e.headers }, o.data = k(n, o, l), {
3282
+ url: v(a),
3283
+ options: o
3284
+ };
3285
+ },
3286
+ /**
3287
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different environment.
3288
+ * @summary Stop file watching
3289
+ * @param {*} [options] Override http request option.
3290
+ * @throws {RequiredError}
3291
+ */
3292
+ stopWatching: async (n = {}) => {
3293
+ const e = "/watch-mode/stop", t = new URL(e, b);
3294
+ let a;
3295
+ l && (a = l.baseOptions);
3296
+ const r = { method: "POST", ...a, ...n }, o = {};
3297
+ P(t, {});
3298
+ let c = a && a.headers ? a.headers : {};
3299
+ return r.headers = { ...o, ...c, ...n.headers }, {
3300
+ url: v(t),
3301
+ options: r
3302
+ };
3303
+ },
3304
+ /**
3305
+ * Opens a Server-Sent Events (SSE) stream of file-change events for the package, used by in-package HTML data apps (via the publisher.js runtime) to live-reload when their sources are edited. This is a long-lived `text/event-stream` connection, not a JSON endpoint, and is therefore not surfaced through the generated API clients — consume it with an `EventSource`. The stream emits: - `event: hello` (`data: connected`) once on connect. - `event: mode` (`data: enabled|disabled`) reporting whether watch mode is currently active for the environment. When `disabled`, no `changed` events will follow until watch mode is started. - `event: changed` (`data: changed`) each time a watched file in the package changes. - periodic `: heartbeat` comments to keep idle proxies from closing the connection.
3306
+ * @summary Stream package change events (SSE)
3307
+ * @param {string} environmentName Name of the environment
3308
+ * @param {string} packageName Name of the package
3309
+ * @param {*} [options] Override http request option.
3310
+ * @throws {RequiredError}
3311
+ */
3312
+ streamPackageEvents: async (n, e, t = {}) => {
3313
+ m("streamPackageEvents", "environmentName", n), m("streamPackageEvents", "packageName", e);
3314
+ const a = "/environments/{environmentName}/packages/{packageName}/events".replace("{environmentName}", encodeURIComponent(String(n))).replace("{packageName}", encodeURIComponent(String(e))), r = new URL(a, b);
3315
+ let o;
3316
+ l && (o = l.baseOptions);
3317
+ const s = { method: "GET", ...o, ...t }, c = {};
3318
+ P(r, {});
3319
+ let d = o && o.headers ? o.headers : {};
3320
+ return s.headers = { ...c, ...d, ...t.headers }, {
3321
+ url: v(r),
3322
+ options: s
3323
+ };
3324
+ }
3325
+ };
3326
+ }, M = function(l) {
3327
+ const n = Be(l);
3328
+ return {
3329
+ /**
3330
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which environment is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
3331
+ * @summary Get watch mode status
3332
+ * @param {*} [options] Override http request option.
3333
+ * @throws {RequiredError}
3334
+ */
3335
+ async getWatchStatus(e) {
3336
+ const t = await n.getWatchStatus(e), a = l?.serverIndex ?? 0, r = g["WatchModeApi.getWatchStatus"]?.[a]?.url;
3337
+ return (o, s) => V(t, h, u, l)(o, r || s);
3338
+ },
3339
+ /**
3340
+ * Initiates file watching for the specified environment. This enables real-time monitoring of file changes within the environment directory, allowing for automatic reloading and updates during development. Only one environment can be watched at a time.
3341
+ * @summary Start file watching
3342
+ * @param {StartWatchRequest} startWatchRequest
3343
+ * @param {*} [options] Override http request option.
3344
+ * @throws {RequiredError}
3345
+ */
3346
+ async startWatching(e, t) {
3347
+ const a = await n.startWatching(e, t), r = l?.serverIndex ?? 0, o = g["WatchModeApi.startWatching"]?.[r]?.url;
3348
+ return (s, c) => V(a, h, u, l)(s, o || c);
3349
+ },
3350
+ /**
3351
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different environment.
3352
+ * @summary Stop file watching
3353
+ * @param {*} [options] Override http request option.
3354
+ * @throws {RequiredError}
3355
+ */
3356
+ async stopWatching(e) {
3357
+ const t = await n.stopWatching(e), a = l?.serverIndex ?? 0, r = g["WatchModeApi.stopWatching"]?.[a]?.url;
3358
+ return (o, s) => V(t, h, u, l)(o, r || s);
3359
+ },
3360
+ /**
3361
+ * Opens a Server-Sent Events (SSE) stream of file-change events for the package, used by in-package HTML data apps (via the publisher.js runtime) to live-reload when their sources are edited. This is a long-lived `text/event-stream` connection, not a JSON endpoint, and is therefore not surfaced through the generated API clients — consume it with an `EventSource`. The stream emits: - `event: hello` (`data: connected`) once on connect. - `event: mode` (`data: enabled|disabled`) reporting whether watch mode is currently active for the environment. When `disabled`, no `changed` events will follow until watch mode is started. - `event: changed` (`data: changed`) each time a watched file in the package changes. - periodic `: heartbeat` comments to keep idle proxies from closing the connection.
3362
+ * @summary Stream package change events (SSE)
3363
+ * @param {string} environmentName Name of the environment
3364
+ * @param {string} packageName Name of the package
3365
+ * @param {*} [options] Override http request option.
3366
+ * @throws {RequiredError}
3367
+ */
3368
+ async streamPackageEvents(e, t, a) {
3369
+ const r = await n.streamPackageEvents(e, t, a), o = l?.serverIndex ?? 0, s = g["WatchModeApi.streamPackageEvents"]?.[o]?.url;
3370
+ return (c, i) => V(r, h, u, l)(c, s || i);
3371
+ }
3372
+ };
3373
+ }, Xa = function(l, n, e) {
3374
+ const t = M(l);
3375
+ return {
3376
+ /**
3377
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which environment is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
3378
+ * @summary Get watch mode status
3379
+ * @param {*} [options] Override http request option.
3380
+ * @throws {RequiredError}
3381
+ */
3382
+ getWatchStatus(a) {
3383
+ return t.getWatchStatus(a).then((r) => r(e, n));
3384
+ },
3385
+ /**
3386
+ * Initiates file watching for the specified environment. This enables real-time monitoring of file changes within the environment directory, allowing for automatic reloading and updates during development. Only one environment can be watched at a time.
3387
+ * @summary Start file watching
3388
+ * @param {StartWatchRequest} startWatchRequest
3389
+ * @param {*} [options] Override http request option.
3390
+ * @throws {RequiredError}
3391
+ */
3392
+ startWatching(a, r) {
3393
+ return t.startWatching(a, r).then((o) => o(e, n));
3394
+ },
3395
+ /**
3396
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different environment.
3397
+ * @summary Stop file watching
3398
+ * @param {*} [options] Override http request option.
3399
+ * @throws {RequiredError}
3400
+ */
3401
+ stopWatching(a) {
3402
+ return t.stopWatching(a).then((r) => r(e, n));
3403
+ },
3404
+ /**
3405
+ * Opens a Server-Sent Events (SSE) stream of file-change events for the package, used by in-package HTML data apps (via the publisher.js runtime) to live-reload when their sources are edited. This is a long-lived `text/event-stream` connection, not a JSON endpoint, and is therefore not surfaced through the generated API clients — consume it with an `EventSource`. The stream emits: - `event: hello` (`data: connected`) once on connect. - `event: mode` (`data: enabled|disabled`) reporting whether watch mode is currently active for the environment. When `disabled`, no `changed` events will follow until watch mode is started. - `event: changed` (`data: changed`) each time a watched file in the package changes. - periodic `: heartbeat` comments to keep idle proxies from closing the connection.
3406
+ * @summary Stream package change events (SSE)
3407
+ * @param {string} environmentName Name of the environment
3408
+ * @param {string} packageName Name of the package
3409
+ * @param {*} [options] Override http request option.
3410
+ * @throws {RequiredError}
3411
+ */
3412
+ streamPackageEvents(a, r, o) {
3413
+ return t.streamPackageEvents(a, r, o).then((s) => s(e, n));
3414
+ }
3415
+ };
3416
+ };
3417
+ class Fe extends I {
3418
+ /**
3419
+ * Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which environment is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
3420
+ * @summary Get watch mode status
3421
+ * @param {*} [options] Override http request option.
3422
+ * @throws {RequiredError}
3423
+ * @memberof WatchModeApi
3424
+ */
3425
+ getWatchStatus(n) {
3426
+ return M(this.configuration).getWatchStatus(n).then((e) => e(this.axios, this.basePath));
3427
+ }
3428
+ /**
3429
+ * Initiates file watching for the specified environment. This enables real-time monitoring of file changes within the environment directory, allowing for automatic reloading and updates during development. Only one environment can be watched at a time.
3430
+ * @summary Start file watching
3431
+ * @param {StartWatchRequest} startWatchRequest
3432
+ * @param {*} [options] Override http request option.
3433
+ * @throws {RequiredError}
3434
+ * @memberof WatchModeApi
3435
+ */
3436
+ startWatching(n, e) {
3437
+ return M(this.configuration).startWatching(n, e).then((t) => t(this.axios, this.basePath));
3438
+ }
3439
+ /**
3440
+ * Stops the current file watching session. This disables real-time monitoring of file changes and releases system resources. Use this when development is complete or when switching to a different environment.
3441
+ * @summary Stop file watching
3442
+ * @param {*} [options] Override http request option.
3443
+ * @throws {RequiredError}
3444
+ * @memberof WatchModeApi
3445
+ */
3446
+ stopWatching(n) {
3447
+ return M(this.configuration).stopWatching(n).then((e) => e(this.axios, this.basePath));
3448
+ }
3449
+ /**
3450
+ * Opens a Server-Sent Events (SSE) stream of file-change events for the package, used by in-package HTML data apps (via the publisher.js runtime) to live-reload when their sources are edited. This is a long-lived `text/event-stream` connection, not a JSON endpoint, and is therefore not surfaced through the generated API clients — consume it with an `EventSource`. The stream emits: - `event: hello` (`data: connected`) once on connect. - `event: mode` (`data: enabled|disabled`) reporting whether watch mode is currently active for the environment. When `disabled`, no `changed` events will follow until watch mode is started. - `event: changed` (`data: changed`) each time a watched file in the package changes. - periodic `: heartbeat` comments to keep idle proxies from closing the connection.
3451
+ * @summary Stream package change events (SSE)
3452
+ * @param {string} environmentName Name of the environment
3453
+ * @param {string} packageName Name of the package
3454
+ * @param {*} [options] Override http request option.
3455
+ * @throws {RequiredError}
3456
+ * @memberof WatchModeApi
3457
+ */
3458
+ streamPackageEvents(n, e, t) {
3459
+ return M(this.configuration).streamPackageEvents(n, e, t).then((a) => a(this.axios, this.basePath));
3460
+ }
3461
+ }
3462
+ class Qe {
3463
+ /**
3464
+ * parameter for apiKey security
3465
+ * @param name security name
3466
+ * @memberof Configuration
3467
+ */
3468
+ apiKey;
3469
+ /**
3470
+ * parameter for basic security
3471
+ *
3472
+ * @type {string}
3473
+ * @memberof Configuration
3474
+ */
3475
+ username;
3476
+ /**
3477
+ * parameter for basic security
3478
+ *
3479
+ * @type {string}
3480
+ * @memberof Configuration
3481
+ */
3482
+ password;
3483
+ /**
3484
+ * parameter for oauth2 security
3485
+ * @param name security name
3486
+ * @param scopes oauth2 scope
3487
+ * @memberof Configuration
3488
+ */
3489
+ accessToken;
3490
+ /**
3491
+ * override base path
3492
+ *
3493
+ * @type {string}
3494
+ * @memberof Configuration
3495
+ */
3496
+ basePath;
3497
+ /**
3498
+ * override server index
3499
+ *
3500
+ * @type {number}
3501
+ * @memberof Configuration
3502
+ */
3503
+ serverIndex;
3504
+ /**
3505
+ * base options for axios calls
3506
+ *
3507
+ * @type {any}
3508
+ * @memberof Configuration
3509
+ */
3510
+ baseOptions;
3511
+ /**
3512
+ * The FormData constructor that will be used to create multipart form data
3513
+ * requests. You can inject this here so that execution environments that
3514
+ * do not support the FormData class can still run the generated client.
3515
+ *
3516
+ * @type {new () => FormData}
3517
+ */
3518
+ formDataCtor;
3519
+ constructor(n = {}) {
3520
+ this.apiKey = n.apiKey, this.username = n.username, this.password = n.password, this.accessToken = n.accessToken, this.basePath = n.basePath, this.serverIndex = n.serverIndex, this.baseOptions = {
3521
+ ...n.baseOptions,
3522
+ headers: {
3523
+ ...n.baseOptions?.headers
3524
+ }
3525
+ }, this.formDataCtor = n.formDataCtor;
3526
+ }
3527
+ /**
3528
+ * Check if the given MIME is a JSON MIME.
3529
+ * JSON MIME examples:
3530
+ * application/json
3531
+ * application/json; charset=UTF8
3532
+ * APPLICATION/JSON
3533
+ * application/vnd.company+json
3534
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
3535
+ * @return True if the given MIME is JSON, false otherwise.
3536
+ */
3537
+ isJsonMime(n) {
3538
+ const e = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
3539
+ return n !== null && (e.test(n) || n.toLowerCase() === "application/json-patch+json");
3540
+ }
3541
+ }
3542
+ const B = {
3543
+ teal: "#14b3cb",
3544
+ // light wing of the M
3545
+ orange: "#e47404",
3546
+ // right wing of the M
3547
+ darkBlue: "#1474a4"
3548
+ // deep shadow of the M
3549
+ }, Za = {
3550
+ violet: "#7c4dcc",
3551
+ magenta: "#c2478f",
3552
+ moss: "#5c8f3f"
3553
+ }, et = '"JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", monospace', at = y(J)({
3554
+ display: "flex",
3555
+ flexDirection: "column",
3556
+ height: "100%",
3557
+ boxShadow: "none",
3558
+ border: "none",
3559
+ backgroundColor: "transparent"
3560
+ }), tt = y(K)({
3561
+ display: "flex",
3562
+ flexDirection: "column",
3563
+ padding: "0",
3564
+ flexGrow: 1
3565
+ }), rt = y(he)({
3566
+ padding: "0"
3567
+ }), nt = y("div")(({ theme: l }) => ({
3568
+ backgroundColor: l.palette.background.default,
3569
+ padding: "0 8px 0px 8px",
3570
+ borderRadius: "12px",
3571
+ boxShadow: "none",
3572
+ border: "none",
3573
+ maxWidth: "1200px",
3574
+ margin: "0 auto"
3575
+ }));
3576
+ y("div")(({ theme: l }) => ({
3577
+ marginBottom: "40px",
3578
+ paddingBottom: "24px",
3579
+ borderBottom: `1px solid ${l.palette.divider}`
3580
+ }));
3581
+ const ot = y("div")({
3582
+ marginBottom: "48px",
3583
+ padding: "0",
3584
+ backgroundColor: "transparent",
3585
+ border: "none",
3586
+ boxShadow: "none"
3587
+ }), st = y("div")({
3588
+ marginBottom: "0",
3589
+ padding: "0",
3590
+ backgroundColor: "transparent",
3591
+ border: "none",
3592
+ boxShadow: "none"
3593
+ }), lt = y("div")({
3594
+ backgroundColor: "transparent",
3595
+ paddingTop: "12px",
3596
+ paddingBottom: "2px",
3597
+ borderRadius: "8px",
3598
+ border: "none",
3599
+ boxShadow: "none",
3600
+ marginBottom: "0"
3601
+ });
3602
+ y("div")(({ theme: l }) => ({
3603
+ backgroundColor: l.palette.mode === "dark" ? "#1e293b" : "#f8f9fa",
3604
+ padding: "16px",
3605
+ borderRadius: "8px",
3606
+ border: `1px solid ${l.palette.divider}`,
3607
+ fontFamily: "'Monaco', 'Menlo', 'Ubuntu Mono', monospace",
3608
+ fontSize: "13px",
3609
+ lineHeight: "1.5",
3610
+ overflowX: "auto",
3611
+ color: l.palette.text.primary
3612
+ }));
3613
+ y("div")(({ theme: l }) => ({
3614
+ backgroundColor: l.palette.mode === "dark" ? "#1e293b" : "#f8f9fa",
3615
+ padding: "12px 16px",
3616
+ borderRadius: "8px",
3617
+ border: `1px solid ${l.palette.divider}`,
3618
+ marginBottom: "16px",
3619
+ display: "flex",
3620
+ justifyContent: "space-between",
3621
+ alignItems: "center"
3622
+ }));
3623
+ const ct = y("div")({
3624
+ height: "100%"
3625
+ });
3626
+ y("div")({
3627
+ height: "30px",
3628
+ backgroundColor: "rgba(225, 240, 255, 1)",
3629
+ display: "flex",
3630
+ padding: "4px",
3631
+ alignItems: "center"
3632
+ });
3633
+ const it = y("div")({
3634
+ height: "75vh",
3635
+ width: "100%",
3636
+ overflowY: "auto"
3637
+ });
3638
+ y("div")({
3639
+ position: "relative",
3640
+ height: "100%",
3641
+ flex: "0 0 auto"
3642
+ });
3643
+ const dt = y(J)(({ theme: l }) => ({
3644
+ backgroundColor: l.palette.background.paper,
3645
+ padding: "24px",
3646
+ borderRadius: "8px",
3647
+ border: `1px solid ${l.palette.divider}`,
3648
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
3649
+ height: "100%",
3650
+ transition: "box-shadow 0.2s ease-in-out",
3651
+ "&:hover": {
3652
+ boxShadow: "0 2px 6px rgba(0, 0, 0, 0.08)"
3653
+ }
3654
+ })), pt = y(K)({
3655
+ padding: "0",
3656
+ "&:last-child": {
3657
+ paddingBottom: "0"
3658
+ }
3659
+ }), mt = y("div")(({ theme: l }) => ({
3660
+ fontSize: "0.875rem",
3661
+ fontWeight: 500,
3662
+ color: l.palette.text.secondary,
3663
+ marginBottom: "16px",
3664
+ paddingBottom: "8px",
3665
+ borderBottom: `1px solid ${l.palette.divider}`
3666
+ }));
3667
+ y("div")({
3668
+ padding: "32px",
3669
+ maxWidth: "1400px",
3670
+ margin: "0 auto",
3671
+ minHeight: "100vh"
3672
+ });
3673
+ const $e = [
3674
+ B.teal,
3675
+ B.orange,
3676
+ B.darkBlue,
3677
+ "#66cedc",
3678
+ "#ec72b8",
3679
+ "#f9c85b",
3680
+ "#aacd85",
3681
+ "#b87ced"
3682
+ ], ze = "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", W = {
3683
+ defaultMode: "light",
3684
+ allowUserToggle: !0,
3685
+ palette: {
3686
+ series: $e,
3687
+ background: {
3688
+ light: "#ffffff",
3689
+ // Slate to match the Publisher app's sidebar surface so
3690
+ // rendered charts sit on the same elevation as the chrome
3691
+ // around them.
3692
+ dark: "#1e293b"
3693
+ },
3694
+ tableHeader: {
3695
+ light: "#5d626b",
3696
+ dark: "#cbd5e1"
3697
+ },
3698
+ // Background of the table header row, independent of the
3699
+ // tile (dashboard tile container) so the operator can theme
3700
+ // the header band on its own.
3701
+ tableHeaderBackground: {
3702
+ light: "#f5fafc",
3703
+ dark: "#1e293b"
3704
+ },
3705
+ tableBody: {
3706
+ light: "#727883",
3707
+ dark: "#e2e8f0"
3708
+ },
3709
+ // The padded container that wraps each chart / table in a
3710
+ // dashboard. Light mode: a faint tint so tiles read as recessed
3711
+ // cards on the page; dark mode: page-outer slate.
3712
+ tile: {
3713
+ light: "#f5fafc",
3714
+ dark: "#0f172a"
3715
+ },
3716
+ tileTitle: {
3717
+ light: "#5d626b",
3718
+ dark: "#94a3b8"
3719
+ },
3720
+ // Saturated end of the choropleth / heatmap gradient. The
3721
+ // renderer pairs this with a near-neutral low end. Defaults
3722
+ // match the first series colour (teal) so unbranded installs
3723
+ // get a brand-coherent gradient instead of the renderer's
3724
+ // hardcoded blue ramp.
3725
+ mapColor: {
3726
+ light: B.teal,
3727
+ dark: B.teal
3728
+ }
3729
+ },
3730
+ font: {
3731
+ family: ze,
3732
+ size: 12
3733
+ }
3734
+ }, qe = [
3735
+ "background",
3736
+ "tableHeader",
3737
+ "tableHeaderBackground",
3738
+ "tableBody",
3739
+ "tile",
3740
+ "tileTitle",
3741
+ "mapColor"
3742
+ ];
3743
+ function ae(l, n) {
3744
+ const e = W.palette ?? {}, t = W.font ?? {
3745
+ family: "sans-serif",
3746
+ size: 12
3747
+ };
3748
+ let a = [...e.series ?? []], r = t.family ?? "sans-serif", o = t.size ?? 12;
3749
+ const s = {
3750
+ background: { ...e.background ?? {} },
3751
+ tableHeader: { ...e.tableHeader ?? {} },
3752
+ tableHeaderBackground: {
3753
+ ...e.tableHeaderBackground ?? {}
3754
+ },
3755
+ tableBody: { ...e.tableBody ?? {} },
3756
+ tile: { ...e.tile ?? {} },
3757
+ tileTitle: { ...e.tileTitle ?? {} },
3758
+ mapColor: { ...e.mapColor ?? {} }
3759
+ };
3760
+ for (const p of l)
3761
+ if (p) {
3762
+ Array.isArray(p.palette?.series) && (a = [...p.palette.series]);
3763
+ for (const O of qe) {
3764
+ const C = p.palette?.[O];
3765
+ C && (s[O] = { ...s[O], ...C });
3766
+ }
3767
+ typeof p.font?.family == "string" && (r = p.font.family), typeof p.font?.size == "number" && (o = p.font.size);
3768
+ }
3769
+ const c = n === "dark", i = (p) => s[p][n] ?? e[p]?.[n], d = i("background");
3770
+ return {
3771
+ mode: n,
3772
+ series: a,
3773
+ font: { family: r, size: o },
3774
+ background: d,
3775
+ tableHeader: i("tableHeader"),
3776
+ tableHeaderBackground: i("tableHeaderBackground"),
3777
+ tableBody: i("tableBody"),
3778
+ tile: i("tile"),
3779
+ tileTitle: i("tileTitle"),
3780
+ mapColor: i("mapColor"),
3781
+ // Table interior follows the operator's chart background so
3782
+ // tables and chart canvases share a single "viz surface" colour.
3783
+ tableBackground: d,
3784
+ // Derived, mode-keyed defaults. Operators don't edit these in
3785
+ // v1; they're consistent borders / readable foreground text for
3786
+ // each mode. If a user later asks to customise them, expose them
3787
+ // on the schema and the editor and replace the literals below.
3788
+ border: c ? "1px solid #334155" : "1px solid #e5e7eb",
3789
+ pinnedBorder: c ? "1px solid #475569" : "1px solid #daedf3",
3790
+ valueColor: c ? "#f1f5f9" : "#1f2937",
3791
+ foreground: c ? "#e2e8f0" : "#1f2937",
3792
+ axisFaint: c ? "#475569" : "#d1d5db",
3793
+ // Dashboard panel background (area BETWEEN tiles). Light keeps
3794
+ // white so the page stays visually unchanged. Dark uses slate so
3795
+ // the panel doesn't read as a bright box against the dark page
3796
+ // chrome. Intentionally NOT tied to `palette.background`: the
3797
+ // panel stays neutral so a bold accent on the chart canvas
3798
+ // doesn't bleed into the surrounding chrome.
3799
+ dashboardRoot: c ? "#1e293b" : "#ffffff",
3800
+ // Drill link hover. Light is Malloyyo's own blue, so the same drill reads
3801
+ // the same in both; dark lightens it for contrast on the slate panel.
3802
+ drillLink: c ? "#60a5fa" : "#2563eb"
3803
+ };
3804
+ }
3805
+ function De(l, n, e) {
3806
+ const t = n ?? l ?? "light";
3807
+ return t === "auto" ? e ? "dark" : "light" : t;
3808
+ }
3809
+ const te = G(void 0);
3810
+ function Le({
3811
+ layers: l,
3812
+ mode: n,
3813
+ userChoice: e,
3814
+ setMode: t,
3815
+ allowUserToggle: a = !0,
3816
+ children: r
3817
+ }) {
3818
+ const o = f(() => ae(l, n), [l, n]), s = f(
3819
+ () => ({ theme: o, layers: l, mode: n, userChoice: e, setMode: t, allowUserToggle: a }),
3820
+ [o, l, n, e, t, a]
3821
+ );
3822
+ return /* @__PURE__ */ F(te.Provider, { value: s, children: r });
3823
+ }
3824
+ function ht() {
3825
+ const l = Y(te);
3826
+ return l || {
3827
+ theme: ae([], "light"),
3828
+ layers: [],
3829
+ mode: "light",
3830
+ userChoice: void 0,
3831
+ setMode: () => {
3832
+ },
3833
+ allowUserToggle: !1
3834
+ };
3835
+ }
3836
+ const je = new ce({
3837
+ defaultOptions: {
3838
+ queries: {
3839
+ retry: !1,
3840
+ throwOnError: !1
3841
+ },
3842
+ mutations: {
3843
+ retry: !1,
3844
+ throwOnError: !1
3845
+ }
3846
+ }
3847
+ }), ut = {
3848
+ staleTime: 300 * 1e3,
3849
+ refetchOnWindowFocus: !1,
3850
+ refetchOnReconnect: !1
3851
+ }, L = "publisher:themeMode";
3852
+ function He() {
3853
+ if (!(typeof window > "u"))
3854
+ try {
3855
+ const l = window.localStorage.getItem(L);
3856
+ if (l === "light" || l === "dark" || l === "auto") return l;
3857
+ } catch {
3858
+ }
3859
+ }
3860
+ function _e(l) {
3861
+ if (!(typeof window > "u"))
3862
+ try {
3863
+ l === void 0 ? window.localStorage.removeItem(L) : window.localStorage.setItem(L, l);
3864
+ } catch {
3865
+ }
3866
+ }
3867
+ function We() {
3868
+ return typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
3869
+ }
3870
+ h.defaults.baseURL || (h.defaults.baseURL = "IfYouAreSeeingThis_baseURL_IsNotSet");
3871
+ const re = G(void 0), Ge = (l, n) => {
3872
+ const e = `${window.location.protocol}//${window.location.host}/api/v0`, t = h.create({
3873
+ baseURL: l || e,
3874
+ withCredentials: !0,
3875
+ timeout: 6e5
3876
+ });
3877
+ t.interceptors.request.use(async (r) => {
3878
+ const o = await n?.();
3879
+ return r.headers.Authorization = o || "", r;
3880
+ });
3881
+ const a = new Qe({ basePath: e });
3882
+ return {
3883
+ models: new Ne(a, e, t),
3884
+ publisher: new fe(a, e, t),
3885
+ environments: new Ie(a, e, t),
3886
+ packages: new Ee(a, e, t),
3887
+ dashboards: new Ve(a, e, t),
3888
+ dataApps: new Se(a, e, t),
3889
+ notebooks: new Ue(a, e, t),
3890
+ connections: new be(a, e, t),
3891
+ databases: new ye(a, e, t),
3892
+ materializations: new Ae(
3893
+ a,
3894
+ e,
3895
+ t
3896
+ ),
3897
+ watchMode: new Fe(a, e, t)
3898
+ };
3899
+ }, gt = (l) => /* @__PURE__ */ F(ie, { client: je, children: /* @__PURE__ */ F(Ye, { ...l }) }), Ye = ({
3900
+ children: l,
3901
+ getAccessToken: n,
3902
+ baseURL: e,
3903
+ mutable: t,
3904
+ theme: a
3905
+ }) => {
3906
+ const r = f(
3907
+ () => Ge(e, n),
3908
+ [e, n]
3909
+ ), o = e || `${window.location.protocol}//${window.location.host}/api/v0`, s = de({
3910
+ queryKey: ["status"],
3911
+ queryFn: async () => (await r.publisher.getStatus()).data
3912
+ });
3913
+ s.error && console.error("Failed to fetch publisher status:", s.error);
3914
+ const c = s.data?.frozenConfig, i = s.data?.theme, d = s.isLoading;
3915
+ let p;
3916
+ s.isLoading || s.error ? p = t : c ? p = !1 : p = t ?? !0;
3917
+ const O = f(
3918
+ () => [i, a],
3919
+ [i, a]
3920
+ ), [C, U] = _(
3921
+ He
3922
+ ), [x, $] = _(We);
3923
+ pe(() => {
3924
+ if (typeof window > "u" || !window.matchMedia) return;
3925
+ const R = window.matchMedia("(prefers-color-scheme: dark)"), H = (le) => $(le.matches);
3926
+ return R.addEventListener("change", H), () => R.removeEventListener("change", H);
3927
+ }, []);
3928
+ const ne = me((R) => {
3929
+ U(R), _e(R);
3930
+ }, []), j = i?.allowUserToggle ?? !0, z = j ? C : void 0, oe = f(
3931
+ () => De(
3932
+ i?.defaultMode,
3933
+ z,
3934
+ x
3935
+ ),
3936
+ [i?.defaultMode, z, x]
3937
+ ), se = {
3938
+ server: o,
3939
+ getAccessToken: n,
3940
+ apiClients: r,
3941
+ mutable: p,
3942
+ isLoadingStatus: d,
3943
+ instanceTheme: i
3944
+ };
3945
+ return /* @__PURE__ */ F(re.Provider, { value: se, children: /* @__PURE__ */ F(
3946
+ Le,
3947
+ {
3948
+ layers: O,
3949
+ mode: oe,
3950
+ userChoice: z,
3951
+ setMode: ne,
3952
+ allowUserToggle: j,
3953
+ children: l
3954
+ }
3955
+ ) });
3956
+ }, bt = () => {
3957
+ const l = Y(re);
3958
+ if (l === void 0)
3959
+ throw new Error("useServer must be used within a ServerProvider");
3960
+ return l;
3961
+ };
3962
+ export {
3963
+ Z as $,
3964
+ aa as A,
3965
+ Ba as B,
3966
+ ra as C,
3967
+ ia as D,
3968
+ ge as E,
3969
+ pa as F,
3970
+ ha as G,
3971
+ S as H,
3972
+ Qa as I,
3973
+ be as J,
3974
+ Pe as K,
3975
+ ua as L,
3976
+ ba as M,
3977
+ Oa as N,
3978
+ X as O,
3979
+ ka as P,
3980
+ Ra as Q,
3981
+ Ua as R,
3982
+ gt as S,
3983
+ Fa as T,
3984
+ $a as U,
3985
+ za as V,
3986
+ ve as W,
3987
+ D as X,
3988
+ qa as Y,
3989
+ Ve as Z,
3990
+ Oe as _,
3991
+ ta as a,
3992
+ Da as a0,
3993
+ Se as a1,
3994
+ ke as a2,
3995
+ ee as a3,
3996
+ La as a4,
3997
+ ye as a5,
3998
+ Ce as a6,
3999
+ N as a7,
4000
+ ja as a8,
4001
+ Ie as a9,
4002
+ Qe as aA,
4003
+ rt as aB,
4004
+ ct as aC,
4005
+ it as aD,
4006
+ ht as aE,
4007
+ at as aF,
4008
+ tt as aG,
4009
+ ut as aH,
4010
+ et as aI,
4011
+ dt as aJ,
4012
+ pt as aK,
4013
+ mt as aL,
4014
+ B as aM,
4015
+ st as aN,
4016
+ lt as aO,
4017
+ nt as aP,
4018
+ ot as aQ,
4019
+ Za as aR,
4020
+ qe as aS,
4021
+ ae as aT,
4022
+ W as aU,
4023
+ De as aV,
4024
+ Le as aW,
4025
+ xe as aa,
4026
+ A as ab,
4027
+ Ha as ac,
4028
+ Ae as ad,
4029
+ _a as ae,
4030
+ Re as af,
4031
+ w as ag,
4032
+ Wa as ah,
4033
+ Ne as ai,
4034
+ Te as aj,
4035
+ Q as ak,
4036
+ Ga as al,
4037
+ Ue as am,
4038
+ Ya as an,
4039
+ we as ao,
4040
+ T as ap,
4041
+ Ja as aq,
4042
+ Ee as ar,
4043
+ Me as as,
4044
+ E as at,
4045
+ Ka as au,
4046
+ fe as av,
4047
+ Be as aw,
4048
+ M as ax,
4049
+ Xa as ay,
4050
+ Fe as az,
4051
+ na as b,
4052
+ oa as c,
4053
+ sa as d,
4054
+ la as e,
4055
+ ca as f,
4056
+ je as g,
4057
+ da as h,
4058
+ ma as i,
4059
+ ga as j,
4060
+ Pa as k,
4061
+ va as l,
4062
+ Va as m,
4063
+ Sa as n,
4064
+ ya as o,
4065
+ Ca as p,
4066
+ Ia as q,
4067
+ xa as r,
4068
+ Aa as s,
4069
+ Na as t,
4070
+ bt as u,
4071
+ Ta as v,
4072
+ wa as w,
4073
+ Ea as x,
4074
+ Ma as y,
4075
+ fa as z
4076
+ };