@malloy-publisher/sdk 0.0.137 → 0.0.138
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-BGGK1ZQ_.es.js → ServerProvider-B8JWg8Mo.es.js} +563 -491
- package/dist/ServerProvider-DC74Txr5.cjs.js +1 -0
- package/dist/client/api.d.ts +126 -53
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +22 -21
- package/dist/components/Notebook/NotebookCell.d.ts +2 -2
- package/dist/components/Notebook/types.d.ts +21 -0
- package/dist/index.cjs.js +15 -15
- package/dist/index.es.js +483 -418
- package/package.json +1 -1
- package/src/components/Notebook/Notebook.tsx +106 -5
- package/src/components/Notebook/NotebookCell.tsx +2 -2
- package/src/components/Notebook/types.ts +24 -0
- package/src/components/Package/Connections.tsx +3 -6
- package/dist/ServerProvider-lXAaPKBb.cjs.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Q=require("react/jsx-runtime"),F=require("@tanstack/react-query"),u=require("axios"),I=require("react"),q=new F.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),m="http://localhost/api/v0".replace(/\/+$/,"");class C{constructor(a,e=m,r=u){this.basePath=e,this.axios=r,a&&(this.configuration=a,this.basePath=a.basePath??e)}configuration}class ae 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 ae(a,`Required parameter ${a} was null or undefined when calling ${c}.`)};function R(c,a,e=""){a!=null&&(typeof a=="object"?Array.isArray(a)?a.forEach(r=>R(c,r,e)):Object.keys(a).forEach(r=>R(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);R(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)}},re={Bigquery:"bigquery",Snowflake:"snowflake",Postgres:"postgres"},oe={Postgres:"postgres",Bigquery:"bigquery",Snowflake:"snowflake",Trino:"trino",Mysql:"mysql",Duckdb:"duckdb",Motherduck:"motherduck"},se={Ok:"ok",Failed:"failed"},ne={Embedded:"embedded",Materialized:"materialized"},ce={Markdown:"markdown",Code:"code"},le={Markdown:"markdown",Code:"code"},B=function(c){return{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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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}}}},A=function(c){const a=B(c);return{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)}}},ie=function(c,a,e){const r=A(c);return{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))}}};class M extends C{getConnection(a,e,r){return A(this.configuration).getConnection(a,e,r).then(t=>t(this.axios,this.basePath))}getQuerydata(a,e,r,t,o){return A(this.configuration).getQuerydata(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getSqlsource(a,e,r,t){return A(this.configuration).getSqlsource(a,e,r,t).then(o=>o(this.axios,this.basePath))}getTable(a,e,r,t,o){return A(this.configuration).getTable(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getTablesource(a,e,r,t,o){return A(this.configuration).getTablesource(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getTemporarytable(a,e,r,t){return A(this.configuration).getTemporarytable(a,e,r,t).then(o=>o(this.axios,this.basePath))}listConnections(a,e){return A(this.configuration).listConnections(a,e).then(r=>r(this.axios,this.basePath))}listSchemas(a,e,r){return A(this.configuration).listSchemas(a,e,r).then(t=>t(this.axios,this.basePath))}listTables(a,e,r,t){return A(this.configuration).listTables(a,e,r,t).then(o=>o(this.axios,this.basePath))}postQuerydata(a,e,r,t,o){return A(this.configuration).postQuerydata(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}postSqlsource(a,e,r,t){return A(this.configuration).postSqlsource(a,e,r,t).then(o=>o(this.axios,this.basePath))}postTemporarytable(a,e,r,t){return A(this.configuration).postTemporarytable(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const $=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}}}},U=function(c){const a=$(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)}}},pe=function(c,a,e){const r=U(c);return{testConnectionConfiguration(t,o){return r.testConnectionConfiguration(t,o).then(s=>s(e,a))}}};class de extends C{testConnectionConfiguration(a,e){return U(this.configuration).testConnectionConfiguration(a,e).then(r=>r(this.axios,this.basePath))}}const E=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}}}},T=function(c){const a=E(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)}}},he=function(c,a,e){const r=T(c);return{listDatabases(t,o,s,n){return r.listDatabases(t,o,s,n).then(l=>l(e,a))}}};class L extends C{listDatabases(a,e,r,t){return T(this.configuration).listDatabases(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const H=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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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}}}},k=function(c){const a=H(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)}}},ue=function(c,a,e){const r=k(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 W extends C{executeQueryModel(a,e,r,t,o){return k(this.configuration).executeQueryModel(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}getModel(a,e,r,t,o){return k(this.configuration).getModel(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}listModels(a,e,r,t){return k(this.configuration).listModels(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const D=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={},y={};o!==void 0&&(y.versionId=o),b(l,y);let te=i&&i.headers?i.headers:{};return p.headers={...h,...te,...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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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}}}},N=function(c){const a=D(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,y)=>g(l,u,m,c)(h,p||y)},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)}}},me=function(c,a,e){const r=N(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 C{executeNotebookCell(a,e,r,t,o,s){return N(this.configuration).executeNotebookCell(a,e,r,t,o,s).then(n=>n(this.axios,this.basePath))}getNotebook(a,e,r,t,o){return N(this.configuration).getNotebook(a,e,r,t,o).then(s=>s(this.axios,this.basePath))}listNotebooks(a,e,r,t){return N(this.configuration).listNotebooks(a,e,r,t).then(o=>o(this.axios,this.basePath))}}const f=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 y=l&&l.headers?l.headers:{};return i.headers={...p,...y,...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=f(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)}}},Pe=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 z extends C{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 J=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=J(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)}}},Ve=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 K extends C{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 Y=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}}}},w=function(c){const a=Y(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)}}},be=function(c,a,e){const r=w(c);return{getStatus(t){return r.getStatus(t).then(o=>o(e,a))}}};class Oe extends C{getStatus(a){return w(this.configuration).getStatus(a).then(e=>e(this.axios,this.basePath))}}const _=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}}}},v=function(c){const a=_(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)}}},ge=function(c,a,e){const r=v(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 X extends C{getWatchStatus(a){return v(this.configuration).getWatchStatus(a).then(e=>e(this.axios,this.basePath))}startWatching(a,e){return v(this.configuration).startWatching(a,e).then(r=>r(this.axios,this.basePath))}stopWatching(a){return v(this.configuration).stopWatching(a).then(e=>e(this.axios,this.basePath))}}class Z{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 ee=I.createContext(void 0),ye=(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 Z({basePath:e});return{models:new W(t,e,r),projects:new K(t,e,r),packages:new z(t,e,r),notebooks:new G(t,e,r),connections:new M(t,e,r),databases:new L(t,e,r),watchMode:new X(t,e,r)}},Ae=({children:c,getAccessToken:a,baseURL:e,mutable:r=!0})=>{const t=I.useMemo(()=>ye(e,a),[e,a]),o={server:e||`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:a,apiClients:t,mutable:r};return Q.jsx(F.QueryClientProvider,{client:q,children:Q.jsx(ee.Provider,{value:o,children:c})})},Se=()=>{const c=I.useContext(ee);if(c===void 0)throw new Error("useServer must be used within a ServerProvider");return c};exports.AttachedDatabaseTypeEnum=re;exports.Configuration=Z;exports.ConnectionStatusStatusEnum=se;exports.ConnectionTypeEnum=oe;exports.ConnectionsApi=M;exports.ConnectionsApiAxiosParamCreator=B;exports.ConnectionsApiFactory=ie;exports.ConnectionsApiFp=A;exports.ConnectionsTestApi=de;exports.ConnectionsTestApiAxiosParamCreator=$;exports.ConnectionsTestApiFactory=pe;exports.ConnectionsTestApiFp=U;exports.DatabaseTypeEnum=ne;exports.DatabasesApi=L;exports.DatabasesApiAxiosParamCreator=E;exports.DatabasesApiFactory=he;exports.DatabasesApiFp=T;exports.ModelsApi=W;exports.ModelsApiAxiosParamCreator=H;exports.ModelsApiFactory=ue;exports.ModelsApiFp=k;exports.NotebookCellResultTypeEnum=le;exports.NotebookCellTypeEnum=ce;exports.NotebooksApi=G;exports.NotebooksApiAxiosParamCreator=D;exports.NotebooksApiFactory=me;exports.NotebooksApiFp=N;exports.PackagesApi=z;exports.PackagesApiAxiosParamCreator=f;exports.PackagesApiFactory=Pe;exports.PackagesApiFp=j;exports.ProjectsApi=K;exports.ProjectsApiAxiosParamCreator=J;exports.ProjectsApiFactory=Ve;exports.ProjectsApiFp=x;exports.PublisherApi=Oe;exports.PublisherApiAxiosParamCreator=Y;exports.PublisherApiFactory=be;exports.PublisherApiFp=w;exports.ServerProvider=Ae;exports.WatchModeApi=X;exports.WatchModeApiAxiosParamCreator=_;exports.WatchModeApiFactory=ge;exports.WatchModeApiFp=v;exports.globalQueryClient=q;exports.useServer=Se;
|
package/dist/client/api.d.ts
CHANGED
|
@@ -161,43 +161,6 @@ export interface CompiledModel {
|
|
|
161
161
|
*/
|
|
162
162
|
'queries'?: Array<Query>;
|
|
163
163
|
}
|
|
164
|
-
/**
|
|
165
|
-
* Compiled Malloy notebook with cells, results, and execution data
|
|
166
|
-
* @export
|
|
167
|
-
* @interface CompiledNotebook
|
|
168
|
-
*/
|
|
169
|
-
export interface CompiledNotebook {
|
|
170
|
-
/**
|
|
171
|
-
* Resource path to the notebook
|
|
172
|
-
* @type {string}
|
|
173
|
-
* @memberof CompiledNotebook
|
|
174
|
-
*/
|
|
175
|
-
'resource'?: string;
|
|
176
|
-
/**
|
|
177
|
-
* Name of the package containing this notebook
|
|
178
|
-
* @type {string}
|
|
179
|
-
* @memberof CompiledNotebook
|
|
180
|
-
*/
|
|
181
|
-
'packageName'?: string;
|
|
182
|
-
/**
|
|
183
|
-
* Relative path to the notebook file within its package directory
|
|
184
|
-
* @type {string}
|
|
185
|
-
* @memberof CompiledNotebook
|
|
186
|
-
*/
|
|
187
|
-
'path'?: string;
|
|
188
|
-
/**
|
|
189
|
-
* Version of the Malloy compiler used to generate the notebook data
|
|
190
|
-
* @type {string}
|
|
191
|
-
* @memberof CompiledNotebook
|
|
192
|
-
*/
|
|
193
|
-
'malloyVersion'?: string;
|
|
194
|
-
/**
|
|
195
|
-
* Array of notebook cells containing code, markdown, and execution results
|
|
196
|
-
* @type {Array<NotebookCell>}
|
|
197
|
-
* @memberof CompiledNotebook
|
|
198
|
-
*/
|
|
199
|
-
'notebookCells'?: Array<NotebookCell>;
|
|
200
|
-
}
|
|
201
164
|
/**
|
|
202
165
|
* Database connection configuration and metadata
|
|
203
166
|
* @export
|
|
@@ -535,29 +498,53 @@ export interface NotebookCell {
|
|
|
535
498
|
*/
|
|
536
499
|
'type'?: NotebookCellTypeEnum;
|
|
537
500
|
/**
|
|
538
|
-
* Text contents of the notebook cell
|
|
501
|
+
* Text contents of the notebook cell (either markdown or Malloy code)
|
|
539
502
|
* @type {string}
|
|
540
503
|
* @memberof NotebookCell
|
|
541
504
|
*/
|
|
542
505
|
'text'?: string;
|
|
506
|
+
}
|
|
507
|
+
export declare const NotebookCellTypeEnum: {
|
|
508
|
+
readonly Markdown: "markdown";
|
|
509
|
+
readonly Code: "code";
|
|
510
|
+
};
|
|
511
|
+
export type NotebookCellTypeEnum = typeof NotebookCellTypeEnum[keyof typeof NotebookCellTypeEnum];
|
|
512
|
+
/**
|
|
513
|
+
* Result of executing a notebook cell
|
|
514
|
+
* @export
|
|
515
|
+
* @interface NotebookCellResult
|
|
516
|
+
*/
|
|
517
|
+
export interface NotebookCellResult {
|
|
518
|
+
/**
|
|
519
|
+
* Type of notebook cell
|
|
520
|
+
* @type {string}
|
|
521
|
+
* @memberof NotebookCellResult
|
|
522
|
+
*/
|
|
523
|
+
'type'?: NotebookCellResultTypeEnum;
|
|
524
|
+
/**
|
|
525
|
+
* Text contents of the notebook cell
|
|
526
|
+
* @type {string}
|
|
527
|
+
* @memberof NotebookCellResult
|
|
528
|
+
*/
|
|
529
|
+
'text'?: string;
|
|
543
530
|
/**
|
|
544
531
|
* JSON string containing the execution result for this cell
|
|
545
532
|
* @type {string}
|
|
546
|
-
* @memberof
|
|
533
|
+
* @memberof NotebookCellResult
|
|
547
534
|
*/
|
|
548
535
|
'result'?: string;
|
|
549
536
|
/**
|
|
550
537
|
* Array of JSON strings containing SourceInfo objects made available in this cell
|
|
551
538
|
* @type {Array<string>}
|
|
552
|
-
* @memberof
|
|
539
|
+
* @memberof NotebookCellResult
|
|
553
540
|
*/
|
|
554
541
|
'newSources'?: Array<string>;
|
|
555
542
|
}
|
|
556
|
-
export declare const
|
|
543
|
+
export declare const NotebookCellResultTypeEnum: {
|
|
557
544
|
readonly Markdown: "markdown";
|
|
558
545
|
readonly Code: "code";
|
|
559
546
|
};
|
|
560
|
-
export type
|
|
547
|
+
export type NotebookCellResultTypeEnum = typeof NotebookCellResultTypeEnum[keyof typeof NotebookCellResultTypeEnum];
|
|
561
548
|
/**
|
|
562
549
|
* Represents a Malloy package containing models, notebooks, and embedded databases
|
|
563
550
|
* @export
|
|
@@ -782,6 +769,43 @@ export interface QueryResult {
|
|
|
782
769
|
*/
|
|
783
770
|
'resource'?: string;
|
|
784
771
|
}
|
|
772
|
+
/**
|
|
773
|
+
* Raw Malloy notebook with unexecuted cell contents
|
|
774
|
+
* @export
|
|
775
|
+
* @interface RawNotebook
|
|
776
|
+
*/
|
|
777
|
+
export interface RawNotebook {
|
|
778
|
+
/**
|
|
779
|
+
* Resource path to the notebook
|
|
780
|
+
* @type {string}
|
|
781
|
+
* @memberof RawNotebook
|
|
782
|
+
*/
|
|
783
|
+
'resource'?: string;
|
|
784
|
+
/**
|
|
785
|
+
* Name of the package containing this notebook
|
|
786
|
+
* @type {string}
|
|
787
|
+
* @memberof RawNotebook
|
|
788
|
+
*/
|
|
789
|
+
'packageName'?: string;
|
|
790
|
+
/**
|
|
791
|
+
* Relative path to the notebook file within its package directory
|
|
792
|
+
* @type {string}
|
|
793
|
+
* @memberof RawNotebook
|
|
794
|
+
*/
|
|
795
|
+
'path'?: string;
|
|
796
|
+
/**
|
|
797
|
+
* Version of the Malloy compiler used to generate the notebook data
|
|
798
|
+
* @type {string}
|
|
799
|
+
* @memberof RawNotebook
|
|
800
|
+
*/
|
|
801
|
+
'malloyVersion'?: string;
|
|
802
|
+
/**
|
|
803
|
+
* Array of notebook cells containing raw markdown and code content
|
|
804
|
+
* @type {Array<NotebookCell>}
|
|
805
|
+
* @memberof RawNotebook
|
|
806
|
+
*/
|
|
807
|
+
'notebookCells'?: Array<NotebookCell>;
|
|
808
|
+
}
|
|
785
809
|
/**
|
|
786
810
|
* A schema name in a Connection.
|
|
787
811
|
* @export
|
|
@@ -1947,8 +1971,20 @@ export declare class ModelsApi extends BaseAPI {
|
|
|
1947
1971
|
*/
|
|
1948
1972
|
export declare const NotebooksApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
1949
1973
|
/**
|
|
1950
|
-
*
|
|
1951
|
-
* @summary
|
|
1974
|
+
* 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.
|
|
1975
|
+
* @summary Execute a specific notebook cell
|
|
1976
|
+
* @param {string} projectName Name of the project
|
|
1977
|
+
* @param {string} packageName Name of the package
|
|
1978
|
+
* @param {string} path Path to notebook within the package
|
|
1979
|
+
* @param {number} cellIndex Index of the cell to execute (0-based)
|
|
1980
|
+
* @param {string} [versionId] Version identifier for the package
|
|
1981
|
+
* @param {*} [options] Override http request option.
|
|
1982
|
+
* @throws {RequiredError}
|
|
1983
|
+
*/
|
|
1984
|
+
executeNotebookCell: (projectName: string, packageName: string, path: string, cellIndex: number, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1985
|
+
/**
|
|
1986
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
|
|
1987
|
+
* @summary Get Malloy notebook cells
|
|
1952
1988
|
* @param {string} projectName Name of the project
|
|
1953
1989
|
* @param {string} packageName Name of the package
|
|
1954
1990
|
* @param {string} path Path to notebook within the package.
|
|
@@ -1974,8 +2010,20 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
|
|
|
1974
2010
|
*/
|
|
1975
2011
|
export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
1976
2012
|
/**
|
|
1977
|
-
*
|
|
1978
|
-
* @summary
|
|
2013
|
+
* 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.
|
|
2014
|
+
* @summary Execute a specific notebook cell
|
|
2015
|
+
* @param {string} projectName Name of the project
|
|
2016
|
+
* @param {string} packageName Name of the package
|
|
2017
|
+
* @param {string} path Path to notebook within the package
|
|
2018
|
+
* @param {number} cellIndex Index of the cell to execute (0-based)
|
|
2019
|
+
* @param {string} [versionId] Version identifier for the package
|
|
2020
|
+
* @param {*} [options] Override http request option.
|
|
2021
|
+
* @throws {RequiredError}
|
|
2022
|
+
*/
|
|
2023
|
+
executeNotebookCell(projectName: string, packageName: string, path: string, cellIndex: number, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotebookCellResult>>;
|
|
2024
|
+
/**
|
|
2025
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
|
|
2026
|
+
* @summary Get Malloy notebook cells
|
|
1979
2027
|
* @param {string} projectName Name of the project
|
|
1980
2028
|
* @param {string} packageName Name of the package
|
|
1981
2029
|
* @param {string} path Path to notebook within the package.
|
|
@@ -1983,7 +2031,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
|
1983
2031
|
* @param {*} [options] Override http request option.
|
|
1984
2032
|
* @throws {RequiredError}
|
|
1985
2033
|
*/
|
|
1986
|
-
getNotebook(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
2034
|
+
getNotebook(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RawNotebook>>;
|
|
1987
2035
|
/**
|
|
1988
2036
|
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
|
|
1989
2037
|
* @summary List package notebooks
|
|
@@ -2001,8 +2049,20 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
|
|
|
2001
2049
|
*/
|
|
2002
2050
|
export declare const NotebooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
2003
2051
|
/**
|
|
2004
|
-
*
|
|
2005
|
-
* @summary
|
|
2052
|
+
* 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.
|
|
2053
|
+
* @summary Execute a specific notebook cell
|
|
2054
|
+
* @param {string} projectName Name of the project
|
|
2055
|
+
* @param {string} packageName Name of the package
|
|
2056
|
+
* @param {string} path Path to notebook within the package
|
|
2057
|
+
* @param {number} cellIndex Index of the cell to execute (0-based)
|
|
2058
|
+
* @param {string} [versionId] Version identifier for the package
|
|
2059
|
+
* @param {*} [options] Override http request option.
|
|
2060
|
+
* @throws {RequiredError}
|
|
2061
|
+
*/
|
|
2062
|
+
executeNotebookCell(projectName: string, packageName: string, path: string, cellIndex: number, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<NotebookCellResult>;
|
|
2063
|
+
/**
|
|
2064
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
|
|
2065
|
+
* @summary Get Malloy notebook cells
|
|
2006
2066
|
* @param {string} projectName Name of the project
|
|
2007
2067
|
* @param {string} packageName Name of the package
|
|
2008
2068
|
* @param {string} path Path to notebook within the package.
|
|
@@ -2010,7 +2070,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
|
|
|
2010
2070
|
* @param {*} [options] Override http request option.
|
|
2011
2071
|
* @throws {RequiredError}
|
|
2012
2072
|
*/
|
|
2013
|
-
getNotebook(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<
|
|
2073
|
+
getNotebook(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<RawNotebook>;
|
|
2014
2074
|
/**
|
|
2015
2075
|
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
|
|
2016
2076
|
* @summary List package notebooks
|
|
@@ -2030,8 +2090,21 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
|
|
|
2030
2090
|
*/
|
|
2031
2091
|
export declare class NotebooksApi extends BaseAPI {
|
|
2032
2092
|
/**
|
|
2033
|
-
*
|
|
2034
|
-
* @summary
|
|
2093
|
+
* 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.
|
|
2094
|
+
* @summary Execute a specific notebook cell
|
|
2095
|
+
* @param {string} projectName Name of the project
|
|
2096
|
+
* @param {string} packageName Name of the package
|
|
2097
|
+
* @param {string} path Path to notebook within the package
|
|
2098
|
+
* @param {number} cellIndex Index of the cell to execute (0-based)
|
|
2099
|
+
* @param {string} [versionId] Version identifier for the package
|
|
2100
|
+
* @param {*} [options] Override http request option.
|
|
2101
|
+
* @throws {RequiredError}
|
|
2102
|
+
* @memberof NotebooksApi
|
|
2103
|
+
*/
|
|
2104
|
+
executeNotebookCell(projectName: string, packageName: string, path: string, cellIndex: number, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<NotebookCellResult, any, {}>>;
|
|
2105
|
+
/**
|
|
2106
|
+
* Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint.
|
|
2107
|
+
* @summary Get Malloy notebook cells
|
|
2035
2108
|
* @param {string} projectName Name of the project
|
|
2036
2109
|
* @param {string} packageName Name of the package
|
|
2037
2110
|
* @param {string} path Path to notebook within the package.
|
|
@@ -2040,7 +2113,7 @@ export declare class NotebooksApi extends BaseAPI {
|
|
|
2040
2113
|
* @throws {RequiredError}
|
|
2041
2114
|
* @memberof NotebooksApi
|
|
2042
2115
|
*/
|
|
2043
|
-
getNotebook(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<
|
|
2116
|
+
getNotebook(projectName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<RawNotebook, any, {}>>;
|
|
2044
2117
|
/**
|
|
2045
2118
|
* Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
|
|
2046
2119
|
* @summary List package notebooks
|
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-DC74Txr5.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,
|
|
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-B8JWg8Mo.es.js";
|
|
2
2
|
export {
|
|
3
3
|
o as AttachedDatabaseTypeEnum,
|
|
4
4
|
e as Configuration,
|
|
@@ -13,26 +13,27 @@ export {
|
|
|
13
13
|
P as ConnectionsTestApiFactory,
|
|
14
14
|
F as ConnectionsTestApiFp,
|
|
15
15
|
b as DatabaseTypeEnum,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
l as DatabasesApi,
|
|
17
|
+
m as DatabasesApiAxiosParamCreator,
|
|
18
|
+
u as DatabasesApiFactory,
|
|
19
|
+
y as DatabasesApiFp,
|
|
20
20
|
d as ModelsApi,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
M as
|
|
25
|
-
T as
|
|
26
|
-
g as
|
|
27
|
-
D as
|
|
28
|
-
E as
|
|
29
|
-
N as
|
|
30
|
-
j as
|
|
31
|
-
S as
|
|
32
|
-
W as
|
|
33
|
-
v as
|
|
34
|
-
f as
|
|
35
|
-
Q as
|
|
21
|
+
k as ModelsApiAxiosParamCreator,
|
|
22
|
+
x as ModelsApiFactory,
|
|
23
|
+
h as ModelsApiFp,
|
|
24
|
+
M as NotebookCellResultTypeEnum,
|
|
25
|
+
T as NotebookCellTypeEnum,
|
|
26
|
+
g as NotebooksApi,
|
|
27
|
+
D as NotebooksApiAxiosParamCreator,
|
|
28
|
+
E as NotebooksApiFactory,
|
|
29
|
+
N as NotebooksApiFp,
|
|
30
|
+
j as PackagesApi,
|
|
31
|
+
S as PackagesApiAxiosParamCreator,
|
|
32
|
+
W as PackagesApiFactory,
|
|
33
|
+
v as PackagesApiFp,
|
|
34
|
+
f as ProjectsApi,
|
|
35
|
+
Q as ProjectsApiAxiosParamCreator,
|
|
36
|
+
R as ProjectsApiFactory,
|
|
36
37
|
q as ProjectsApiFp,
|
|
37
38
|
w as PublisherApi,
|
|
38
39
|
z as PublisherApiAxiosParamCreator,
|
|
@@ -44,5 +45,5 @@ export {
|
|
|
44
45
|
K as WatchModeApiFactory,
|
|
45
46
|
L as WatchModeApiFp,
|
|
46
47
|
O as globalQueryClient,
|
|
47
|
-
|
|
48
|
+
U as useServer
|
|
48
49
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnhancedNotebookCell } from './types';
|
|
2
2
|
interface NotebookCellProps {
|
|
3
|
-
cell:
|
|
3
|
+
cell: EnhancedNotebookCell;
|
|
4
4
|
expandCodeCell?: boolean;
|
|
5
5
|
hideCodeCellIcon?: boolean;
|
|
6
6
|
expandEmbedding?: boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NotebookCell as ClientNotebookCell } from '../../client';
|
|
2
|
+
/**
|
|
3
|
+
* Enhanced notebook cell that extends the base API cell with execution results.
|
|
4
|
+
* The base ClientNotebookCell only contains type and text (raw content).
|
|
5
|
+
* This interface adds the runtime execution data.
|
|
6
|
+
*/
|
|
7
|
+
export interface EnhancedNotebookCell extends ClientNotebookCell {
|
|
8
|
+
/**
|
|
9
|
+
* Name of the query that was executed (for code cells that run queries)
|
|
10
|
+
*/
|
|
11
|
+
queryName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* JSON string containing the query execution results
|
|
14
|
+
*/
|
|
15
|
+
result?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Array of JSON strings containing SourceInfo objects for data sources
|
|
18
|
+
* that become available in this cell (e.g., from imports or source definitions)
|
|
19
|
+
*/
|
|
20
|
+
newSources?: string[];
|
|
21
|
+
}
|