@malloy-publisher/sdk 0.0.382-dev → 0.2.0

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