@malloy-publisher/sdk 0.0.217 → 0.0.219
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/{ServerProvider-n2G52vS7.es.js → ServerProvider-DaYKdCxq.es.js} +126 -114
- package/dist/ServerProvider-RXwIqb5f.cjs.js +1 -0
- package/dist/client/api.d.ts +132 -0
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +58 -55
- package/dist/{core-DiLT6QvL.es.js → core-BiGj7BML.es.js} +1 -1
- package/dist/{core-CJddZwwz.cjs.js → core-CnTkTGYk.cjs.js} +1 -1
- package/dist/{index-CyjzjJGF.es.js → index-BTfp6uRs.es.js} +2 -2
- package/dist/{index-CBEVTU48.cjs.js → index-CQMDeQ_C.cjs.js} +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +2 -2
- package/package.json +1 -1
- package/dist/ServerProvider-CPvSRdUp.cjs.js +0 -1
|
@@ -3,7 +3,7 @@ import { QueryClient as L, QueryClientProvider as H } from "@tanstack/react-quer
|
|
|
3
3
|
import h from "axios";
|
|
4
4
|
import { useContext as D, createContext as W, useMemo as f, useState as $, useEffect as G } from "react";
|
|
5
5
|
const u = "http://localhost/api/v0".replace(/\/+$/, "");
|
|
6
|
-
class
|
|
6
|
+
class I {
|
|
7
7
|
constructor(r, e = u, t = h) {
|
|
8
8
|
this.basePath = e, this.axios = t, r && (this.configuration = r, this.basePath = r.basePath ?? e);
|
|
9
9
|
}
|
|
@@ -36,14 +36,14 @@ const g = function(l, ...r) {
|
|
|
36
36
|
const o = { ...l.options, url: (a.defaults.baseURL ? "" : t?.basePath ?? n) + l.url };
|
|
37
37
|
return a.request(o);
|
|
38
38
|
};
|
|
39
|
-
},
|
|
39
|
+
}, ye = {
|
|
40
40
|
Bigquery: "bigquery",
|
|
41
41
|
Snowflake: "snowflake",
|
|
42
42
|
Postgres: "postgres",
|
|
43
43
|
Gcs: "gcs",
|
|
44
44
|
S3: "s3",
|
|
45
45
|
Azure: "azure"
|
|
46
|
-
},
|
|
46
|
+
}, Ie = {
|
|
47
47
|
ServicePrincipal: "service_principal",
|
|
48
48
|
SasToken: "sas_token"
|
|
49
49
|
}, Ce = {
|
|
@@ -65,47 +65,56 @@ const g = function(l, ...r) {
|
|
|
65
65
|
Ducklake: "ducklake",
|
|
66
66
|
Publisher: "publisher"
|
|
67
67
|
}, Ne = {
|
|
68
|
+
Ssh: "ssh"
|
|
69
|
+
}, Re = {
|
|
68
70
|
Ok: "ok",
|
|
69
71
|
Failed: "failed"
|
|
70
|
-
},
|
|
72
|
+
}, Ue = {
|
|
71
73
|
Embedded: "embedded",
|
|
72
74
|
Materialized: "materialized"
|
|
73
|
-
},
|
|
75
|
+
}, Te = {
|
|
74
76
|
Equal: "equal",
|
|
75
77
|
In: "in",
|
|
76
78
|
Like: "like",
|
|
77
79
|
GreaterThan: "greater_than",
|
|
78
80
|
LessThan: "less_than"
|
|
79
|
-
},
|
|
81
|
+
}, we = {
|
|
80
82
|
Debug: "debug",
|
|
81
83
|
Info: "info",
|
|
82
84
|
Warn: "warn",
|
|
83
85
|
Error: "error"
|
|
84
|
-
},
|
|
86
|
+
}, Ee = {
|
|
85
87
|
Pending: "PENDING",
|
|
86
88
|
ManifestRowsReady: "MANIFEST_ROWS_READY",
|
|
87
89
|
ManifestFileReady: "MANIFEST_FILE_READY",
|
|
88
90
|
Failed: "FAILED",
|
|
89
91
|
Cancelled: "CANCELLED"
|
|
90
|
-
}, Ee = {
|
|
91
|
-
Markdown: "markdown",
|
|
92
|
-
Code: "code"
|
|
93
92
|
}, Me = {
|
|
94
93
|
Markdown: "markdown",
|
|
95
94
|
Code: "code"
|
|
96
95
|
}, Qe = {
|
|
96
|
+
Markdown: "markdown",
|
|
97
|
+
Code: "code"
|
|
98
|
+
}, $e = {
|
|
97
99
|
Declared: "declared",
|
|
98
100
|
All: "all"
|
|
99
|
-
},
|
|
101
|
+
}, Be = {
|
|
100
102
|
Unbound: "unbound",
|
|
101
103
|
Bound: "bound",
|
|
102
104
|
LiveFallback: "live_fallback"
|
|
103
|
-
}, Be = {
|
|
104
|
-
Viewport: "viewport"
|
|
105
105
|
}, Fe = {
|
|
106
|
+
Error: "error",
|
|
107
|
+
Warn: "warn"
|
|
108
|
+
}, qe = {
|
|
109
|
+
Viewport: "viewport"
|
|
110
|
+
}, ze = {
|
|
111
|
+
Disable: "disable",
|
|
112
|
+
NoVerify: "no-verify",
|
|
113
|
+
VerifyCa: "verify-ca"
|
|
114
|
+
}, je = {
|
|
106
115
|
Snapshot: "SNAPSHOT",
|
|
107
116
|
Copy: "COPY"
|
|
108
|
-
},
|
|
117
|
+
}, Le = {
|
|
109
118
|
Initializing: "initializing",
|
|
110
119
|
Serving: "serving",
|
|
111
120
|
Draining: "draining",
|
|
@@ -217,8 +226,8 @@ const g = function(l, ...r) {
|
|
|
217
226
|
l && (i = l.baseOptions);
|
|
218
227
|
const p = { method: "GET", ...i, ...o }, m = {};
|
|
219
228
|
g(c, {});
|
|
220
|
-
let
|
|
221
|
-
return p.headers = { ...m, ...
|
|
229
|
+
let y = i && i.headers ? i.headers : {};
|
|
230
|
+
return p.headers = { ...m, ...y, ...o.headers }, {
|
|
222
231
|
url: v(c),
|
|
223
232
|
options: p
|
|
224
233
|
};
|
|
@@ -327,8 +336,8 @@ const g = function(l, ...r) {
|
|
|
327
336
|
l && (i = l.baseOptions);
|
|
328
337
|
const p = { method: "GET", ...i, ...o }, m = {}, b = {};
|
|
329
338
|
n && (b.tableNames = n), g(c, b);
|
|
330
|
-
let
|
|
331
|
-
return p.headers = { ...m, ...
|
|
339
|
+
let y = i && i.headers ? i.headers : {};
|
|
340
|
+
return p.headers = { ...m, ...y, ...o.headers }, {
|
|
332
341
|
url: v(c),
|
|
333
342
|
options: p
|
|
334
343
|
};
|
|
@@ -720,7 +729,7 @@ const g = function(l, ...r) {
|
|
|
720
729
|
return (i, p) => O(o, h, u, l)(i, c || p);
|
|
721
730
|
}
|
|
722
731
|
};
|
|
723
|
-
},
|
|
732
|
+
}, He = function(l, r, e) {
|
|
724
733
|
const t = S(l);
|
|
725
734
|
return {
|
|
726
735
|
/**
|
|
@@ -933,7 +942,7 @@ const g = function(l, ...r) {
|
|
|
933
942
|
}
|
|
934
943
|
};
|
|
935
944
|
};
|
|
936
|
-
class J extends
|
|
945
|
+
class J extends I {
|
|
937
946
|
/**
|
|
938
947
|
* Creates a new database connection in the specified environment.
|
|
939
948
|
* @summary Create a new database connection
|
|
@@ -1198,7 +1207,7 @@ const K = function(l) {
|
|
|
1198
1207
|
return (s, c) => O(a, h, u, l)(s, o || c);
|
|
1199
1208
|
}
|
|
1200
1209
|
};
|
|
1201
|
-
},
|
|
1210
|
+
}, De = function(l, r, e) {
|
|
1202
1211
|
const t = B(l);
|
|
1203
1212
|
return {
|
|
1204
1213
|
/**
|
|
@@ -1213,7 +1222,7 @@ const K = function(l) {
|
|
|
1213
1222
|
}
|
|
1214
1223
|
};
|
|
1215
1224
|
};
|
|
1216
|
-
class
|
|
1225
|
+
class We extends I {
|
|
1217
1226
|
/**
|
|
1218
1227
|
* Validates a database connection configuration without adding it to any environment. This endpoint allows you to test connection parameters, credentials, and network connectivity before committing the connection to an environment. Useful for troubleshooting connection issues and validating configurations during setup.
|
|
1219
1228
|
* @summary Test database connection configuration
|
|
@@ -1268,7 +1277,7 @@ const X = function(l) {
|
|
|
1268
1277
|
return (i, p) => O(o, h, u, l)(i, c || p);
|
|
1269
1278
|
}
|
|
1270
1279
|
};
|
|
1271
|
-
},
|
|
1280
|
+
}, fe = function(l, r, e) {
|
|
1272
1281
|
const t = F(l);
|
|
1273
1282
|
return {
|
|
1274
1283
|
/**
|
|
@@ -1285,7 +1294,7 @@ const X = function(l) {
|
|
|
1285
1294
|
}
|
|
1286
1295
|
};
|
|
1287
1296
|
};
|
|
1288
|
-
class Z extends
|
|
1297
|
+
class Z extends I {
|
|
1289
1298
|
/**
|
|
1290
1299
|
* Retrieves a list of all embedded databases within the specified package. These are typically DuckDB databases stored as .parquet files that provide local data storage for the package. Each database entry includes metadata about the database structure and content.
|
|
1291
1300
|
* @summary List embedded databases
|
|
@@ -1463,7 +1472,7 @@ const ee = function(l) {
|
|
|
1463
1472
|
return (c, i) => O(n, h, u, l)(c, s || i);
|
|
1464
1473
|
}
|
|
1465
1474
|
};
|
|
1466
|
-
},
|
|
1475
|
+
}, Ge = function(l, r, e) {
|
|
1467
1476
|
const t = x(l);
|
|
1468
1477
|
return {
|
|
1469
1478
|
/**
|
|
@@ -1519,7 +1528,7 @@ const ee = function(l) {
|
|
|
1519
1528
|
}
|
|
1520
1529
|
};
|
|
1521
1530
|
};
|
|
1522
|
-
class ae extends
|
|
1531
|
+
class ae extends I {
|
|
1523
1532
|
/**
|
|
1524
1533
|
* 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.
|
|
1525
1534
|
* @summary Create a new environment
|
|
@@ -1765,7 +1774,7 @@ const te = function(l) {
|
|
|
1765
1774
|
return (p, m) => O(s, h, u, l)(p, i || m);
|
|
1766
1775
|
}
|
|
1767
1776
|
};
|
|
1768
|
-
},
|
|
1777
|
+
}, _e = function(l, r, e) {
|
|
1769
1778
|
const t = N(l);
|
|
1770
1779
|
return {
|
|
1771
1780
|
/**
|
|
@@ -1833,7 +1842,7 @@ const te = function(l) {
|
|
|
1833
1842
|
}
|
|
1834
1843
|
};
|
|
1835
1844
|
};
|
|
1836
|
-
class ne extends
|
|
1845
|
+
class ne extends I {
|
|
1837
1846
|
/**
|
|
1838
1847
|
* 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.
|
|
1839
1848
|
* @summary Create a materialization
|
|
@@ -1903,7 +1912,7 @@ class ne extends y {
|
|
|
1903
1912
|
return N(this.configuration).materializationAction(r, e, t, a, n).then((o) => o(this.axios, this.basePath));
|
|
1904
1913
|
}
|
|
1905
1914
|
}
|
|
1906
|
-
const
|
|
1915
|
+
const Ye = {
|
|
1907
1916
|
Stop: "stop"
|
|
1908
1917
|
}, re = function(l) {
|
|
1909
1918
|
return {
|
|
@@ -2058,7 +2067,7 @@ const fe = {
|
|
|
2058
2067
|
return (i, p) => O(o, h, u, l)(i, c || p);
|
|
2059
2068
|
}
|
|
2060
2069
|
};
|
|
2061
|
-
},
|
|
2070
|
+
}, Je = function(l, r, e) {
|
|
2062
2071
|
const t = U(l);
|
|
2063
2072
|
return {
|
|
2064
2073
|
/**
|
|
@@ -2114,7 +2123,7 @@ const fe = {
|
|
|
2114
2123
|
}
|
|
2115
2124
|
};
|
|
2116
2125
|
};
|
|
2117
|
-
class oe extends
|
|
2126
|
+
class oe extends I {
|
|
2118
2127
|
/**
|
|
2119
2128
|
* Compiles Malloy source code in the context of a specific model file. The submitted source is appended to the full model content, giving it access to all sources, imports, and queries defined in the model. Relative imports resolve correctly against sibling model files. Returns compilation status and any problems (errors or warnings) found.
|
|
2120
2129
|
* @summary Compile Malloy source code
|
|
@@ -2192,12 +2201,12 @@ const se = function(l) {
|
|
|
2192
2201
|
const p = "/environments/{environmentName}/packages/{packageName}/notebooks/{path}/cells/{cellIndex}".replace("{environmentName}", encodeURIComponent(String(r))).replace("{packageName}", encodeURIComponent(String(e))).replace("{path}", encodeURIComponent(String(t))).replace("{cellIndex}", encodeURIComponent(String(a))), m = new URL(p, V);
|
|
2193
2202
|
let b;
|
|
2194
2203
|
l && (b = l.baseOptions);
|
|
2195
|
-
const
|
|
2204
|
+
const y = { method: "GET", ...b, ...i }, w = {}, C = {};
|
|
2196
2205
|
n !== void 0 && (C.versionId = n), o !== void 0 && (C.filter_params = o), s !== void 0 && (C.bypass_filters = s), c !== void 0 && (C.givens = c), g(m, C);
|
|
2197
2206
|
let A = b && b.headers ? b.headers : {};
|
|
2198
|
-
return
|
|
2207
|
+
return y.headers = { ...w, ...A, ...i.headers }, {
|
|
2199
2208
|
url: v(m),
|
|
2200
|
-
options:
|
|
2209
|
+
options: y
|
|
2201
2210
|
};
|
|
2202
2211
|
},
|
|
2203
2212
|
/**
|
|
@@ -2264,8 +2273,8 @@ const se = function(l) {
|
|
|
2264
2273
|
* @throws {RequiredError}
|
|
2265
2274
|
*/
|
|
2266
2275
|
async executeNotebookCell(e, t, a, n, o, s, c, i, p) {
|
|
2267
|
-
const m = await r.executeNotebookCell(e, t, a, n, o, s, c, i, p), b = l?.serverIndex ?? 0,
|
|
2268
|
-
return (w, C) => O(m, h, u, l)(w,
|
|
2276
|
+
const m = await r.executeNotebookCell(e, t, a, n, o, s, c, i, p), b = l?.serverIndex ?? 0, y = P["NotebooksApi.executeNotebookCell"]?.[b]?.url;
|
|
2277
|
+
return (w, C) => O(m, h, u, l)(w, y || C);
|
|
2269
2278
|
},
|
|
2270
2279
|
/**
|
|
2271
2280
|
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
|
|
@@ -2295,7 +2304,7 @@ const se = function(l) {
|
|
|
2295
2304
|
return (i, p) => O(o, h, u, l)(i, c || p);
|
|
2296
2305
|
}
|
|
2297
2306
|
};
|
|
2298
|
-
},
|
|
2307
|
+
}, Ke = function(l, r, e) {
|
|
2299
2308
|
const t = E(l);
|
|
2300
2309
|
return {
|
|
2301
2310
|
/**
|
|
@@ -2313,7 +2322,7 @@ const se = function(l) {
|
|
|
2313
2322
|
* @throws {RequiredError}
|
|
2314
2323
|
*/
|
|
2315
2324
|
executeNotebookCell(a, n, o, s, c, i, p, m, b) {
|
|
2316
|
-
return t.executeNotebookCell(a, n, o, s, c, i, p, m, b).then((
|
|
2325
|
+
return t.executeNotebookCell(a, n, o, s, c, i, p, m, b).then((y) => y(e, r));
|
|
2317
2326
|
},
|
|
2318
2327
|
/**
|
|
2319
2328
|
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
|
|
@@ -2342,7 +2351,7 @@ const se = function(l) {
|
|
|
2342
2351
|
}
|
|
2343
2352
|
};
|
|
2344
2353
|
};
|
|
2345
|
-
class ce extends
|
|
2354
|
+
class ce extends I {
|
|
2346
2355
|
/**
|
|
2347
2356
|
* Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content.
|
|
2348
2357
|
* @summary Execute a specific notebook cell
|
|
@@ -2389,7 +2398,7 @@ class ce extends y {
|
|
|
2389
2398
|
return E(this.configuration).listNotebooks(r, e, t, a).then((n) => n(this.axios, this.basePath));
|
|
2390
2399
|
}
|
|
2391
2400
|
}
|
|
2392
|
-
const
|
|
2401
|
+
const Xe = {
|
|
2393
2402
|
True: "true",
|
|
2394
2403
|
False: "false"
|
|
2395
2404
|
}, le = function(l) {
|
|
@@ -2568,7 +2577,7 @@ const Ye = {
|
|
|
2568
2577
|
return (i, p) => O(o, h, u, l)(i, c || p);
|
|
2569
2578
|
}
|
|
2570
2579
|
};
|
|
2571
|
-
},
|
|
2580
|
+
}, Ze = function(l, r, e) {
|
|
2572
2581
|
const t = R(l);
|
|
2573
2582
|
return {
|
|
2574
2583
|
/**
|
|
@@ -2630,7 +2639,7 @@ const Ye = {
|
|
|
2630
2639
|
}
|
|
2631
2640
|
};
|
|
2632
2641
|
};
|
|
2633
|
-
class ie extends
|
|
2642
|
+
class ie extends I {
|
|
2634
2643
|
/**
|
|
2635
2644
|
* Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content.
|
|
2636
2645
|
* @summary Create a new package
|
|
@@ -2734,7 +2743,7 @@ const pe = function(l) {
|
|
|
2734
2743
|
return (c, i) => O(n, h, u, l)(c, s || i);
|
|
2735
2744
|
}
|
|
2736
2745
|
};
|
|
2737
|
-
},
|
|
2746
|
+
}, ea = function(l, r, e) {
|
|
2738
2747
|
const t = q(l);
|
|
2739
2748
|
return {
|
|
2740
2749
|
/**
|
|
@@ -2750,7 +2759,7 @@ const pe = function(l) {
|
|
|
2750
2759
|
}
|
|
2751
2760
|
};
|
|
2752
2761
|
};
|
|
2753
|
-
class de extends
|
|
2762
|
+
class de extends I {
|
|
2754
2763
|
/**
|
|
2755
2764
|
* Retrieves a list of all static HTML pages (in-package data apps) within the specified package. Each page entry includes the relative path, the package name, a canonical resource URL, and the page title (extracted from the file\'s <title> tag, falling back to the path). Used by the Publisher SPA to surface a clickable \"Pages\" section on the package detail view, and by anyone who wants to discover in-package data apps programmatically without scraping the directory. Recursive depth is capped server-side to keep this cheap on large packages.
|
|
2756
2765
|
* @summary List package pages
|
|
@@ -2799,7 +2808,7 @@ const me = function(l) {
|
|
|
2799
2808
|
return (o, s) => O(t, h, u, l)(o, n || s);
|
|
2800
2809
|
}
|
|
2801
2810
|
};
|
|
2802
|
-
},
|
|
2811
|
+
}, aa = function(l, r, e) {
|
|
2803
2812
|
const t = z(l);
|
|
2804
2813
|
return {
|
|
2805
2814
|
/**
|
|
@@ -2813,7 +2822,7 @@ const me = function(l) {
|
|
|
2813
2822
|
}
|
|
2814
2823
|
};
|
|
2815
2824
|
};
|
|
2816
|
-
class he extends
|
|
2825
|
+
class he extends I {
|
|
2817
2826
|
/**
|
|
2818
2827
|
* Returns the current status of the Malloy Publisher server, including initialization state, available environments, and server timestamp. This endpoint is useful for health checks and monitoring server availability.
|
|
2819
2828
|
* @summary Get server status and health information
|
|
@@ -2952,7 +2961,7 @@ const ue = function(l) {
|
|
|
2952
2961
|
return (c, i) => O(n, h, u, l)(c, s || i);
|
|
2953
2962
|
}
|
|
2954
2963
|
};
|
|
2955
|
-
},
|
|
2964
|
+
}, ta = function(l, r, e) {
|
|
2956
2965
|
const t = T(l);
|
|
2957
2966
|
return {
|
|
2958
2967
|
/**
|
|
@@ -2996,7 +3005,7 @@ const ue = function(l) {
|
|
|
2996
3005
|
}
|
|
2997
3006
|
};
|
|
2998
3007
|
};
|
|
2999
|
-
class Pe extends
|
|
3008
|
+
class Pe extends I {
|
|
3000
3009
|
/**
|
|
3001
3010
|
* Retrieves the current status of the file watching system. This includes whether watch mode is enabled, which environment is being watched, and the path being monitored. Useful for monitoring the development workflow and ensuring file changes are being detected.
|
|
3002
3011
|
* @summary Get watch mode status
|
|
@@ -3161,7 +3170,7 @@ const j = W(void 0), ve = (l, r) => {
|
|
|
3161
3170
|
),
|
|
3162
3171
|
watchMode: new Pe(a, e, t)
|
|
3163
3172
|
};
|
|
3164
|
-
},
|
|
3173
|
+
}, na = ({
|
|
3165
3174
|
children: l,
|
|
3166
3175
|
getAccessToken: r,
|
|
3167
3176
|
baseURL: e,
|
|
@@ -3175,14 +3184,14 @@ const j = W(void 0), ve = (l, r) => {
|
|
|
3175
3184
|
let m = !0;
|
|
3176
3185
|
return (async () => {
|
|
3177
3186
|
try {
|
|
3178
|
-
const
|
|
3187
|
+
const y = await a.publisher.getStatus();
|
|
3179
3188
|
if (m) {
|
|
3180
|
-
const C =
|
|
3189
|
+
const C = y.data?.frozenConfig;
|
|
3181
3190
|
let A;
|
|
3182
3191
|
C ? A = !1 : t === void 0 ? A = !0 : A = t, s(A), i(!1);
|
|
3183
3192
|
}
|
|
3184
|
-
} catch (
|
|
3185
|
-
console.error("Failed to fetch publisher status:",
|
|
3193
|
+
} catch (y) {
|
|
3194
|
+
console.error("Failed to fetch publisher status:", y), m && (s(t), i(!1));
|
|
3186
3195
|
}
|
|
3187
3196
|
})(), () => {
|
|
3188
3197
|
m = !1;
|
|
@@ -3196,78 +3205,81 @@ const j = W(void 0), ve = (l, r) => {
|
|
|
3196
3205
|
isLoadingStatus: c
|
|
3197
3206
|
};
|
|
3198
3207
|
return /* @__PURE__ */ Q(H, { client: ge, children: /* @__PURE__ */ Q(j.Provider, { value: p, children: l }) });
|
|
3199
|
-
},
|
|
3208
|
+
}, ra = () => {
|
|
3200
3209
|
const l = D(j);
|
|
3201
3210
|
if (l === void 0)
|
|
3202
3211
|
throw new Error("useServer must be used within a ServerProvider");
|
|
3203
3212
|
return l;
|
|
3204
3213
|
};
|
|
3205
3214
|
export {
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3215
|
+
le as $,
|
|
3216
|
+
ye as A,
|
|
3217
|
+
Ge as B,
|
|
3209
3218
|
Ce as C,
|
|
3210
|
-
|
|
3219
|
+
Ue as D,
|
|
3211
3220
|
ee as E,
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3221
|
+
Te as F,
|
|
3222
|
+
ae as G,
|
|
3223
|
+
te as H,
|
|
3224
|
+
N as I,
|
|
3225
|
+
_e as J,
|
|
3226
|
+
ne as K,
|
|
3227
|
+
we as L,
|
|
3228
|
+
Ee as M,
|
|
3229
|
+
Me as N,
|
|
3230
|
+
Ye as O,
|
|
3231
|
+
$e as P,
|
|
3232
|
+
re as Q,
|
|
3233
|
+
je as R,
|
|
3234
|
+
na as S,
|
|
3235
|
+
U as T,
|
|
3236
|
+
Je as U,
|
|
3237
|
+
oe as V,
|
|
3238
|
+
se as W,
|
|
3239
|
+
E as X,
|
|
3240
|
+
Ke as Y,
|
|
3241
|
+
ce as Z,
|
|
3242
|
+
Xe as _,
|
|
3243
|
+
Ie as a,
|
|
3244
|
+
R as a0,
|
|
3245
|
+
Ze as a1,
|
|
3246
|
+
ie as a2,
|
|
3247
|
+
pe as a3,
|
|
3248
|
+
q as a4,
|
|
3249
|
+
ea as a5,
|
|
3250
|
+
de as a6,
|
|
3251
|
+
me as a7,
|
|
3252
|
+
z as a8,
|
|
3253
|
+
aa as a9,
|
|
3254
|
+
he as aa,
|
|
3255
|
+
ue as ab,
|
|
3256
|
+
T as ac,
|
|
3257
|
+
ta as ad,
|
|
3258
|
+
Pe as ae,
|
|
3259
|
+
Ve as af,
|
|
3248
3260
|
Ae as b,
|
|
3249
3261
|
xe as c,
|
|
3250
3262
|
Ne as d,
|
|
3251
|
-
|
|
3252
|
-
|
|
3263
|
+
Re as e,
|
|
3264
|
+
Qe as f,
|
|
3253
3265
|
ge as g,
|
|
3254
3266
|
Be as h,
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3267
|
+
Fe as i,
|
|
3268
|
+
qe as j,
|
|
3269
|
+
ze as k,
|
|
3270
|
+
Le as l,
|
|
3271
|
+
Y as m,
|
|
3272
|
+
S as n,
|
|
3273
|
+
He as o,
|
|
3274
|
+
J as p,
|
|
3275
|
+
K as q,
|
|
3276
|
+
B as r,
|
|
3277
|
+
De as s,
|
|
3278
|
+
We as t,
|
|
3279
|
+
ra as u,
|
|
3280
|
+
X as v,
|
|
3281
|
+
F as w,
|
|
3282
|
+
fe as x,
|
|
3283
|
+
Z as y,
|
|
3284
|
+
x as z
|
|
3273
3285
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const q=require("react/jsx-runtime"),j=require("@tanstack/react-query"),h=require("axios"),U=require("react"),u="http://localhost/api/v0".replace(/\/+$/,"");class k{constructor(r,e=u,t=h){this.basePath=e,this.axios=t,r&&(this.configuration=r,this.basePath=r.basePath??e)}configuration}class de extends Error{constructor(r,e){super(e),this.field=r,this.name="RequiredError"}}const P={},g="https://example.com",m=function(l,r,e){if(e==null)throw new de(r,`Required parameter ${r} was null or undefined when calling ${l}.`)};function F(l,r,e=""){r!=null&&(typeof r=="object"?Array.isArray(r)?r.forEach(t=>F(l,t,e)):Object.keys(r).forEach(t=>F(l,r[t],`${e}${e!==""?".":""}${t}`)):l.has(e)?l.append(e,r):l.set(e,r))}const V=function(l,...r){const e=new URLSearchParams(l.search);F(e,r),l.search=e.toString()},y=function(l,r,e){const t=typeof l!="string";return(t&&e&&e.isJsonMime?e.isJsonMime(r.headers["Content-Type"]):t)?JSON.stringify(l!==void 0?l:{}):l||""},v=function(l){return l.pathname+l.search+l.hash},b=function(l,r,e,t){return(a=r,n=e)=>{const o={...l.options,url:(a.defaults.baseURL?"":t?.basePath??n)+l.url};return a.request(o)}},he={Bigquery:"bigquery",Snowflake:"snowflake",Postgres:"postgres",Gcs:"gcs",S3:"s3",Azure:"azure"},ue={ServicePrincipal:"service_principal",SasToken:"sas_token"},Pe={Error:"error",Warn:"warn",Debug:"debug"},ge={Success:"success",Error:"error"},Ve={Postgres:"postgres",Bigquery:"bigquery",Snowflake:"snowflake",Trino:"trino",Databricks:"databricks",Mysql:"mysql",Duckdb:"duckdb",Motherduck:"motherduck",Ducklake:"ducklake",Publisher:"publisher"},ve={Ssh:"ssh"},be={Ok:"ok",Failed:"failed"},Oe={Embedded:"embedded",Materialized:"materialized"},Se={Equal:"equal",In:"in",Like:"like",GreaterThan:"greater_than",LessThan:"less_than"},ye={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Ce={Pending:"PENDING",ManifestRowsReady:"MANIFEST_ROWS_READY",ManifestFileReady:"MANIFEST_FILE_READY",Failed:"FAILED",Cancelled:"CANCELLED"},ke={Markdown:"markdown",Code:"code"},Ae={Markdown:"markdown",Code:"code"},Ie={Declared:"declared",All:"all"},xe={Unbound:"unbound",Bound:"bound",LiveFallback:"live_fallback"},Ne={Error:"error",Warn:"warn"},Re={Viewport:"viewport"},Ue={Disable:"disable",NoVerify:"no-verify",VerifyCa:"verify-ca"},Te={Snapshot:"SNAPSHOT",Copy:"COPY"},Ee={Initializing:"initializing",Serving:"serving",Draining:"draining",Throttled:"throttled"},L=function(l){return{createConnection:async(r,e,t,a={})=>{m("createConnection","environmentName",r),m("createConnection","connectionName",e),m("createConnection","connection",t);const n="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"POST",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}},deleteConnection:async(r,e,t={})=>{m("deleteConnection","environmentName",r),m("deleteConnection","connectionName",e);const a="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"DELETE",...o,...t},c={};V(n,{});let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}},getConnection:async(r,e,t={})=>{m("getConnection","environmentName",r),m("getConnection","connectionName",e);const a="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"GET",...o,...t},c={};V(n,{});let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}},getTable:async(r,e,t,a,n={})=>{m("getTable","environmentName",r),m("getTable","connectionName",e),m("getTable","schemaName",t),m("getTable","tablePath",a);const o="/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))).replace("{schemaName}",encodeURIComponent(String(t))).replace("{tablePath}",encodeURIComponent(String(a))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"GET",...c,...n},p={};V(s,{});let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},getTableInPackage:async(r,e,t,a,n,o={})=>{m("getTableInPackage","environmentName",r),m("getTableInPackage","packageName",e),m("getTableInPackage","connectionName",t),m("getTableInPackage","schemaName",a),m("getTableInPackage","tablePath",n);const s="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(t))).replace("{schemaName}",encodeURIComponent(String(a))).replace("{tablePath}",encodeURIComponent(String(n))),c=new URL(s,g);let i;l&&(i=l.baseOptions);const p={method:"GET",...i,...o},d={};V(c,{});let C=i&&i.headers?i.headers:{};return p.headers={...d,...C,...o.headers},{url:v(c),options:p}},listConnections:async(r,e={})=>{m("listConnections","environmentName",r);const t="/environments/{environmentName}/connections".replace("{environmentName}",encodeURIComponent(String(r))),a=new URL(t,g);let n;l&&(n=l.baseOptions);const o={method:"GET",...n,...e},s={};V(a,{});let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...e.headers},{url:v(a),options:o}},listSchemas:async(r,e,t={})=>{m("listSchemas","environmentName",r),m("listSchemas","connectionName",e);const a="/environments/{environmentName}/connections/{connectionName}/schemas".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"GET",...o,...t},c={};V(n,{});let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}},listSchemasInPackage:async(r,e,t,a={})=>{m("listSchemasInPackage","environmentName",r),m("listSchemasInPackage","packageName",e),m("listSchemasInPackage","connectionName",t);const n="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(t))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"GET",...s,...a},i={};V(o,{});let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},{url:v(o),options:c}},listTables:async(r,e,t,a,n={})=>{m("listTables","environmentName",r),m("listTables","connectionName",e),m("listTables","schemaName",t);const o="/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))).replace("{schemaName}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"GET",...c,...n},p={},d={};a&&(d.tableNames=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},listTablesInPackage:async(r,e,t,a,n,o={})=>{m("listTablesInPackage","environmentName",r),m("listTablesInPackage","packageName",e),m("listTablesInPackage","connectionName",t),m("listTablesInPackage","schemaName",a);const s="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(t))).replace("{schemaName}",encodeURIComponent(String(a))),c=new URL(s,g);let i;l&&(i=l.baseOptions);const p={method:"GET",...i,...o},d={},O={};n&&(O.tableNames=n),V(c,O);let C=i&&i.headers?i.headers:{};return p.headers={...d,...C,...o.headers},{url:v(c),options:p}},postQuerydata:async(r,e,t,a={})=>{m("postQuerydata","environmentName",r),m("postQuerydata","connectionName",e),m("postQuerydata","postQuerydataRequest",t);const n="/environments/{environmentName}/connections/{connectionName}/sqlQuery".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"POST",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}},postQuerydataInPackage:async(r,e,t,a,n={})=>{m("postQuerydataInPackage","environmentName",r),m("postQuerydataInPackage","packageName",e),m("postQuerydataInPackage","connectionName",t),m("postQuerydataInPackage","postQuerydataRequest",a);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlQuery".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"POST",...c,...n},p={},d={};p["Content-Type"]="application/json",V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},i.data=y(a,i,l),{url:v(s),options:i}},postSqlsource:async(r,e,t,a={})=>{m("postSqlsource","environmentName",r),m("postSqlsource","connectionName",e),m("postSqlsource","postSqlsourceRequest",t);const n="/environments/{environmentName}/connections/{connectionName}/sqlSource".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"POST",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}},postSqlsourceInPackage:async(r,e,t,a,n={})=>{m("postSqlsourceInPackage","environmentName",r),m("postSqlsourceInPackage","packageName",e),m("postSqlsourceInPackage","connectionName",t),m("postSqlsourceInPackage","postSqlsourceRequest",a);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlSource".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"POST",...c,...n},p={},d={};p["Content-Type"]="application/json",V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},i.data=y(a,i,l),{url:v(s),options:i}},postTemporarytable:async(r,e,t,a={})=>{m("postTemporarytable","environmentName",r),m("postTemporarytable","connectionName",e),m("postTemporarytable","postSqlsourceRequest",t);const n="/environments/{environmentName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"POST",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}},postTemporarytableInPackage:async(r,e,t,a,n={})=>{m("postTemporarytableInPackage","environmentName",r),m("postTemporarytableInPackage","packageName",e),m("postTemporarytableInPackage","connectionName",t),m("postTemporarytableInPackage","postSqlsourceRequest",a);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"POST",...c,...n},p={},d={};p["Content-Type"]="application/json",V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},i.data=y(a,i,l),{url:v(s),options:i}},updateConnection:async(r,e,t,a={})=>{m("updateConnection","environmentName",r),m("updateConnection","connectionName",e),m("updateConnection","updateConnectionRequest",t);const n="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"PATCH",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}}}},S=function(l){const r=L(l);return{async createConnection(e,t,a,n){const o=await r.createConnection(e,t,a,n),s=l?.serverIndex??0,c=P["ConnectionsApi.createConnection"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async deleteConnection(e,t,a){const n=await r.deleteConnection(e,t,a),o=l?.serverIndex??0,s=P["ConnectionsApi.deleteConnection"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)},async getConnection(e,t,a){const n=await r.getConnection(e,t,a),o=l?.serverIndex??0,s=P["ConnectionsApi.getConnection"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)},async getTable(e,t,a,n,o){const s=await r.getTable(e,t,a,n,o),c=l?.serverIndex??0,i=P["ConnectionsApi.getTable"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async getTableInPackage(e,t,a,n,o,s){const c=await r.getTableInPackage(e,t,a,n,o,s),i=l?.serverIndex??0,p=P["ConnectionsApi.getTableInPackage"]?.[i]?.url;return(d,O)=>b(c,h,u,l)(d,p||O)},async listConnections(e,t){const a=await r.listConnections(e,t),n=l?.serverIndex??0,o=P["ConnectionsApi.listConnections"]?.[n]?.url;return(s,c)=>b(a,h,u,l)(s,o||c)},async listSchemas(e,t,a){const n=await r.listSchemas(e,t,a),o=l?.serverIndex??0,s=P["ConnectionsApi.listSchemas"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)},async listSchemasInPackage(e,t,a,n){const o=await r.listSchemasInPackage(e,t,a,n),s=l?.serverIndex??0,c=P["ConnectionsApi.listSchemasInPackage"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async listTables(e,t,a,n,o){const s=await r.listTables(e,t,a,n,o),c=l?.serverIndex??0,i=P["ConnectionsApi.listTables"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async listTablesInPackage(e,t,a,n,o,s){const c=await r.listTablesInPackage(e,t,a,n,o,s),i=l?.serverIndex??0,p=P["ConnectionsApi.listTablesInPackage"]?.[i]?.url;return(d,O)=>b(c,h,u,l)(d,p||O)},async postQuerydata(e,t,a,n){const o=await r.postQuerydata(e,t,a,n),s=l?.serverIndex??0,c=P["ConnectionsApi.postQuerydata"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async postQuerydataInPackage(e,t,a,n,o){const s=await r.postQuerydataInPackage(e,t,a,n,o),c=l?.serverIndex??0,i=P["ConnectionsApi.postQuerydataInPackage"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async postSqlsource(e,t,a,n){const o=await r.postSqlsource(e,t,a,n),s=l?.serverIndex??0,c=P["ConnectionsApi.postSqlsource"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async postSqlsourceInPackage(e,t,a,n,o){const s=await r.postSqlsourceInPackage(e,t,a,n,o),c=l?.serverIndex??0,i=P["ConnectionsApi.postSqlsourceInPackage"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async postTemporarytable(e,t,a,n){const o=await r.postTemporarytable(e,t,a,n),s=l?.serverIndex??0,c=P["ConnectionsApi.postTemporarytable"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async postTemporarytableInPackage(e,t,a,n,o){const s=await r.postTemporarytableInPackage(e,t,a,n,o),c=l?.serverIndex??0,i=P["ConnectionsApi.postTemporarytableInPackage"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async updateConnection(e,t,a,n){const o=await r.updateConnection(e,t,a,n),s=l?.serverIndex??0,c=P["ConnectionsApi.updateConnection"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)}}},Me=function(l,r,e){const t=S(l);return{createConnection(a,n,o,s){return t.createConnection(a,n,o,s).then(c=>c(e,r))},deleteConnection(a,n,o){return t.deleteConnection(a,n,o).then(s=>s(e,r))},getConnection(a,n,o){return t.getConnection(a,n,o).then(s=>s(e,r))},getTable(a,n,o,s,c){return t.getTable(a,n,o,s,c).then(i=>i(e,r))},getTableInPackage(a,n,o,s,c,i){return t.getTableInPackage(a,n,o,s,c,i).then(p=>p(e,r))},listConnections(a,n){return t.listConnections(a,n).then(o=>o(e,r))},listSchemas(a,n,o){return t.listSchemas(a,n,o).then(s=>s(e,r))},listSchemasInPackage(a,n,o,s){return t.listSchemasInPackage(a,n,o,s).then(c=>c(e,r))},listTables(a,n,o,s,c){return t.listTables(a,n,o,s,c).then(i=>i(e,r))},listTablesInPackage(a,n,o,s,c,i){return t.listTablesInPackage(a,n,o,s,c,i).then(p=>p(e,r))},postQuerydata(a,n,o,s){return t.postQuerydata(a,n,o,s).then(c=>c(e,r))},postQuerydataInPackage(a,n,o,s,c){return t.postQuerydataInPackage(a,n,o,s,c).then(i=>i(e,r))},postSqlsource(a,n,o,s){return t.postSqlsource(a,n,o,s).then(c=>c(e,r))},postSqlsourceInPackage(a,n,o,s,c){return t.postSqlsourceInPackage(a,n,o,s,c).then(i=>i(e,r))},postTemporarytable(a,n,o,s){return t.postTemporarytable(a,n,o,s).then(c=>c(e,r))},postTemporarytableInPackage(a,n,o,s,c){return t.postTemporarytableInPackage(a,n,o,s,c).then(i=>i(e,r))},updateConnection(a,n,o,s){return t.updateConnection(a,n,o,s).then(c=>c(e,r))}}};class H extends k{createConnection(r,e,t,a){return S(this.configuration).createConnection(r,e,t,a).then(n=>n(this.axios,this.basePath))}deleteConnection(r,e,t){return S(this.configuration).deleteConnection(r,e,t).then(a=>a(this.axios,this.basePath))}getConnection(r,e,t){return S(this.configuration).getConnection(r,e,t).then(a=>a(this.axios,this.basePath))}getTable(r,e,t,a,n){return S(this.configuration).getTable(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}getTableInPackage(r,e,t,a,n,o){return S(this.configuration).getTableInPackage(r,e,t,a,n,o).then(s=>s(this.axios,this.basePath))}listConnections(r,e){return S(this.configuration).listConnections(r,e).then(t=>t(this.axios,this.basePath))}listSchemas(r,e,t){return S(this.configuration).listSchemas(r,e,t).then(a=>a(this.axios,this.basePath))}listSchemasInPackage(r,e,t,a){return S(this.configuration).listSchemasInPackage(r,e,t,a).then(n=>n(this.axios,this.basePath))}listTables(r,e,t,a,n){return S(this.configuration).listTables(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}listTablesInPackage(r,e,t,a,n,o){return S(this.configuration).listTablesInPackage(r,e,t,a,n,o).then(s=>s(this.axios,this.basePath))}postQuerydata(r,e,t,a){return S(this.configuration).postQuerydata(r,e,t,a).then(n=>n(this.axios,this.basePath))}postQuerydataInPackage(r,e,t,a,n){return S(this.configuration).postQuerydataInPackage(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}postSqlsource(r,e,t,a){return S(this.configuration).postSqlsource(r,e,t,a).then(n=>n(this.axios,this.basePath))}postSqlsourceInPackage(r,e,t,a,n){return S(this.configuration).postSqlsourceInPackage(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}postTemporarytable(r,e,t,a){return S(this.configuration).postTemporarytable(r,e,t,a).then(n=>n(this.axios,this.basePath))}postTemporarytableInPackage(r,e,t,a,n){return S(this.configuration).postTemporarytableInPackage(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}updateConnection(r,e,t,a){return S(this.configuration).updateConnection(r,e,t,a).then(n=>n(this.axios,this.basePath))}}const D=function(l){return{testConnectionConfiguration:async(r,e={})=>{m("testConnectionConfiguration","connection",r);const t="/connections/test",a=new URL(t,g);let n;l&&(n=l.baseOptions);const o={method:"POST",...n,...e},s={},c={};s["Content-Type"]="application/json",V(a,c);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(r,o,l),{url:v(a),options:o}}}},Q=function(l){const r=D(l);return{async testConnectionConfiguration(e,t){const a=await r.testConnectionConfiguration(e,t),n=l?.serverIndex??0,o=P["ConnectionsTestApi.testConnectionConfiguration"]?.[n]?.url;return(s,c)=>b(a,h,u,l)(s,o||c)}}},we=function(l,r,e){const t=Q(l);return{testConnectionConfiguration(a,n){return t.testConnectionConfiguration(a,n).then(o=>o(e,r))}}};class Fe extends k{testConnectionConfiguration(r,e){return Q(this.configuration).testConnectionConfiguration(r,e).then(t=>t(this.axios,this.basePath))}}const W=function(l){return{listDatabases:async(r,e,t,a={})=>{m("listDatabases","environmentName",r),m("listDatabases","packageName",e);const n="/environments/{environmentName}/packages/{packageName}/databases".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"GET",...s,...a},i={},p={};t!==void 0&&(p.versionId=t),V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},{url:v(o),options:c}}}},$=function(l){const r=W(l);return{async listDatabases(e,t,a,n){const o=await r.listDatabases(e,t,a,n),s=l?.serverIndex??0,c=P["DatabasesApi.listDatabases"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)}}},Qe=function(l,r,e){const t=$(l);return{listDatabases(a,n,o,s){return t.listDatabases(a,n,o,s).then(c=>c(e,r))}}};class f extends k{listDatabases(r,e,t,a){return $(this.configuration).listDatabases(r,e,t,a).then(n=>n(this.axios,this.basePath))}}const G=function(l){return{createEnvironment:async(r,e={})=>{m("createEnvironment","environment",r);const t="/environments",a=new URL(t,g);let n;l&&(n=l.baseOptions);const o={method:"POST",...n,...e},s={},c={};s["Content-Type"]="application/json",V(a,c);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(r,o,l),{url:v(a),options:o}},deleteEnvironment:async(r,e={})=>{m("deleteEnvironment","environmentName",r);const t="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(r))),a=new URL(t,g);let n;l&&(n=l.baseOptions);const o={method:"DELETE",...n,...e},s={};V(a,{});let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...e.headers},{url:v(a),options:o}},getEnvironment:async(r,e,t={})=>{m("getEnvironment","environmentName",r);const a="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(r))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"GET",...o,...t},c={},i={};e!==void 0&&(i.reload=e),V(n,i);let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}},listEnvironments:async(r={})=>{const e="/environments",t=new URL(e,g);let a;l&&(a=l.baseOptions);const n={method:"GET",...a,...r},o={};V(t,{});let c=a&&a.headers?a.headers:{};return n.headers={...o,...c,...r.headers},{url:v(t),options:n}},updateEnvironment:async(r,e,t={})=>{m("updateEnvironment","environmentName",r),m("updateEnvironment","environment",e);const a="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(r))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"PATCH",...o,...t},c={},i={};c["Content-Type"]="application/json",V(n,i);let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},s.data=y(e,s,l),{url:v(n),options:s}}}},I=function(l){const r=G(l);return{async createEnvironment(e,t){const a=await r.createEnvironment(e,t),n=l?.serverIndex??0,o=P["EnvironmentsApi.createEnvironment"]?.[n]?.url;return(s,c)=>b(a,h,u,l)(s,o||c)},async deleteEnvironment(e,t){const a=await r.deleteEnvironment(e,t),n=l?.serverIndex??0,o=P["EnvironmentsApi.deleteEnvironment"]?.[n]?.url;return(s,c)=>b(a,h,u,l)(s,o||c)},async getEnvironment(e,t,a){const n=await r.getEnvironment(e,t,a),o=l?.serverIndex??0,s=P["EnvironmentsApi.getEnvironment"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)},async listEnvironments(e){const t=await r.listEnvironments(e),a=l?.serverIndex??0,n=P["EnvironmentsApi.listEnvironments"]?.[a]?.url;return(o,s)=>b(t,h,u,l)(o,n||s)},async updateEnvironment(e,t,a){const n=await r.updateEnvironment(e,t,a),o=l?.serverIndex??0,s=P["EnvironmentsApi.updateEnvironment"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)}}},$e=function(l,r,e){const t=I(l);return{createEnvironment(a,n){return t.createEnvironment(a,n).then(o=>o(e,r))},deleteEnvironment(a,n){return t.deleteEnvironment(a,n).then(o=>o(e,r))},getEnvironment(a,n,o){return t.getEnvironment(a,n,o).then(s=>s(e,r))},listEnvironments(a){return t.listEnvironments(a).then(n=>n(e,r))},updateEnvironment(a,n,o){return t.updateEnvironment(a,n,o).then(s=>s(e,r))}}};class _ extends k{createEnvironment(r,e){return I(this.configuration).createEnvironment(r,e).then(t=>t(this.axios,this.basePath))}deleteEnvironment(r,e){return I(this.configuration).deleteEnvironment(r,e).then(t=>t(this.axios,this.basePath))}getEnvironment(r,e,t){return I(this.configuration).getEnvironment(r,e,t).then(a=>a(this.axios,this.basePath))}listEnvironments(r){return I(this.configuration).listEnvironments(r).then(e=>e(this.axios,this.basePath))}updateEnvironment(r,e,t){return I(this.configuration).updateEnvironment(r,e,t).then(a=>a(this.axios,this.basePath))}}const Y=function(l){return{createMaterialization:async(r,e,t,a={})=>{m("createMaterialization","environmentName",r),m("createMaterialization","packageName",e);const n="/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"POST",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}},deleteMaterialization:async(r,e,t,a,n={})=>{m("deleteMaterialization","environmentName",r),m("deleteMaterialization","packageName",e),m("deleteMaterialization","materializationId",t);const o="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{materializationId}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"DELETE",...c,...n},p={},d={};a!==void 0&&(d.dropTables=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},getMaterialization:async(r,e,t,a={})=>{m("getMaterialization","environmentName",r),m("getMaterialization","packageName",e),m("getMaterialization","materializationId",t);const n="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{materializationId}",encodeURIComponent(String(t))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"GET",...s,...a},i={};V(o,{});let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},{url:v(o),options:c}},listMaterializations:async(r,e,t,a,n={})=>{m("listMaterializations","environmentName",r),m("listMaterializations","packageName",e);const o="/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"GET",...c,...n},p={},d={};t!==void 0&&(d.limit=t),a!==void 0&&(d.offset=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},materializationAction:async(r,e,t,a,n={})=>{m("materializationAction","environmentName",r),m("materializationAction","packageName",e),m("materializationAction","materializationId",t),m("materializationAction","action",a);const o="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{materializationId}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"POST",...c,...n},p={},d={};a!==void 0&&(d.action=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}}}},x=function(l){const r=Y(l);return{async createMaterialization(e,t,a,n){const o=await r.createMaterialization(e,t,a,n),s=l?.serverIndex??0,c=P["MaterializationsApi.createMaterialization"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async deleteMaterialization(e,t,a,n,o){const s=await r.deleteMaterialization(e,t,a,n,o),c=l?.serverIndex??0,i=P["MaterializationsApi.deleteMaterialization"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async getMaterialization(e,t,a,n){const o=await r.getMaterialization(e,t,a,n),s=l?.serverIndex??0,c=P["MaterializationsApi.getMaterialization"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)},async listMaterializations(e,t,a,n,o){const s=await r.listMaterializations(e,t,a,n,o),c=l?.serverIndex??0,i=P["MaterializationsApi.listMaterializations"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async materializationAction(e,t,a,n,o){const s=await r.materializationAction(e,t,a,n,o),c=l?.serverIndex??0,i=P["MaterializationsApi.materializationAction"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)}}},Be=function(l,r,e){const t=x(l);return{createMaterialization(a,n,o,s){return t.createMaterialization(a,n,o,s).then(c=>c(e,r))},deleteMaterialization(a,n,o,s,c){return t.deleteMaterialization(a,n,o,s,c).then(i=>i(e,r))},getMaterialization(a,n,o,s){return t.getMaterialization(a,n,o,s).then(c=>c(e,r))},listMaterializations(a,n,o,s,c){return t.listMaterializations(a,n,o,s,c).then(i=>i(e,r))},materializationAction(a,n,o,s,c){return t.materializationAction(a,n,o,s,c).then(i=>i(e,r))}}};class J extends k{createMaterialization(r,e,t,a){return x(this.configuration).createMaterialization(r,e,t,a).then(n=>n(this.axios,this.basePath))}deleteMaterialization(r,e,t,a,n){return x(this.configuration).deleteMaterialization(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}getMaterialization(r,e,t,a){return x(this.configuration).getMaterialization(r,e,t,a).then(n=>n(this.axios,this.basePath))}listMaterializations(r,e,t,a,n){return x(this.configuration).listMaterializations(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}materializationAction(r,e,t,a,n){return x(this.configuration).materializationAction(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}}const ze={Stop:"stop"},K=function(l){return{compileModelSource:async(r,e,t,a,n={})=>{m("compileModelSource","environmentName",r),m("compileModelSource","packageName",e),m("compileModelSource","path",t),m("compileModelSource","compileRequest",a);const o="/environments/{environmentName}/packages/{packageName}/models/{path}/compile".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"POST",...c,...n},p={},d={};p["Content-Type"]="application/json",V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},i.data=y(a,i,l),{url:v(s),options:i}},executeQueryModel:async(r,e,t,a,n={})=>{m("executeQueryModel","environmentName",r),m("executeQueryModel","packageName",e),m("executeQueryModel","path",t),m("executeQueryModel","queryRequest",a);const o="/environments/{environmentName}/packages/{packageName}/models/{path}/query".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"POST",...c,...n},p={},d={};p["Content-Type"]="application/json",V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},i.data=y(a,i,l),{url:v(s),options:i}},getModel:async(r,e,t,a,n={})=>{m("getModel","environmentName",r),m("getModel","packageName",e),m("getModel","path",t);const o="/environments/{environmentName}/packages/{packageName}/models/{path}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"GET",...c,...n},p={},d={};a!==void 0&&(d.versionId=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},listModels:async(r,e,t,a={})=>{m("listModels","environmentName",r),m("listModels","packageName",e);const n="/environments/{environmentName}/packages/{packageName}/models".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"GET",...s,...a},i={},p={};t!==void 0&&(p.versionId=t),V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},{url:v(o),options:c}}}},T=function(l){const r=K(l);return{async compileModelSource(e,t,a,n,o){const s=await r.compileModelSource(e,t,a,n,o),c=l?.serverIndex??0,i=P["ModelsApi.compileModelSource"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async executeQueryModel(e,t,a,n,o){const s=await r.executeQueryModel(e,t,a,n,o),c=l?.serverIndex??0,i=P["ModelsApi.executeQueryModel"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async getModel(e,t,a,n,o){const s=await r.getModel(e,t,a,n,o),c=l?.serverIndex??0,i=P["ModelsApi.getModel"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async listModels(e,t,a,n){const o=await r.listModels(e,t,a,n),s=l?.serverIndex??0,c=P["ModelsApi.listModels"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)}}},qe=function(l,r,e){const t=T(l);return{compileModelSource(a,n,o,s,c){return t.compileModelSource(a,n,o,s,c).then(i=>i(e,r))},executeQueryModel(a,n,o,s,c){return t.executeQueryModel(a,n,o,s,c).then(i=>i(e,r))},getModel(a,n,o,s,c){return t.getModel(a,n,o,s,c).then(i=>i(e,r))},listModels(a,n,o,s){return t.listModels(a,n,o,s).then(c=>c(e,r))}}};class X extends k{compileModelSource(r,e,t,a,n){return T(this.configuration).compileModelSource(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}executeQueryModel(r,e,t,a,n){return T(this.configuration).executeQueryModel(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}getModel(r,e,t,a,n){return T(this.configuration).getModel(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}listModels(r,e,t,a){return T(this.configuration).listModels(r,e,t,a).then(n=>n(this.axios,this.basePath))}}const Z=function(l){return{executeNotebookCell:async(r,e,t,a,n,o,s,c,i={})=>{m("executeNotebookCell","environmentName",r),m("executeNotebookCell","packageName",e),m("executeNotebookCell","path",t),m("executeNotebookCell","cellIndex",a);const p="/environments/{environmentName}/packages/{packageName}/notebooks/{path}/cells/{cellIndex}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(t))).replace("{cellIndex}",encodeURIComponent(String(a))),d=new URL(p,g);let O;l&&(O=l.baseOptions);const C={method:"GET",...O,...i},w={},A={};n!==void 0&&(A.versionId=n),o!==void 0&&(A.filter_params=o),s!==void 0&&(A.bypass_filters=s),c!==void 0&&(A.givens=c),V(d,A);let R=O&&O.headers?O.headers:{};return C.headers={...w,...R,...i.headers},{url:v(d),options:C}},getNotebook:async(r,e,t,a,n={})=>{m("getNotebook","environmentName",r),m("getNotebook","packageName",e),m("getNotebook","path",t);const o="/environments/{environmentName}/packages/{packageName}/notebooks/{path}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(t))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"GET",...c,...n},p={},d={};a!==void 0&&(d.versionId=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},listNotebooks:async(r,e,t,a={})=>{m("listNotebooks","environmentName",r),m("listNotebooks","packageName",e);const n="/environments/{environmentName}/packages/{packageName}/notebooks".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"GET",...s,...a},i={},p={};t!==void 0&&(p.versionId=t),V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},{url:v(o),options:c}}}},M=function(l){const r=Z(l);return{async executeNotebookCell(e,t,a,n,o,s,c,i,p){const d=await r.executeNotebookCell(e,t,a,n,o,s,c,i,p),O=l?.serverIndex??0,C=P["NotebooksApi.executeNotebookCell"]?.[O]?.url;return(w,A)=>b(d,h,u,l)(w,C||A)},async getNotebook(e,t,a,n,o){const s=await r.getNotebook(e,t,a,n,o),c=l?.serverIndex??0,i=P["NotebooksApi.getNotebook"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async listNotebooks(e,t,a,n){const o=await r.listNotebooks(e,t,a,n),s=l?.serverIndex??0,c=P["NotebooksApi.listNotebooks"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)}}},je=function(l,r,e){const t=M(l);return{executeNotebookCell(a,n,o,s,c,i,p,d,O){return t.executeNotebookCell(a,n,o,s,c,i,p,d,O).then(C=>C(e,r))},getNotebook(a,n,o,s,c){return t.getNotebook(a,n,o,s,c).then(i=>i(e,r))},listNotebooks(a,n,o,s){return t.listNotebooks(a,n,o,s).then(c=>c(e,r))}}};class ee extends k{executeNotebookCell(r,e,t,a,n,o,s,c,i){return M(this.configuration).executeNotebookCell(r,e,t,a,n,o,s,c,i).then(p=>p(this.axios,this.basePath))}getNotebook(r,e,t,a,n){return M(this.configuration).getNotebook(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}listNotebooks(r,e,t,a){return M(this.configuration).listNotebooks(r,e,t,a).then(n=>n(this.axios,this.basePath))}}const Le={True:"true",False:"false"},ae=function(l){return{createPackage:async(r,e,t={})=>{m("createPackage","environmentName",r),m("createPackage","_package",e);const a="/environments/{environmentName}/packages".replace("{environmentName}",encodeURIComponent(String(r))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"POST",...o,...t},c={},i={};c["Content-Type"]="application/json",V(n,i);let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},s.data=y(e,s,l),{url:v(n),options:s}},deletePackage:async(r,e,t={})=>{m("deletePackage","environmentName",r),m("deletePackage","packageName",e);const a="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"DELETE",...o,...t},c={};V(n,{});let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}},getPackage:async(r,e,t,a,n={})=>{m("getPackage","environmentName",r),m("getPackage","packageName",e);const o="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,g);let c;l&&(c=l.baseOptions);const i={method:"GET",...c,...n},p={},d={};t!==void 0&&(d.versionId=t),a!==void 0&&(d.reload=a),V(s,d);let O=c&&c.headers?c.headers:{};return i.headers={...p,...O,...n.headers},{url:v(s),options:i}},listPackages:async(r,e={})=>{m("listPackages","environmentName",r);const t="/environments/{environmentName}/packages".replace("{environmentName}",encodeURIComponent(String(r))),a=new URL(t,g);let n;l&&(n=l.baseOptions);const o={method:"GET",...n,...e},s={};V(a,{});let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...e.headers},{url:v(a),options:o}},updatePackage:async(r,e,t,a={})=>{m("updatePackage","environmentName",r),m("updatePackage","packageName",e),m("updatePackage","_package",t);const n="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(n,g);let s;l&&(s=l.baseOptions);const c={method:"PATCH",...s,...a},i={},p={};i["Content-Type"]="application/json",V(o,p);let d=s&&s.headers?s.headers:{};return c.headers={...i,...d,...a.headers},c.data=y(t,c,l),{url:v(o),options:c}}}},N=function(l){const r=ae(l);return{async createPackage(e,t,a){const n=await r.createPackage(e,t,a),o=l?.serverIndex??0,s=P["PackagesApi.createPackage"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)},async deletePackage(e,t,a){const n=await r.deletePackage(e,t,a),o=l?.serverIndex??0,s=P["PackagesApi.deletePackage"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)},async getPackage(e,t,a,n,o){const s=await r.getPackage(e,t,a,n,o),c=l?.serverIndex??0,i=P["PackagesApi.getPackage"]?.[c]?.url;return(p,d)=>b(s,h,u,l)(p,i||d)},async listPackages(e,t){const a=await r.listPackages(e,t),n=l?.serverIndex??0,o=P["PackagesApi.listPackages"]?.[n]?.url;return(s,c)=>b(a,h,u,l)(s,o||c)},async updatePackage(e,t,a,n){const o=await r.updatePackage(e,t,a,n),s=l?.serverIndex??0,c=P["PackagesApi.updatePackage"]?.[s]?.url;return(i,p)=>b(o,h,u,l)(i,c||p)}}},He=function(l,r,e){const t=N(l);return{createPackage(a,n,o){return t.createPackage(a,n,o).then(s=>s(e,r))},deletePackage(a,n,o){return t.deletePackage(a,n,o).then(s=>s(e,r))},getPackage(a,n,o,s,c){return t.getPackage(a,n,o,s,c).then(i=>i(e,r))},listPackages(a,n){return t.listPackages(a,n).then(o=>o(e,r))},updatePackage(a,n,o,s){return t.updatePackage(a,n,o,s).then(c=>c(e,r))}}};class te extends k{createPackage(r,e,t){return N(this.configuration).createPackage(r,e,t).then(a=>a(this.axios,this.basePath))}deletePackage(r,e,t){return N(this.configuration).deletePackage(r,e,t).then(a=>a(this.axios,this.basePath))}getPackage(r,e,t,a,n){return N(this.configuration).getPackage(r,e,t,a,n).then(o=>o(this.axios,this.basePath))}listPackages(r,e){return N(this.configuration).listPackages(r,e).then(t=>t(this.axios,this.basePath))}updatePackage(r,e,t,a){return N(this.configuration).updatePackage(r,e,t,a).then(n=>n(this.axios,this.basePath))}}const ne=function(l){return{listPages:async(r,e,t={})=>{m("listPages","environmentName",r),m("listPages","packageName",e);const a="/environments/{environmentName}/packages/{packageName}/pages".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"GET",...o,...t},c={};V(n,{});let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}}}},B=function(l){const r=ne(l);return{async listPages(e,t,a){const n=await r.listPages(e,t,a),o=l?.serverIndex??0,s=P["PagesApi.listPages"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)}}},De=function(l,r,e){const t=B(l);return{listPages(a,n,o){return t.listPages(a,n,o).then(s=>s(e,r))}}};class re extends k{listPages(r,e,t){return B(this.configuration).listPages(r,e,t).then(a=>a(this.axios,this.basePath))}}const oe=function(l){return{getStatus:async(r={})=>{const e="/status",t=new URL(e,g);let a;l&&(a=l.baseOptions);const n={method:"GET",...a,...r},o={};V(t,{});let c=a&&a.headers?a.headers:{};return n.headers={...o,...c,...r.headers},{url:v(t),options:n}}}},z=function(l){const r=oe(l);return{async getStatus(e){const t=await r.getStatus(e),a=l?.serverIndex??0,n=P["PublisherApi.getStatus"]?.[a]?.url;return(o,s)=>b(t,h,u,l)(o,n||s)}}},We=function(l,r,e){const t=z(l);return{getStatus(a){return t.getStatus(a).then(n=>n(e,r))}}};class se extends k{getStatus(r){return z(this.configuration).getStatus(r).then(e=>e(this.axios,this.basePath))}}const ce=function(l){return{getWatchStatus:async(r={})=>{const e="/watch-mode/status",t=new URL(e,g);let a;l&&(a=l.baseOptions);const n={method:"GET",...a,...r},o={};V(t,{});let c=a&&a.headers?a.headers:{};return n.headers={...o,...c,...r.headers},{url:v(t),options:n}},startWatching:async(r,e={})=>{m("startWatching","startWatchRequest",r);const t="/watch-mode/start",a=new URL(t,g);let n;l&&(n=l.baseOptions);const o={method:"POST",...n,...e},s={},c={};s["Content-Type"]="application/json",V(a,c);let i=n&&n.headers?n.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(r,o,l),{url:v(a),options:o}},stopWatching:async(r={})=>{const e="/watch-mode/stop",t=new URL(e,g);let a;l&&(a=l.baseOptions);const n={method:"POST",...a,...r},o={};V(t,{});let c=a&&a.headers?a.headers:{};return n.headers={...o,...c,...r.headers},{url:v(t),options:n}},streamPackageEvents:async(r,e,t={})=>{m("streamPackageEvents","environmentName",r),m("streamPackageEvents","packageName",e);const a="/environments/{environmentName}/packages/{packageName}/events".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(e))),n=new URL(a,g);let o;l&&(o=l.baseOptions);const s={method:"GET",...o,...t},c={};V(n,{});let p=o&&o.headers?o.headers:{};return s.headers={...c,...p,...t.headers},{url:v(n),options:s}}}},E=function(l){const r=ce(l);return{async getWatchStatus(e){const t=await r.getWatchStatus(e),a=l?.serverIndex??0,n=P["WatchModeApi.getWatchStatus"]?.[a]?.url;return(o,s)=>b(t,h,u,l)(o,n||s)},async startWatching(e,t){const a=await r.startWatching(e,t),n=l?.serverIndex??0,o=P["WatchModeApi.startWatching"]?.[n]?.url;return(s,c)=>b(a,h,u,l)(s,o||c)},async stopWatching(e){const t=await r.stopWatching(e),a=l?.serverIndex??0,n=P["WatchModeApi.stopWatching"]?.[a]?.url;return(o,s)=>b(t,h,u,l)(o,n||s)},async streamPackageEvents(e,t,a){const n=await r.streamPackageEvents(e,t,a),o=l?.serverIndex??0,s=P["WatchModeApi.streamPackageEvents"]?.[o]?.url;return(c,i)=>b(n,h,u,l)(c,s||i)}}},fe=function(l,r,e){const t=E(l);return{getWatchStatus(a){return t.getWatchStatus(a).then(n=>n(e,r))},startWatching(a,n){return t.startWatching(a,n).then(o=>o(e,r))},stopWatching(a){return t.stopWatching(a).then(n=>n(e,r))},streamPackageEvents(a,n,o){return t.streamPackageEvents(a,n,o).then(s=>s(e,r))}}};class le extends k{getWatchStatus(r){return E(this.configuration).getWatchStatus(r).then(e=>e(this.axios,this.basePath))}startWatching(r,e){return E(this.configuration).startWatching(r,e).then(t=>t(this.axios,this.basePath))}stopWatching(r){return E(this.configuration).stopWatching(r).then(e=>e(this.axios,this.basePath))}streamPackageEvents(r,e,t){return E(this.configuration).streamPackageEvents(r,e,t).then(a=>a(this.axios,this.basePath))}}class ie{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(r={}){this.apiKey=r.apiKey,this.username=r.username,this.password=r.password,this.accessToken=r.accessToken,this.basePath=r.basePath,this.serverIndex=r.serverIndex,this.baseOptions={...r.baseOptions,headers:{...r.baseOptions?.headers}},this.formDataCtor=r.formDataCtor}isJsonMime(r){const e=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return r!==null&&(e.test(r)||r.toLowerCase()==="application/json-patch+json")}}const pe=new j.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}});h.defaults.baseURL||(h.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet");const me=U.createContext(void 0),Ge=(l,r)=>{const e=`${window.location.protocol}//${window.location.host}/api/v0`,t=h.create({baseURL:l||e,withCredentials:!0,timeout:6e5});t.interceptors.request.use(async n=>{const o=await r?.();return n.headers.Authorization=o||"",n});const a=new ie({basePath:e});return{models:new X(a,e,t),publisher:new se(a,e,t),environments:new _(a,e,t),packages:new te(a,e,t),pages:new re(a,e,t),notebooks:new ee(a,e,t),connections:new H(a,e,t),databases:new f(a,e,t),materializations:new J(a,e,t),watchMode:new le(a,e,t)}},_e=({children:l,getAccessToken:r,baseURL:e,mutable:t})=>{const a=U.useMemo(()=>Ge(e,r),[e,r]),n=e||`${window.location.protocol}//${window.location.host}/api/v0`,[o,s]=U.useState(t),[c,i]=U.useState(!0);U.useEffect(()=>{let d=!0;return(async()=>{try{const C=await a.publisher.getStatus();if(d){const A=C.data?.frozenConfig;let R;A?R=!1:t===void 0?R=!0:R=t,s(R),i(!1)}}catch(C){console.error("Failed to fetch publisher status:",C),d&&(s(t),i(!1))}})(),()=>{d=!1}},[a,t]);const p={server:n,getAccessToken:r,apiClients:a,mutable:o,isLoadingStatus:c};return q.jsx(j.QueryClientProvider,{client:pe,children:q.jsx(me.Provider,{value:p,children:l})})},Ye=()=>{const l=U.useContext(me);if(l===void 0)throw new Error("useServer must be used within a ServerProvider");return l};exports.AttachedDatabaseTypeEnum=he;exports.AzureConnectionAuthTypeEnum=ue;exports.CompileProblemSeverityEnum=Pe;exports.CompileResultStatusEnum=ge;exports.Configuration=ie;exports.ConnectionProxyTypeEnum=ve;exports.ConnectionStatusStatusEnum=be;exports.ConnectionTypeEnum=Ve;exports.ConnectionsApi=H;exports.ConnectionsApiAxiosParamCreator=L;exports.ConnectionsApiFactory=Me;exports.ConnectionsApiFp=S;exports.ConnectionsTestApi=Fe;exports.ConnectionsTestApiAxiosParamCreator=D;exports.ConnectionsTestApiFactory=we;exports.ConnectionsTestApiFp=Q;exports.DatabaseTypeEnum=Oe;exports.DatabasesApi=f;exports.DatabasesApiAxiosParamCreator=W;exports.DatabasesApiFactory=Qe;exports.DatabasesApiFp=$;exports.EnvironmentsApi=_;exports.EnvironmentsApiAxiosParamCreator=G;exports.EnvironmentsApiFactory=$e;exports.EnvironmentsApiFp=I;exports.ExecuteNotebookCellBypassFiltersEnum=Le;exports.FilterTypeEnum=Se;exports.LogMessageSeverityEnum=ye;exports.MaterializationActionActionEnum=ze;exports.MaterializationStatus=Ce;exports.MaterializationsApi=J;exports.MaterializationsApiAxiosParamCreator=Y;exports.MaterializationsApiFactory=Be;exports.MaterializationsApiFp=x;exports.ModelsApi=X;exports.ModelsApiAxiosParamCreator=K;exports.ModelsApiFactory=qe;exports.ModelsApiFp=T;exports.NotebookCellResultTypeEnum=Ae;exports.NotebookCellTypeEnum=ke;exports.NotebooksApi=ee;exports.NotebooksApiAxiosParamCreator=Z;exports.NotebooksApiFactory=je;exports.NotebooksApiFp=M;exports.PackageManifestBindingStatusEnum=xe;exports.PackageQueryableSourcesEnum=Ie;exports.PackageWarningsInnerSeverityEnum=Ne;exports.PackagesApi=te;exports.PackagesApiAxiosParamCreator=ae;exports.PackagesApiFactory=He;exports.PackagesApiFp=N;exports.PageFitEnum=Re;exports.PagesApi=re;exports.PagesApiAxiosParamCreator=ne;exports.PagesApiFactory=De;exports.PagesApiFp=B;exports.PostgresConnectionSslmodeEnum=Ue;exports.PublisherApi=se;exports.PublisherApiAxiosParamCreator=oe;exports.PublisherApiFactory=We;exports.PublisherApiFp=z;exports.Realization=Te;exports.ServerProvider=_e;exports.ServerStatusOperationalStateEnum=Ee;exports.WatchModeApi=le;exports.WatchModeApiAxiosParamCreator=ce;exports.WatchModeApiFactory=fe;exports.WatchModeApiFp=E;exports.globalQueryClient=pe;exports.useServer=Ye;
|