@malloy-publisher/sdk 0.12.5 → 0.12.6

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.
@@ -1,8 +1,8 @@
1
1
  import { jsx as I } from "react/jsx-runtime";
2
2
  import { Box as se } from "@mui/material";
3
3
  import { Suspense as ge, useRef as M, useMemo as de, useEffect as ve, useLayoutEffect as we } from "react";
4
- import { r as ke, a as be, D as xe, b as Q, T as V, l as Ce, c as Re, d as Ee, e as Te, R as Ae, m as Se, f as _e, g as ce } from "./useCompiledDocument-BnT2QpG0.es.js";
5
- import { bt as De, br as Oe, bu as Fe, bv as ze } from "./ServerProvider-DRbZ6tLP.es.js";
4
+ import { r as ke, a as be, D as xe, b as Q, T as V, l as Ce, c as Re, d as Ee, e as Te, R as Ae, m as Se, f as _e, g as ce } from "./useCompiledDocument-XJMCZF8O.es.js";
5
+ import { bt as De, br as Oe, bu as Fe, bv as ze } from "./ServerProvider-Qd3zdOsC.es.js";
6
6
  const g = ke.drillCell;
7
7
  function Le(e, t) {
8
8
  const r = /* @__PURE__ */ new Set();
@@ -1,4 +1,4 @@
1
- "use strict";const $=require("react/jsx-runtime"),se=require("@mui/material"),w=require("react"),u=require("./useCompiledDocument--Z7vKZL5.cjs.js"),X=require("./ServerProvider-CqL6xzta.cjs.js"),v=u.reportClasses.drillCell;function he(e,t){const r=new Set;let a;try{a=e.getMetadata()?.getAllFields()??[]}catch{return r}const o=new Set;for(const n of a)!n||t(n)||n.tag?.tag("hidden")===void 0&&o.add(n.tag?.text("label")??n.name);for(const n of a){if(!n||!t(n))continue;const l=n.tag?.text("label")??n.name;o.has(l)||r.add(l)}return r}function j(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function me(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const a=l=>l.closest(".malloy-table")===r,o=new Set;for(const l of r.querySelectorAll(".column-cell.th")){if(!a(l))continue;const i=(l.textContent??"").replace(/\u200b/g,"").trim(),m=j(l);m&&t.has(i)&&o.add(m)}if(o.size===0)continue;const n=new Set;for(const l of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!a(l))continue;const i=j(l);i&&(n.has(i)?l.tabIndex=-1:n.add(i))}for(const l of r.querySelectorAll(".column-cell.td")){if(!a(l))continue;const i=j(l),m=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(i&&m&&o.has(i)&&!l.querySelector(".malloy-table")){if(l.classList.add(v),l.tabIndex===0)n.add(i);else{const p=n.has(i);p||n.add(i),l.tabIndex=p?-1:0}l.setAttribute("role","button")}}}}function ke(e){const t=e.closest(".malloy-table"),r=j(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(a=>a.closest(".malloy-table")===t&&j(a)===r)}function de(e,t){const r=ke(e),a=r.indexOf(e);if(a===-1)return;const o=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(a+t,0),r.length-1)];if(o){for(const n of r)n.tabIndex=n===o?0:-1;return o}}function be(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function fe(e){const{foreground:t,axisFaint:r,gridline:a,font:o}=e,n={background:e.background,font:o.family,title:{color:t,font:o.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:a,labelFont:o.family,titleFont:o.family},legend:{labelColor:t,titleColor:t,labelFont:o.family,titleFont:o.family},header:{labelColor:t,titleColor:t},range:{category:e.series}},l={...n,legend:{...n.legend,orient:"bottom"}};return i=>i==="shape_map"?l:n}function ye(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},a=t.tag("palette");if(a){const n={},l=a.textArray("series");l&&l.length>0&&(n.series=l);for(const i of X.PER_MODE_COLOR_KEYS){const m=a.tag(i);if(!m)continue;const p={},C=m.text("light"),x=m.text("dark");C&&(p.light=C),x&&(p.dark=x),Object.keys(p).length>0&&(n[i]=p)}Object.keys(n).length>0&&(r.palette=n)}const o=t.tag("font");if(o){const n={},l=o.text("family");l&&(n.family=l);const i=o.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(n.size=i),Object.keys(n).length>0&&(r.font=n)}return Object.keys(r).length>0?r:void 0}const Z=e=>(e??[]).map(t=>t?.value).filter(t=>typeof t=="string");function xe(e){const t=e.replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}const Ce=e=>Z(e.annotations).some(t=>{const r=t.trim();return/^#[^("]/.test(r)&&/(?:^#|[\s{])label\s*=/.test(r)}),Re=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Te=e=>e.type?.element_type?.fields??e.type?.fields;function pe(e,t){let r=!1;return{fields:e.map(o=>{const n=Te(o);if(n){const i=pe(n,u.requestsRowChart(Z(o.annotations)));if(!i.changed)return o;r=!0;const m=o.type?.element_type?{...o.type,element_type:{...o.type.element_type,fields:i.fields}}:{...o.type,fields:i.fields};return{...o,type:m}}if(!t||!o.name||Ce(o))return o;const l=xe(o.name);return l===o.name?o:(r=!0,{...o,annotations:[{value:`# label=${Re(l)}
1
+ "use strict";const $=require("react/jsx-runtime"),se=require("@mui/material"),w=require("react"),u=require("./useCompiledDocument-BpP4Clt3.cjs.js"),X=require("./ServerProvider-CqL6xzta.cjs.js"),v=u.reportClasses.drillCell;function he(e,t){const r=new Set;let a;try{a=e.getMetadata()?.getAllFields()??[]}catch{return r}const o=new Set;for(const n of a)!n||t(n)||n.tag?.tag("hidden")===void 0&&o.add(n.tag?.text("label")??n.name);for(const n of a){if(!n||!t(n))continue;const l=n.tag?.text("label")??n.name;o.has(l)||r.add(l)}return r}function j(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function me(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const a=l=>l.closest(".malloy-table")===r,o=new Set;for(const l of r.querySelectorAll(".column-cell.th")){if(!a(l))continue;const i=(l.textContent??"").replace(/\u200b/g,"").trim(),m=j(l);m&&t.has(i)&&o.add(m)}if(o.size===0)continue;const n=new Set;for(const l of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!a(l))continue;const i=j(l);i&&(n.has(i)?l.tabIndex=-1:n.add(i))}for(const l of r.querySelectorAll(".column-cell.td")){if(!a(l))continue;const i=j(l),m=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(i&&m&&o.has(i)&&!l.querySelector(".malloy-table")){if(l.classList.add(v),l.tabIndex===0)n.add(i);else{const p=n.has(i);p||n.add(i),l.tabIndex=p?-1:0}l.setAttribute("role","button")}}}}function ke(e){const t=e.closest(".malloy-table"),r=j(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(a=>a.closest(".malloy-table")===t&&j(a)===r)}function de(e,t){const r=ke(e),a=r.indexOf(e);if(a===-1)return;const o=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(a+t,0),r.length-1)];if(o){for(const n of r)n.tabIndex=n===o?0:-1;return o}}function be(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function fe(e){const{foreground:t,axisFaint:r,gridline:a,font:o}=e,n={background:e.background,font:o.family,title:{color:t,font:o.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:a,labelFont:o.family,titleFont:o.family},legend:{labelColor:t,titleColor:t,labelFont:o.family,titleFont:o.family},header:{labelColor:t,titleColor:t},range:{category:e.series}},l={...n,legend:{...n.legend,orient:"bottom"}};return i=>i==="shape_map"?l:n}function ye(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},a=t.tag("palette");if(a){const n={},l=a.textArray("series");l&&l.length>0&&(n.series=l);for(const i of X.PER_MODE_COLOR_KEYS){const m=a.tag(i);if(!m)continue;const p={},C=m.text("light"),x=m.text("dark");C&&(p.light=C),x&&(p.dark=x),Object.keys(p).length>0&&(n[i]=p)}Object.keys(n).length>0&&(r.palette=n)}const o=t.tag("font");if(o){const n={},l=o.text("family");l&&(n.family=l);const i=o.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(n.size=i),Object.keys(n).length>0&&(r.font=n)}return Object.keys(r).length>0?r:void 0}const Z=e=>(e??[]).map(t=>t?.value).filter(t=>typeof t=="string");function xe(e){const t=e.replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}const Ce=e=>Z(e.annotations).some(t=>{const r=t.trim();return/^#[^("]/.test(r)&&/(?:^#|[\s{])label\s*=/.test(r)}),Re=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Te=e=>e.type?.element_type?.fields??e.type?.fields;function pe(e,t){let r=!1;return{fields:e.map(o=>{const n=Te(o);if(n){const i=pe(n,u.requestsRowChart(Z(o.annotations)));if(!i.changed)return o;r=!0;const m=o.type?.element_type?{...o.type,element_type:{...o.type.element_type,fields:i.fields}}:{...o.type,fields:i.fields};return{...o,type:m}}if(!t||!o.name||Ce(o))return o;const l=xe(o.name);return l===o.name?o:(r=!0,{...o,annotations:[{value:`# label=${Re(l)}
2
2
  `},...o.annotations??[]]})}),changed:r}}function Ae(e){if(!e||typeof e!="object")return e;const t=e,r=t.schema?.fields;if(!Array.isArray(r))return e;const{fields:a,changed:o}=pe(r,u.requestsRowChart(Z(t.annotations)));return o?{...t,schema:{...t.schema,fields:a}}:e}const ce=320,Ee=10,Se=96,_e=4e3;function De(e,t){if(e!=="bar"&&e!=="combo"&&e!=="line"&&e!=="chart"&&e!=="scatter_chart")return;if(e!=="bar"&&e!=="combo")return ce;const r=t?.data?.array_value?.length,a=r===void 0?0:r*Ee+Se;return Math.min(Math.max(ce,a),_e)}function Oe(e){let t;return{onClick:r=>{const a={...r,...Le(r)};t=a,queueMicrotask(()=>{t===a&&(t=void 0),e(a)})},onDrill:r=>{const a=t;t=void 0,a&&r.stableDrillClauses!==void 0&&(a.drillClauses=r.stableDrillClauses)}}}function Le(e){const t=e.field;try{const r=t?.getEffectiveQueryTimezone?.();return r?{timezone:r}:{}}catch{return{}}}function ze(e){const t=r=>{let a=!1;try{a=r.isArray?.()===!0}catch{a=!1}a&&"stableDrillFilters"in r&&Object.defineProperty(r,"stableDrillFilters",{configurable:!0,get:()=>[]});for(const o of r.fields??[])t(o)};e&&t(e)}const B="data-publisher-fill",Fe=async(e,t,r)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:a}=await u.loadMalloyRenderer();return new a({onClick:t,...r?{onDrill:r,tableConfig:{enableDrill:!0}}:{},vegaConfigOverride:fe(e),theme:be(e),onError:n=>{console.error("Error rendering visualization:",typeof n,n)}}).createViz()};async function Ie(e){if(!e||typeof e!="object")return;const t=e,r=[...Array.isArray(t.model_annotations)?t.model_annotations:[],...Array.isArray(t.source_annotations)?t.source_annotations:[],...Array.isArray(t.annotations)?t.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(r.length===0)return;let a;try{({parseAnnotation:a}=await u.loadMalloyTag())}catch{return}try{const{tag:o}=a(r);return ye(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:r});return}}function Me(e,t,r){const a=u.buildTableCssVars(t,r);for(const[o,n]of Object.entries(a))e.style.setProperty(o,n)}const $e=`
3
3
  /* Card geometry, through the renderer's OWN theme vars rather than over the top
4
4
  of them. It declares --malloy-theme--dashboard-* on .malloy-render itself and
@@ -2377,7 +2377,7 @@ const Ze = function(l) {
2377
2377
  * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
2378
2378
  * @summary Get environment details and metadata
2379
2379
  * @param {string} environmentName Name of the environment
2380
- * @param {boolean} [reload] Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2380
+ * @param {boolean} [reload] **Deprecated.** Re-reads the environment\'s block of `publisher.config.json` and reloads the environment from it. Nothing first-party calls it, and the v1 API has no environment reload. A response to `reload=true` carries `Deprecation: true`, and each use is counted in `publisher_deprecated_usage_total{feature=\"environment_reload\"}`; it is removed once that reads zero (#1540). Under `frozenConfig` it is refused with 403, like any change to an environment. To pick up a package\'s changed files, reload the package. Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2381
2381
  * @param {*} [options] Override http request option.
2382
2382
  * @throws {RequiredError}
2383
2383
  */
@@ -2463,7 +2463,7 @@ const Ze = function(l) {
2463
2463
  * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
2464
2464
  * @summary Get environment details and metadata
2465
2465
  * @param {string} environmentName Name of the environment
2466
- * @param {boolean} [reload] Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2466
+ * @param {boolean} [reload] **Deprecated.** Re-reads the environment\'s block of `publisher.config.json` and reloads the environment from it. Nothing first-party calls it, and the v1 API has no environment reload. A response to `reload=true` carries `Deprecation: true`, and each use is counted in `publisher_deprecated_usage_total{feature=\"environment_reload\"}`; it is removed once that reads zero (#1540). Under `frozenConfig` it is refused with 403, like any change to an environment. To pick up a package\'s changed files, reload the package. Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2467
2467
  * @param {*} [options] Override http request option.
2468
2468
  * @throws {RequiredError}
2469
2469
  */
@@ -2521,7 +2521,7 @@ const Ze = function(l) {
2521
2521
  * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
2522
2522
  * @summary Get environment details and metadata
2523
2523
  * @param {string} environmentName Name of the environment
2524
- * @param {boolean} [reload] Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2524
+ * @param {boolean} [reload] **Deprecated.** Re-reads the environment\'s block of `publisher.config.json` and reloads the environment from it. Nothing first-party calls it, and the v1 API has no environment reload. A response to `reload=true` carries `Deprecation: true`, and each use is counted in `publisher_deprecated_usage_total{feature=\"environment_reload\"}`; it is removed once that reads zero (#1540). Under `frozenConfig` it is refused with 403, like any change to an environment. To pick up a package\'s changed files, reload the package. Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2525
2525
  * @param {*} [options] Override http request option.
2526
2526
  * @throws {RequiredError}
2527
2527
  */
@@ -2575,7 +2575,7 @@ class ea extends C {
2575
2575
  * Retrieves detailed information about a specific environment, including its packages, connections, configuration, and metadata. The reload parameter can be used to refresh the environment state from disk before returning the information.
2576
2576
  * @summary Get environment details and metadata
2577
2577
  * @param {string} environmentName Name of the environment
2578
- * @param {boolean} [reload] Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2578
+ * @param {boolean} [reload] **Deprecated.** Re-reads the environment\'s block of `publisher.config.json` and reloads the environment from it. Nothing first-party calls it, and the v1 API has no environment reload. A response to `reload=true` carries `Deprecation: true`, and each use is counted in `publisher_deprecated_usage_total{feature=\"environment_reload\"}`; it is removed once that reads zero (#1540). Under `frozenConfig` it is refused with 403, like any change to an environment. To pick up a package\'s changed files, reload the package. Load / reload the environment before returning result. Only the two spellings OpenAPI serializes a boolean as are accepted: `true` and `false`. Any other value (`1`, `yes`, `TRUE`, or the parameter repeated) is refused with 400 rather than read as `false`, which would answer 200 without recompiling.
2579
2579
  * @param {*} [options] Override http request option.
2580
2580
  * @throws {RequiredError}
2581
2581
  */
@@ -3041,7 +3041,7 @@ const vn = {
3041
3041
  };
3042
3042
  },
3043
3043
  /**
3044
- * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`).
3044
+ * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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, `reason` `FILE_EXISTS`, so a caller choosing a name can try the next, and an unconditional overwrite is not something a caller can ask for by leaving a field out. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`). A package installed from a `location` is fetched again from there on reload, which replaces its files, so it refuses this write with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`): add the report to the package\'s source and reload it, or publish it as a version.
3045
3045
  * @summary Write a report file into the package
3046
3046
  * @param {string} environmentName Name of the environment
3047
3047
  * @param {string} packageName Name of the package
@@ -3129,7 +3129,7 @@ const vn = {
3129
3129
  return (p, d) => S(o, u, g, l)(p, i || d);
3130
3130
  },
3131
3131
  /**
3132
- * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`).
3132
+ * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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, `reason` `FILE_EXISTS`, so a caller choosing a name can try the next, and an unconditional overwrite is not something a caller can ask for by leaving a field out. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`). A package installed from a `location` is fetched again from there on reload, which replaces its files, so it refuses this write with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`): add the report to the package\'s source and reload it, or publish it as a version.
3133
3133
  * @summary Write a report file into the package
3134
3134
  * @param {string} environmentName Name of the environment
3135
3135
  * @param {string} packageName Name of the package
@@ -3204,7 +3204,7 @@ const vn = {
3204
3204
  return t.listModels(a, n, s, o, c).then((i) => i(e, r));
3205
3205
  },
3206
3206
  /**
3207
- * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`).
3207
+ * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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, `reason` `FILE_EXISTS`, so a caller choosing a name can try the next, and an unconditional overwrite is not something a caller can ask for by leaving a field out. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`). A package installed from a `location` is fetched again from there on reload, which replaces its files, so it refuses this write with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`): add the report to the package\'s source and reload it, or publish it as a version.
3208
3208
  * @summary Write a report file into the package
3209
3209
  * @param {string} environmentName Name of the environment
3210
3210
  * @param {string} packageName Name of the package
@@ -3277,7 +3277,7 @@ class ra extends C {
3277
3277
  return F(this.configuration).listModels(r, e, t, a, n).then((s) => s(this.axios, this.basePath));
3278
3278
  }
3279
3279
  /**
3280
- * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`).
3280
+ * Writes the Malloy text of a report into the package, and reloads the package in place so it is served from the new text. This is the report builder\'s save. A report is any `.malloy` file carrying an artifact tag (see list-reports), of either layout, wherever it lives in the package. What it accepts: - CREATE (no `expectedHash`): any `.malloy` path in the package that does not exist yet, outside `public/`, and never the root `index.malloy`. Missing directories are created, inside the package root only. The text must carry an artifact tag (`## artifact`, or the deprecated query-level `# artifact`): an `artifact` property anywhere on a tag line, outside a string. Text without one is refused with 400. - REPLACE (with `expectedHash`): only a file the package currently reads as an editable report: a tagged `.malloy` report of either layout, including a tagged grid report that has no tiles yet, and a file whose tag makes no report (a `kind=` tag, or the retired `run:` cell format), so it can be rewritten as tiles. A model, an untagged file, a `.malloynb`, the root `index.malloy` and anything in `public/` cannot be overwritten, wherever they live, and answer 400. Two reports may share a basename in different directories; a report is identified by its path, so a taken basename is not refused. The text is compiled first, as the file, and refused with its problems when it does not compile, or when its tag makes no report (for example a linear tag with no `tiles`, `report-cells-removed`); 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 file\'s text as the caller opened it, as `GET …/models/{path}` returned it in `sourceText`. On a package with a surface, that GET withholds `sourceText` only when the text names a source the file does not publish, and returns it anyway with `includeHiddenFilesAndSources=true`. 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, `reason` `FILE_EXISTS`, so a caller choosing a name can try the next, and an unconditional overwrite is not something a caller can ask for by leaving a field out. A path over an existing file the package does not read as a report answers 400 instead, with or without a hash, because that check comes before the hash. 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 tag only inside a block comment passes the tag check but the compiled model carries none, so it is rolled back and answers 500. A tagged grid report with no tiles saves but is not served until it has one. 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. A published version is immutable, so a package with versions refuses this write with 409 (`reason` `PACKAGE_IS_VERSIONED`), whatever `versionId` names: change the file in the package\'s source and publish a new version. A `versionId` on a package with no versions answers 404 (`reason` `VERSION_NOT_FOUND`). A package installed from a `location` is fetched again from there on reload, which replaces its files, so it refuses this write with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`): add the report to the package\'s source and reload it, or publish it as a version.
3281
3281
  * @summary Write a report file into the package
3282
3282
  * @param {string} environmentName Name of the environment
3283
3283
  * @param {string} packageName Name of the package
@@ -3721,7 +3721,7 @@ const kn = {
3721
3721
  };
3722
3722
  },
3723
3723
  /**
3724
- * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
3724
+ * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear. A package fetched from a `location` keeps none of these on reload: a reload fetches it again and replaces its files, `publisher.json` included, keeping only its `location` and manifest binding. So when the package will be fetched from a location once this request is applied (the `location` it sends, or else the one it was installed from), a change to `description`, `explores`, `queryableSources`, `scope`, `queryMetadata` or `materialization` is refused with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`). A change is judged by the value the request would leave in force: clearing a set field is a change, a null is omitted, and a value equal to the current one (`explores` normalized as stored) is not. A request that names a new `location` is judged against the tree fetched from it, and a refusal leaves the previous install serving. When the package it replaces was itself installed from a location, a field sent with that package\'s value is the package sent back, not a change: it is left out and the new tree\'s value serves, so a whole package read back with only its `location` changed is accepted. Make the change in the package\'s source and reload it, or publish it as a version.
3725
3725
  * @summary Update package configuration
3726
3726
  * @param {string} environmentName Name of the environment
3727
3727
  * @param {string} packageName Name of the package
@@ -3864,7 +3864,7 @@ const kn = {
3864
3864
  return (o, c) => S(a, u, g, l)(o, s || c);
3865
3865
  },
3866
3866
  /**
3867
- * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
3867
+ * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear. A package fetched from a `location` keeps none of these on reload: a reload fetches it again and replaces its files, `publisher.json` included, keeping only its `location` and manifest binding. So when the package will be fetched from a location once this request is applied (the `location` it sends, or else the one it was installed from), a change to `description`, `explores`, `queryableSources`, `scope`, `queryMetadata` or `materialization` is refused with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`). A change is judged by the value the request would leave in force: clearing a set field is a change, a null is omitted, and a value equal to the current one (`explores` normalized as stored) is not. A request that names a new `location` is judged against the tree fetched from it, and a refusal leaves the previous install serving. When the package it replaces was itself installed from a location, a field sent with that package\'s value is the package sent back, not a change: it is left out and the new tree\'s value serves, so a whole package read back with only its `location` changed is accepted. Make the change in the package\'s source and reload it, or publish it as a version.
3868
3868
  * @summary Update package configuration
3869
3869
  * @param {string} environmentName Name of the environment
3870
3870
  * @param {string} packageName Name of the package
@@ -3989,7 +3989,7 @@ const kn = {
3989
3989
  return t.listPackages(a, n).then((s) => s(e, r));
3990
3990
  },
3991
3991
  /**
3992
- * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
3992
+ * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear. A package fetched from a `location` keeps none of these on reload: a reload fetches it again and replaces its files, `publisher.json` included, keeping only its `location` and manifest binding. So when the package will be fetched from a location once this request is applied (the `location` it sends, or else the one it was installed from), a change to `description`, `explores`, `queryableSources`, `scope`, `queryMetadata` or `materialization` is refused with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`). A change is judged by the value the request would leave in force: clearing a set field is a change, a null is omitted, and a value equal to the current one (`explores` normalized as stored) is not. A request that names a new `location` is judged against the tree fetched from it, and a refusal leaves the previous install serving. When the package it replaces was itself installed from a location, a field sent with that package\'s value is the package sent back, not a change: it is left out and the new tree\'s value serves, so a whole package read back with only its `location` changed is accepted. Make the change in the package\'s source and reload it, or publish it as a version.
3993
3993
  * @summary Update package configuration
3994
3994
  * @param {string} environmentName Name of the environment
3995
3995
  * @param {string} packageName Name of the package
@@ -4112,7 +4112,7 @@ class la extends C {
4112
4112
  return R(this.configuration).listPackages(r, e).then((t) => t(this.axios, this.basePath));
4113
4113
  }
4114
4114
  /**
4115
- * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear.
4115
+ * DEPRECATED. In-place mutation of a package contradicts immutable versions, so this operation will be removed. On a package that has published versions it changes only what is not content: a `manifestLocation` URI is bound to the package\'s `latest` version (as `PUT .../packages/{packageName}/versions/{version}/manifest` does for any version), while a null or empty one leaves the binding as it is (clear it with that route), and `description` is the package\'s. `name` and the `location` the version was published from may be sent back unchanged. Any other change is refused with 409 (`reason` `PACKAGE_IS_VERSIONED`), as is a package with no `latest` yet: publish a new version to change content. It keeps working, so that callers which predate versions do not break, and says it is deprecated: every response carries `Deprecation: true` and a `Link` to the package versions reference, every request is counted in `publisher_deprecated_usage_total` (`feature` `package_patch`), and the server logs a warning, once per package per run, naming the route that replaces it. Updates the configuration and metadata of an existing package. This allows you to modify package settings, update the description, change the location, or update other package-level properties. The package must exist and be accessible. A supplied `materialization` block REPLACES the one on disk, so re-send every field of it you want to keep. Two exceptions are preserved when omitted: `scope`, which is a top-level field and not expressible in the block at all, and `queryMetadata`, which is orthogonal to the schedule and freshness policy this call usually carries — a client setting a schedule has no reason to re-send the package\'s tags, and dropping them silently untags every statement the package issues. `queryMetadata` has two homes: the top-level field, which is canonical, and `materialization.queryMetadata`, which is DEPRECATED and still accepted. The canonical field wins if a request sends both, and both are populated on read. At EITHER home, omitting it preserves the package\'s tags and so does sending null — a client that serializes unset fields as null must not untag a package by accident. Send an empty object to clear. A package fetched from a `location` keeps none of these on reload: a reload fetches it again and replaces its files, `publisher.json` included, keeping only its `location` and manifest binding. So when the package will be fetched from a location once this request is applied (the `location` it sends, or else the one it was installed from), a change to `description`, `explores`, `queryableSources`, `scope`, `queryMetadata` or `materialization` is refused with 409 (`reason` `PACKAGE_INSTALLED_FROM_LOCATION`). A change is judged by the value the request would leave in force: clearing a set field is a change, a null is omitted, and a value equal to the current one (`explores` normalized as stored) is not. A request that names a new `location` is judged against the tree fetched from it, and a refusal leaves the previous install serving. When the package it replaces was itself installed from a location, a field sent with that package\'s value is the package sent back, not a change: it is left out and the new tree\'s value serves, so a whole package read back with only its `location` changed is accepted. Make the change in the package\'s source and reload it, or publish it as a version.
4116
4116
  * @summary Update package configuration
4117
4117
  * @param {string} environmentName Name of the environment
4118
4118
  * @param {string} packageName Name of the package