@malloy-publisher/sdk 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -65
- package/dist/{DocumentStorage-CigwNjz4.es.js → Dashboard-DnqWRijB.es.js} +23660 -23575
- package/dist/Dashboard-FD3-Af-_.cjs.js +136 -0
- package/dist/{RenderedResult-BfayOSk1.es.js → RenderedResult-6UKAHaAj.es.js} +18 -18
- package/dist/{RenderedResult-DpHdrFtp.cjs.js → RenderedResult-CetSzFgW.cjs.js} +1 -1
- package/dist/ServerProvider-BsjJvkML.cjs.js +1 -0
- package/dist/{ServerProvider-CfUFleYe.es.js → ServerProvider-DgRFJ43L.es.js} +983 -957
- package/dist/builder/index.cjs.js +50 -50
- package/dist/builder/index.es.js +2587 -2511
- package/dist/client/api.d.ts +141 -40
- package/dist/client/configuration.d.ts +1 -1
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.es.js +62 -59
- package/dist/components/DashboardBuilder/malloyText.d.ts +49 -0
- package/dist/components/DashboardBuilder/malloyTree.d.ts +2 -18
- package/dist/components/DashboardBuilder/readDocument.d.ts +2 -0
- package/dist/components/Notebook/NotebookCell.d.ts +3 -2
- package/dist/components/Notebook/cellKind.d.ts +20 -0
- package/dist/index.cjs.js +15 -12
- package/dist/index.es.js +4528 -4435
- package/package.json +1 -1
- package/src/components/DashboardBuilder/malloyText.spec.ts +70 -1
- package/src/components/DashboardBuilder/malloyText.ts +171 -3
- package/src/components/DashboardBuilder/malloyTree.spec.ts +35 -0
- package/src/components/DashboardBuilder/malloyTree.ts +28 -4
- package/src/components/DashboardBuilder/readDocument.spec.ts +180 -1
- package/src/components/DashboardBuilder/readDocument.ts +52 -14
- package/src/components/DashboardBuilder/spliceDocument.spec.ts +396 -2
- package/src/components/DashboardBuilder/spliceDocument.ts +121 -18
- package/src/components/Notebook/Notebook.served.spec.tsx +175 -0
- package/src/components/Notebook/Notebook.spec.tsx +33 -2
- package/src/components/Notebook/Notebook.tsx +13 -7
- package/src/components/Notebook/NotebookCell.tsx +124 -63
- package/src/components/Notebook/cellKind.spec.ts +191 -0
- package/src/components/Notebook/cellKind.ts +74 -0
- package/src/components/Package/Package.notebooks.spec.tsx +90 -0
- package/src/components/Package/Package.tsx +18 -4
- package/dist/DocumentStorage-DvUNSOiN.cjs.js +0 -134
- package/dist/ServerProvider-CuYLH_Yi.cjs.js +0 -1
package/dist/client/api.d.ts
CHANGED
|
@@ -895,7 +895,7 @@ export interface Dashboard {
|
|
|
895
895
|
*/
|
|
896
896
|
'title'?: string;
|
|
897
897
|
/**
|
|
898
|
-
* The file\'s
|
|
898
|
+
* The file\'s unnamed `\"` notes above the `## artifact` tag; when it has none there, the ones below it (a legacy spot the lint flags). For a dashboard whose tag sits on one query, that query\'s `#\"` notes.
|
|
899
899
|
* @type {string}
|
|
900
900
|
* @memberof Dashboard
|
|
901
901
|
*/
|
|
@@ -944,7 +944,7 @@ export interface DashboardManifest {
|
|
|
944
944
|
*/
|
|
945
945
|
'title'?: string;
|
|
946
946
|
/**
|
|
947
|
-
* The file\'s
|
|
947
|
+
* The file\'s unnamed `\"` notes above the `## artifact` tag; when it has none there, the ones below it (a legacy spot the lint flags). For a dashboard whose tag sits on one query, that query\'s `#\"` notes.
|
|
948
948
|
* @type {string}
|
|
949
949
|
* @memberof DashboardManifest
|
|
950
950
|
*/
|
|
@@ -1945,6 +1945,12 @@ export interface Model {
|
|
|
1945
1945
|
* @memberof Model
|
|
1946
1946
|
*/
|
|
1947
1947
|
'path'?: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* Whether the file is on the package\'s surface: the files this route lists without `includeHiddenFilesAndSources`. True for every file of a package with no surface. It does not say whether a query can reach the file, which `queryableSources: \"all\"` also decides. False only on a file listed because the request set `includeHiddenFilesAndSources`.
|
|
1950
|
+
* @type {boolean}
|
|
1951
|
+
* @memberof Model
|
|
1952
|
+
*/
|
|
1953
|
+
'onSurface'?: boolean;
|
|
1948
1954
|
/**
|
|
1949
1955
|
* Error message if the model failed to compile or load
|
|
1950
1956
|
* @type {string}
|
|
@@ -2120,13 +2126,13 @@ export interface Notebook {
|
|
|
2120
2126
|
*/
|
|
2121
2127
|
'path'?: string;
|
|
2122
2128
|
/**
|
|
2123
|
-
* Human title
|
|
2129
|
+
* Human title. For a `.malloynb`, resolved from its own `## title=\"…\"`, then its `#\"` doc comment, then its first markdown heading. For a `.malloy` notebook, from the `title` in its `## artifact` tag, then the first line of the `\"` notes above that tag, then its first markdown heading when no prose precedes it. Absent when none of those resolve, leaving the caller to show the path.
|
|
2124
2130
|
* @type {string}
|
|
2125
2131
|
* @memberof Notebook
|
|
2126
2132
|
*/
|
|
2127
2133
|
'title'?: string;
|
|
2128
2134
|
/**
|
|
2129
|
-
* The notebook\'s
|
|
2135
|
+
* The notebook\'s doc comment, when it has one. For a `.malloy` notebook that is the `\"` notes above the `## artifact` line; prose below it is a `##(markdown)` or `##|(markdown)` cell.
|
|
2130
2136
|
* @type {string}
|
|
2131
2137
|
* @memberof Notebook
|
|
2132
2138
|
*/
|
|
@@ -2150,12 +2156,42 @@ export interface NotebookCell {
|
|
|
2150
2156
|
* @memberof NotebookCell
|
|
2151
2157
|
*/
|
|
2152
2158
|
'type'?: NotebookCellTypeEnum;
|
|
2159
|
+
/**
|
|
2160
|
+
* What a cell is, on a `.malloy` notebook. A definition cell (`source:`, `import`, `query:`, `given:`, `type:`, `export`) has type `code` and produces no result. Absent on a `.malloynb`.
|
|
2161
|
+
* @type {string}
|
|
2162
|
+
* @memberof NotebookCell
|
|
2163
|
+
*/
|
|
2164
|
+
'kind'?: NotebookCellKindEnum;
|
|
2153
2165
|
/**
|
|
2154
2166
|
* Text contents of the notebook cell (either markdown or Malloy code)
|
|
2155
2167
|
* @type {string}
|
|
2156
2168
|
* @memberof NotebookCell
|
|
2157
2169
|
*/
|
|
2158
2170
|
'text'?: string;
|
|
2171
|
+
/**
|
|
2172
|
+
* On a `.malloy` notebook\'s code cell, the prose written on the `(markdown)` route in its own tag lines (`#(markdown) text` lines, `#|(markdown)` … `|#` blocks), which `text` still contains. Blocks join with a blank line, adjacent lines with a newline. Author prose, so it is served even when `queryInfo` is withheld. Absent when the cell has none.
|
|
2173
|
+
* @type {string}
|
|
2174
|
+
* @memberof NotebookCell
|
|
2175
|
+
*/
|
|
2176
|
+
'markdown'?: string;
|
|
2177
|
+
/**
|
|
2178
|
+
* Present on every code cell of a `.malloy` notebook, and absent on a `.malloynb` or from a server that predates it. The lines of `text` that hold `markdown`, as `[start, end]` pairs in file order; `[]` when the cell has none. Lines are 0-based and inclusive, counted on `text` split at `\\n`. Strip exactly these lines to get the cell\'s code without its prose; do not re-derive them from `text`, whose first line has lost its indentation.
|
|
2179
|
+
* @type {Array<Array<number>>}
|
|
2180
|
+
* @memberof NotebookCell
|
|
2181
|
+
*/
|
|
2182
|
+
'proseLines'?: Array<Array<number>>;
|
|
2183
|
+
/**
|
|
2184
|
+
* Present on every code cell of a `.malloy` notebook, as `proseLines` is. The 0-based line of `text` (split at `\\n`) where the statement\'s code starts, its first token that is neither a note nor a comment, so the `source`, `run`, `given` or `import` keyword sits on it.
|
|
2185
|
+
* @type {number}
|
|
2186
|
+
* @memberof NotebookCell
|
|
2187
|
+
*/
|
|
2188
|
+
'codeLine'?: number;
|
|
2189
|
+
/**
|
|
2190
|
+
* On a `.malloy` notebook\'s code cell, the joined text of its leading `#\"` lines (space-joined, trimmed). Author prose, so it is served even when `queryInfo` is withheld. Absent when the cell has none, which is authoritative wherever `proseLines` is present.
|
|
2191
|
+
* @type {string}
|
|
2192
|
+
* @memberof NotebookCell
|
|
2193
|
+
*/
|
|
2194
|
+
'caption'?: string;
|
|
2159
2195
|
/**
|
|
2160
2196
|
* Array of JSON strings containing SourceInfo objects made available in this cell
|
|
2161
2197
|
* @type {Array<string>}
|
|
@@ -2174,6 +2210,12 @@ export declare const NotebookCellTypeEnum: {
|
|
|
2174
2210
|
readonly Code: "code";
|
|
2175
2211
|
};
|
|
2176
2212
|
export type NotebookCellTypeEnum = typeof NotebookCellTypeEnum[keyof typeof NotebookCellTypeEnum];
|
|
2213
|
+
export declare const NotebookCellKindEnum: {
|
|
2214
|
+
readonly Markdown: "markdown";
|
|
2215
|
+
readonly Query: "query";
|
|
2216
|
+
readonly Definition: "definition";
|
|
2217
|
+
};
|
|
2218
|
+
export type NotebookCellKindEnum = typeof NotebookCellKindEnum[keyof typeof NotebookCellKindEnum];
|
|
2177
2219
|
/**
|
|
2178
2220
|
* Result of executing a notebook cell
|
|
2179
2221
|
* @export
|
|
@@ -2186,12 +2228,42 @@ export interface NotebookCellResult {
|
|
|
2186
2228
|
* @memberof NotebookCellResult
|
|
2187
2229
|
*/
|
|
2188
2230
|
'type'?: NotebookCellResultTypeEnum;
|
|
2231
|
+
/**
|
|
2232
|
+
* The cell\'s kind, on a `.malloy` notebook. Absent on a `.malloynb`.
|
|
2233
|
+
* @type {string}
|
|
2234
|
+
* @memberof NotebookCellResult
|
|
2235
|
+
*/
|
|
2236
|
+
'kind'?: NotebookCellResultKindEnum;
|
|
2189
2237
|
/**
|
|
2190
2238
|
* Text contents of the notebook cell
|
|
2191
2239
|
* @type {string}
|
|
2192
2240
|
* @memberof NotebookCellResult
|
|
2193
2241
|
*/
|
|
2194
2242
|
'text'?: string;
|
|
2243
|
+
/**
|
|
2244
|
+
* A `.malloy` notebook code cell\'s own `(markdown)` prose, as on `NotebookCell`. Absent when the cell has none.
|
|
2245
|
+
* @type {string}
|
|
2246
|
+
* @memberof NotebookCellResult
|
|
2247
|
+
*/
|
|
2248
|
+
'markdown'?: string;
|
|
2249
|
+
/**
|
|
2250
|
+
* The lines of `text` that hold `markdown`, as on `NotebookCell`; `[]` when none.
|
|
2251
|
+
* @type {Array<Array<number>>}
|
|
2252
|
+
* @memberof NotebookCellResult
|
|
2253
|
+
*/
|
|
2254
|
+
'proseLines'?: Array<Array<number>>;
|
|
2255
|
+
/**
|
|
2256
|
+
* The line of `text` where the statement\'s code starts, as on `NotebookCell`.
|
|
2257
|
+
* @type {number}
|
|
2258
|
+
* @memberof NotebookCellResult
|
|
2259
|
+
*/
|
|
2260
|
+
'codeLine'?: number;
|
|
2261
|
+
/**
|
|
2262
|
+
* The cell\'s leading `#\"` caption, as on `NotebookCell`. Absent when the cell has none.
|
|
2263
|
+
* @type {string}
|
|
2264
|
+
* @memberof NotebookCellResult
|
|
2265
|
+
*/
|
|
2266
|
+
'caption'?: string;
|
|
2195
2267
|
/**
|
|
2196
2268
|
* JSON string containing the execution result for this cell
|
|
2197
2269
|
* @type {string}
|
|
@@ -2210,6 +2282,12 @@ export declare const NotebookCellResultTypeEnum: {
|
|
|
2210
2282
|
readonly Code: "code";
|
|
2211
2283
|
};
|
|
2212
2284
|
export type NotebookCellResultTypeEnum = typeof NotebookCellResultTypeEnum[keyof typeof NotebookCellResultTypeEnum];
|
|
2285
|
+
export declare const NotebookCellResultKindEnum: {
|
|
2286
|
+
readonly Markdown: "markdown";
|
|
2287
|
+
readonly Query: "query";
|
|
2288
|
+
readonly Definition: "definition";
|
|
2289
|
+
};
|
|
2290
|
+
export type NotebookCellResultKindEnum = typeof NotebookCellResultKindEnum[keyof typeof NotebookCellResultKindEnum];
|
|
2213
2291
|
/**
|
|
2214
2292
|
* Represents a Malloy package containing models, notebooks, and embedded databases
|
|
2215
2293
|
* @export
|
|
@@ -2259,7 +2337,7 @@ export interface Package {
|
|
|
2259
2337
|
*/
|
|
2260
2338
|
'exploresWarnings'?: Array<string>;
|
|
2261
2339
|
/**
|
|
2262
|
-
* Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`colocated` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model on the package\'s surface whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page; a surface whose every model failed to compile, so every model in the package answers 404 by name; and, on the reload that caused it, a package that had a surface and now has none, so every source that surface hid is listed and queryable by name again. Manifest findings: each deprecated use of `explores` or of `queryableSources: \"declared\"`, and a root file such as `Index.malloy` that differs from `index.malloy` only in case and so is ignored. A root `index.malloy` with no manifest keys gets no warning. Dashboard findings: a `dashboards/` file whose `# artifact` tag does not parse or does not describe a dashboard, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a dashboard, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. Two dashboard findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
|
|
2340
|
+
* Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`colocated` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model on the package\'s surface whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page; a surface whose every model failed to compile, so every model in the package answers 404 by name; and, on the reload that caused it, a package that had a surface and now has none, so every source that surface hid is listed and queryable by name again. Manifest findings: each deprecated use of `explores` or of `queryableSources: \"declared\"`, and a root file such as `Index.malloy` that differs from `index.malloy` only in case and so is ignored. A root `index.malloy` with no manifest keys gets no warning. Dashboard findings: a `dashboards/` file whose `# artifact` tag does not parse or does not describe a dashboard, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a dashboard, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. Two dashboard findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. Notebook findings: a `notebooks/` file with an `## artifact` note whose cells could not be read, which names the line and the fix and is reported with severity `error`, because the notebook is served with that error instead of opening. The same family carries findings on files under `notebooks/` and `dashboards/`, each naming its line and the fix; they are computed at discovery and are also returned by `/compile` at file and package scope. Eight codes are `error` and fail `/compile`: `notebook-statement-above-artifact` and `notebook-tag-above-artifact` (a statement or a tag above a served notebook\'s `## artifact`), `notebook-markdown-above-artifact` (a `(markdown)` annotation above it), `notebook-columns-conflict` (a tiled dashboard\'s `dashboard_columns` disagrees with `dashboard { columns }`), `notebook-markdown-opener-text` (more than a name after `(markdown)` on a block\'s opener), `notebook-markdown-attached-nowhere` (a `#(markdown)` annotation with no statement to take it), `notebook-artifact-unparsed` (an `## artifact` tag does not parse), and `notebook-cells-unreadable` (the reader could not read a served notebook\'s cells). The rest are `warn` (a mistyped `(markdown)` opener, a missing `kind=notebook`, a block that never closes, and similar). Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
|
|
2263
2341
|
* @type {Array<PackageWarningsInner>}
|
|
2264
2342
|
* @memberof Package
|
|
2265
2343
|
*/
|
|
@@ -2983,6 +3061,12 @@ export interface RawNotebook {
|
|
|
2983
3061
|
* @memberof RawNotebook
|
|
2984
3062
|
*/
|
|
2985
3063
|
'modelPath'?: string;
|
|
3064
|
+
/**
|
|
3065
|
+
* The file format the notebook is written in. `malloynb` is the cell-separated format; `malloy` is a `.malloy` file under `notebooks/` with a model-level `## artifact` note, whose cells are its statements and its floating `(markdown)` notes in file order.
|
|
3066
|
+
* @type {string}
|
|
3067
|
+
* @memberof RawNotebook
|
|
3068
|
+
*/
|
|
3069
|
+
'format'?: RawNotebookFormatEnum;
|
|
2986
3070
|
/**
|
|
2987
3071
|
* Version of the Malloy compiler used to generate the notebook data
|
|
2988
3072
|
* @type {string}
|
|
@@ -3002,13 +3086,13 @@ export interface RawNotebook {
|
|
|
3002
3086
|
*/
|
|
3003
3087
|
'notebookCells'?: Array<NotebookCell>;
|
|
3004
3088
|
/**
|
|
3005
|
-
* Array of file-level (##) annotations attached to the notebook
|
|
3089
|
+
* Array of file-level (##) annotations attached to the notebook. For a `.malloy` notebook, every own note that is not a floating `(markdown)` cell, in file order, each note once. A `\"` or `(text)` note below the `## artifact` tag is dropped and not listed.
|
|
3006
3090
|
* @type {Array<string>}
|
|
3007
3091
|
* @memberof RawNotebook
|
|
3008
3092
|
*/
|
|
3009
3093
|
'annotations'?: Array<string>;
|
|
3010
3094
|
/**
|
|
3011
|
-
* Starting values for the notebook\'s controls,
|
|
3095
|
+
* Starting values for the notebook\'s controls. A `.malloy` notebook declares them in its artifact tag (`## artifact { givens { … } }`), a `.malloynb` in its file-level tags (`## givens { … }`). URL parameters override these, which is why the two share a shape. Omitted when the notebook declares none.
|
|
3012
3096
|
* @type {{ [key: string]: string; }}
|
|
3013
3097
|
* @memberof RawNotebook
|
|
3014
3098
|
*/
|
|
@@ -3016,7 +3100,7 @@ export interface RawNotebook {
|
|
|
3016
3100
|
[key: string]: string;
|
|
3017
3101
|
};
|
|
3018
3102
|
/**
|
|
3019
|
-
* False batches control changes behind an Apply button instead of re-running on every change. Defaults to true.
|
|
3103
|
+
* False batches control changes behind an Apply button instead of re-running on every change. Defaults to true. A `.malloy` notebook reads it from its artifact tag (`## artifact { autorun=false }`), a `.malloynb` from its file-level tags (`## autorun=false`). The same flag, with the same default, that `DashboardManifest.autorun` carries.
|
|
3020
3104
|
* @type {boolean}
|
|
3021
3105
|
* @memberof RawNotebook
|
|
3022
3106
|
*/
|
|
@@ -3034,6 +3118,11 @@ export interface RawNotebook {
|
|
|
3034
3118
|
*/
|
|
3035
3119
|
'queries'?: Array<Query>;
|
|
3036
3120
|
}
|
|
3121
|
+
export declare const RawNotebookFormatEnum: {
|
|
3122
|
+
readonly Malloynb: "malloynb";
|
|
3123
|
+
readonly Malloy: "malloy";
|
|
3124
|
+
};
|
|
3125
|
+
export type RawNotebookFormatEnum = typeof RawNotebookFormatEnum[keyof typeof RawNotebookFormatEnum];
|
|
3037
3126
|
/**
|
|
3038
3127
|
* SNAPSHOT = warehouse clone/snapshot; COPY = CREATE TABLE AS SELECT.
|
|
3039
3128
|
* @export
|
|
@@ -5577,31 +5666,34 @@ export declare const ModelsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
5577
5666
|
* @param {string} packageName Name of the package
|
|
5578
5667
|
* @param {string} path Path to the model within the package
|
|
5579
5668
|
* @param {QueryRequest} queryRequest
|
|
5669
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5580
5670
|
* @param {*} [options] Override http request option.
|
|
5581
5671
|
* @throws {RequiredError}
|
|
5582
5672
|
*/
|
|
5583
|
-
executeQueryModel: (environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5673
|
+
executeQueryModel: (environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5584
5674
|
/**
|
|
5585
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard
|
|
5675
|
+
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
|
|
5586
5676
|
* @summary Get compiled Malloy model
|
|
5587
5677
|
* @param {string} environmentName Name of the environment
|
|
5588
5678
|
* @param {string} packageName Name of the package
|
|
5589
5679
|
* @param {string} path Path to the model within the package
|
|
5590
5680
|
* @param {string} [versionId] Version identifier for the package
|
|
5681
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5591
5682
|
* @param {*} [options] Override http request option.
|
|
5592
5683
|
* @throws {RequiredError}
|
|
5593
5684
|
*/
|
|
5594
|
-
getModel: (environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5685
|
+
getModel: (environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5595
5686
|
/**
|
|
5596
|
-
* Retrieves
|
|
5687
|
+
* Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
|
|
5597
5688
|
* @summary List package models
|
|
5598
5689
|
* @param {string} environmentName Name of the environment
|
|
5599
5690
|
* @param {string} packageName Name of the package
|
|
5600
5691
|
* @param {string} [versionId] Version identifier for the package
|
|
5692
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5601
5693
|
* @param {*} [options] Override http request option.
|
|
5602
5694
|
* @throws {RequiredError}
|
|
5603
5695
|
*/
|
|
5604
|
-
listModels: (environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5696
|
+
listModels: (environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5605
5697
|
/**
|
|
5606
5698
|
* Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
|
|
5607
5699
|
* @summary Write a dashboard file into the package
|
|
@@ -5638,31 +5730,34 @@ export declare const ModelsApiFp: (configuration?: Configuration) => {
|
|
|
5638
5730
|
* @param {string} packageName Name of the package
|
|
5639
5731
|
* @param {string} path Path to the model within the package
|
|
5640
5732
|
* @param {QueryRequest} queryRequest
|
|
5733
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5641
5734
|
* @param {*} [options] Override http request option.
|
|
5642
5735
|
* @throws {RequiredError}
|
|
5643
5736
|
*/
|
|
5644
|
-
executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>>;
|
|
5737
|
+
executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>>;
|
|
5645
5738
|
/**
|
|
5646
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard
|
|
5739
|
+
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
|
|
5647
5740
|
* @summary Get compiled Malloy model
|
|
5648
5741
|
* @param {string} environmentName Name of the environment
|
|
5649
5742
|
* @param {string} packageName Name of the package
|
|
5650
5743
|
* @param {string} path Path to the model within the package
|
|
5651
5744
|
* @param {string} [versionId] Version identifier for the package
|
|
5745
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5652
5746
|
* @param {*} [options] Override http request option.
|
|
5653
5747
|
* @throws {RequiredError}
|
|
5654
5748
|
*/
|
|
5655
|
-
getModel(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompiledModel>>;
|
|
5749
|
+
getModel(environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompiledModel>>;
|
|
5656
5750
|
/**
|
|
5657
|
-
* Retrieves
|
|
5751
|
+
* Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
|
|
5658
5752
|
* @summary List package models
|
|
5659
5753
|
* @param {string} environmentName Name of the environment
|
|
5660
5754
|
* @param {string} packageName Name of the package
|
|
5661
5755
|
* @param {string} [versionId] Version identifier for the package
|
|
5756
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5662
5757
|
* @param {*} [options] Override http request option.
|
|
5663
5758
|
* @throws {RequiredError}
|
|
5664
5759
|
*/
|
|
5665
|
-
listModels(environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Model>>>;
|
|
5760
|
+
listModels(environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Model>>>;
|
|
5666
5761
|
/**
|
|
5667
5762
|
* Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
|
|
5668
5763
|
* @summary Write a dashboard file into the package
|
|
@@ -5699,31 +5794,34 @@ export declare const ModelsApiFactory: (configuration?: Configuration, basePath?
|
|
|
5699
5794
|
* @param {string} packageName Name of the package
|
|
5700
5795
|
* @param {string} path Path to the model within the package
|
|
5701
5796
|
* @param {QueryRequest} queryRequest
|
|
5797
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5702
5798
|
* @param {*} [options] Override http request option.
|
|
5703
5799
|
* @throws {RequiredError}
|
|
5704
5800
|
*/
|
|
5705
|
-
executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult>;
|
|
5801
|
+
executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult>;
|
|
5706
5802
|
/**
|
|
5707
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard
|
|
5803
|
+
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
|
|
5708
5804
|
* @summary Get compiled Malloy model
|
|
5709
5805
|
* @param {string} environmentName Name of the environment
|
|
5710
5806
|
* @param {string} packageName Name of the package
|
|
5711
5807
|
* @param {string} path Path to the model within the package
|
|
5712
5808
|
* @param {string} [versionId] Version identifier for the package
|
|
5809
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5713
5810
|
* @param {*} [options] Override http request option.
|
|
5714
5811
|
* @throws {RequiredError}
|
|
5715
5812
|
*/
|
|
5716
|
-
getModel(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<CompiledModel>;
|
|
5813
|
+
getModel(environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<CompiledModel>;
|
|
5717
5814
|
/**
|
|
5718
|
-
* Retrieves
|
|
5815
|
+
* Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
|
|
5719
5816
|
* @summary List package models
|
|
5720
5817
|
* @param {string} environmentName Name of the environment
|
|
5721
5818
|
* @param {string} packageName Name of the package
|
|
5722
5819
|
* @param {string} [versionId] Version identifier for the package
|
|
5820
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5723
5821
|
* @param {*} [options] Override http request option.
|
|
5724
5822
|
* @throws {RequiredError}
|
|
5725
5823
|
*/
|
|
5726
|
-
listModels(environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Model>>;
|
|
5824
|
+
listModels(environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Array<Model>>;
|
|
5727
5825
|
/**
|
|
5728
5826
|
* Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
|
|
5729
5827
|
* @summary Write a dashboard file into the package
|
|
@@ -5763,34 +5861,37 @@ export declare class ModelsApi extends BaseAPI {
|
|
|
5763
5861
|
* @param {string} packageName Name of the package
|
|
5764
5862
|
* @param {string} path Path to the model within the package
|
|
5765
5863
|
* @param {QueryRequest} queryRequest
|
|
5864
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5766
5865
|
* @param {*} [options] Override http request option.
|
|
5767
5866
|
* @throws {RequiredError}
|
|
5768
5867
|
* @memberof ModelsApi
|
|
5769
5868
|
*/
|
|
5770
|
-
executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<QueryResult, any, {}>>;
|
|
5869
|
+
executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise< AxiosResponse<QueryResult, any, {}>>;
|
|
5771
5870
|
/**
|
|
5772
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard
|
|
5871
|
+
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
|
|
5773
5872
|
* @summary Get compiled Malloy model
|
|
5774
5873
|
* @param {string} environmentName Name of the environment
|
|
5775
5874
|
* @param {string} packageName Name of the package
|
|
5776
5875
|
* @param {string} path Path to the model within the package
|
|
5777
5876
|
* @param {string} [versionId] Version identifier for the package
|
|
5877
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5778
5878
|
* @param {*} [options] Override http request option.
|
|
5779
5879
|
* @throws {RequiredError}
|
|
5780
5880
|
* @memberof ModelsApi
|
|
5781
5881
|
*/
|
|
5782
|
-
getModel(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CompiledModel, any, {}>>;
|
|
5882
|
+
getModel(environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CompiledModel, any, {}>>;
|
|
5783
5883
|
/**
|
|
5784
|
-
* Retrieves
|
|
5884
|
+
* Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
|
|
5785
5885
|
* @summary List package models
|
|
5786
5886
|
* @param {string} environmentName Name of the environment
|
|
5787
5887
|
* @param {string} packageName Name of the package
|
|
5788
5888
|
* @param {string} [versionId] Version identifier for the package
|
|
5889
|
+
* @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root `index.malloy`, or a legacy `explores`) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as `queryableSources: \"all\"` does for every request. `#(authorize)` and `#(access_filter)` still apply: it lifts curation, never the lock. The model GET goes one step further than `queryableSources: \"all\"`: it returns the file\'s `sourceText` even when that text names a source the file does not publish. That text can include `#(authorize)` expressions, `given:` defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy `/projects/...` aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\'s hidden files, such as its authors. Only `true` and `false` are accepted. Any other value is refused with 400.
|
|
5789
5890
|
* @param {*} [options] Override http request option.
|
|
5790
5891
|
* @throws {RequiredError}
|
|
5791
5892
|
* @memberof ModelsApi
|
|
5792
5893
|
*/
|
|
5793
|
-
listModels(environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Model[], any, {}>>;
|
|
5894
|
+
listModels(environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Model[], any, {}>>;
|
|
5794
5895
|
/**
|
|
5795
5896
|
* Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
|
|
5796
5897
|
* @summary Write a dashboard file into the package
|
|
@@ -5811,7 +5912,7 @@ export declare class ModelsApi extends BaseAPI {
|
|
|
5811
5912
|
*/
|
|
5812
5913
|
export declare const NotebooksApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
5813
5914
|
/**
|
|
5814
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5915
|
+
* 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. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5815
5916
|
* @summary Execute a specific notebook cell
|
|
5816
5917
|
* @param {string} environmentName Name of the environment
|
|
5817
5918
|
* @param {string} packageName Name of the package
|
|
@@ -5826,7 +5927,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
|
|
|
5826
5927
|
*/
|
|
5827
5928
|
executeNotebookCell: (environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5828
5929
|
/**
|
|
5829
|
-
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
|
|
5930
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
|
|
5830
5931
|
* @summary Get Malloy notebook cells
|
|
5831
5932
|
* @param {string} environmentName Name of the environment
|
|
5832
5933
|
* @param {string} packageName Name of the package
|
|
@@ -5837,7 +5938,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
|
|
|
5837
5938
|
*/
|
|
5838
5939
|
getNotebook: (environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5839
5940
|
/**
|
|
5840
|
-
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation
|
|
5941
|
+
* Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
|
|
5841
5942
|
* @summary List package notebooks
|
|
5842
5943
|
* @param {string} environmentName Name of the environment
|
|
5843
5944
|
* @param {string} packageName Name of the package
|
|
@@ -5853,7 +5954,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
|
|
|
5853
5954
|
*/
|
|
5854
5955
|
export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
5855
5956
|
/**
|
|
5856
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5957
|
+
* 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. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5857
5958
|
* @summary Execute a specific notebook cell
|
|
5858
5959
|
* @param {string} environmentName Name of the environment
|
|
5859
5960
|
* @param {string} packageName Name of the package
|
|
@@ -5868,7 +5969,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
|
5868
5969
|
*/
|
|
5869
5970
|
executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotebookCellResult>>;
|
|
5870
5971
|
/**
|
|
5871
|
-
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
|
|
5972
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
|
|
5872
5973
|
* @summary Get Malloy notebook cells
|
|
5873
5974
|
* @param {string} environmentName Name of the environment
|
|
5874
5975
|
* @param {string} packageName Name of the package
|
|
@@ -5879,7 +5980,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
|
5879
5980
|
*/
|
|
5880
5981
|
getNotebook(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RawNotebook>>;
|
|
5881
5982
|
/**
|
|
5882
|
-
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation
|
|
5983
|
+
* Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
|
|
5883
5984
|
* @summary List package notebooks
|
|
5884
5985
|
* @param {string} environmentName Name of the environment
|
|
5885
5986
|
* @param {string} packageName Name of the package
|
|
@@ -5895,7 +5996,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
|
5895
5996
|
*/
|
|
5896
5997
|
export declare const NotebooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
5897
5998
|
/**
|
|
5898
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5999
|
+
* 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. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5899
6000
|
* @summary Execute a specific notebook cell
|
|
5900
6001
|
* @param {string} environmentName Name of the environment
|
|
5901
6002
|
* @param {string} packageName Name of the package
|
|
@@ -5910,7 +6011,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
|
|
|
5910
6011
|
*/
|
|
5911
6012
|
executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): AxiosPromise<NotebookCellResult>;
|
|
5912
6013
|
/**
|
|
5913
|
-
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
|
|
6014
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
|
|
5914
6015
|
* @summary Get Malloy notebook cells
|
|
5915
6016
|
* @param {string} environmentName Name of the environment
|
|
5916
6017
|
* @param {string} packageName Name of the package
|
|
@@ -5921,7 +6022,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
|
|
|
5921
6022
|
*/
|
|
5922
6023
|
getNotebook(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<RawNotebook>;
|
|
5923
6024
|
/**
|
|
5924
|
-
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation
|
|
6025
|
+
* Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
|
|
5925
6026
|
* @summary List package notebooks
|
|
5926
6027
|
* @param {string} environmentName Name of the environment
|
|
5927
6028
|
* @param {string} packageName Name of the package
|
|
@@ -5939,7 +6040,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
|
|
|
5939
6040
|
*/
|
|
5940
6041
|
export declare class NotebooksApi extends BaseAPI {
|
|
5941
6042
|
/**
|
|
5942
|
-
* 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. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
6043
|
+
* 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. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
5943
6044
|
* @summary Execute a specific notebook cell
|
|
5944
6045
|
* @param {string} environmentName Name of the environment
|
|
5945
6046
|
* @param {string} packageName Name of the package
|
|
@@ -5955,7 +6056,7 @@ export declare class NotebooksApi extends BaseAPI {
|
|
|
5955
6056
|
*/
|
|
5956
6057
|
executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<NotebookCellResult, any, {}>>;
|
|
5957
6058
|
/**
|
|
5958
|
-
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
|
|
6059
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
|
|
5959
6060
|
* @summary Get Malloy notebook cells
|
|
5960
6061
|
* @param {string} environmentName Name of the environment
|
|
5961
6062
|
* @param {string} packageName Name of the package
|
|
@@ -5967,7 +6068,7 @@ export declare class NotebooksApi extends BaseAPI {
|
|
|
5967
6068
|
*/
|
|
5968
6069
|
getNotebook(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<RawNotebook, any, {}>>;
|
|
5969
6070
|
/**
|
|
5970
|
-
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation
|
|
6071
|
+
* Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
|
|
5971
6072
|
* @summary List package notebooks
|
|
5972
6073
|
* @param {string} environmentName Name of the environment
|
|
5973
6074
|
* @param {string} packageName Name of the package
|