@malloy-publisher/sdk 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RenderedResult-B2VzqpJV.cjs.js → RenderedResult-DTM9o4Ql.cjs.js} +1 -1
- package/dist/{RenderedResult-Ct3z543g.es.js → RenderedResult-vyM2wQbC.es.js} +2 -2
- package/dist/ServerProvider-DpOy4_Kf.cjs.js +1 -0
- package/dist/{ServerProvider-Be9eusDF.es.js → ServerProvider-lAZ5ZdQS.es.js} +171 -100
- package/dist/builder/index.cjs.js +1 -1
- package/dist/builder/index.es.js +3 -3
- package/dist/client/api.d.ts +88 -18
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +5 -5
- package/dist/{useCompiledDocument-CQG6VO-x.cjs.js → useCompiledDocument-2huaKTJN.cjs.js} +2 -2
- package/dist/{useCompiledDocument-CuSAYHX_.es.js → useCompiledDocument-CSXZufFO.es.js} +2 -2
- package/package.json +1 -1
- package/src/components/RenderedResult/RenderedResult.lifecycle.spec.tsx +15 -1
- package/dist/ServerProvider-DDr5VOVF.cjs.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as z } from "react/jsx-runtime";
|
|
2
2
|
import { QueryClient as ye, QueryClientProvider as Ce, useQuery as Ie } from "@tanstack/react-query";
|
|
3
3
|
import u from "axios";
|
|
4
4
|
import { useContext as le, useMemo as B, createContext as ce, useState as oe, useEffect as Re, useCallback as xe } from "react";
|
|
@@ -74,9 +74,9 @@ const R = {
|
|
|
74
74
|
border: "none",
|
|
75
75
|
boxShadow: "none",
|
|
76
76
|
marginBottom: "0"
|
|
77
|
-
}),
|
|
77
|
+
}), za = j("div")({
|
|
78
78
|
height: "100%"
|
|
79
|
-
}),
|
|
79
|
+
}), Qa = j("div")({
|
|
80
80
|
height: "75vh",
|
|
81
81
|
width: "100%",
|
|
82
82
|
overflowY: "auto"
|
|
@@ -94,7 +94,7 @@ const R = {
|
|
|
94
94
|
}, we = {
|
|
95
95
|
light: "#ffffff",
|
|
96
96
|
dark: "#0f172a"
|
|
97
|
-
}, Me = 3,
|
|
97
|
+
}, Me = 3, f = (l) => {
|
|
98
98
|
const r = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(l.trim());
|
|
99
99
|
if (!r) return;
|
|
100
100
|
const a = r[1].length === 3 ? [...r[1]].map((n) => n + n).join("") : r[1];
|
|
@@ -105,31 +105,31 @@ const R = {
|
|
|
105
105
|
return t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
|
|
106
106
|
});
|
|
107
107
|
return 0.2126 * r + 0.7152 * a + 0.0722 * n;
|
|
108
|
-
},
|
|
108
|
+
}, Q = (l, r) => {
|
|
109
109
|
const [a, n] = [K(l), K(r)].sort((e, t) => t - e);
|
|
110
110
|
return (a + 0.05) / (n + 0.05);
|
|
111
111
|
};
|
|
112
|
-
function
|
|
113
|
-
const a =
|
|
114
|
-
return a && n ?
|
|
112
|
+
function _a(l, r) {
|
|
113
|
+
const a = f(l), n = f(r);
|
|
114
|
+
return a && n ? Q(a, n) : void 0;
|
|
115
115
|
}
|
|
116
116
|
const Fe = [15, 23, 42];
|
|
117
117
|
function $(l, r, a = Me) {
|
|
118
|
-
const n =
|
|
119
|
-
if (!n || !e ||
|
|
118
|
+
const n = f(l), e = f(r);
|
|
119
|
+
if (!n || !e || Q(n, e) >= a) return l;
|
|
120
120
|
const t = K(e) < 0.5 ? 255 : 0;
|
|
121
121
|
for (let s = 0.05; s < 1; s += 0.05) {
|
|
122
|
-
const o =
|
|
123
|
-
if (o &&
|
|
122
|
+
const o = f(W(n, t, s));
|
|
123
|
+
if (o && Q(o, e) >= a) return pe(o);
|
|
124
124
|
}
|
|
125
125
|
return t === 255 ? "#ffffff" : "#000000";
|
|
126
126
|
}
|
|
127
127
|
function ie(l, r, a = we[r]) {
|
|
128
128
|
const n = fe[r];
|
|
129
129
|
if (!l || l.toLowerCase() === R.blue) return n;
|
|
130
|
-
if (!
|
|
130
|
+
if (!f(l))
|
|
131
131
|
return r === "light" ? { ...n, accent: l, accentHover: l } : n;
|
|
132
|
-
const e = $(l, a), t =
|
|
132
|
+
const e = $(l, a), t = f(e), s = r === "dark" ? W(t, 255, 0.25) : W(t, 0, 0.2), o = Q(t, [255, 255, 255]), i = Q(t, Fe);
|
|
133
133
|
return {
|
|
134
134
|
accent: e,
|
|
135
135
|
accentHover: s,
|
|
@@ -348,7 +348,7 @@ function de(l, r) {
|
|
|
348
348
|
drillLink: ie(void 0, r).accent
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function qa(l, r) {
|
|
352
352
|
const a = r.palette?.series;
|
|
353
353
|
if (!Array.isArray(a) || a.length !== 1) return r;
|
|
354
354
|
const n = a[0], e = l.reduce(
|
|
@@ -370,7 +370,7 @@ function Le(l, r, a) {
|
|
|
370
370
|
return n === "auto" ? a ? "dark" : "light" : n;
|
|
371
371
|
}
|
|
372
372
|
const me = ce(void 0);
|
|
373
|
-
function
|
|
373
|
+
function ze({
|
|
374
374
|
layers: l,
|
|
375
375
|
mode: r,
|
|
376
376
|
userChoice: a,
|
|
@@ -390,7 +390,7 @@ function Qe({
|
|
|
390
390
|
() => ({ theme: c, layers: l, mode: r, userChoice: a, setMode: n, allowUserToggle: e }),
|
|
391
391
|
[c, l, r, a, n, e]
|
|
392
392
|
);
|
|
393
|
-
return /* @__PURE__ */
|
|
393
|
+
return /* @__PURE__ */ z(me.Provider, { value: p, children: s });
|
|
394
394
|
}
|
|
395
395
|
function Ha() {
|
|
396
396
|
const l = le(me);
|
|
@@ -411,14 +411,14 @@ class I {
|
|
|
411
411
|
}
|
|
412
412
|
configuration;
|
|
413
413
|
}
|
|
414
|
-
class
|
|
414
|
+
class Qe extends Error {
|
|
415
415
|
constructor(r, a) {
|
|
416
416
|
super(a), this.field = r, this.name = "RequiredError";
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
const P = {}, b = "https://example.com", m = function(l, r, a) {
|
|
420
420
|
if (a == null)
|
|
421
|
-
throw new
|
|
421
|
+
throw new Qe(r, `Required parameter ${r} was null or undefined when calling ${l}.`);
|
|
422
422
|
};
|
|
423
423
|
function J(l, r, a = "") {
|
|
424
424
|
r != null && (typeof r == "object" ? Array.isArray(r) || r instanceof Set ? r.forEach((n) => J(l, n, a)) : Object.keys(r).forEach(
|
|
@@ -428,11 +428,11 @@ function J(l, r, a = "") {
|
|
|
428
428
|
const v = function(l, ...r) {
|
|
429
429
|
const a = new URLSearchParams(l.search);
|
|
430
430
|
J(a, r), l.search = a.toString();
|
|
431
|
-
},
|
|
431
|
+
}, _e = function(l, r) {
|
|
432
432
|
return r instanceof Set ? Array.from(r) : r;
|
|
433
433
|
}, A = function(l, r, a) {
|
|
434
434
|
const n = typeof l != "string";
|
|
435
|
-
return (n && a && a.isJsonMime ? a.isJsonMime(r.headers["Content-Type"]) : n) ? JSON.stringify(l !== void 0 ? l : {},
|
|
435
|
+
return (n && a && a.isJsonMime ? a.isJsonMime(r.headers["Content-Type"]) : n) ? JSON.stringify(l !== void 0 ? l : {}, _e) : l || "";
|
|
436
436
|
}, V = function(l) {
|
|
437
437
|
return l.pathname + l.search + l.hash;
|
|
438
438
|
}, S = function(l, r, a, n) {
|
|
@@ -630,24 +630,24 @@ const v = function(l, ...r) {
|
|
|
630
630
|
}, Lt = {
|
|
631
631
|
Error: "error",
|
|
632
632
|
Warn: "warn"
|
|
633
|
-
},
|
|
633
|
+
}, zt = {
|
|
634
634
|
Persist: "persist",
|
|
635
635
|
Materialize: "materialize",
|
|
636
636
|
View: "view",
|
|
637
637
|
Query: "query",
|
|
638
638
|
Rollup: "rollup",
|
|
639
639
|
Preaggregate: "preaggregate"
|
|
640
|
-
},
|
|
640
|
+
}, Qt = {
|
|
641
641
|
Disable: "disable",
|
|
642
642
|
NoVerify: "no-verify",
|
|
643
643
|
VerifyCa: "verify-ca",
|
|
644
644
|
VerifyFull: "verify-full"
|
|
645
|
-
},
|
|
645
|
+
}, _t = {
|
|
646
646
|
Interactive: "interactive",
|
|
647
647
|
Materialize: "materialize",
|
|
648
648
|
Index: "index",
|
|
649
649
|
Ops: "ops"
|
|
650
|
-
},
|
|
650
|
+
}, qt = {
|
|
651
651
|
Persist: "persist",
|
|
652
652
|
Materialize: "materialize",
|
|
653
653
|
View: "view",
|
|
@@ -814,7 +814,7 @@ const v = function(l, ...r) {
|
|
|
814
814
|
Light: "light",
|
|
815
815
|
Dark: "dark",
|
|
816
816
|
Auto: "auto"
|
|
817
|
-
},
|
|
817
|
+
}, qe = function(l) {
|
|
818
818
|
return {
|
|
819
819
|
/**
|
|
820
820
|
* Returns one agent with its instructions, its own skill files and each schedule\'s task text, plus `source`, which pins the package load and the agent\'s own content so a runner can prove which bytes ran. Publisher serves the definition and runs nothing: the caller\'s own harness executes it, and schedules are never fired by the server. 404 when no agent of that name is served.
|
|
@@ -887,8 +887,8 @@ const v = function(l, ...r) {
|
|
|
887
887
|
};
|
|
888
888
|
}
|
|
889
889
|
};
|
|
890
|
-
},
|
|
891
|
-
const r =
|
|
890
|
+
}, _ = function(l) {
|
|
891
|
+
const r = qe(l);
|
|
892
892
|
return {
|
|
893
893
|
/**
|
|
894
894
|
* Returns one agent with its instructions, its own skill files and each schedule\'s task text, plus `source`, which pins the package load and the agent\'s own content so a runner can prove which bytes ran. Publisher serves the definition and runs nothing: the caller\'s own harness executes it, and schedules are never fired by the server. 404 when no agent of that name is served.
|
|
@@ -935,7 +935,7 @@ const v = function(l, ...r) {
|
|
|
935
935
|
}
|
|
936
936
|
};
|
|
937
937
|
}, Sn = function(l, r, a) {
|
|
938
|
-
const n =
|
|
938
|
+
const n = _(l);
|
|
939
939
|
return {
|
|
940
940
|
/**
|
|
941
941
|
* Returns one agent with its instructions, its own skill files and each schedule\'s task text, plus `source`, which pins the package load and the agent\'s own content so a runner can prove which bytes ran. Publisher serves the definition and runs nothing: the caller\'s own harness executes it, and schedules are never fired by the server. 404 when no agent of that name is served.
|
|
@@ -992,7 +992,7 @@ class He extends I {
|
|
|
992
992
|
* @throws {RequiredError}
|
|
993
993
|
*/
|
|
994
994
|
getAgent(r, a, n, e, t, s) {
|
|
995
|
-
return
|
|
995
|
+
return _(this.configuration).getAgent(r, a, n, e, t, s).then((o) => o(this.axios, this.basePath));
|
|
996
996
|
}
|
|
997
997
|
/**
|
|
998
998
|
* Returns one file from the agent\'s resolved skill set, named by a `relative_filepath` from `GET .../agents/{agentName}?skills=summary` (for example `analyst-conventions/SKILL.md`), with the same `source` pin as the full definition. The path is looked up in the resolved set, never joined onto the filesystem. A `relative_filepath` from the agent\'s `assets` listing (`<skill>/assets/...`, full view only) is matched exactly against the listing, then read from disk as UTF-8 text and served only if it still hashes to its listed `sha256`; one that changed, or became a link, since the load is a 404. 404 when the agent or the file is not served.
|
|
@@ -1006,7 +1006,7 @@ class He extends I {
|
|
|
1006
1006
|
* @throws {RequiredError}
|
|
1007
1007
|
*/
|
|
1008
1008
|
getAgentSkillFile(r, a, n, e, t, s) {
|
|
1009
|
-
return
|
|
1009
|
+
return _(this.configuration).getAgentSkillFile(r, a, n, e, t, s).then((o) => o(this.axios, this.basePath));
|
|
1010
1010
|
}
|
|
1011
1011
|
/**
|
|
1012
1012
|
* Lists the agents declared under `agents` in the package\'s `publisher.json` that passed validation, without instructions or skills. An agent that failed validation is not listed; the package\'s `warnings` say why. Empty when the manifest declares none. The REST half of the `get_agent` MCP tool.
|
|
@@ -1018,7 +1018,7 @@ class He extends I {
|
|
|
1018
1018
|
* @throws {RequiredError}
|
|
1019
1019
|
*/
|
|
1020
1020
|
listAgents(r, a, n, e) {
|
|
1021
|
-
return
|
|
1021
|
+
return _(this.configuration).listAgents(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
1024
|
const kn = {
|
|
@@ -1251,7 +1251,7 @@ const kn = {
|
|
|
1251
1251
|
};
|
|
1252
1252
|
},
|
|
1253
1253
|
/**
|
|
1254
|
-
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
|
|
1254
|
+
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
|
|
1255
1255
|
* @summary Execute SQL query
|
|
1256
1256
|
* @param {string} environmentName Name of the environment
|
|
1257
1257
|
* @param {string} connectionName Name of the connection
|
|
@@ -1273,7 +1273,7 @@ const kn = {
|
|
|
1273
1273
|
};
|
|
1274
1274
|
},
|
|
1275
1275
|
/**
|
|
1276
|
-
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
|
|
1276
|
+
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
|
|
1277
1277
|
* @summary Execute SQL query (per-package)
|
|
1278
1278
|
* @param {string} environmentName Name of the environment
|
|
1279
1279
|
* @param {string} packageName Name of the package whose connection context to use
|
|
@@ -1549,7 +1549,7 @@ const kn = {
|
|
|
1549
1549
|
return (h, k) => S(c, u, g, l)(h, d || k);
|
|
1550
1550
|
},
|
|
1551
1551
|
/**
|
|
1552
|
-
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
|
|
1552
|
+
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
|
|
1553
1553
|
* @summary Execute SQL query
|
|
1554
1554
|
* @param {string} environmentName Name of the environment
|
|
1555
1555
|
* @param {string} connectionName Name of the connection
|
|
@@ -1562,7 +1562,7 @@ const kn = {
|
|
|
1562
1562
|
return (c, p) => S(s, u, g, l)(c, i || p);
|
|
1563
1563
|
},
|
|
1564
1564
|
/**
|
|
1565
|
-
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
|
|
1565
|
+
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
|
|
1566
1566
|
* @summary Execute SQL query (per-package)
|
|
1567
1567
|
* @param {string} environmentName Name of the environment
|
|
1568
1568
|
* @param {string} packageName Name of the package whose connection context to use
|
|
@@ -1774,7 +1774,7 @@ const kn = {
|
|
|
1774
1774
|
return n.listTablesInPackage(e, t, s, o, i, c, p).then((d) => d(a, r));
|
|
1775
1775
|
},
|
|
1776
1776
|
/**
|
|
1777
|
-
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
|
|
1777
|
+
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
|
|
1778
1778
|
* @summary Execute SQL query
|
|
1779
1779
|
* @param {string} environmentName Name of the environment
|
|
1780
1780
|
* @param {string} connectionName Name of the connection
|
|
@@ -1786,7 +1786,7 @@ const kn = {
|
|
|
1786
1786
|
return n.postQuerydata(e, t, s, o).then((i) => i(a, r));
|
|
1787
1787
|
},
|
|
1788
1788
|
/**
|
|
1789
|
-
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
|
|
1789
|
+
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
|
|
1790
1790
|
* @summary Execute SQL query (per-package)
|
|
1791
1791
|
* @param {string} environmentName Name of the environment
|
|
1792
1792
|
* @param {string} packageName Name of the package whose connection context to use
|
|
@@ -1991,7 +1991,7 @@ class We extends I {
|
|
|
1991
1991
|
return C(this.configuration).listTablesInPackage(r, a, n, e, t, s, o).then((i) => i(this.axios, this.basePath));
|
|
1992
1992
|
}
|
|
1993
1993
|
/**
|
|
1994
|
-
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
|
|
1994
|
+
* Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
|
|
1995
1995
|
* @summary Execute SQL query
|
|
1996
1996
|
* @param {string} environmentName Name of the environment
|
|
1997
1997
|
* @param {string} connectionName Name of the connection
|
|
@@ -2003,7 +2003,7 @@ class We extends I {
|
|
|
2003
2003
|
return C(this.configuration).postQuerydata(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
2004
2004
|
}
|
|
2005
2005
|
/**
|
|
2006
|
-
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
|
|
2006
|
+
* Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
|
|
2007
2007
|
* @summary Execute SQL query (per-package)
|
|
2008
2008
|
* @param {string} environmentName Name of the environment
|
|
2009
2009
|
* @param {string} packageName Name of the package whose connection context to use
|
|
@@ -2539,7 +2539,7 @@ const aa = function(l) {
|
|
|
2539
2539
|
};
|
|
2540
2540
|
}
|
|
2541
2541
|
};
|
|
2542
|
-
},
|
|
2542
|
+
}, M = function(l) {
|
|
2543
2543
|
const r = aa(l);
|
|
2544
2544
|
return {
|
|
2545
2545
|
/**
|
|
@@ -2600,7 +2600,7 @@ const aa = function(l) {
|
|
|
2600
2600
|
}
|
|
2601
2601
|
};
|
|
2602
2602
|
}, xn = function(l, r, a) {
|
|
2603
|
-
const n =
|
|
2603
|
+
const n = M(l);
|
|
2604
2604
|
return {
|
|
2605
2605
|
/**
|
|
2606
2606
|
* Creates a new Malloy environment with the specified configuration. An environment serves as a container for packages, connections, and other resources. The environment will be initialized with the provided metadata and can immediately accept packages and connections.
|
|
@@ -2664,7 +2664,7 @@ class ta extends I {
|
|
|
2664
2664
|
* @throws {RequiredError}
|
|
2665
2665
|
*/
|
|
2666
2666
|
createEnvironment(r, a) {
|
|
2667
|
-
return
|
|
2667
|
+
return M(this.configuration).createEnvironment(r, a).then((n) => n(this.axios, this.basePath));
|
|
2668
2668
|
}
|
|
2669
2669
|
/**
|
|
2670
2670
|
* Permanently deletes an environment and all its associated resources including packages, connections, and metadata. This operation cannot be undone, so use with caution. The environment must exist and be accessible for deletion.
|
|
@@ -2674,7 +2674,7 @@ class ta extends I {
|
|
|
2674
2674
|
* @throws {RequiredError}
|
|
2675
2675
|
*/
|
|
2676
2676
|
deleteEnvironment(r, a) {
|
|
2677
|
-
return
|
|
2677
|
+
return M(this.configuration).deleteEnvironment(r, a).then((n) => n(this.axios, this.basePath));
|
|
2678
2678
|
}
|
|
2679
2679
|
/**
|
|
2680
2680
|
* 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.
|
|
@@ -2685,7 +2685,7 @@ class ta extends I {
|
|
|
2685
2685
|
* @throws {RequiredError}
|
|
2686
2686
|
*/
|
|
2687
2687
|
getEnvironment(r, a, n) {
|
|
2688
|
-
return
|
|
2688
|
+
return M(this.configuration).getEnvironment(r, a, n).then((e) => e(this.axios, this.basePath));
|
|
2689
2689
|
}
|
|
2690
2690
|
/**
|
|
2691
2691
|
* Retrieves a list of all environments currently hosted on this Malloy Publisher server. Each environment contains metadata about its packages, connections, and configuration. This endpoint is typically used to discover available environments and their basic information. This endpoint does not reload. A `reload` query parameter is rejected with 400 rather than ignored, because answering 200 here reads as a reload that worked. Reload is per-environment: use `GET /environments/{environmentName}?reload=true`.
|
|
@@ -2694,7 +2694,7 @@ class ta extends I {
|
|
|
2694
2694
|
* @throws {RequiredError}
|
|
2695
2695
|
*/
|
|
2696
2696
|
listEnvironments(r) {
|
|
2697
|
-
return
|
|
2697
|
+
return M(this.configuration).listEnvironments(r).then((a) => a(this.axios, this.basePath));
|
|
2698
2698
|
}
|
|
2699
2699
|
/**
|
|
2700
2700
|
* Updates the configuration and metadata of an existing environment. This allows you to modify environment settings, update the README, change the location, or update other environment-level properties. The environment must exist and be accessible.
|
|
@@ -2705,7 +2705,7 @@ class ta extends I {
|
|
|
2705
2705
|
* @throws {RequiredError}
|
|
2706
2706
|
*/
|
|
2707
2707
|
updateEnvironment(r, a, n) {
|
|
2708
|
-
return
|
|
2708
|
+
return M(this.configuration).updateEnvironment(r, a, n).then((e) => e(this.axios, this.basePath));
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
2711
2711
|
const na = function(l) {
|
|
@@ -2733,7 +2733,7 @@ const na = function(l) {
|
|
|
2733
2733
|
};
|
|
2734
2734
|
},
|
|
2735
2735
|
/**
|
|
2736
|
-
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced,
|
|
2736
|
+
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
|
|
2737
2737
|
* @summary Delete a materialization
|
|
2738
2738
|
* @param {string} environmentName Name of the environment
|
|
2739
2739
|
* @param {string} packageName Name of the package
|
|
@@ -2755,6 +2755,31 @@ const na = function(l) {
|
|
|
2755
2755
|
options: c
|
|
2756
2756
|
};
|
|
2757
2757
|
},
|
|
2758
|
+
/**
|
|
2759
|
+
* Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
|
|
2760
|
+
* @summary Drop a materialized table from a package\'s connection
|
|
2761
|
+
* @param {string} environmentName Name of the environment
|
|
2762
|
+
* @param {string} packageName Name of the package
|
|
2763
|
+
* @param {string} connectionName Name of the connection the table was built on, as the package reaches it
|
|
2764
|
+
* @param {string} tableName The table\'s full name as the run\'s manifest records it (`physicalTableName`: `table`, `schema.table` or `catalog.schema.table`), URL-encoded. It is quoted for the connection\'s dialect as the build quoted it; a name the dialect cannot quote answers 400.
|
|
2765
|
+
* @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\'s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 `MATERIALIZATION_CONFLICT` while it is active).
|
|
2766
|
+
* @param {string} [versionId] The published version of the package to serve, a semantic version such as `1.2.0` or `1.2.0-rc1`. `latest`, omitted or empty (`versionId=`, which a proxy forwarding a page\'s query string may send), the request is served from the package\'s `latest` version. Any other value that is not a semantic version answers 400 with `reason` VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with `reason` VERSION_NOT_FOUND, and an archived one answers 410 with `reason` VERSION_ARCHIVED. A package that has no versions (one loaded from `publisher.config.json` or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send `1.2.0+build.5` as `1.2.0%2Bbuild.5`, since a bare `+` in a query string decodes to a space.
|
|
2767
|
+
* @param {*} [options] Override http request option.
|
|
2768
|
+
* @throws {RequiredError}
|
|
2769
|
+
*/
|
|
2770
|
+
dropMaterializedTable: async (r, a, n, e, t, s, o = {}) => {
|
|
2771
|
+
m("dropMaterializedTable", "environmentName", r), m("dropMaterializedTable", "packageName", a), m("dropMaterializedTable", "connectionName", n), m("dropMaterializedTable", "tableName", e);
|
|
2772
|
+
const i = "/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/materializedTables/{tableName}".replace("{environmentName}", encodeURIComponent(String(r))).replace("{packageName}", encodeURIComponent(String(a))).replace("{connectionName}", encodeURIComponent(String(n))).replace("{tableName}", encodeURIComponent(String(e))), c = new URL(i, b);
|
|
2773
|
+
let p;
|
|
2774
|
+
l && (p = l.baseOptions);
|
|
2775
|
+
const d = { method: "DELETE", ...p, ...o }, h = {}, k = {};
|
|
2776
|
+
t !== void 0 && (k.materializationId = t), s !== void 0 && (k.versionId = s), h.Accept = "application/json", v(c, k);
|
|
2777
|
+
let O = p && p.headers ? p.headers : {};
|
|
2778
|
+
return d.headers = { ...h, ...O, ...o.headers }, {
|
|
2779
|
+
url: V(c),
|
|
2780
|
+
options: d
|
|
2781
|
+
};
|
|
2782
|
+
},
|
|
2758
2783
|
/**
|
|
2759
2784
|
* A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
|
|
2760
2785
|
* @summary Get a specific materialization
|
|
@@ -2827,7 +2852,7 @@ const na = function(l) {
|
|
|
2827
2852
|
};
|
|
2828
2853
|
}
|
|
2829
2854
|
};
|
|
2830
|
-
},
|
|
2855
|
+
}, T = function(l) {
|
|
2831
2856
|
const r = na(l);
|
|
2832
2857
|
return {
|
|
2833
2858
|
/**
|
|
@@ -2844,7 +2869,7 @@ const na = function(l) {
|
|
|
2844
2869
|
return (c, p) => S(s, u, g, l)(c, i || p);
|
|
2845
2870
|
},
|
|
2846
2871
|
/**
|
|
2847
|
-
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced,
|
|
2872
|
+
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
|
|
2848
2873
|
* @summary Delete a materialization
|
|
2849
2874
|
* @param {string} environmentName Name of the environment
|
|
2850
2875
|
* @param {string} packageName Name of the package
|
|
@@ -2857,6 +2882,22 @@ const na = function(l) {
|
|
|
2857
2882
|
const o = await r.deleteMaterialization(a, n, e, t, s), i = l?.serverIndex ?? 0, c = P["MaterializationsApi.deleteMaterialization"]?.[i]?.url;
|
|
2858
2883
|
return (p, d) => S(o, u, g, l)(p, c || d);
|
|
2859
2884
|
},
|
|
2885
|
+
/**
|
|
2886
|
+
* Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
|
|
2887
|
+
* @summary Drop a materialized table from a package\'s connection
|
|
2888
|
+
* @param {string} environmentName Name of the environment
|
|
2889
|
+
* @param {string} packageName Name of the package
|
|
2890
|
+
* @param {string} connectionName Name of the connection the table was built on, as the package reaches it
|
|
2891
|
+
* @param {string} tableName The table\'s full name as the run\'s manifest records it (`physicalTableName`: `table`, `schema.table` or `catalog.schema.table`), URL-encoded. It is quoted for the connection\'s dialect as the build quoted it; a name the dialect cannot quote answers 400.
|
|
2892
|
+
* @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\'s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 `MATERIALIZATION_CONFLICT` while it is active).
|
|
2893
|
+
* @param {string} [versionId] The published version of the package to serve, a semantic version such as `1.2.0` or `1.2.0-rc1`. `latest`, omitted or empty (`versionId=`, which a proxy forwarding a page\'s query string may send), the request is served from the package\'s `latest` version. Any other value that is not a semantic version answers 400 with `reason` VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with `reason` VERSION_NOT_FOUND, and an archived one answers 410 with `reason` VERSION_ARCHIVED. A package that has no versions (one loaded from `publisher.config.json` or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send `1.2.0+build.5` as `1.2.0%2Bbuild.5`, since a bare `+` in a query string decodes to a space.
|
|
2894
|
+
* @param {*} [options] Override http request option.
|
|
2895
|
+
* @throws {RequiredError}
|
|
2896
|
+
*/
|
|
2897
|
+
async dropMaterializedTable(a, n, e, t, s, o, i) {
|
|
2898
|
+
const c = await r.dropMaterializedTable(a, n, e, t, s, o, i), p = l?.serverIndex ?? 0, d = P["MaterializationsApi.dropMaterializedTable"]?.[p]?.url;
|
|
2899
|
+
return (h, k) => S(c, u, g, l)(h, d || k);
|
|
2900
|
+
},
|
|
2860
2901
|
/**
|
|
2861
2902
|
* A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
|
|
2862
2903
|
* @summary Get a specific materialization
|
|
@@ -2903,7 +2944,7 @@ const na = function(l) {
|
|
|
2903
2944
|
}
|
|
2904
2945
|
};
|
|
2905
2946
|
}, Nn = function(l, r, a) {
|
|
2906
|
-
const n =
|
|
2947
|
+
const n = T(l);
|
|
2907
2948
|
return {
|
|
2908
2949
|
/**
|
|
2909
2950
|
* Creates a materialization and starts building. Behavior depends on the request body (see CreateMaterializationRequest): * Orchestrated build — supply `buildInstructions`. The publisher builds directly into the caller-assigned names derived from the package\'s already-compiled build plan (read off `Package.buildPlan`). Returns the materialization already building. * Auto-run (standalone, default) — omit `buildInstructions`; the publisher self-assigns names and runs all phases in one pass.
|
|
@@ -2918,7 +2959,7 @@ const na = function(l) {
|
|
|
2918
2959
|
return n.createMaterialization(e, t, s, o).then((i) => i(a, r));
|
|
2919
2960
|
},
|
|
2920
2961
|
/**
|
|
2921
|
-
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced,
|
|
2962
|
+
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
|
|
2922
2963
|
* @summary Delete a materialization
|
|
2923
2964
|
* @param {string} environmentName Name of the environment
|
|
2924
2965
|
* @param {string} packageName Name of the package
|
|
@@ -2930,6 +2971,21 @@ const na = function(l) {
|
|
|
2930
2971
|
deleteMaterialization(e, t, s, o, i) {
|
|
2931
2972
|
return n.deleteMaterialization(e, t, s, o, i).then((c) => c(a, r));
|
|
2932
2973
|
},
|
|
2974
|
+
/**
|
|
2975
|
+
* Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
|
|
2976
|
+
* @summary Drop a materialized table from a package\'s connection
|
|
2977
|
+
* @param {string} environmentName Name of the environment
|
|
2978
|
+
* @param {string} packageName Name of the package
|
|
2979
|
+
* @param {string} connectionName Name of the connection the table was built on, as the package reaches it
|
|
2980
|
+
* @param {string} tableName The table\'s full name as the run\'s manifest records it (`physicalTableName`: `table`, `schema.table` or `catalog.schema.table`), URL-encoded. It is quoted for the connection\'s dialect as the build quoted it; a name the dialect cannot quote answers 400.
|
|
2981
|
+
* @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\'s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 `MATERIALIZATION_CONFLICT` while it is active).
|
|
2982
|
+
* @param {string} [versionId] The published version of the package to serve, a semantic version such as `1.2.0` or `1.2.0-rc1`. `latest`, omitted or empty (`versionId=`, which a proxy forwarding a page\'s query string may send), the request is served from the package\'s `latest` version. Any other value that is not a semantic version answers 400 with `reason` VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with `reason` VERSION_NOT_FOUND, and an archived one answers 410 with `reason` VERSION_ARCHIVED. A package that has no versions (one loaded from `publisher.config.json` or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send `1.2.0+build.5` as `1.2.0%2Bbuild.5`, since a bare `+` in a query string decodes to a space.
|
|
2983
|
+
* @param {*} [options] Override http request option.
|
|
2984
|
+
* @throws {RequiredError}
|
|
2985
|
+
*/
|
|
2986
|
+
dropMaterializedTable(e, t, s, o, i, c, p) {
|
|
2987
|
+
return n.dropMaterializedTable(e, t, s, o, i, c, p).then((d) => d(a, r));
|
|
2988
|
+
},
|
|
2933
2989
|
/**
|
|
2934
2990
|
* A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
|
|
2935
2991
|
* @summary Get a specific materialization
|
|
@@ -2984,10 +3040,10 @@ class ra extends I {
|
|
|
2984
3040
|
* @throws {RequiredError}
|
|
2985
3041
|
*/
|
|
2986
3042
|
createMaterialization(r, a, n, e) {
|
|
2987
|
-
return
|
|
3043
|
+
return T(this.configuration).createMaterialization(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
2988
3044
|
}
|
|
2989
3045
|
/**
|
|
2990
|
-
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced,
|
|
3046
|
+
* Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
|
|
2991
3047
|
* @summary Delete a materialization
|
|
2992
3048
|
* @param {string} environmentName Name of the environment
|
|
2993
3049
|
* @param {string} packageName Name of the package
|
|
@@ -2997,7 +3053,22 @@ class ra extends I {
|
|
|
2997
3053
|
* @throws {RequiredError}
|
|
2998
3054
|
*/
|
|
2999
3055
|
deleteMaterialization(r, a, n, e, t) {
|
|
3000
|
-
return
|
|
3056
|
+
return T(this.configuration).deleteMaterialization(r, a, n, e, t).then((s) => s(this.axios, this.basePath));
|
|
3057
|
+
}
|
|
3058
|
+
/**
|
|
3059
|
+
* Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
|
|
3060
|
+
* @summary Drop a materialized table from a package\'s connection
|
|
3061
|
+
* @param {string} environmentName Name of the environment
|
|
3062
|
+
* @param {string} packageName Name of the package
|
|
3063
|
+
* @param {string} connectionName Name of the connection the table was built on, as the package reaches it
|
|
3064
|
+
* @param {string} tableName The table\'s full name as the run\'s manifest records it (`physicalTableName`: `table`, `schema.table` or `catalog.schema.table`), URL-encoded. It is quoted for the connection\'s dialect as the build quoted it; a name the dialect cannot quote answers 400.
|
|
3065
|
+
* @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\'s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 `MATERIALIZATION_CONFLICT` while it is active).
|
|
3066
|
+
* @param {string} [versionId] The published version of the package to serve, a semantic version such as `1.2.0` or `1.2.0-rc1`. `latest`, omitted or empty (`versionId=`, which a proxy forwarding a page\'s query string may send), the request is served from the package\'s `latest` version. Any other value that is not a semantic version answers 400 with `reason` VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with `reason` VERSION_NOT_FOUND, and an archived one answers 410 with `reason` VERSION_ARCHIVED. A package that has no versions (one loaded from `publisher.config.json` or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send `1.2.0+build.5` as `1.2.0%2Bbuild.5`, since a bare `+` in a query string decodes to a space.
|
|
3067
|
+
* @param {*} [options] Override http request option.
|
|
3068
|
+
* @throws {RequiredError}
|
|
3069
|
+
*/
|
|
3070
|
+
dropMaterializedTable(r, a, n, e, t, s, o) {
|
|
3071
|
+
return T(this.configuration).dropMaterializedTable(r, a, n, e, t, s, o).then((i) => i(this.axios, this.basePath));
|
|
3001
3072
|
}
|
|
3002
3073
|
/**
|
|
3003
3074
|
* A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
|
|
@@ -3010,7 +3081,7 @@ class ra extends I {
|
|
|
3010
3081
|
* @throws {RequiredError}
|
|
3011
3082
|
*/
|
|
3012
3083
|
getMaterialization(r, a, n, e, t) {
|
|
3013
|
-
return
|
|
3084
|
+
return T(this.configuration).getMaterialization(r, a, n, e, t).then((s) => s(this.axios, this.basePath));
|
|
3014
3085
|
}
|
|
3015
3086
|
/**
|
|
3016
3087
|
* Returns the materialization history for the package, ordered by most recent first. For a package with published versions, the runs of one version (the one `versionId` names, or `latest`), together with the runs from before the package\'s first versioned publish.
|
|
@@ -3024,7 +3095,7 @@ class ra extends I {
|
|
|
3024
3095
|
* @throws {RequiredError}
|
|
3025
3096
|
*/
|
|
3026
3097
|
listMaterializations(r, a, n, e, t, s) {
|
|
3027
|
-
return
|
|
3098
|
+
return T(this.configuration).listMaterializations(r, a, n, e, t, s).then((o) => o(this.axios, this.basePath));
|
|
3028
3099
|
}
|
|
3029
3100
|
/**
|
|
3030
3101
|
* Performs an action on a materialization. The action is specified via the `action` query parameter: * `stop` - Cancels a PENDING or building materialization. Returns 200.
|
|
@@ -3038,7 +3109,7 @@ class ra extends I {
|
|
|
3038
3109
|
* @throws {RequiredError}
|
|
3039
3110
|
*/
|
|
3040
3111
|
materializationAction(r, a, n, e, t, s) {
|
|
3041
|
-
return
|
|
3112
|
+
return T(this.configuration).materializationAction(r, a, n, e, t, s).then((o) => o(this.axios, this.basePath));
|
|
3042
3113
|
}
|
|
3043
3114
|
}
|
|
3044
3115
|
const Un = {
|
|
@@ -3470,7 +3541,7 @@ const ia = function(l) {
|
|
|
3470
3541
|
};
|
|
3471
3542
|
}
|
|
3472
3543
|
};
|
|
3473
|
-
},
|
|
3544
|
+
}, q = function(l) {
|
|
3474
3545
|
const r = ia(l);
|
|
3475
3546
|
return {
|
|
3476
3547
|
/**
|
|
@@ -3523,7 +3594,7 @@ const ia = function(l) {
|
|
|
3523
3594
|
}
|
|
3524
3595
|
};
|
|
3525
3596
|
}, En = function(l, r, a) {
|
|
3526
|
-
const n =
|
|
3597
|
+
const n = q(l);
|
|
3527
3598
|
return {
|
|
3528
3599
|
/**
|
|
3529
3600
|
* **DEPRECATED**: removed with the other notebook routes. For a `.malloy` report, run a cell through the model query endpoint instead: the report\'s path as the model, the cell\'s `text` (from get-report) as `query`, and `givens` in the body, which applies the same surface, `#(authorize)` and row-level gates. A `.malloynb` has no other route. Executes a specific cell in a linear report by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. A linear `.malloy` report, wherever it lives, answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
|
|
@@ -3589,7 +3660,7 @@ class la extends I {
|
|
|
3589
3660
|
* @throws {RequiredError}
|
|
3590
3661
|
*/
|
|
3591
3662
|
executeNotebookCell(r, a, n, e, t, s, o, i, c) {
|
|
3592
|
-
return
|
|
3663
|
+
return q(this.configuration).executeNotebookCell(r, a, n, e, t, s, o, i, c).then((p) => p(this.axios, this.basePath));
|
|
3593
3664
|
}
|
|
3594
3665
|
/**
|
|
3595
3666
|
* **DEPRECATED**: use get-report. Retrieves a linear report with its raw cell contents (markdown and code). A `.malloy` report\'s cells run through the model query endpoint (each cell\'s `text` as the query); a `.malloynb`\'s through execute-notebook-cell. A linear `.malloy` report, wherever it lives, answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
|
|
@@ -3603,7 +3674,7 @@ class la extends I {
|
|
|
3603
3674
|
* @throws {RequiredError}
|
|
3604
3675
|
*/
|
|
3605
3676
|
getNotebook(r, a, n, e, t) {
|
|
3606
|
-
return
|
|
3677
|
+
return q(this.configuration).getNotebook(r, a, n, e, t).then((s) => s(this.axios, this.basePath));
|
|
3607
3678
|
}
|
|
3608
3679
|
/**
|
|
3609
3680
|
* **DEPRECATED**: use list-reports. Lists the package\'s linear reports (see list-reports): every `.malloynb` file outside `public/`, and every tagged `.malloy` report whose layout is linear, wherever it lives. Each entry includes the relative path, package name, title, description, and any compilation or reading error. **Contract change since reports.** This route used to list `.malloy` notebooks only directly under `notebooks/`. It now lists linear reports from anywhere in the package, including `dashboards/` and nested directories, and no longer lists a kindless tiled file in `notebooks/`, which is now grid.
|
|
@@ -3616,7 +3687,7 @@ class la extends I {
|
|
|
3616
3687
|
* @throws {RequiredError}
|
|
3617
3688
|
*/
|
|
3618
3689
|
listNotebooks(r, a, n, e) {
|
|
3619
|
-
return
|
|
3690
|
+
return q(this.configuration).listNotebooks(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
3620
3691
|
}
|
|
3621
3692
|
}
|
|
3622
3693
|
const fn = {
|
|
@@ -5048,7 +5119,7 @@ const ba = function(l) {
|
|
|
5048
5119
|
};
|
|
5049
5120
|
}
|
|
5050
5121
|
};
|
|
5051
|
-
},
|
|
5122
|
+
}, E = function(l) {
|
|
5052
5123
|
const r = ba(l);
|
|
5053
5124
|
return {
|
|
5054
5125
|
/**
|
|
@@ -5131,8 +5202,8 @@ const ba = function(l) {
|
|
|
5131
5202
|
return (p, d) => S(o, u, g, l)(p, c || d);
|
|
5132
5203
|
}
|
|
5133
5204
|
};
|
|
5134
|
-
},
|
|
5135
|
-
const n =
|
|
5205
|
+
}, zn = function(l, r, a) {
|
|
5206
|
+
const n = E(l);
|
|
5136
5207
|
return {
|
|
5137
5208
|
/**
|
|
5138
5209
|
* Removes one version for good, where an archive only takes it out of service. The version is unloaded from memory, and its row and its files are deleted; other versions are untouched. Then, in the background, its own auto-runs still running are stopped and the tables its own auto-runs built under `scope: version` are reclaimed with their run records, as an archive reclaims them. Nothing is dropped before the delete commits, so a refused delete changes nothing. It cannot be undone, and it frees the version id: a later publish of the same version is a new version, with whatever content it carries. An archived version can be deleted too; that is how its files are reclaimed. Deleting the package\'s only version deletes the package with it (its row, run records and ledger), so no package is left with no version; while a publish of another version of the package is running, the package is left to that publish. Each table is tried once: one that could not be dropped is left. Tables another run of the package still references are kept, as is an orchestrated run (its tables, and a build of it still running), which the caller that instructed it owns. A delete is refused with 409 when: - the version is the package\'s `latest` and other versions remain (`reason` `VERSION_IS_LATEST`): move `latest` first; - it is the package\'s last version in service and archived versions remain (`reason` `VERSION_IS_LAST_ACTIVE`): a package that has versions always keeps one in service. Delete the archived versions first, or delete the package.
|
|
@@ -5220,7 +5291,7 @@ class va extends I {
|
|
|
5220
5291
|
* @throws {RequiredError}
|
|
5221
5292
|
*/
|
|
5222
5293
|
deletePackageVersion(r, a, n, e) {
|
|
5223
|
-
return
|
|
5294
|
+
return E(this.configuration).deletePackageVersion(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
5224
5295
|
}
|
|
5225
5296
|
/**
|
|
5226
5297
|
* Returns one published version, archived or not. An unknown version answers 404 with `reason` `VERSION_NOT_FOUND`.
|
|
@@ -5232,7 +5303,7 @@ class va extends I {
|
|
|
5232
5303
|
* @throws {RequiredError}
|
|
5233
5304
|
*/
|
|
5234
5305
|
getPackageVersion(r, a, n, e) {
|
|
5235
|
-
return
|
|
5306
|
+
return E(this.configuration).getPackageVersion(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
5236
5307
|
}
|
|
5237
5308
|
/**
|
|
5238
5309
|
* Lists every version published to the package, highest version first, including archived ones (marked by `archiveStatus`). The entry marked `latest` is the version served when a request names no `versionId`. An unversioned package (one registered from a directory, mounted in a watched environment, or loaded or published with versioning off) has no versions and returns an empty list.
|
|
@@ -5243,7 +5314,7 @@ class va extends I {
|
|
|
5243
5314
|
* @throws {RequiredError}
|
|
5244
5315
|
*/
|
|
5245
5316
|
listPackageVersions(r, a, n) {
|
|
5246
|
-
return
|
|
5317
|
+
return E(this.configuration).listPackageVersions(r, a, n).then((e) => e(this.axios, this.basePath));
|
|
5247
5318
|
}
|
|
5248
5319
|
/**
|
|
5249
5320
|
* Makes the named version the package\'s `latest`: the version served to every request that names no `versionId`. Nothing is rebuilt or re-fetched; the pointer moves. Pointing it at an earlier version is a rollback, and the next publish still moves `latest` under `versionPromotion: \"on-publish\"`. This is the only way `latest` moves when the server runs with `versionPromotion: \"explicit\"`, the mode for an orchestrator that decides when a version is ready to serve. The version must exist and must not be archived (404 `VERSION_NOT_FOUND`, 410 `VERSION_ARCHIVED`), and it is loaded before the pointer moves: a version that fails to load is refused with that load\'s error, and `latest` stays where it was.
|
|
@@ -5255,7 +5326,7 @@ class va extends I {
|
|
|
5255
5326
|
* @throws {RequiredError}
|
|
5256
5327
|
*/
|
|
5257
5328
|
setPackageLatestVersion(r, a, n, e) {
|
|
5258
|
-
return
|
|
5329
|
+
return E(this.configuration).setPackageLatestVersion(r, a, n, e).then((t) => t(this.axios, this.basePath));
|
|
5259
5330
|
}
|
|
5260
5331
|
/**
|
|
5261
5332
|
* Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. Only this version is affected. A version is owned by the host from then on once a manifest it named, by this route or by a publish, has bound (one whose fetch fails marks nothing), or once a run it instructed with `buildInstructions` has run, even one whose commit failed. The version\'s record keeps that across an unload and a restart. A null `manifestLocation` then clears the binding and the version serves live: this server never binds tables its own runs built for it, so a host can clear the binding before it drops the tables the manifest named. A reload or restart of that version keeps it live until the host binds a manifest again, and the version answers a local run without `buildInstructions` with 409. Its status reports it the way it reports a version with nothing bound: `manifestBindingStatus` `unbound`, `manifestEntryCount` 0 and `boundManifestUri` null. A version no host has bound (standalone, or built only by this server\'s own runs) serves what this server\'s own runs built for it when its binding is cleared, or live when they built nothing, as it does when it loads. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
|
|
@@ -5268,7 +5339,7 @@ class va extends I {
|
|
|
5268
5339
|
* @throws {RequiredError}
|
|
5269
5340
|
*/
|
|
5270
5341
|
setPackageVersionManifest(r, a, n, e, t) {
|
|
5271
|
-
return
|
|
5342
|
+
return E(this.configuration).setPackageVersionManifest(r, a, n, e, t).then((s) => s(this.axios, this.basePath));
|
|
5272
5343
|
}
|
|
5273
5344
|
/**
|
|
5274
5345
|
* Changes a version\'s lifecycle state. Content is never edited here: a published version is immutable. - `archive` takes the version out of service: reads and queries that name it answer 410 with `reason` `VERSION_ARCHIVED`, and it is unloaded from memory. The tables its own auto-runs built under `scope: version` are reclaimed in the background, with their run records; tables another version\'s run still references are kept, and so are an orchestrated run\'s, whose names and lifetime the caller that assigned them owns. Each table is tried once: one that cannot be dropped is left, and its run record goes all the same. Its files stay on disk, so it can be unarchived. To remove them, delete the version with `DELETE .../versions/{version}`. - `unarchive` puts it back in service. It loads again on its next read, and serves live until it is built again. Archiving stops the version\'s materialization schedule, if it has one, and unarchiving starts it again. An archive is refused with 409 when: - the version is the package\'s `latest` (`reason` `VERSION_IS_LATEST`): move `latest` first; - it is the package\'s last version in service (`reason` `VERSION_IS_LAST_ACTIVE`): a package always keeps one. To take the whole package out of service, delete it; - a materialization of that version is running (`reason` `VERSION_BUILDING`), since the archive would reclaim the tables that run is writing. A run that starts after the archive fails, and what it built is reclaimed when it ends. Sending the state the version is already in changes nothing and answers 200.
|
|
@@ -5281,7 +5352,7 @@ class va extends I {
|
|
|
5281
5352
|
* @throws {RequiredError}
|
|
5282
5353
|
*/
|
|
5283
5354
|
updatePackageVersion(r, a, n, e, t) {
|
|
5284
|
-
return
|
|
5355
|
+
return E(this.configuration).updatePackageVersion(r, a, n, e, t).then((s) => s(this.axios, this.basePath));
|
|
5285
5356
|
}
|
|
5286
5357
|
}
|
|
5287
5358
|
const Va = function(l) {
|
|
@@ -5419,7 +5490,7 @@ const Va = function(l) {
|
|
|
5419
5490
|
return (c, p) => S(s, u, g, l)(c, i || p);
|
|
5420
5491
|
}
|
|
5421
5492
|
};
|
|
5422
|
-
},
|
|
5493
|
+
}, Qn = function(l, r, a) {
|
|
5423
5494
|
const n = L(l);
|
|
5424
5495
|
return {
|
|
5425
5496
|
/**
|
|
@@ -5604,7 +5675,7 @@ const Oa = new ye({
|
|
|
5604
5675
|
throwOnError: !1
|
|
5605
5676
|
}
|
|
5606
5677
|
}
|
|
5607
|
-
}),
|
|
5678
|
+
}), _n = {
|
|
5608
5679
|
staleTime: 300 * 1e3,
|
|
5609
5680
|
refetchOnWindowFocus: !1,
|
|
5610
5681
|
refetchOnReconnect: !1
|
|
@@ -5673,7 +5744,7 @@ const Pe = ce(void 0), xa = (l, r, a) => {
|
|
|
5673
5744
|
watchMode: new Sa(t, n, e),
|
|
5674
5745
|
versions: new va(t, n, e)
|
|
5675
5746
|
};
|
|
5676
|
-
},
|
|
5747
|
+
}, qn = (l) => /* @__PURE__ */ z(Ce, { client: Oa, children: /* @__PURE__ */ z(Na, { ...l }) }), Na = ({
|
|
5677
5748
|
children: l,
|
|
5678
5749
|
getAccessToken: r,
|
|
5679
5750
|
baseURL: a,
|
|
@@ -5706,11 +5777,11 @@ const Pe = ce(void 0), xa = (l, r, a) => {
|
|
|
5706
5777
|
), [te, Ve] = oe(Ra);
|
|
5707
5778
|
Re(() => {
|
|
5708
5779
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
5709
|
-
const
|
|
5710
|
-
return
|
|
5780
|
+
const w = window.matchMedia("(prefers-color-scheme: dark)"), re = (Ae) => Ve(Ae.matches);
|
|
5781
|
+
return w.addEventListener("change", re), () => w.removeEventListener("change", re);
|
|
5711
5782
|
}, []);
|
|
5712
|
-
const Se = xe((
|
|
5713
|
-
ve(
|
|
5783
|
+
const Se = xe((w) => {
|
|
5784
|
+
ve(w), Ia(w);
|
|
5714
5785
|
}, []), ne = h?.allowUserToggle ?? !0, G = ne ? be : void 0, ke = B(
|
|
5715
5786
|
() => o ?? Le(
|
|
5716
5787
|
h?.defaultMode,
|
|
@@ -5727,8 +5798,8 @@ const Pe = ce(void 0), xa = (l, r, a) => {
|
|
|
5727
5798
|
instanceTheme: h,
|
|
5728
5799
|
modelPage: k
|
|
5729
5800
|
};
|
|
5730
|
-
return /* @__PURE__ */
|
|
5731
|
-
|
|
5801
|
+
return /* @__PURE__ */ z(Pe.Provider, { value: Oe, children: /* @__PURE__ */ z(
|
|
5802
|
+
ze,
|
|
5732
5803
|
{
|
|
5733
5804
|
layers: N,
|
|
5734
5805
|
mode: ke,
|
|
@@ -5764,7 +5835,7 @@ export {
|
|
|
5764
5835
|
ta as O,
|
|
5765
5836
|
aa as P,
|
|
5766
5837
|
xn as Q,
|
|
5767
|
-
|
|
5838
|
+
M as R,
|
|
5768
5839
|
fn as S,
|
|
5769
5840
|
it as T,
|
|
5770
5841
|
lt as U,
|
|
@@ -5774,7 +5845,7 @@ export {
|
|
|
5774
5845
|
dt as Y,
|
|
5775
5846
|
ut as Z,
|
|
5776
5847
|
mt as _,
|
|
5777
|
-
|
|
5848
|
+
qe as a,
|
|
5778
5849
|
tn as a$,
|
|
5779
5850
|
ht as a0,
|
|
5780
5851
|
Un as a1,
|
|
@@ -5783,7 +5854,7 @@ export {
|
|
|
5783
5854
|
ra as a4,
|
|
5784
5855
|
na as a5,
|
|
5785
5856
|
Nn as a6,
|
|
5786
|
-
|
|
5857
|
+
T as a7,
|
|
5787
5858
|
vt as a8,
|
|
5788
5859
|
sa as a9,
|
|
5789
5860
|
jt as aA,
|
|
@@ -5793,14 +5864,14 @@ export {
|
|
|
5793
5864
|
ca as aE,
|
|
5794
5865
|
wn as aF,
|
|
5795
5866
|
x as aG,
|
|
5796
|
-
|
|
5797
|
-
|
|
5867
|
+
zt as aH,
|
|
5868
|
+
Qt as aI,
|
|
5798
5869
|
ma as aJ,
|
|
5799
5870
|
da as aK,
|
|
5800
5871
|
Mn as aL,
|
|
5801
5872
|
D as aM,
|
|
5802
|
-
|
|
5803
|
-
|
|
5873
|
+
_t as aN,
|
|
5874
|
+
qt as aO,
|
|
5804
5875
|
Ht as aP,
|
|
5805
5876
|
Gt as aQ,
|
|
5806
5877
|
Wt as aR,
|
|
@@ -5823,7 +5894,7 @@ export {
|
|
|
5823
5894
|
la as ah,
|
|
5824
5895
|
ia as ai,
|
|
5825
5896
|
En as aj,
|
|
5826
|
-
|
|
5897
|
+
q as ak,
|
|
5827
5898
|
At as al,
|
|
5828
5899
|
xt as am,
|
|
5829
5900
|
Nt as an,
|
|
@@ -5855,25 +5926,25 @@ export {
|
|
|
5855
5926
|
Hn as bC,
|
|
5856
5927
|
De as bD,
|
|
5857
5928
|
de as bE,
|
|
5858
|
-
|
|
5929
|
+
qa as bF,
|
|
5859
5930
|
U as bG,
|
|
5860
5931
|
Fa as bH,
|
|
5861
5932
|
Ma as bI,
|
|
5862
5933
|
R as bJ,
|
|
5863
5934
|
La as bK,
|
|
5864
5935
|
Da as bL,
|
|
5865
|
-
|
|
5866
|
-
|
|
5936
|
+
za as bM,
|
|
5937
|
+
Qa as bN,
|
|
5867
5938
|
Ba as bO,
|
|
5868
5939
|
ja as bP,
|
|
5869
5940
|
Y as bQ,
|
|
5870
|
-
|
|
5941
|
+
ze as bR,
|
|
5871
5942
|
ie as bS,
|
|
5872
|
-
|
|
5943
|
+
_a as bT,
|
|
5873
5944
|
Ee as bU,
|
|
5874
5945
|
Le as bV,
|
|
5875
|
-
|
|
5876
|
-
|
|
5946
|
+
_n as bW,
|
|
5947
|
+
qn as ba,
|
|
5877
5948
|
un as bb,
|
|
5878
5949
|
dn as bc,
|
|
5879
5950
|
mn as bd,
|
|
@@ -5893,13 +5964,13 @@ export {
|
|
|
5893
5964
|
Vn as br,
|
|
5894
5965
|
va as bs,
|
|
5895
5966
|
ba as bt,
|
|
5896
|
-
|
|
5897
|
-
|
|
5967
|
+
zn as bu,
|
|
5968
|
+
E as bv,
|
|
5898
5969
|
Sa as bw,
|
|
5899
5970
|
Va as bx,
|
|
5900
|
-
|
|
5971
|
+
Qn as by,
|
|
5901
5972
|
L as bz,
|
|
5902
|
-
|
|
5973
|
+
_ as c,
|
|
5903
5974
|
Ga as d,
|
|
5904
5975
|
Wa as e,
|
|
5905
5976
|
$a as f,
|