@malloy-publisher/sdk 0.0.155 → 0.0.157
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-BImNv6bh.es.js → ServerProvider-BBBZysNI.es.js} +701 -523
- package/dist/ServerProvider-CTnyNhoU.cjs.js +1 -0
- package/dist/client/api.d.ts +194 -0
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/ServerProvider.d.ts +5 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +3 -6
- package/package.json +1 -1
- package/src/components/Project/ConnectionExplorer.tsx +3 -1
- package/src/components/ServerProvider.tsx +16 -4
- package/dist/ServerProvider-PWUjfVQM.cjs.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const q=require("react/jsx-runtime"),B=require("@tanstack/react-query"),u=require("axios"),N=require("react"),m="http://localhost/api/v0".replace(/\/+$/,"");class A{constructor(a,e=m,r=u){this.basePath=e,this.axios=r,a&&(this.configuration=a,this.basePath=a.basePath??e)}configuration}class se extends Error{constructor(a,e){super(e),this.field=a,this.name="RequiredError"}}const P={},V="https://example.com",d=function(c,a,e){if(e==null)throw new se(a,`Required parameter ${a} was null or undefined when calling ${c}.`)};function T(c,a,e=""){a!=null&&(typeof a=="object"?Array.isArray(a)?a.forEach(r=>T(c,r,e)):Object.keys(a).forEach(r=>T(c,a[r],`${e}${e!==""?".":""}${r}`)):c.has(e)?c.append(e,a):c.set(e,a))}const b=function(c,...a){const e=new URLSearchParams(c.search);T(e,a),c.search=e.toString()},S=function(c,a,e){const r=typeof c!="string";return(r&&e&&e.isJsonMime?e.isJsonMime(a.headers["Content-Type"]):r)?JSON.stringify(c!==void 0?c:{}):c||""},O=function(c){return c.pathname+c.search+c.hash},g=function(c,a,e,r){return(t=a,o=e)=>{const s={...c.options,url:(t.defaults.baseURL?"":r?.basePath??o)+c.url};return t.request(s)}},ne={Bigquery:"bigquery",Snowflake:"snowflake",Postgres:"postgres",Gcs:"gcs",S3:"s3"},ce={Postgres:"postgres",Bigquery:"bigquery",Snowflake:"snowflake",Trino:"trino",Mysql:"mysql",Duckdb:"duckdb",Motherduck:"motherduck"},le={Ok:"ok",Failed:"failed"},ie={Embedded:"embedded",Materialized:"materialized"},pe={Markdown:"markdown",Code:"code"},de={Markdown:"markdown",Code:"code"},$=function(c){return{createConnection:async(a,e,r,t={})=>{d("createConnection","projectName",a),d("createConnection","connectionName",e),d("createConnection","connection",r);const o="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"POST",...n,...t},i={},p={};i["Content-Type"]="application/json",b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},l.data=S(r,l,c),{url:O(s),options:l}},deleteConnection:async(a,e,r={})=>{d("deleteConnection","projectName",a),d("deleteConnection","connectionName",e);const t="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"DELETE",...s,...r},l={};b(o,{});let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},{url:O(o),options:n}},getConnection:async(a,e,r={})=>{d("getConnection","projectName",a),d("getConnection","connectionName",e);const t="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"GET",...s,...r},l={};b(o,{});let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},{url:O(o),options:n}},getQuerydata:async(a,e,r,t,o={})=>{d("getQuerydata","projectName",a),d("getQuerydata","connectionName",e);const s="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...o},p={},h={};r!==void 0&&(h.sqlStatement=r),t!==void 0&&(h.options=t),b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},{url:O(n),options:i}},getSqlsource:async(a,e,r,t={})=>{d("getSqlsource","projectName",a),d("getSqlsource","connectionName",e);const o="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"GET",...n,...t},i={},p={};r!==void 0&&(p.sqlStatement=r),b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},{url:O(s),options:l}},getTable:async(a,e,r,t,o={})=>{d("getTable","projectName",a),d("getTable","connectionName",e),d("getTable","schemaName",r),d("getTable","tablePath",t);const s="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))).replace("{schemaName}",encodeURIComponent(String(r))).replace("{tablePath}",encodeURIComponent(String(t))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...o},p={};b(n,{});let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},{url:O(n),options:i}},getTablesource:async(a,e,r,t,o={})=>{d("getTablesource","projectName",a),d("getTablesource","connectionName",e);const s="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...o},p={},h={};r!==void 0&&(h.tableKey=r),t!==void 0&&(h.tablePath=t),b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},{url:O(n),options:i}},getTemporarytable:async(a,e,r,t={})=>{d("getTemporarytable","projectName",a),d("getTemporarytable","connectionName",e);const o="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"GET",...n,...t},i={},p={};r!==void 0&&(p.sqlStatement=r),b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},{url:O(s),options:l}},listConnections:async(a,e={})=>{d("listConnections","projectName",a);const r="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(a))),t=new URL(r,V);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...e},n={};b(t,{});let i=o&&o.headers?o.headers:{};return s.headers={...n,...i,...e.headers},{url:O(t),options:s}},listSchemas:async(a,e,r={})=>{d("listSchemas","projectName",a),d("listSchemas","connectionName",e);const t="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"GET",...s,...r},l={};b(o,{});let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},{url:O(o),options:n}},listTables:async(a,e,r,t={})=>{d("listTables","projectName",a),d("listTables","connectionName",e),d("listTables","schemaName",r);const o="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))).replace("{schemaName}",encodeURIComponent(String(r))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"GET",...n,...t},i={};b(s,{});let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},{url:O(s),options:l}},postQuerydata:async(a,e,r,t,o={})=>{d("postQuerydata","projectName",a),d("postQuerydata","connectionName",e),d("postQuerydata","postSqlsourceRequest",r);const s="/projects/{projectName}/connections/{connectionName}/sqlQuery".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...o},p={},h={};t!==void 0&&(h.options=t),p["Content-Type"]="application/json",b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},i.data=S(r,i,c),{url:O(n),options:i}},postSqlsource:async(a,e,r,t={})=>{d("postSqlsource","projectName",a),d("postSqlsource","connectionName",e),d("postSqlsource","postSqlsourceRequest",r);const o="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"POST",...n,...t},i={},p={};i["Content-Type"]="application/json",b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},l.data=S(r,l,c),{url:O(s),options:l}},postTemporarytable:async(a,e,r,t={})=>{d("postTemporarytable","projectName",a),d("postTemporarytable","connectionName",e),d("postTemporarytable","postSqlsourceRequest",r);const o="/projects/{projectName}/connections/{connectionName}/sqlTemporaryTable".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"POST",...n,...t},i={},p={};i["Content-Type"]="application/json",b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},l.data=S(r,l,c),{url:O(s),options:l}},updateConnection:async(a,e,r,t={})=>{d("updateConnection","projectName",a),d("updateConnection","connectionName",e),d("updateConnection","updateConnectionRequest",r);const o="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"PATCH",...n,...t},i={},p={};i["Content-Type"]="application/json",b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},l.data=S(r,l,c),{url:O(s),options:l}}}},y=function(c){const a=$(c);return{async createConnection(e,r,t,o){const s=await a.createConnection(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.createConnection"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)},async deleteConnection(e,r,t){const o=await a.deleteConnection(e,r,t),s=c?.serverIndex??0,n=P["ConnectionsApi.deleteConnection"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)},async getConnection(e,r,t){const o=await a.getConnection(e,r,t),s=c?.serverIndex??0,n=P["ConnectionsApi.getConnection"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)},async getQuerydata(e,r,t,o,s){const n=await a.getQuerydata(e,r,t,o,s),l=c?.serverIndex??0,i=P["ConnectionsApi.getQuerydata"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async getSqlsource(e,r,t,o){const s=await a.getSqlsource(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.getSqlsource"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)},async getTable(e,r,t,o,s){const n=await a.getTable(e,r,t,o,s),l=c?.serverIndex??0,i=P["ConnectionsApi.getTable"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async getTablesource(e,r,t,o,s){const n=await a.getTablesource(e,r,t,o,s),l=c?.serverIndex??0,i=P["ConnectionsApi.getTablesource"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async getTemporarytable(e,r,t,o){const s=await a.getTemporarytable(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.getTemporarytable"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)},async listConnections(e,r){const t=await a.listConnections(e,r),o=c?.serverIndex??0,s=P["ConnectionsApi.listConnections"]?.[o]?.url;return(n,l)=>g(t,u,m,c)(n,s||l)},async listSchemas(e,r,t){const o=await a.listSchemas(e,r,t),s=c?.serverIndex??0,n=P["ConnectionsApi.listSchemas"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)},async listTables(e,r,t,o){const s=await a.listTables(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.listTables"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)},async postQuerydata(e,r,t,o,s){const n=await a.postQuerydata(e,r,t,o,s),l=c?.serverIndex??0,i=P["ConnectionsApi.postQuerydata"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async postSqlsource(e,r,t,o){const s=await a.postSqlsource(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.postSqlsource"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)},async postTemporarytable(e,r,t,o){const s=await a.postTemporarytable(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.postTemporarytable"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)},async updateConnection(e,r,t,o){const s=await a.updateConnection(e,r,t,o),n=c?.serverIndex??0,l=P["ConnectionsApi.updateConnection"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)}}},he=function(c,a,e){const r=y(c);return{createConnection(t,o,s,n){return r.createConnection(t,o,s,n).then(l=>l(e,a))},deleteConnection(t,o,s){return r.deleteConnection(t,o,s).then(n=>n(e,a))},getConnection(t,o,s){return r.getConnection(t,o,s).then(n=>n(e,a))},getQuerydata(t,o,s,n,l){return r.getQuerydata(t,o,s,n,l).then(i=>i(e,a))},getSqlsource(t,o,s,n){return r.getSqlsource(t,o,s,n).then(l=>l(e,a))},getTable(t,o,s,n,l){return r.getTable(t,o,s,n,l).then(i=>i(e,a))},getTablesource(t,o,s,n,l){return r.getTablesource(t,o,s,n,l).then(i=>i(e,a))},getTemporarytable(t,o,s,n){return r.getTemporarytable(t,o,s,n).then(l=>l(e,a))},listConnections(t,o){return r.listConnections(t,o).then(s=>s(e,a))},listSchemas(t,o,s){return r.listSchemas(t,o,s).then(n=>n(e,a))},listTables(t,o,s,n){return r.listTables(t,o,s,n).then(l=>l(e,a))},postQuerydata(t,o,s,n,l){return r.postQuerydata(t,o,s,n,l).then(i=>i(e,a))},postSqlsource(t,o,s,n){return r.postSqlsource(t,o,s,n).then(l=>l(e,a))},postTemporarytable(t,o,s,n){return r.postTemporarytable(t,o,s,n).then(l=>l(e,a))},updateConnection(t,o,s,n){return r.updateConnection(t,o,s,n).then(l=>l(e,a))}}};class M extends A{createConnection(a,e,r,t){return y(this.configuration).createConnection(a,e,r,t).then(o=>o(this.axios,this.basePath))}deleteConnection(a,e,r){return y(this.configuration).deleteConnection(a,e,r).then(t=>t(this.axios,this.basePath))}getConnection(a,e,r){return y(this.configuration).getConnection(a,e,r).then(t=>t(this.axios,this.basePath))}getQuerydata(a,e,r,t,o){return y(this.configuration).getQuerydata(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getSqlsource(a,e,r,t){return y(this.configuration).getSqlsource(a,e,r,t).then(o=>o(this.axios,this.basePath))}getTable(a,e,r,t,o){return y(this.configuration).getTable(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getTablesource(a,e,r,t,o){return y(this.configuration).getTablesource(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getTemporarytable(a,e,r,t){return y(this.configuration).getTemporarytable(a,e,r,t).then(o=>o(this.axios,this.basePath))}listConnections(a,e){return y(this.configuration).listConnections(a,e).then(r=>r(this.axios,this.basePath))}listSchemas(a,e,r){return y(this.configuration).listSchemas(a,e,r).then(t=>t(this.axios,this.basePath))}listTables(a,e,r,t){return y(this.configuration).listTables(a,e,r,t).then(o=>o(this.axios,this.basePath))}postQuerydata(a,e,r,t,o){return y(this.configuration).postQuerydata(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}postSqlsource(a,e,r,t){return y(this.configuration).postSqlsource(a,e,r,t).then(o=>o(this.axios,this.basePath))}postTemporarytable(a,e,r,t){return y(this.configuration).postTemporarytable(a,e,r,t).then(o=>o(this.axios,this.basePath))}updateConnection(a,e,r,t){return y(this.configuration).updateConnection(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const E=function(c){return{testConnectionConfiguration:async(a,e={})=>{d("testConnectionConfiguration","connection",a);const r="/connections/test",t=new URL(r,V);let o;c&&(o=c.baseOptions);const s={method:"POST",...o,...e},n={},l={};n["Content-Type"]="application/json",b(t,l);let i=o&&o.headers?o.headers:{};return s.headers={...n,...i,...e.headers},s.data=S(a,s,c),{url:O(t),options:s}}}},w=function(c){const a=E(c);return{async testConnectionConfiguration(e,r){const t=await a.testConnectionConfiguration(e,r),o=c?.serverIndex??0,s=P["ConnectionsTestApi.testConnectionConfiguration"]?.[o]?.url;return(n,l)=>g(t,u,m,c)(n,s||l)}}},ue=function(c,a,e){const r=w(c);return{testConnectionConfiguration(t,o){return r.testConnectionConfiguration(t,o).then(s=>s(e,a))}}};class me extends A{testConnectionConfiguration(a,e){return w(this.configuration).testConnectionConfiguration(a,e).then(r=>r(this.axios,this.basePath))}}const L=function(c){return{listDatabases:async(a,e,r,t={})=>{d("listDatabases","projectName",a),d("listDatabases","packageName",e);const o="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"GET",...n,...t},i={},p={};r!==void 0&&(p.versionId=r),b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},{url:O(s),options:l}}}},Q=function(c){const a=L(c);return{async listDatabases(e,r,t,o){const s=await a.listDatabases(e,r,t,o),n=c?.serverIndex??0,l=P["DatabasesApi.listDatabases"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)}}},Pe=function(c,a,e){const r=Q(c);return{listDatabases(t,o,s,n){return r.listDatabases(t,o,s,n).then(l=>l(e,a))}}};class H extends A{listDatabases(a,e,r,t){return Q(this.configuration).listDatabases(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const W=function(c){return{executeQueryModel:async(a,e,r,t,o={})=>{d("executeQueryModel","projectName",a),d("executeQueryModel","packageName",e),d("executeQueryModel","path",r),d("executeQueryModel","queryRequest",t);const s="/projects/{projectName}/packages/{packageName}/models/{path}/query".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...o},p={},h={};p["Content-Type"]="application/json",b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},i.data=S(t,i,c),{url:O(n),options:i}},getModel:async(a,e,r,t,o={})=>{d("getModel","projectName",a),d("getModel","packageName",e),d("getModel","path",r);const s="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...o},p={},h={};t!==void 0&&(h.versionId=t),b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},{url:O(n),options:i}},listModels:async(a,e,r,t={})=>{d("listModels","projectName",a),d("listModels","packageName",e);const o="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"GET",...n,...t},i={},p={};r!==void 0&&(p.versionId=r),b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},{url:O(s),options:l}}}},v=function(c){const a=W(c);return{async executeQueryModel(e,r,t,o,s){const n=await a.executeQueryModel(e,r,t,o,s),l=c?.serverIndex??0,i=P["ModelsApi.executeQueryModel"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async getModel(e,r,t,o,s){const n=await a.getModel(e,r,t,o,s),l=c?.serverIndex??0,i=P["ModelsApi.getModel"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async listModels(e,r,t,o){const s=await a.listModels(e,r,t,o),n=c?.serverIndex??0,l=P["ModelsApi.listModels"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)}}},Ve=function(c,a,e){const r=v(c);return{executeQueryModel(t,o,s,n,l){return r.executeQueryModel(t,o,s,n,l).then(i=>i(e,a))},getModel(t,o,s,n,l){return r.getModel(t,o,s,n,l).then(i=>i(e,a))},listModels(t,o,s,n){return r.listModels(t,o,s,n).then(l=>l(e,a))}}};class D extends A{executeQueryModel(a,e,r,t,o){return v(this.configuration).executeQueryModel(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getModel(a,e,r,t,o){return v(this.configuration).getModel(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}listModels(a,e,r,t){return v(this.configuration).listModels(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const f=function(c){return{executeNotebookCell:async(a,e,r,t,o,s={})=>{d("executeNotebookCell","projectName",a),d("executeNotebookCell","packageName",e),d("executeNotebookCell","path",r),d("executeNotebookCell","cellIndex",t);const n="/projects/{projectName}/packages/{packageName}/notebooks/{path}/cells/{cellIndex}".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))).replace("{cellIndex}",encodeURIComponent(String(t))),l=new URL(n,V);let i;c&&(i=c.baseOptions);const p={method:"GET",...i,...s},h={},C={};o!==void 0&&(C.versionId=o),b(l,C);let k=i&&i.headers?i.headers:{};return p.headers={...h,...k,...s.headers},{url:O(l),options:p}},getNotebook:async(a,e,r,t,o={})=>{d("getNotebook","projectName",a),d("getNotebook","packageName",e),d("getNotebook","path",r);const s="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...o},p={},h={};t!==void 0&&(h.versionId=t),b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},{url:O(n),options:i}},listNotebooks:async(a,e,r,t={})=>{d("listNotebooks","projectName",a),d("listNotebooks","packageName",e);const o="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"GET",...n,...t},i={},p={};r!==void 0&&(p.versionId=r),b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},{url:O(s),options:l}}}},R=function(c){const a=f(c);return{async executeNotebookCell(e,r,t,o,s,n){const l=await a.executeNotebookCell(e,r,t,o,s,n),i=c?.serverIndex??0,p=P["NotebooksApi.executeNotebookCell"]?.[i]?.url;return(h,C)=>g(l,u,m,c)(h,p||C)},async getNotebook(e,r,t,o,s){const n=await a.getNotebook(e,r,t,o,s),l=c?.serverIndex??0,i=P["NotebooksApi.getNotebook"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async listNotebooks(e,r,t,o){const s=await a.listNotebooks(e,r,t,o),n=c?.serverIndex??0,l=P["NotebooksApi.listNotebooks"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)}}},be=function(c,a,e){const r=R(c);return{executeNotebookCell(t,o,s,n,l,i){return r.executeNotebookCell(t,o,s,n,l,i).then(p=>p(e,a))},getNotebook(t,o,s,n,l){return r.getNotebook(t,o,s,n,l).then(i=>i(e,a))},listNotebooks(t,o,s,n){return r.listNotebooks(t,o,s,n).then(l=>l(e,a))}}};class G extends A{executeNotebookCell(a,e,r,t,o,s){return R(this.configuration).executeNotebookCell(a,e,r,t,o,s).then(n=>n(this.axios,this.basePath))}getNotebook(a,e,r,t,o){return R(this.configuration).getNotebook(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}listNotebooks(a,e,r,t){return R(this.configuration).listNotebooks(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const z=function(c){return{createPackage:async(a,e,r={})=>{d("createPackage","projectName",a),d("createPackage","_package",e);const t="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(a))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"POST",...s,...r},l={},i={};l["Content-Type"]="application/json",b(o,i);let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},n.data=S(e,n,c),{url:O(o),options:n}},deletePackage:async(a,e,r={})=>{d("deletePackage","projectName",a),d("deletePackage","packageName",e);const t="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"DELETE",...s,...r},l={};b(o,{});let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},{url:O(o),options:n}},getPackage:async(a,e,r,t,o={})=>{d("getPackage","projectName",a),d("getPackage","packageName",e);const s="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))),n=new URL(s,V);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...o},p={},h={};r!==void 0&&(h.versionId=r),t!==void 0&&(h.reload=t),b(n,h);let C=l&&l.headers?l.headers:{};return i.headers={...p,...C,...o.headers},{url:O(n),options:i}},listPackages:async(a,e={})=>{d("listPackages","projectName",a);const r="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(a))),t=new URL(r,V);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...e},n={};b(t,{});let i=o&&o.headers?o.headers:{};return s.headers={...n,...i,...e.headers},{url:O(t),options:s}},updatePackage:async(a,e,r,t={})=>{d("updatePackage","projectName",a),d("updatePackage","packageName",e),d("updatePackage","_package",r);const o="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(a))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,V);let n;c&&(n=c.baseOptions);const l={method:"PATCH",...n,...t},i={},p={};i["Content-Type"]="application/json",b(s,p);let h=n&&n.headers?n.headers:{};return l.headers={...i,...h,...t.headers},l.data=S(r,l,c),{url:O(s),options:l}}}},j=function(c){const a=z(c);return{async createPackage(e,r,t){const o=await a.createPackage(e,r,t),s=c?.serverIndex??0,n=P["PackagesApi.createPackage"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)},async deletePackage(e,r,t){const o=await a.deletePackage(e,r,t),s=c?.serverIndex??0,n=P["PackagesApi.deletePackage"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)},async getPackage(e,r,t,o,s){const n=await a.getPackage(e,r,t,o,s),l=c?.serverIndex??0,i=P["PackagesApi.getPackage"]?.[l]?.url;return(p,h)=>g(n,u,m,c)(p,i||h)},async listPackages(e,r){const t=await a.listPackages(e,r),o=c?.serverIndex??0,s=P["PackagesApi.listPackages"]?.[o]?.url;return(n,l)=>g(t,u,m,c)(n,s||l)},async updatePackage(e,r,t,o){const s=await a.updatePackage(e,r,t,o),n=c?.serverIndex??0,l=P["PackagesApi.updatePackage"]?.[n]?.url;return(i,p)=>g(s,u,m,c)(i,l||p)}}},Oe=function(c,a,e){const r=j(c);return{createPackage(t,o,s){return r.createPackage(t,o,s).then(n=>n(e,a))},deletePackage(t,o,s){return r.deletePackage(t,o,s).then(n=>n(e,a))},getPackage(t,o,s,n,l){return r.getPackage(t,o,s,n,l).then(i=>i(e,a))},listPackages(t,o){return r.listPackages(t,o).then(s=>s(e,a))},updatePackage(t,o,s,n){return r.updatePackage(t,o,s,n).then(l=>l(e,a))}}};class J extends A{createPackage(a,e,r){return j(this.configuration).createPackage(a,e,r).then(t=>t(this.axios,this.basePath))}deletePackage(a,e,r){return j(this.configuration).deletePackage(a,e,r).then(t=>t(this.axios,this.basePath))}getPackage(a,e,r,t,o){return j(this.configuration).getPackage(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}listPackages(a,e){return j(this.configuration).listPackages(a,e).then(r=>r(this.axios,this.basePath))}updatePackage(a,e,r,t){return j(this.configuration).updatePackage(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const K=function(c){return{createProject:async(a,e={})=>{d("createProject","project",a);const r="/projects",t=new URL(r,V);let o;c&&(o=c.baseOptions);const s={method:"POST",...o,...e},n={},l={};n["Content-Type"]="application/json",b(t,l);let i=o&&o.headers?o.headers:{};return s.headers={...n,...i,...e.headers},s.data=S(a,s,c),{url:O(t),options:s}},deleteProject:async(a,e={})=>{d("deleteProject","projectName",a);const r="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(a))),t=new URL(r,V);let o;c&&(o=c.baseOptions);const s={method:"DELETE",...o,...e},n={};b(t,{});let i=o&&o.headers?o.headers:{};return s.headers={...n,...i,...e.headers},{url:O(t),options:s}},getProject:async(a,e,r={})=>{d("getProject","projectName",a);const t="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(a))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"GET",...s,...r},l={},i={};e!==void 0&&(i.reload=e),b(o,i);let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},{url:O(o),options:n}},listProjects:async(a={})=>{const e="/projects",r=new URL(e,V);let t;c&&(t=c.baseOptions);const o={method:"GET",...t,...a},s={};b(r,{});let l=t&&t.headers?t.headers:{};return o.headers={...s,...l,...a.headers},{url:O(r),options:o}},updateProject:async(a,e,r={})=>{d("updateProject","projectName",a),d("updateProject","project",e);const t="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(a))),o=new URL(t,V);let s;c&&(s=c.baseOptions);const n={method:"PATCH",...s,...r},l={},i={};l["Content-Type"]="application/json",b(o,i);let p=s&&s.headers?s.headers:{};return n.headers={...l,...p,...r.headers},n.data=S(e,n,c),{url:O(o),options:n}}}},x=function(c){const a=K(c);return{async createProject(e,r){const t=await a.createProject(e,r),o=c?.serverIndex??0,s=P["ProjectsApi.createProject"]?.[o]?.url;return(n,l)=>g(t,u,m,c)(n,s||l)},async deleteProject(e,r){const t=await a.deleteProject(e,r),o=c?.serverIndex??0,s=P["ProjectsApi.deleteProject"]?.[o]?.url;return(n,l)=>g(t,u,m,c)(n,s||l)},async getProject(e,r,t){const o=await a.getProject(e,r,t),s=c?.serverIndex??0,n=P["ProjectsApi.getProject"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)},async listProjects(e){const r=await a.listProjects(e),t=c?.serverIndex??0,o=P["ProjectsApi.listProjects"]?.[t]?.url;return(s,n)=>g(r,u,m,c)(s,o||n)},async updateProject(e,r,t){const o=await a.updateProject(e,r,t),s=c?.serverIndex??0,n=P["ProjectsApi.updateProject"]?.[s]?.url;return(l,i)=>g(o,u,m,c)(l,n||i)}}},ge=function(c,a,e){const r=x(c);return{createProject(t,o){return r.createProject(t,o).then(s=>s(e,a))},deleteProject(t,o){return r.deleteProject(t,o).then(s=>s(e,a))},getProject(t,o,s){return r.getProject(t,o,s).then(n=>n(e,a))},listProjects(t){return r.listProjects(t).then(o=>o(e,a))},updateProject(t,o,s){return r.updateProject(t,o,s).then(n=>n(e,a))}}};class Y extends A{createProject(a,e){return x(this.configuration).createProject(a,e).then(r=>r(this.axios,this.basePath))}deleteProject(a,e){return x(this.configuration).deleteProject(a,e).then(r=>r(this.axios,this.basePath))}getProject(a,e,r){return x(this.configuration).getProject(a,e,r).then(t=>t(this.axios,this.basePath))}listProjects(a){return x(this.configuration).listProjects(a).then(e=>e(this.axios,this.basePath))}updateProject(a,e,r){return x(this.configuration).updateProject(a,e,r).then(t=>t(this.axios,this.basePath))}}const _=function(c){return{getStatus:async(a={})=>{const e="/status",r=new URL(e,V);let t;c&&(t=c.baseOptions);const o={method:"GET",...t,...a},s={};b(r,{});let l=t&&t.headers?t.headers:{};return o.headers={...s,...l,...a.headers},{url:O(r),options:o}}}},F=function(c){const a=_(c);return{async getStatus(e){const r=await a.getStatus(e),t=c?.serverIndex??0,o=P["PublisherApi.getStatus"]?.[t]?.url;return(s,n)=>g(r,u,m,c)(s,o||n)}}},Ce=function(c,a,e){const r=F(c);return{getStatus(t){return r.getStatus(t).then(o=>o(e,a))}}};class X extends A{getStatus(a){return F(this.configuration).getStatus(a).then(e=>e(this.axios,this.basePath))}}const Z=function(c){return{getWatchStatus:async(a={})=>{const e="/watch-mode/status",r=new URL(e,V);let t;c&&(t=c.baseOptions);const o={method:"GET",...t,...a},s={};b(r,{});let l=t&&t.headers?t.headers:{};return o.headers={...s,...l,...a.headers},{url:O(r),options:o}},startWatching:async(a,e={})=>{d("startWatching","startWatchRequest",a);const r="/watch-mode/start",t=new URL(r,V);let o;c&&(o=c.baseOptions);const s={method:"POST",...o,...e},n={},l={};n["Content-Type"]="application/json",b(t,l);let i=o&&o.headers?o.headers:{};return s.headers={...n,...i,...e.headers},s.data=S(a,s,c),{url:O(t),options:s}},stopWatching:async(a={})=>{const e="/watch-mode/stop",r=new URL(e,V);let t;c&&(t=c.baseOptions);const o={method:"POST",...t,...a},s={};b(r,{});let l=t&&t.headers?t.headers:{};return o.headers={...s,...l,...a.headers},{url:O(r),options:o}}}},I=function(c){const a=Z(c);return{async getWatchStatus(e){const r=await a.getWatchStatus(e),t=c?.serverIndex??0,o=P["WatchModeApi.getWatchStatus"]?.[t]?.url;return(s,n)=>g(r,u,m,c)(s,o||n)},async startWatching(e,r){const t=await a.startWatching(e,r),o=c?.serverIndex??0,s=P["WatchModeApi.startWatching"]?.[o]?.url;return(n,l)=>g(t,u,m,c)(n,s||l)},async stopWatching(e){const r=await a.stopWatching(e),t=c?.serverIndex??0,o=P["WatchModeApi.stopWatching"]?.[t]?.url;return(s,n)=>g(r,u,m,c)(s,o||n)}}},ye=function(c,a,e){const r=I(c);return{getWatchStatus(t){return r.getWatchStatus(t).then(o=>o(e,a))},startWatching(t,o){return r.startWatching(t,o).then(s=>s(e,a))},stopWatching(t){return r.stopWatching(t).then(o=>o(e,a))}}};class ee extends A{getWatchStatus(a){return I(this.configuration).getWatchStatus(a).then(e=>e(this.axios,this.basePath))}startWatching(a,e){return I(this.configuration).startWatching(a,e).then(r=>r(this.axios,this.basePath))}stopWatching(a){return I(this.configuration).stopWatching(a).then(e=>e(this.axios,this.basePath))}}class te{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(a={}){this.apiKey=a.apiKey,this.username=a.username,this.password=a.password,this.accessToken=a.accessToken,this.basePath=a.basePath,this.serverIndex=a.serverIndex,this.baseOptions={...a.baseOptions,headers:{...a.baseOptions?.headers}},this.formDataCtor=a.formDataCtor}isJsonMime(a){const e=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return a!==null&&(e.test(a)||a.toLowerCase()==="application/json-patch+json")}}const ae=new B.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),re=N.createContext(void 0),Se=(c,a)=>{const e=`${window.location.protocol}//${window.location.host}/api/v0`,r=u.create({baseURL:c||e,withCredentials:!0,timeout:6e5});r.interceptors.request.use(async o=>{const s=await a?.();return o.headers.Authorization=s||"",o});const t=new te({basePath:e});return{models:new D(t,e,r),publisher:new X(t,e,r),projects:new Y(t,e,r),packages:new J(t,e,r),notebooks:new G(t,e,r),connections:new M(t,e,r),databases:new H(t,e,r),watchMode:new ee(t,e,r)}},Ae=({children:c,getAccessToken:a,baseURL:e,mutable:r})=>{const t=N.useMemo(()=>Se(e,a),[e,a]),o=e||`${window.location.protocol}//${window.location.host}/api/v0`,[s,n]=N.useState(r),[l,i]=N.useState(!0);N.useEffect(()=>{let h=!0;return(async()=>{try{const k=await t.publisher.getStatus();if(h){const oe=k.data?.frozenConfig;let U;oe?U=!1:r===void 0?U=!0:U=r,n(U),i(!1)}}catch(k){console.error("Failed to fetch publisher status:",k),h&&(n(r),i(!1))}})(),()=>{h=!1}},[t,r]);const p={server:o,getAccessToken:a,apiClients:t,mutable:s,isLoadingStatus:l};return q.jsx(B.QueryClientProvider,{client:ae,children:q.jsx(re.Provider,{value:p,children:c})})},je=()=>{const c=N.useContext(re);if(c===void 0)throw new Error("useServer must be used within a ServerProvider");return c};exports.AttachedDatabaseTypeEnum=ne;exports.Configuration=te;exports.ConnectionStatusStatusEnum=le;exports.ConnectionTypeEnum=ce;exports.ConnectionsApi=M;exports.ConnectionsApiAxiosParamCreator=$;exports.ConnectionsApiFactory=he;exports.ConnectionsApiFp=y;exports.ConnectionsTestApi=me;exports.ConnectionsTestApiAxiosParamCreator=E;exports.ConnectionsTestApiFactory=ue;exports.ConnectionsTestApiFp=w;exports.DatabaseTypeEnum=ie;exports.DatabasesApi=H;exports.DatabasesApiAxiosParamCreator=L;exports.DatabasesApiFactory=Pe;exports.DatabasesApiFp=Q;exports.ModelsApi=D;exports.ModelsApiAxiosParamCreator=W;exports.ModelsApiFactory=Ve;exports.ModelsApiFp=v;exports.NotebookCellResultTypeEnum=de;exports.NotebookCellTypeEnum=pe;exports.NotebooksApi=G;exports.NotebooksApiAxiosParamCreator=f;exports.NotebooksApiFactory=be;exports.NotebooksApiFp=R;exports.PackagesApi=J;exports.PackagesApiAxiosParamCreator=z;exports.PackagesApiFactory=Oe;exports.PackagesApiFp=j;exports.ProjectsApi=Y;exports.ProjectsApiAxiosParamCreator=K;exports.ProjectsApiFactory=ge;exports.ProjectsApiFp=x;exports.PublisherApi=X;exports.PublisherApiAxiosParamCreator=_;exports.PublisherApiFactory=Ce;exports.PublisherApiFp=F;exports.ServerProvider=Ae;exports.WatchModeApi=ee;exports.WatchModeApiAxiosParamCreator=Z;exports.WatchModeApiFactory=ye;exports.WatchModeApiFp=I;exports.globalQueryClient=ae;exports.useServer=je;
|
package/dist/client/api.d.ts
CHANGED
|
@@ -313,6 +313,32 @@ export declare const ConnectionStatusStatusEnum: {
|
|
|
313
313
|
readonly Failed: "failed";
|
|
314
314
|
};
|
|
315
315
|
export type ConnectionStatusStatusEnum = typeof ConnectionStatusStatusEnum[keyof typeof ConnectionStatusStatusEnum];
|
|
316
|
+
/**
|
|
317
|
+
*
|
|
318
|
+
* @export
|
|
319
|
+
* @interface CreateConnection201Response
|
|
320
|
+
*/
|
|
321
|
+
export interface CreateConnection201Response {
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @type {string}
|
|
325
|
+
* @memberof CreateConnection201Response
|
|
326
|
+
*/
|
|
327
|
+
'message'?: string;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
* @export
|
|
332
|
+
* @interface CreateConnection409Response
|
|
333
|
+
*/
|
|
334
|
+
export interface CreateConnection409Response {
|
|
335
|
+
/**
|
|
336
|
+
*
|
|
337
|
+
* @type {string}
|
|
338
|
+
* @memberof CreateConnection409Response
|
|
339
|
+
*/
|
|
340
|
+
'error'?: string;
|
|
341
|
+
}
|
|
316
342
|
/**
|
|
317
343
|
* Embedded database within a Malloy package
|
|
318
344
|
* @export
|
|
@@ -1198,6 +1224,55 @@ export interface TrinoConnection {
|
|
|
1198
1224
|
*/
|
|
1199
1225
|
'peakaKey'?: string;
|
|
1200
1226
|
}
|
|
1227
|
+
/**
|
|
1228
|
+
*
|
|
1229
|
+
* @export
|
|
1230
|
+
* @interface UpdateConnectionRequest
|
|
1231
|
+
*/
|
|
1232
|
+
export interface UpdateConnectionRequest {
|
|
1233
|
+
/**
|
|
1234
|
+
*
|
|
1235
|
+
* @type {PostgresConnection}
|
|
1236
|
+
* @memberof UpdateConnectionRequest
|
|
1237
|
+
*/
|
|
1238
|
+
'postgresConnection'?: PostgresConnection;
|
|
1239
|
+
/**
|
|
1240
|
+
*
|
|
1241
|
+
* @type {MysqlConnection}
|
|
1242
|
+
* @memberof UpdateConnectionRequest
|
|
1243
|
+
*/
|
|
1244
|
+
'mysqlConnection'?: MysqlConnection;
|
|
1245
|
+
/**
|
|
1246
|
+
*
|
|
1247
|
+
* @type {BigqueryConnection}
|
|
1248
|
+
* @memberof UpdateConnectionRequest
|
|
1249
|
+
*/
|
|
1250
|
+
'bigqueryConnection'?: BigqueryConnection;
|
|
1251
|
+
/**
|
|
1252
|
+
*
|
|
1253
|
+
* @type {SnowflakeConnection}
|
|
1254
|
+
* @memberof UpdateConnectionRequest
|
|
1255
|
+
*/
|
|
1256
|
+
'snowflakeConnection'?: SnowflakeConnection;
|
|
1257
|
+
/**
|
|
1258
|
+
*
|
|
1259
|
+
* @type {DuckdbConnection}
|
|
1260
|
+
* @memberof UpdateConnectionRequest
|
|
1261
|
+
*/
|
|
1262
|
+
'duckdbConnection'?: DuckdbConnection;
|
|
1263
|
+
/**
|
|
1264
|
+
*
|
|
1265
|
+
* @type {MotherDuckConnection}
|
|
1266
|
+
* @memberof UpdateConnectionRequest
|
|
1267
|
+
*/
|
|
1268
|
+
'motherduckConnection'?: MotherDuckConnection;
|
|
1269
|
+
/**
|
|
1270
|
+
*
|
|
1271
|
+
* @type {TrinoConnection}
|
|
1272
|
+
* @memberof UpdateConnectionRequest
|
|
1273
|
+
*/
|
|
1274
|
+
'trinoConnection'?: TrinoConnection;
|
|
1275
|
+
}
|
|
1201
1276
|
/**
|
|
1202
1277
|
* Named model view definition
|
|
1203
1278
|
* @export
|
|
@@ -1247,6 +1322,25 @@ export interface WatchStatus {
|
|
|
1247
1322
|
* @export
|
|
1248
1323
|
*/
|
|
1249
1324
|
export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
1325
|
+
/**
|
|
1326
|
+
* Creates a new database connection in the specified project.
|
|
1327
|
+
* @summary Create a new database connection
|
|
1328
|
+
* @param {string} projectName Name of the project
|
|
1329
|
+
* @param {string} connectionName Name of the connection
|
|
1330
|
+
* @param {Connection} connection
|
|
1331
|
+
* @param {*} [options] Override http request option.
|
|
1332
|
+
* @throws {RequiredError}
|
|
1333
|
+
*/
|
|
1334
|
+
createConnection: (projectName: string, connectionName: string, connection: Connection, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Permanently deletes a database connection from the project.
|
|
1337
|
+
* @summary Delete a database connection
|
|
1338
|
+
* @param {string} projectName Name of the project
|
|
1339
|
+
* @param {string} connectionName Name of the connection to delete
|
|
1340
|
+
* @param {*} [options] Override http request option.
|
|
1341
|
+
* @throws {RequiredError}
|
|
1342
|
+
*/
|
|
1343
|
+
deleteConnection: (projectName: string, connectionName: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1250
1344
|
/**
|
|
1251
1345
|
* Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
|
|
1252
1346
|
* @summary Get connection details
|
|
@@ -1371,12 +1465,41 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
|
|
|
1371
1465
|
* @throws {RequiredError}
|
|
1372
1466
|
*/
|
|
1373
1467
|
postTemporarytable: (projectName: string, connectionName: string, postSqlsourceRequest: PostSqlsourceRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Updates the configuration of an existing database connection.
|
|
1470
|
+
* @summary Update an existing database connection
|
|
1471
|
+
* @param {string} projectName Name of the project
|
|
1472
|
+
* @param {string} connectionName Name of the connection to update
|
|
1473
|
+
* @param {UpdateConnectionRequest} updateConnectionRequest
|
|
1474
|
+
* @param {*} [options] Override http request option.
|
|
1475
|
+
* @throws {RequiredError}
|
|
1476
|
+
*/
|
|
1477
|
+
updateConnection: (projectName: string, connectionName: string, updateConnectionRequest: UpdateConnectionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1374
1478
|
};
|
|
1375
1479
|
/**
|
|
1376
1480
|
* ConnectionsApi - functional programming interface
|
|
1377
1481
|
* @export
|
|
1378
1482
|
*/
|
|
1379
1483
|
export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
1484
|
+
/**
|
|
1485
|
+
* Creates a new database connection in the specified project.
|
|
1486
|
+
* @summary Create a new database connection
|
|
1487
|
+
* @param {string} projectName Name of the project
|
|
1488
|
+
* @param {string} connectionName Name of the connection
|
|
1489
|
+
* @param {Connection} connection
|
|
1490
|
+
* @param {*} [options] Override http request option.
|
|
1491
|
+
* @throws {RequiredError}
|
|
1492
|
+
*/
|
|
1493
|
+
createConnection(projectName: string, connectionName: string, connection: Connection, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateConnection201Response>>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Permanently deletes a database connection from the project.
|
|
1496
|
+
* @summary Delete a database connection
|
|
1497
|
+
* @param {string} projectName Name of the project
|
|
1498
|
+
* @param {string} connectionName Name of the connection to delete
|
|
1499
|
+
* @param {*} [options] Override http request option.
|
|
1500
|
+
* @throws {RequiredError}
|
|
1501
|
+
*/
|
|
1502
|
+
deleteConnection(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateConnection201Response>>;
|
|
1380
1503
|
/**
|
|
1381
1504
|
* Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
|
|
1382
1505
|
* @summary Get connection details
|
|
@@ -1501,12 +1624,41 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
|
1501
1624
|
* @throws {RequiredError}
|
|
1502
1625
|
*/
|
|
1503
1626
|
postTemporarytable(projectName: string, connectionName: string, postSqlsourceRequest: PostSqlsourceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TemporaryTable>>;
|
|
1627
|
+
/**
|
|
1628
|
+
* Updates the configuration of an existing database connection.
|
|
1629
|
+
* @summary Update an existing database connection
|
|
1630
|
+
* @param {string} projectName Name of the project
|
|
1631
|
+
* @param {string} connectionName Name of the connection to update
|
|
1632
|
+
* @param {UpdateConnectionRequest} updateConnectionRequest
|
|
1633
|
+
* @param {*} [options] Override http request option.
|
|
1634
|
+
* @throws {RequiredError}
|
|
1635
|
+
*/
|
|
1636
|
+
updateConnection(projectName: string, connectionName: string, updateConnectionRequest: UpdateConnectionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateConnection201Response>>;
|
|
1504
1637
|
};
|
|
1505
1638
|
/**
|
|
1506
1639
|
* ConnectionsApi - factory interface
|
|
1507
1640
|
* @export
|
|
1508
1641
|
*/
|
|
1509
1642
|
export declare const ConnectionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
1643
|
+
/**
|
|
1644
|
+
* Creates a new database connection in the specified project.
|
|
1645
|
+
* @summary Create a new database connection
|
|
1646
|
+
* @param {string} projectName Name of the project
|
|
1647
|
+
* @param {string} connectionName Name of the connection
|
|
1648
|
+
* @param {Connection} connection
|
|
1649
|
+
* @param {*} [options] Override http request option.
|
|
1650
|
+
* @throws {RequiredError}
|
|
1651
|
+
*/
|
|
1652
|
+
createConnection(projectName: string, connectionName: string, connection: Connection, options?: RawAxiosRequestConfig): AxiosPromise<CreateConnection201Response>;
|
|
1653
|
+
/**
|
|
1654
|
+
* Permanently deletes a database connection from the project.
|
|
1655
|
+
* @summary Delete a database connection
|
|
1656
|
+
* @param {string} projectName Name of the project
|
|
1657
|
+
* @param {string} connectionName Name of the connection to delete
|
|
1658
|
+
* @param {*} [options] Override http request option.
|
|
1659
|
+
* @throws {RequiredError}
|
|
1660
|
+
*/
|
|
1661
|
+
deleteConnection(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): AxiosPromise<CreateConnection201Response>;
|
|
1510
1662
|
/**
|
|
1511
1663
|
* Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
|
|
1512
1664
|
* @summary Get connection details
|
|
@@ -1631,6 +1783,16 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
|
|
|
1631
1783
|
* @throws {RequiredError}
|
|
1632
1784
|
*/
|
|
1633
1785
|
postTemporarytable(projectName: string, connectionName: string, postSqlsourceRequest: PostSqlsourceRequest, options?: RawAxiosRequestConfig): AxiosPromise<TemporaryTable>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Updates the configuration of an existing database connection.
|
|
1788
|
+
* @summary Update an existing database connection
|
|
1789
|
+
* @param {string} projectName Name of the project
|
|
1790
|
+
* @param {string} connectionName Name of the connection to update
|
|
1791
|
+
* @param {UpdateConnectionRequest} updateConnectionRequest
|
|
1792
|
+
* @param {*} [options] Override http request option.
|
|
1793
|
+
* @throws {RequiredError}
|
|
1794
|
+
*/
|
|
1795
|
+
updateConnection(projectName: string, connectionName: string, updateConnectionRequest: UpdateConnectionRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateConnection201Response>;
|
|
1634
1796
|
};
|
|
1635
1797
|
/**
|
|
1636
1798
|
* ConnectionsApi - object-oriented interface
|
|
@@ -1639,6 +1801,27 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
|
|
|
1639
1801
|
* @extends {BaseAPI}
|
|
1640
1802
|
*/
|
|
1641
1803
|
export declare class ConnectionsApi extends BaseAPI {
|
|
1804
|
+
/**
|
|
1805
|
+
* Creates a new database connection in the specified project.
|
|
1806
|
+
* @summary Create a new database connection
|
|
1807
|
+
* @param {string} projectName Name of the project
|
|
1808
|
+
* @param {string} connectionName Name of the connection
|
|
1809
|
+
* @param {Connection} connection
|
|
1810
|
+
* @param {*} [options] Override http request option.
|
|
1811
|
+
* @throws {RequiredError}
|
|
1812
|
+
* @memberof ConnectionsApi
|
|
1813
|
+
*/
|
|
1814
|
+
createConnection(projectName: string, connectionName: string, connection: Connection, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CreateConnection201Response, any, {}>>;
|
|
1815
|
+
/**
|
|
1816
|
+
* Permanently deletes a database connection from the project.
|
|
1817
|
+
* @summary Delete a database connection
|
|
1818
|
+
* @param {string} projectName Name of the project
|
|
1819
|
+
* @param {string} connectionName Name of the connection to delete
|
|
1820
|
+
* @param {*} [options] Override http request option.
|
|
1821
|
+
* @throws {RequiredError}
|
|
1822
|
+
* @memberof ConnectionsApi
|
|
1823
|
+
*/
|
|
1824
|
+
deleteConnection(projectName: string, connectionName: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CreateConnection201Response, any, {}>>;
|
|
1642
1825
|
/**
|
|
1643
1826
|
* Retrieves detailed information about a specific database connection within a project. This includes connection configuration, credentials (if accessible), and metadata. Useful for inspecting connection settings and troubleshooting connectivity issues.
|
|
1644
1827
|
* @summary Get connection details
|
|
@@ -1775,6 +1958,17 @@ export declare class ConnectionsApi extends BaseAPI {
|
|
|
1775
1958
|
* @memberof ConnectionsApi
|
|
1776
1959
|
*/
|
|
1777
1960
|
postTemporarytable(projectName: string, connectionName: string, postSqlsourceRequest: PostSqlsourceRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<TemporaryTable, any, {}>>;
|
|
1961
|
+
/**
|
|
1962
|
+
* Updates the configuration of an existing database connection.
|
|
1963
|
+
* @summary Update an existing database connection
|
|
1964
|
+
* @param {string} projectName Name of the project
|
|
1965
|
+
* @param {string} connectionName Name of the connection to update
|
|
1966
|
+
* @param {UpdateConnectionRequest} updateConnectionRequest
|
|
1967
|
+
* @param {*} [options] Override http request option.
|
|
1968
|
+
* @throws {RequiredError}
|
|
1969
|
+
* @memberof ConnectionsApi
|
|
1970
|
+
*/
|
|
1971
|
+
updateConnection(projectName: string, connectionName: string, updateConnectionRequest: UpdateConnectionRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CreateConnection201Response, any, {}>>;
|
|
1778
1972
|
}
|
|
1779
1973
|
/**
|
|
1780
1974
|
* ConnectionsTestApi - axios parameter creator
|
package/dist/client/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../ServerProvider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../ServerProvider-CTnyNhoU.cjs.js");exports.AttachedDatabaseTypeEnum=o.AttachedDatabaseTypeEnum;exports.Configuration=o.Configuration;exports.ConnectionStatusStatusEnum=o.ConnectionStatusStatusEnum;exports.ConnectionTypeEnum=o.ConnectionTypeEnum;exports.ConnectionsApi=o.ConnectionsApi;exports.ConnectionsApiAxiosParamCreator=o.ConnectionsApiAxiosParamCreator;exports.ConnectionsApiFactory=o.ConnectionsApiFactory;exports.ConnectionsApiFp=o.ConnectionsApiFp;exports.ConnectionsTestApi=o.ConnectionsTestApi;exports.ConnectionsTestApiAxiosParamCreator=o.ConnectionsTestApiAxiosParamCreator;exports.ConnectionsTestApiFactory=o.ConnectionsTestApiFactory;exports.ConnectionsTestApiFp=o.ConnectionsTestApiFp;exports.DatabaseTypeEnum=o.DatabaseTypeEnum;exports.DatabasesApi=o.DatabasesApi;exports.DatabasesApiAxiosParamCreator=o.DatabasesApiAxiosParamCreator;exports.DatabasesApiFactory=o.DatabasesApiFactory;exports.DatabasesApiFp=o.DatabasesApiFp;exports.ModelsApi=o.ModelsApi;exports.ModelsApiAxiosParamCreator=o.ModelsApiAxiosParamCreator;exports.ModelsApiFactory=o.ModelsApiFactory;exports.ModelsApiFp=o.ModelsApiFp;exports.NotebookCellResultTypeEnum=o.NotebookCellResultTypeEnum;exports.NotebookCellTypeEnum=o.NotebookCellTypeEnum;exports.NotebooksApi=o.NotebooksApi;exports.NotebooksApiAxiosParamCreator=o.NotebooksApiAxiosParamCreator;exports.NotebooksApiFactory=o.NotebooksApiFactory;exports.NotebooksApiFp=o.NotebooksApiFp;exports.PackagesApi=o.PackagesApi;exports.PackagesApiAxiosParamCreator=o.PackagesApiAxiosParamCreator;exports.PackagesApiFactory=o.PackagesApiFactory;exports.PackagesApiFp=o.PackagesApiFp;exports.ProjectsApi=o.ProjectsApi;exports.ProjectsApiAxiosParamCreator=o.ProjectsApiAxiosParamCreator;exports.ProjectsApiFactory=o.ProjectsApiFactory;exports.ProjectsApiFp=o.ProjectsApiFp;exports.PublisherApi=o.PublisherApi;exports.PublisherApiAxiosParamCreator=o.PublisherApiAxiosParamCreator;exports.PublisherApiFactory=o.PublisherApiFactory;exports.PublisherApiFp=o.PublisherApiFp;exports.ServerProvider=o.ServerProvider;exports.WatchModeApi=o.WatchModeApi;exports.WatchModeApiAxiosParamCreator=o.WatchModeApiAxiosParamCreator;exports.WatchModeApiFactory=o.WatchModeApiFactory;exports.WatchModeApiFp=o.WatchModeApiFp;exports.globalQueryClient=o.globalQueryClient;exports.useServer=o.useServer;
|
package/dist/client/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as o, R as e, a as i, C as t, f as r, c as p, e as A, d as n, k as c, h as C, j as P, i as F, D as b, o as l, l as m, n as u, m as y, r as d, M as k, q as x, p as h, b as M, N as T, w as g, s as D, v as E, t as N, z as j, P as S, y as W, x as v, G as f, B as Q, F as R, E as q, K as w, H as z, J as B, I as G, S as H, Q as I, W as J, O as K, L, g as O, u as U } from "../ServerProvider-
|
|
1
|
+
import { A as o, R as e, a as i, C as t, f as r, c as p, e as A, d as n, k as c, h as C, j as P, i as F, D as b, o as l, l as m, n as u, m as y, r as d, M as k, q as x, p as h, b as M, N as T, w as g, s as D, v as E, t as N, z as j, P as S, y as W, x as v, G as f, B as Q, F as R, E as q, K as w, H as z, J as B, I as G, S as H, Q as I, W as J, O as K, L, g as O, u as U } from "../ServerProvider-BBBZysNI.es.js";
|
|
2
2
|
export {
|
|
3
3
|
o as AttachedDatabaseTypeEnum,
|
|
4
4
|
e as Configuration,
|
|
@@ -20,6 +20,11 @@ export interface ServerProviderProps {
|
|
|
20
20
|
* Will send "Bearer 123" in the Authorization header.
|
|
21
21
|
*/
|
|
22
22
|
getAccessToken?: () => Promise<string>;
|
|
23
|
+
/** Whether the publisher should allow project and package management operations.
|
|
24
|
+
* When false, users can only view and explore existing projects and packages.
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
mutable?: boolean;
|
|
23
28
|
}
|
|
24
29
|
declare const getApiClients: (baseURL?: string, accessToken?: () => Promise<string>) => {
|
|
25
30
|
models: ModelsApi;
|