@malloy-publisher/sdk 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -450,7 +450,7 @@ export interface CompileRequest {
450
450
  */
451
451
  'source'?: string;
452
452
  /**
453
- * What the source means, and how far the check reaches. \"append\" (default, the historical behavior) appends the source to the model in the URL and compiles it in that namespace — right for NEW definitions; an edit to an existing definition collides (\"Cannot redefine\"), and diagnostic positions land in the concatenated virtual file. \"file\" compiles the source AS that model, replacing its on-disk content for the check — validates an edit before saving, at true file coordinates. \"package\" runs the same worker compiler and file selection as reload over every .malloy and .malloynb file, without swapping the result into the served package; with a source, importers compile against the replacement. Package diagnostics can name files hidden from discovery. No rows or SQL are returned, and caller-provided source remains subject to authorize gates. includeSql is not available at \"package\". An invalid value is rejected with a 400 naming the valid set.
453
+ * What the source means, and how far the check reaches. \"append\" (default) appends the source to the model in the URL and compiles it in that namespace — right for NEW definitions; an edit to an existing definition collides (\"Cannot redefine\"), and diagnostic positions land in the concatenated virtual file. \"file\" compiles the source AS that model, replacing its on-disk content for the check — validates an edit before saving, at true file coordinates. \"package\" runs the same worker compiler and file selection as reload over every .malloy and .malloynb file, without swapping the result into the served package; with a source, importers compile against the replacement. Package diagnostics can name files hidden from discovery. No rows or SQL are returned, and caller-provided source remains subject to authorize gates. includeSql is not available at \"package\". \"append\" text is checked against the model\'s PUBLISHED surface, so it may not declare its own data roots: import, connection.table(…), connection.sql(…), given:, ##! compiler flags and the raw-SQL function forms (name!type(…), sql_number, sql_string and the rest of that family) are refused with a 400. Those belong in a model file, so validate text declaring them at \"file\" or \"package\", which are not restricted. \"append\" text must also stand alone as top-level Malloy: a bare view:, dimension: or measure:, and anything that only parses as a continuation of the model\'s last statement, is refused with a 400, because the check reads the submitted text by itself. Wrap a view body in a top-level query:, or a field in a throwaway source: check is <source> extend { … }. Compiling at \"append\" also requires the model named in the URL to load: a model that does not compile is a 400 carrying that model\'s own problems, and a model that does not exist is a 400 that deliberately says only that it could not be loaded. An invalid scope value is rejected with a 400 naming the valid set.
454
454
  * @type {string}
455
455
  * @memberof CompileRequest
456
456
  */
@@ -567,7 +567,7 @@ export interface CompiledModel {
567
567
  */
568
568
  'givens'?: Array<Given>;
569
569
  /**
570
- * The model file\'s Malloy text, verbatim, so a client can show the code beside the compiled view of the same file without a second, differently-shaped fetch. Named `sourceText`, not `source`, because `sources` on this same object are the model\'s Malloy sources. Optional twice over: absent from servers that predate it, and omitted (with a server-side warning) when the file cannot be read, so a compiled model is never withheld for want of its text.
570
+ * The model file\'s Malloy text, verbatim, so a client can show the code beside the compiled view of the same file without a second, differently-shaped fetch. Named `sourceText`, not `source`, because `sources` on this same object are the model\'s Malloy sources. Optional: absent from servers that predate it; omitted (with a server-side warning) when the file cannot be read, so a compiled model is never withheld for want of its text; and omitted when the file text names a source it does not publish, on a package with a surface. A dashboard\'s text is always returned.
571
571
  * @type {string}
572
572
  * @memberof CompiledModel
573
573
  */
@@ -1510,6 +1510,31 @@ export interface GivenSuggest {
1510
1510
  */
1511
1511
  'givenNames'?: Array<string>;
1512
1512
  }
1513
+ /**
1514
+ * A join to a given-scoped source, declared on a persisted source and read per caller through the joined source\'s own artifact.
1515
+ * @export
1516
+ * @interface JoinedTerms
1517
+ */
1518
+ export interface JoinedTerms {
1519
+ /**
1520
+ * The join\'s alias as the author wrote it. Dotted for a join reached through another such join (`grant.team`).
1521
+ * @type {string}
1522
+ * @memberof JoinedTerms
1523
+ */
1524
+ 'alias': string;
1525
+ /**
1526
+ * The joined source\'s name — itself a persisted source.
1527
+ * @type {string}
1528
+ * @memberof JoinedTerms
1529
+ */
1530
+ 'source': string;
1531
+ /**
1532
+ * The joined source\'s own stripped terms, which its binding re-applies with the caller\'s values.
1533
+ * @type {Array<StrippedTerm>}
1534
+ * @memberof JoinedTerms
1535
+ */
1536
+ 'terms': Array<StrippedTerm>;
1537
+ }
1513
1538
  /**
1514
1539
  * One incremental source\'s `covered_through` boundary: the table it belongs to, the boundary itself, and the source definition it was measured under. Reported on the manifest entry of every incrementally refreshed source. A caller that owns the ledger stores each one and returns it verbatim in `BuildInstructions.ledger` on the next run — only the publisher derives these values. A returned entry is validated at create time: one naming a table the run does not instruct, or whose `sourceEntityId` is no longer the source\'s, is a 400. After a publish or rollback that changes the source, delete the entry (the source seeds) or set `reseed`.
1515
1540
  * @export
@@ -2132,7 +2157,7 @@ export interface NotebookCell {
2132
2157
  */
2133
2158
  'newSources'?: Array<string>;
2134
2159
  /**
2135
- * JSON string containing QueryInfo object for the query in this cell (if the cell contains a query)
2160
+ * JSON string containing QueryInfo object for the query in this cell (if the cell contains a query). On a package with a surface, left out for a cell whose query reads a source the notebook may not read.
2136
2161
  * @type {string}
2137
2162
  * @memberof NotebookCell
2138
2163
  */
@@ -2216,7 +2241,7 @@ export interface Package {
2216
2241
  */
2217
2242
  'scope'?: PackageScopeEnum;
2218
2243
  /**
2219
- * The package\'s discovery surface and query boundary: model file paths relative to the package root. Only these models are listed via `listModels()`, and within-file discovery is filtered to each model\'s `export {}` closure. Every other .malloy file still compiles for import/join resolution but is hidden. Notebooks are always listed regardless of this field. DEPRECATED for a one-file surface, still honored: a root `index.malloy` is the surface when this key is absent, and gives the same listing and the same boundary with no manifest field. A surface spanning several files is what the convention cannot express, so that use stays supported, with no replacement and no deprecation warning at load. This value MAY have been derived by the server from a root `index.malloy` rather than written by the package author, and the response does not distinguish the two — deliberately, because nothing downstream treats them differently. An explicit key always wins over the convention, and an explicit empty array means \"do not curate\" and suppresses it. A package is uncurated only when it has neither this key nor a root `index.malloy`.
2244
+ * The package\'s discovery surface and query boundary: model file paths relative to the package root. Only these models are listed via `listModels()`, and the surface is the union of their `export {}` closures. Every other .malloy file still compiles for import/join resolution but is hidden. Notebooks and dashboards are always listed regardless of this field, and a dashboard entry needs no listing: a tagged dashboard listed here reads the surface and adds nothing to it. An untagged file under `dashboards/` that is listed is an ordinary surface file. DEPRECATED, still honored. Every non-empty value gets a load warning naming the replacement: a root `index.malloy` that imports the listed files and exports what they publish. `[]` is deprecated too: beside an `index.malloy` it stops that file from limiting what the package publishes (the fix is to rename `index.malloy` and delete this key), and without one it does nothing. A value that is not a list of strings refuses the package load (424). This value MAY have been derived by the server from a root `index.malloy` rather than written by the package author, and the response does not distinguish the two — deliberately, because nothing downstream treats them differently. An explicit key always wins over `index.malloy`. A package is uncurated only when it has neither this key nor a root `index.malloy`.
2220
2245
  * @type {Array<string>}
2221
2246
  * @memberof Package
2222
2247
  */
@@ -2228,13 +2253,13 @@ export interface Package {
2228
2253
  */
2229
2254
  'exploresWarnings'?: Array<string>;
2230
2255
  /**
2231
- * 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 withheld is listed and queryable by name again. 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 dashboard held back from the listing because its entry file is not on the package\'s surface. 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.
2256
+ * 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.
2232
2257
  * @type {Array<PackageWarningsInner>}
2233
2258
  * @memberof Package
2234
2259
  */
2235
2260
  'warnings'?: Array<PackageWarningsInner>;
2236
2261
  /**
2237
- * Controls whether the discovery surface is also a query boundary. `\"declared\"` (the default) makes queryable == discoverable: when `explores` is declared, only `explores` model files are valid query entry points, and the queryable sources are the union of those files\' `export {}` closures — so a source exported by any listed file stays queryable whichever listed model path the request addresses it through. Admission is by declaration, not by name: a request clears only when the model it names resolves the name to the very source a listed file exported, so a same-named source declared in a hidden file is not admitted by the coincidence. Every other source still compiles, imports, joins, and extends but is not directly queryable (denied with 404). The `/compile` endpoint is exempt (compile is the authoring loop; the boundary is discovery curation, not access control — for confidentiality use `#(authorize)`, which gates compile too). A source that is both hidden and authorize-gated still answers `/compile` with the generic 404, so the exemption cannot be used to enumerate gated names. `\"all\"` decouples the axes: `explores`/`export {}` gate discovery only and every compiled source stays directly queryable. The two modes are equivalent (everything queryable) only where there is no curated surface at all, which now means no `explores` AND no root `index.malloy` — a package with that file has a surface whether or not the key is present. Invalid values fall back to `\"declared\"`. Identity-based access is a separate concern — see `#(authorize)` and `#(access_filter)`. DEPRECATED, still honored. `\"declared\"` is already the default, so the key changes nothing and a root `index.malloy` gives the same curated-and-enforced surface with no manifest field. `\"all\"` is the exception: `index.malloy` does NOT replace it, because a surface derived from one always enforces the boundary. It stays supported with no deprecation warning at load. To curate listings without refusing queries, keep both this key and an explicit `explores`.
2262
+ * Controls whether the discovery surface is also a query boundary. `\"declared\"` (the default) makes queryable == discoverable: when the package has a surface (a root `index.malloy`, or `explores`), only the surface\'s model files are valid query entry points, and the queryable sources are the union of those files\' `export {}` closures — so a source exported by any listed file stays queryable whichever listed model path the request addresses it through. Admission is by declaration, not by name: a request clears only when the model it names resolves the name to the very source a listed file exported, so a same-named source declared in a hidden file is not admitted by the coincidence. Every other source still compiles, imports, joins, and extends but is not directly queryable (denied with 404). The `/compile` endpoint is exempt (compile is the authoring loop; the boundary is discovery curation, not access control — for confidentiality use `#(authorize)`, which gates compile too). A source that is both hidden and authorize-gated still answers `/compile` with the generic 404, so the exemption cannot be used to enumerate gated names. `\"all\"` decouples the axes: the surface gates discovery only, every compiled source stays directly queryable, and model files off the surface are returned by path. The two modes are equivalent (everything queryable) only where there is no curated surface at all, which means no `explores` AND no root `index.malloy` — a package with that file has a surface whether or not the key is present. Invalid values fall back to `\"declared\"`. Identity-based access is a separate concern — see `#(authorize)` and `#(access_filter)`. `\"declared\"` is DEPRECATED: it is already the default, so the key changes nothing, and writing it gets a load warning saying to delete it. `\"all\"` is supported, with no warning, and works beside a root `index.malloy`. It is the one way to hide an `#(authorize)`-gated source from listings while authorized callers can still query it by name.
2238
2263
  * @type {string}
2239
2264
  * @memberof Package
2240
2265
  * @deprecated
@@ -2445,7 +2470,7 @@ export interface PackageWarningsInner {
2445
2470
  */
2446
2471
  'message'?: string;
2447
2472
  /**
2448
- * Finding severity. Render-tag findings use both: `error` for a tag malformed for the field it sits on, which renders as \"[object Object]\" or an inline error at query time, and `warn` for one that is well-formed but inert where it sits and so is silently ignored (e.g. `# colspan` outside `# dashboard { columns=N }`), where nothing looks broken at query time and the layout simply is not what was written. Those are the only two severities the renderer emits, so no render finding is withheld. Materialization and dashboard findings use both: `error` for something that cannot work as written, such as a tile naming a view the source does not have, and `warn` for something that works but not as the author probably intended, such as a dashboard held back by curation. The two findings about Publisher rather than about the package split across both: a file that carries an artifact tag and could not be read is `error`, because the dashboard it should have produced does not exist, and a lint that stopped early is `warn`, because the lint failing is not itself a defect in the package. That `warn` does NOT mean the package is free of `error`-severity findings, since the ones the lint never reached are exactly what it cannot report.
2473
+ * Finding severity. Render-tag findings use both: `error` for a tag malformed for the field it sits on, which renders as \"[object Object]\" or an inline error at query time, and `warn` for one that is well-formed but inert where it sits and so is silently ignored (e.g. `# colspan` outside `# dashboard { columns=N }`), where nothing looks broken at query time and the layout simply is not what was written. Those are the only two severities the renderer emits, so no render finding is withheld. Materialization and dashboard findings use both: `error` for something that cannot work as written, such as a tile naming a view the source does not have, and `warn` for something that works but not as the author probably intended, such as a dashboard name outside the conventional shape. The two findings about Publisher rather than about the package split across both: a file that carries an artifact tag and could not be read is `error`, because the dashboard it should have produced does not exist, and a lint that stopped early is `warn`, because the lint failing is not itself a defect in the package. That `warn` does NOT mean the package is free of `error`-severity findings, since the ones the lint never reached are exactly what it cannot report.
2449
2474
  * @type {string}
2450
2475
  * @memberof PackageWarningsInner
2451
2476
  */
@@ -2522,6 +2547,12 @@ export interface PersistSourcePlan {
2522
2547
  * @memberof PersistSourcePlan
2523
2548
  */
2524
2549
  'strippedTerms'?: Array<StrippedTerm>;
2550
+ /**
2551
+ * The joins declared on this source whose TARGET is scoped by a given — one entry per such join, naming the joined source and the terms its own artifact re-applies. Absent or empty means no field of this source reads a caller-scoped join. These terms are not stripped from THIS artifact: a join is not part of a persist source\'s build, so this table holds the same rows with or without it. They are what makes a field reading through the join answer per caller (a visibility dimension that null-checks a grant table, say), and they are applied only by the joined source\'s own binding. So a reader serving this artifact must bind the joined source too; without it, the join cannot be re-emitted and any query reading through the alias must be served live.
2552
+ * @type {Array<JoinedTerms>}
2553
+ * @memberof PersistSourcePlan
2554
+ */
2555
+ 'joinedTerms'?: Array<JoinedTerms>;
2525
2556
  /**
2526
2557
  * The source\'s declared `#@ persist ... refresh=...` value, reported verbatim; null = unset (which means \"full\"). Read and VALIDATED by the publisher, no longer an inert pass-through: a value outside {\"full\", \"incremental\"} is a publish rejection, and `refresh=\"incremental\"` additionally requires a `watermark=` naming one output dimension (see `annotationFields`). An incremental source advances its serving table by a bounded delta in place instead of being rebuilt, so the mode also governs the build path — which is why it is validated rather than passed through.
2527
2558
  * @type {string}
@@ -3440,6 +3471,12 @@ export interface SourceFailure {
3440
3471
  * @memberof SourceFailure
3441
3472
  */
3442
3473
  'storageDestinationName'?: string;
3474
+ /**
3475
+ * True when the materialization-eligibility gate refused this source, so the build was never attempted and `reason` is the gate\'s message. A refusal is a property of the model, not of the run: retrying returns the same answer until the model changes, unlike a warehouse or compile failure, which may clear on its own. Absent for every other failure.
3476
+ * @type {boolean}
3477
+ * @memberof SourceFailure
3478
+ */
3479
+ 'refused'?: boolean;
3443
3480
  }
3444
3481
  /**
3445
3482
  *
@@ -4822,14 +4859,14 @@ export declare const DashboardsApiAxiosParamCreator: (configuration?: Configurat
4822
4859
  * @summary Get a dashboard manifest
4823
4860
  * @param {string} environmentName Name of the environment
4824
4861
  * @param {string} packageName Name of the package
4825
- * @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.
4862
+ * @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 dashboards falls outside that. 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.
4826
4863
  * @param {string} [versionId] Version identifier for the package
4827
4864
  * @param {*} [options] Override http request option.
4828
4865
  * @throws {RequiredError}
4829
4866
  */
4830
4867
  getDashboard: (environmentName: string, packageName: string, dashboardName: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4831
4868
  /**
4832
- * 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 (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; 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 a surface (`explores` declared, or a root `index.malloy`) 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. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
4869
+ * 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. Every tagged dashboard is listed, whatever the package\'s surface. To hide one, remove its `# artifact` tag. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a dashboard\'s tiles, its single query and its filter `suggest` queries may read only sources the surface exports. A source the dashboard declares on top of a surface source may be read; one over a hidden source may not. The dashboard file\'s own `export {}` and named queries add nothing to the surface. A tile over a hidden source answers 404 when it runs, and the package\'s `warnings` report each such tile, single query and suggest, with severity `error`, as of the last load, naming the source and the fix. Under `\"all\"` nothing is refused, so the situation does not arise.
4833
4870
  * @summary List package dashboards
4834
4871
  * @param {string} environmentName Name of the environment
4835
4872
  * @param {string} packageName Name of the package
@@ -4849,14 +4886,14 @@ export declare const DashboardsApiFp: (configuration?: Configuration) => {
4849
4886
  * @summary Get a dashboard manifest
4850
4887
  * @param {string} environmentName Name of the environment
4851
4888
  * @param {string} packageName Name of the package
4852
- * @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.
4889
+ * @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 dashboards falls outside that. 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.
4853
4890
  * @param {string} [versionId] Version identifier for the package
4854
4891
  * @param {*} [options] Override http request option.
4855
4892
  * @throws {RequiredError}
4856
4893
  */
4857
4894
  getDashboard(environmentName: string, packageName: string, dashboardName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DashboardManifest>>;
4858
4895
  /**
4859
- * 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 (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; 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 a surface (`explores` declared, or a root `index.malloy`) 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. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
4896
+ * 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. Every tagged dashboard is listed, whatever the package\'s surface. To hide one, remove its `# artifact` tag. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a dashboard\'s tiles, its single query and its filter `suggest` queries may read only sources the surface exports. A source the dashboard declares on top of a surface source may be read; one over a hidden source may not. The dashboard file\'s own `export {}` and named queries add nothing to the surface. A tile over a hidden source answers 404 when it runs, and the package\'s `warnings` report each such tile, single query and suggest, with severity `error`, as of the last load, naming the source and the fix. Under `\"all\"` nothing is refused, so the situation does not arise.
4860
4897
  * @summary List package dashboards
4861
4898
  * @param {string} environmentName Name of the environment
4862
4899
  * @param {string} packageName Name of the package
@@ -4876,14 +4913,14 @@ export declare const DashboardsApiFactory: (configuration?: Configuration, baseP
4876
4913
  * @summary Get a dashboard manifest
4877
4914
  * @param {string} environmentName Name of the environment
4878
4915
  * @param {string} packageName Name of the package
4879
- * @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.
4916
+ * @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 dashboards falls outside that. 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.
4880
4917
  * @param {string} [versionId] Version identifier for the package
4881
4918
  * @param {*} [options] Override http request option.
4882
4919
  * @throws {RequiredError}
4883
4920
  */
4884
4921
  getDashboard(environmentName: string, packageName: string, dashboardName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<DashboardManifest>;
4885
4922
  /**
4886
- * 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 (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; 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 a surface (`explores` declared, or a root `index.malloy`) 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. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
4923
+ * 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. Every tagged dashboard is listed, whatever the package\'s surface. To hide one, remove its `# artifact` tag. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a dashboard\'s tiles, its single query and its filter `suggest` queries may read only sources the surface exports. A source the dashboard declares on top of a surface source may be read; one over a hidden source may not. The dashboard file\'s own `export {}` and named queries add nothing to the surface. A tile over a hidden source answers 404 when it runs, and the package\'s `warnings` report each such tile, single query and suggest, with severity `error`, as of the last load, naming the source and the fix. Under `\"all\"` nothing is refused, so the situation does not arise.
4887
4924
  * @summary List package dashboards
4888
4925
  * @param {string} environmentName Name of the environment
4889
4926
  * @param {string} packageName Name of the package
@@ -4905,7 +4942,7 @@ export declare class DashboardsApi extends BaseAPI {
4905
4942
  * @summary Get a dashboard manifest
4906
4943
  * @param {string} environmentName Name of the environment
4907
4944
  * @param {string} packageName Name of the package
4908
- * @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.
4945
+ * @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 dashboards falls outside that. 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.
4909
4946
  * @param {string} [versionId] Version identifier for the package
4910
4947
  * @param {*} [options] Override http request option.
4911
4948
  * @throws {RequiredError}
@@ -4913,7 +4950,7 @@ export declare class DashboardsApi extends BaseAPI {
4913
4950
  */
4914
4951
  getDashboard(environmentName: string, packageName: string, dashboardName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<DashboardManifest, any, {}>>;
4915
4952
  /**
4916
- * 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 (a surface from `explores` or from a root `index.malloy`, with `queryableSources` left at `\"declared\"`), a dashboard whose entry file is not on that surface is omitted, because its query and given names would not be runnable. A root `index.malloy` cannot export a dashboard file, so a package curated only by that file omits every dashboard; 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 a surface (`explores` declared, or a root `index.malloy`) 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. Each such tile is reported in the package\'s `warnings` with severity `error`, as of the last load, naming the tile. The check reads the tile\'s source from its text, so a tile written in a form it cannot read is not reported. Under `\"all\"` nothing is refused, so the situation does not arise.
4953
+ * 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. Every tagged dashboard is listed, whatever the package\'s surface. To hide one, remove its `# artifact` tag. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a dashboard\'s tiles, its single query and its filter `suggest` queries may read only sources the surface exports. A source the dashboard declares on top of a surface source may be read; one over a hidden source may not. The dashboard file\'s own `export {}` and named queries add nothing to the surface. A tile over a hidden source answers 404 when it runs, and the package\'s `warnings` report each such tile, single query and suggest, with severity `error`, as of the last load, naming the source and the fix. Under `\"all\"` nothing is refused, so the situation does not arise.
4917
4954
  * @summary List package dashboards
4918
4955
  * @param {string} environmentName Name of the environment
4919
4956
  * @param {string} packageName Name of the package
@@ -5527,7 +5564,7 @@ export declare const ModelsApiAxiosParamCreator: (configuration?: Configuration)
5527
5564
  */
5528
5565
  executeQueryModel: (environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5529
5566
  /**
5530
- * 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.
5567
+ * 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\'s text is always returned.
5531
5568
  * @summary Get compiled Malloy model
5532
5569
  * @param {string} environmentName Name of the environment
5533
5570
  * @param {string} packageName Name of the package
@@ -5588,7 +5625,7 @@ export declare const ModelsApiFp: (configuration?: Configuration) => {
5588
5625
  */
5589
5626
  executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>>;
5590
5627
  /**
5591
- * 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.
5628
+ * 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\'s text is always returned.
5592
5629
  * @summary Get compiled Malloy model
5593
5630
  * @param {string} environmentName Name of the environment
5594
5631
  * @param {string} packageName Name of the package
@@ -5649,7 +5686,7 @@ export declare const ModelsApiFactory: (configuration?: Configuration, basePath?
5649
5686
  */
5650
5687
  executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult>;
5651
5688
  /**
5652
- * 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.
5689
+ * 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\'s text is always returned.
5653
5690
  * @summary Get compiled Malloy model
5654
5691
  * @param {string} environmentName Name of the environment
5655
5692
  * @param {string} packageName Name of the package
@@ -5714,7 +5751,7 @@ export declare class ModelsApi extends BaseAPI {
5714
5751
  */
5715
5752
  executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<QueryResult, any, {}>>;
5716
5753
  /**
5717
- * 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.
5754
+ * 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\'s text is always returned.
5718
5755
  * @summary Get compiled Malloy model
5719
5756
  * @param {string} environmentName Name of the environment
5720
5757
  * @param {string} packageName Name of the package
@@ -5756,7 +5793,7 @@ export declare class ModelsApi extends BaseAPI {
5756
5793
  */
5757
5794
  export declare const NotebooksApiAxiosParamCreator: (configuration?: Configuration) => {
5758
5795
  /**
5759
- * 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.
5796
+ * 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.
5760
5797
  * @summary Execute a specific notebook cell
5761
5798
  * @param {string} environmentName Name of the environment
5762
5799
  * @param {string} packageName Name of the package
@@ -5771,7 +5808,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
5771
5808
  */
5772
5809
  executeNotebookCell: (environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5773
5810
  /**
5774
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
5811
+ * 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.
5775
5812
  * @summary Get Malloy notebook cells
5776
5813
  * @param {string} environmentName Name of the environment
5777
5814
  * @param {string} packageName Name of the package
@@ -5798,7 +5835,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
5798
5835
  */
5799
5836
  export declare const NotebooksApiFp: (configuration?: Configuration) => {
5800
5837
  /**
5801
- * 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.
5838
+ * 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.
5802
5839
  * @summary Execute a specific notebook cell
5803
5840
  * @param {string} environmentName Name of the environment
5804
5841
  * @param {string} packageName Name of the package
@@ -5813,7 +5850,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
5813
5850
  */
5814
5851
  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>>;
5815
5852
  /**
5816
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
5853
+ * 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.
5817
5854
  * @summary Get Malloy notebook cells
5818
5855
  * @param {string} environmentName Name of the environment
5819
5856
  * @param {string} packageName Name of the package
@@ -5840,7 +5877,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
5840
5877
  */
5841
5878
  export declare const NotebooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
5842
5879
  /**
5843
- * 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.
5880
+ * 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.
5844
5881
  * @summary Execute a specific notebook cell
5845
5882
  * @param {string} environmentName Name of the environment
5846
5883
  * @param {string} packageName Name of the package
@@ -5855,7 +5892,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
5855
5892
  */
5856
5893
  executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): AxiosPromise<NotebookCellResult>;
5857
5894
  /**
5858
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
5895
+ * 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.
5859
5896
  * @summary Get Malloy notebook cells
5860
5897
  * @param {string} environmentName Name of the environment
5861
5898
  * @param {string} packageName Name of the package
@@ -5884,7 +5921,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
5884
5921
  */
5885
5922
  export declare class NotebooksApi extends BaseAPI {
5886
5923
  /**
5887
- * 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.
5924
+ * 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.
5888
5925
  * @summary Execute a specific notebook cell
5889
5926
  * @param {string} environmentName Name of the environment
5890
5927
  * @param {string} packageName Name of the package
@@ -5900,7 +5937,7 @@ export declare class NotebooksApi extends BaseAPI {
5900
5937
  */
5901
5938
  executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<NotebookCellResult, any, {}>>;
5902
5939
  /**
5903
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
5940
+ * 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.
5904
5941
  * @summary Get Malloy notebook cells
5905
5942
  * @param {string} environmentName Name of the environment
5906
5943
  * @param {string} packageName Name of the package
@@ -1,4 +1,4 @@
1
- import { A as e, a as i, C as o, b as n, c as t, aC as r, e as p, f as u, d as A, O as m, I as c, K as E, J as l, X as C, U as y, W as P, V as F, $ as b, Y as g, _ as d, Z as S, D as k, a3 as M, a0 as h, a2 as x, a1 as v, h as D, a7 as T, a4 as R, a6 as f, a5 as z, ab as N, a8 as Q, aa as W, a9 as B, ap as O, F as I, i as L, G as q, L as w, j, k as G, M as H, l as J, ag as K, m as U, af as V, ac as X, ae as Y, ad as Z, ak as _, ah as $, aj as aa, ai as sa, n as ea, N as ia, ao as oa, al as na, an as ta, am as ra, q as pa, p as ua, o as Aa, P as ma, r as ca, s as Ea, at as la, aq as Ca, as as ya, ar as Pa, t as Fa, v as ba, ax as ga, au as da, aw as Sa, av as ka, Q as Ma, w as ha, x as xa, R as va, z as Da, y as Ta, B as Ra, E as fa, S as za, H as Na, T as Qa, aB as Wa, ay as Ba, aA as Oa, az as Ia, g as La, u as qa } from "../ServerProvider-AsUiy22k.es.js";
1
+ import { A as e, a as i, C as o, b as n, c as t, aC as r, e as p, f as u, d as A, O as m, I as c, K as E, J as l, X as C, U as y, W as P, V as F, $ as b, Y as g, _ as d, Z as S, D as k, a3 as M, a0 as h, a2 as x, a1 as v, h as D, a7 as T, a4 as R, a6 as f, a5 as z, ab as N, a8 as Q, aa as W, a9 as B, ap as O, F as I, i as L, G as q, L as w, j, k as G, M as H, l as J, ag as K, m as U, af as V, ac as X, ae as Y, ad as Z, ak as _, ah as $, aj as aa, ai as sa, n as ea, N as ia, ao as oa, al as na, an as ta, am as ra, q as pa, p as ua, o as Aa, P as ma, r as ca, s as Ea, at as la, aq as Ca, as as ya, ar as Pa, t as Fa, v as ba, ax as ga, au as da, aw as Sa, av as ka, Q as Ma, w as ha, x as xa, R as va, z as Da, y as Ta, B as Ra, E as fa, S as za, H as Na, T as Qa, aB as Wa, ay as Ba, aA as Oa, az as Ia, g as La, u as qa } from "../ServerProvider-CvMqBhuj.es.js";
2
2
  export {
3
3
  e as AttachedDatabaseTypeEnum,
4
4
  i as AzureConnectionAuthTypeEnum,
@@ -60,3 +60,21 @@ export declare function filterableFields(catalog: PackageCatalog | undefined, so
60
60
  */
61
61
  export declare const isDashboardModel: (path: string | undefined) => boolean;
62
62
  export declare function buildCatalog(models: CompiledModel[]): PackageCatalog;
63
+ /**
64
+ * The part of the package catalog a dashboard file can actually use.
65
+ *
66
+ * The builder never writes an import, so a source the file cannot see would
67
+ * produce a tile that does not compile. A named import says exactly which
68
+ * names it brings. A whole-file import of a published model brings that
69
+ * model's sources. A whole-file import of a file off the surface cannot be
70
+ * read, so then every published source is offered and a wrong pick is caught
71
+ * by the compile check the editor already runs.
72
+ */
73
+ export declare function visibleToDashboard(catalog: PackageCatalog, imports: ReadonlyArray<{
74
+ kind: "all";
75
+ path: string;
76
+ } | {
77
+ kind: "names";
78
+ names: string[];
79
+ path: string;
80
+ }>, published: CompiledModel[]): PackageCatalog;
@@ -13,6 +13,12 @@ interface DataAppViewerProps {
13
13
  * height changes; we listen and resize the iframe to match so embedded
14
14
  * dashboards don't get a nested scrollbar.
15
15
  *
16
+ * When those two origins differ, the worker serving the app must name this
17
+ * SPA's origin in `PUBLISHER_FRAME_ANCESTORS`. The server's default is
18
+ * `frame-ancestors 'self'`, which permits only its own origin, so a
19
+ * cross-origin embed is refused by the browser and the iframe renders blank
20
+ * with nothing logged server-side. A same-origin deployment needs no setting.
21
+ *
16
22
  * Full-screen apps (e.g. slide decks) can opt out of content-height sizing
17
23
  * with `<meta name="publisher:fit" content="viewport">`, surfaced as
18
24
  * `DataApp.fit === "viewport"`. The iframe then fills the available viewport
@@ -33,7 +33,38 @@ export interface MaterializationMetadata {
33
33
  trigger?: "ON_DEMAND" | "SCHEDULER";
34
34
  sourcesBuilt?: number;
35
35
  sourcesReused?: number;
36
+ /**
37
+ * Persist sources the eligibility gate refused, so the run skipped them and
38
+ * they serve live. Absent when the run refused nothing; the refused sources
39
+ * themselves are named in `refusedSources`, beside this count.
40
+ */
41
+ sourcesRefused?: number;
42
+ /**
43
+ * The sources auto-run refused, keyed by sourceID. An orchestrated run
44
+ * reports its refusals in the manifest's `failures` instead, marked
45
+ * `refused`; {@link refusedSourcesOf} reads both.
46
+ */
47
+ refusedSources?: Record<string, {
48
+ name: string;
49
+ message: string;
50
+ }>;
51
+ }
52
+ /** One source a run did not build because the eligibility gate refused it. */
53
+ export interface RunRefusal {
54
+ name: string;
55
+ message: string;
36
56
  }
57
+ /**
58
+ * Every source the run refused, from either place a run records one: the
59
+ * metadata list auto-run writes, and the `failures` an orchestrated run marks
60
+ * `refused`. Sorted by name so the list reads the same on every render.
61
+ */
62
+ export declare function refusedSourcesOf(materialization: Materialization): RunRefusal[];
63
+ /**
64
+ * The run's source counts, joined by `separator`. Refused sources are named
65
+ * only when there are some, so a clean run reads as it always has.
66
+ */
67
+ export declare function sourcesSummary(meta: MaterializationMetadata, separator: string): string;
37
68
  export declare function parseMetadata(materialization: Materialization): MaterializationMetadata;
38
69
  /** Human label for how a run was initiated. */
39
70
  export declare function triggerLabel(meta: MaterializationMetadata): "Scheduled" | "Manual";