From d9ac387a51fc914088868e5f8adcedd4011123e3 Mon Sep 17 00:00:00 2001 From: karthik2804 Date: Thu, 18 Jul 2024 19:32:38 +0200 Subject: [PATCH 1/2] add sdk reference docs Signed-off-by: karthik2804 --- docs/.nojekyll | 1 + docs/assets/highlight.css | 22 + docs/assets/icons.js | 18 + docs/assets/icons.svg | 1 + docs/assets/main.js | 60 + docs/assets/navigation.js | 1 + docs/assets/search.js | 1 + docs/assets/style.css | 1448 +++++++++++++++++ docs/classes/RedisHandler.html | 7 + docs/classes/ResponseBuilder.html | 31 + docs/enums/Llm.EmbeddingModels.html | 3 + docs/enums/Llm.InferencingModels.html | 4 + docs/enums/Mqtt.QoS.html | 8 + docs/enums/_internal_.RdbmsDataType.html | 15 + docs/functions/Kv.open.html | 4 + docs/functions/Kv.openDefault.html | 3 + docs/functions/Llm.generateEmbeddings.html | 5 + docs/functions/Llm.infer.html | 6 + docs/functions/Mqtt.open.html | 7 + docs/functions/Mysql.open.html | 4 + docs/functions/Postgres.open.html | 4 + docs/functions/Redis.open.html | 4 + docs/functions/Router.html | 3 + docs/functions/Sqlite.open.html | 4 + docs/functions/Sqlite.openDefault.html | 3 + docs/functions/Variables.get.html | 4 + docs/index.html | 13 + docs/interfaces/Kv.Store.html | 29 + docs/interfaces/Llm.EmbeddingResult.html | 5 + docs/interfaces/Llm.EmbeddingUsage.html | 4 + docs/interfaces/Llm.InferenceResult.html | 5 + docs/interfaces/Llm.InferenceUsage.html | 5 + docs/interfaces/Llm.InferencingOptions.html | 9 + .../Llm.InternalInferencingOptions.html | 9 + docs/interfaces/Mqtt.MqttConnection.html | 8 + docs/interfaces/Mysql.MysqlConnection.html | 5 + .../Postgres.PostgresConnection.html | 13 + docs/interfaces/Redis.RedisConnection.html | 35 + docs/interfaces/Sqlite.SqliteConnection.html | 7 + docs/interfaces/Sqlite.SqliteResult.html | 7 + docs/interfaces/_internal_.RdbmsColumn.html | 3 + docs/interfaces/_internal_.RdbmsRowSet.html | 3 + docs/interfaces/_internal_.RouteHandler.html | 1 + .../_internal_.SpinRouteHandler.html | 1 + docs/interfaces/_internal_.routerType.html | 11 + docs/modules/Kv.html | 4 + docs/modules/Llm.html | 11 + docs/modules/Mqtt.html | 4 + docs/modules/Mysql.html | 3 + docs/modules/Postgres.html | 3 + docs/modules/Redis.html | 6 + docs/modules/Sqlite.html | 12 + docs/modules/Variables.html | 2 + docs/modules/_internal_.html | 31 + docs/types/Redis.payload.html | 1 + docs/types/Redis.redisParameter.html | 1 + docs/types/Redis.redisResult.html | 1 + docs/types/Sqlite.ParameterValue.html | 1 + docs/types/Sqlite.ValueBlob.html | 1 + docs/types/Sqlite.ValueInteger.html | 1 + docs/types/Sqlite.ValueNull.html | 1 + docs/types/Sqlite.ValueReal.html | 1 + docs/types/Sqlite.ValueText.html | 1 + docs/types/Sqlite.sqliteValues.html | 1 + docs/types/_internal_.GenericTraps.html | 1 + docs/types/_internal_.IRequest.html | 1 + .../types/_internal_.RdbmsParameterValue.html | 1 + docs/types/_internal_.RdbmsValueBinary.html | 1 + docs/types/_internal_.RdbmsValueBoolean.html | 1 + docs/types/_internal_.RdbmsValueDbNull.html | 1 + .../_internal_.RdbmsValueFloating32.html | 1 + .../_internal_.RdbmsValueFloating64.html | 1 + docs/types/_internal_.RdbmsValueInt16.html | 1 + docs/types/_internal_.RdbmsValueInt32.html | 1 + docs/types/_internal_.RdbmsValueInt64.html | 1 + docs/types/_internal_.RdbmsValueInt8.html | 1 + docs/types/_internal_.RdbmsValueStr.html | 1 + docs/types/_internal_.RdbmsValueUint16.html | 1 + docs/types/_internal_.RdbmsValueUint32.html | 1 + docs/types/_internal_.RdbmsValueUint64.html | 1 + docs/types/_internal_.RdbmsValueUint8.html | 1 + docs/types/_internal_.RequestLike.html | 1 + docs/types/_internal_.ResolveFunction.html | 2 + docs/types/_internal_.Route.html | 1 + docs/types/_internal_.RouteEntry.html | 1 + docs/types/_internal_.RouterHints.html | 1 + docs/types/_internal_.RouterType-1.html | 1 + .../_internal_.SpinRdbmsParameterValue.html | 1 + package-lock.json | 173 ++ package.json | 3 + src/inboundHttp.ts | 38 + src/inboundRedis.ts | 8 + src/keyValue.ts | 47 + src/llm.ts | 47 + src/mqtt.ts | 26 + src/mysql.ts | 9 + src/postgres.ts | 21 + src/redis.ts | 67 + src/router.ts | 5 +- src/sqlite.ts | 32 + src/variables.ts | 5 + test/test-app/package-lock.json | 2 + 102 files changed, 2437 insertions(+), 1 deletion(-) create mode 100644 docs/.nojekyll create mode 100644 docs/assets/highlight.css create mode 100644 docs/assets/icons.js create mode 100644 docs/assets/icons.svg create mode 100644 docs/assets/main.js create mode 100644 docs/assets/navigation.js create mode 100644 docs/assets/search.js create mode 100644 docs/assets/style.css create mode 100644 docs/classes/RedisHandler.html create mode 100644 docs/classes/ResponseBuilder.html create mode 100644 docs/enums/Llm.EmbeddingModels.html create mode 100644 docs/enums/Llm.InferencingModels.html create mode 100644 docs/enums/Mqtt.QoS.html create mode 100644 docs/enums/_internal_.RdbmsDataType.html create mode 100644 docs/functions/Kv.open.html create mode 100644 docs/functions/Kv.openDefault.html create mode 100644 docs/functions/Llm.generateEmbeddings.html create mode 100644 docs/functions/Llm.infer.html create mode 100644 docs/functions/Mqtt.open.html create mode 100644 docs/functions/Mysql.open.html create mode 100644 docs/functions/Postgres.open.html create mode 100644 docs/functions/Redis.open.html create mode 100644 docs/functions/Router.html create mode 100644 docs/functions/Sqlite.open.html create mode 100644 docs/functions/Sqlite.openDefault.html create mode 100644 docs/functions/Variables.get.html create mode 100644 docs/index.html create mode 100644 docs/interfaces/Kv.Store.html create mode 100644 docs/interfaces/Llm.EmbeddingResult.html create mode 100644 docs/interfaces/Llm.EmbeddingUsage.html create mode 100644 docs/interfaces/Llm.InferenceResult.html create mode 100644 docs/interfaces/Llm.InferenceUsage.html create mode 100644 docs/interfaces/Llm.InferencingOptions.html create mode 100644 docs/interfaces/Llm.InternalInferencingOptions.html create mode 100644 docs/interfaces/Mqtt.MqttConnection.html create mode 100644 docs/interfaces/Mysql.MysqlConnection.html create mode 100644 docs/interfaces/Postgres.PostgresConnection.html create mode 100644 docs/interfaces/Redis.RedisConnection.html create mode 100644 docs/interfaces/Sqlite.SqliteConnection.html create mode 100644 docs/interfaces/Sqlite.SqliteResult.html create mode 100644 docs/interfaces/_internal_.RdbmsColumn.html create mode 100644 docs/interfaces/_internal_.RdbmsRowSet.html create mode 100644 docs/interfaces/_internal_.RouteHandler.html create mode 100644 docs/interfaces/_internal_.SpinRouteHandler.html create mode 100644 docs/interfaces/_internal_.routerType.html create mode 100644 docs/modules/Kv.html create mode 100644 docs/modules/Llm.html create mode 100644 docs/modules/Mqtt.html create mode 100644 docs/modules/Mysql.html create mode 100644 docs/modules/Postgres.html create mode 100644 docs/modules/Redis.html create mode 100644 docs/modules/Sqlite.html create mode 100644 docs/modules/Variables.html create mode 100644 docs/modules/_internal_.html create mode 100644 docs/types/Redis.payload.html create mode 100644 docs/types/Redis.redisParameter.html create mode 100644 docs/types/Redis.redisResult.html create mode 100644 docs/types/Sqlite.ParameterValue.html create mode 100644 docs/types/Sqlite.ValueBlob.html create mode 100644 docs/types/Sqlite.ValueInteger.html create mode 100644 docs/types/Sqlite.ValueNull.html create mode 100644 docs/types/Sqlite.ValueReal.html create mode 100644 docs/types/Sqlite.ValueText.html create mode 100644 docs/types/Sqlite.sqliteValues.html create mode 100644 docs/types/_internal_.GenericTraps.html create mode 100644 docs/types/_internal_.IRequest.html create mode 100644 docs/types/_internal_.RdbmsParameterValue.html create mode 100644 docs/types/_internal_.RdbmsValueBinary.html create mode 100644 docs/types/_internal_.RdbmsValueBoolean.html create mode 100644 docs/types/_internal_.RdbmsValueDbNull.html create mode 100644 docs/types/_internal_.RdbmsValueFloating32.html create mode 100644 docs/types/_internal_.RdbmsValueFloating64.html create mode 100644 docs/types/_internal_.RdbmsValueInt16.html create mode 100644 docs/types/_internal_.RdbmsValueInt32.html create mode 100644 docs/types/_internal_.RdbmsValueInt64.html create mode 100644 docs/types/_internal_.RdbmsValueInt8.html create mode 100644 docs/types/_internal_.RdbmsValueStr.html create mode 100644 docs/types/_internal_.RdbmsValueUint16.html create mode 100644 docs/types/_internal_.RdbmsValueUint32.html create mode 100644 docs/types/_internal_.RdbmsValueUint64.html create mode 100644 docs/types/_internal_.RdbmsValueUint8.html create mode 100644 docs/types/_internal_.RequestLike.html create mode 100644 docs/types/_internal_.ResolveFunction.html create mode 100644 docs/types/_internal_.Route.html create mode 100644 docs/types/_internal_.RouteEntry.html create mode 100644 docs/types/_internal_.RouterHints.html create mode 100644 docs/types/_internal_.RouterType-1.html create mode 100644 docs/types/_internal_.SpinRdbmsParameterValue.html diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 00000000..e2ac6616 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css new file mode 100644 index 00000000..5674cf39 --- /dev/null +++ b/docs/assets/highlight.css @@ -0,0 +1,22 @@ +:root { + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --code-background: var(--dark-code-background); +} + +pre, code { background: var(--code-background); } diff --git a/docs/assets/icons.js b/docs/assets/icons.js new file mode 100644 index 00000000..e88e8ca7 --- /dev/null +++ b/docs/assets/icons.js @@ -0,0 +1,18 @@ +(function() { + addIcons(); + function addIcons() { + if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); + const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); + svg.innerHTML = `""`; + svg.style.display = "none"; + if (location.protocol === "file:") updateUseElements(); + } + + function updateUseElements() { + document.querySelectorAll("use").forEach(el => { + if (el.getAttribute("href").includes("#icon-")) { + el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); + } + }); + } +})() \ No newline at end of file diff --git a/docs/assets/icons.svg b/docs/assets/icons.svg new file mode 100644 index 00000000..e371b8b5 --- /dev/null +++ b/docs/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/main.js b/docs/assets/main.js new file mode 100644 index 00000000..35728810 --- /dev/null +++ b/docs/assets/main.js @@ -0,0 +1,60 @@ +"use strict"; +window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."}; +"use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js new file mode 100644 index 00000000..c68070d5 --- /dev/null +++ b/docs/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE6WYW2/bIBSA/0ueu0uzNOuqaQ+9rVXbrUvavlRTRWKSWs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1IlCte4Z3/KqXLRHbdPqXq//JuQwLJvR9QFqMFcV0VdRVoR66xcziNZN1+RXYd5p3n3iVBeV6dUc7H3f2x9WCO81T0i48LMUS3yAK8LvVf0XnQqZpuOP8AO3ZuuVMYAAA=" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js new file mode 100644 index 00000000..25beeb4e --- /dev/null +++ b/docs/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE8VdW5PbtpL+LzOvcybq5j21tVV7kpw92SQnWScnL1OpFGdEj7XWzRLl2JXKf18CJKRGowGBlDx+8lhEXwB8aDT6A6U/b3abP/Y3Xz78efN2sZ7ffJmndzfretXcfHnzanNom93N3c1ht+z++/qwfmoXm/X+i/7B/Zt2teyePi3r/b7pdNzc/HVn1Jy0fL9cHVWsNvPDstl/0X0WlCZOLNavRR+UCv1MUHR3s613zbodrJ/0lke13yrRZv20WD//sJk3y/3RRLM+rHr1TpsxpiAnI1CvavzqTd1GG7m1ZLz2XGnZg6/UM6Xx2/W+3R2eRjgiiU7z5zT436wem/k8NPSsxcSB/6/l8ofFevH96vv8V4y0csuF/J3l3Tj5gFkuIe3Hrcbu0ZPFultGr+unxpmBoeWofs/wtGpW9YdfNm+b0bZuqWDUNJs+eRzZNdumbn9q1vWy/TjWGS58dYe+r/ftv3R/v9oc1u1F/rm6ruFu26y2za5uD7tmrHe26FWc2Wy/G+1FL3Ml8z9NMP/TdPP2Ou4MdjM9Zj37JD7lug7ajF7f3r5ets7Dzo1Z7xc5GL3uR/g7bv2PdT8qDoS9jY8Ho50LxoUzXp2PDxPcCcSJs+6cixcR7kj7f/Pvff18Noj3rSbHh+1us9q28TsaMXcryJ4Pm0OvPO48N2uFuGY+zSNZfIJT4ny8avaH5Xl/+maTZ6RtPoyycTsIRPRy6IDH8CEKbtSykZhimo7wMS8OIt5u9ckRL5gbh3jWqzNdD4OLNZvc+cbo8eYDkqVbSyyixxcATbR/Hmh+07kbXb5x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FliNnRwX1ED3rWrsSLrAtg7E1dhBdMANNB8vR6wTrY5HFqseHVkCPmkTwouVDc6mKOTTQXdDGDu9QqCxakWRZ01bIZsQuvPPIvHczBd2AZn0MrImp3XIKT6Ny7EJhNI2lB6txJeeFmJDn9J13GEtx8jaj00vlTK34ke3sdgcotk2ddudmetla8d3WhAxLHMkdKnOZb1v155DEo33R7Y60oQuji0Xb1l9gqrMI3e5Zr9Zvm9eH9YOZipaM4ksl3Xqtpv1vnk8LJZzhhuqLon0bsOYJXXfgiQ+kWtLaek+YHv4jMbNPHLZK1XCogALMZHlC63MUkOURI63VvGmC0GMMqKJZhG5SLUufs4qqSZzgUS9Zhmt0i4e0eiRxQ76H3YFhO7v5s4GZHHRY1/P7RIPgWXkeWHPCViaH0RGV3YwoIdFc+MjN8W/yGi2d+m4jAAqskC3XylC0yaI6KKLvNKy3y7WZ85V6p1YsgAj3VN6fYtwRhdhHjmZ75YLO8ZkJIxG1ul6JZ7qGkXHLA7xvT53j8tphJ+N6WCf61ndJOGvjATtrrFojJS4E3kwFkhaGoYj6zi9FnUXyNJERyeJ26737WZn310gyXlklNM/vkcGlmgoh4BZDhX9aiiHVuaKzOy49ZvQapqCaQumMZrGOMvMH0NjNJcqEExjc00O0TRG0zgxjSMHqW1WW3XX4bBjJThaAjXORmr8YN9PoNt6HJLazfatfcins2/GJ1bV1s4yaEA3Axulyr3fQw+3w9wkcSv3vc3QZmSPKIe9oRqS02rwsjJXOEwDMC3ANAHTBmfmvqK5moMm18VTr01jNI3RNDbXLzEymetLH8vNo9UpSmLGBUdzCm6e7fCfkVmLLKBoVbxykhMsRp7OtZ5dw+aLHHwjj+VaD18bGcnAIqsZ7+vdon5c2gGflvIjp+yPHdsbS1q6iCkf/3Z3s11sm+Vi3ck8/PbXX/8P37HC2mTnAAA="; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css new file mode 100644 index 00000000..9d619a64 --- /dev/null +++ b/docs/assets/style.css @@ -0,0 +1,1448 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + --light-color-focus-outline: #3584e4; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + --light-color-document: #000000; + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + --dark-color-focus-outline: #4c97f2; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + --dark-color-document: #ffffff; + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + --color-focus-outline: var(--light-color-focus-outline); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + --color-document: var(--light-color-document); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + --color-focus-outline: var(--dark-color-focus-outline); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + --color-document: var(--dark-color-document); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +*:focus-visible, +.tsd-accordion-summary:focus-visible svg { + outline: 2px solid var(--color-focus-outline); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +footer { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} +footer > p { + margin: 0 1em; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} +a.tsd-anchor-link { + color: var(--color-text); +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: -moz-fit-content; + width: fit-content; + align-items: center; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus-visible + svg { + outline: 2px solid var(--color-focus-outline); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.settings-label { + font-weight: bold; + text-transform: uppercase; + display: inline-block; +} + +.tsd-filter-visibility .settings-label { + margin: 0.75rem 0 0.5rem 0; +} + +.tsd-theme-toggle .settings-label { + margin: 0.75rem 0.75rem 0 0; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-navigation .tsd-nav-link { + display: none; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-page-navigation-section { + margin-left: 10px; +} +.tsd-page-navigation-section > summary { + padding: 0.25rem; +} +.tsd-page-navigation-section > div { + margin-left: 20px; +} +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; + vertical-align: text-top; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} +.tsd-panel-group > .tsd-accordion-summary { + margin-bottom: 1rem; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-signatures .tsd-index-signature:not(:last-child) { + margin-bottom: 1em; +} +.tsd-signatures .tsd-index-signature .tsd-signature { + border-width: 1px; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } + #tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: flex; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/classes/RedisHandler.html b/docs/classes/RedisHandler.html new file mode 100644 index 00000000..8e648572 --- /dev/null +++ b/docs/classes/RedisHandler.html @@ -0,0 +1,7 @@ +RedisHandler | @fermyon/spin-sdk

Class RedisHandlerAbstract

Abstract class for handling Redis messages.

+

Constructors

Methods

Constructors

Methods

  • Handles a Redis message.

    +

    Parameters

    • msg: Uint8Array

      The message data as a Uint8Array.

      +

    Returns Promise<void>

    A Promise that resolves when the message has been handled.

    +
diff --git a/docs/classes/ResponseBuilder.html b/docs/classes/ResponseBuilder.html new file mode 100644 index 00000000..b628bf11 --- /dev/null +++ b/docs/classes/ResponseBuilder.html @@ -0,0 +1,31 @@ +ResponseBuilder | @fermyon/spin-sdk

Class for building HTTP responses.

+

Constructors

Properties

Methods

Constructors

Properties

headers: Headers = ...
statusCode: number = 200

Methods

  • Ends a streaming response by closing the writer. +If not already streaming, it sends the response.

    +

    Returns void

    Error if the response has already been sent.

    +
  • Gets the currently set HTTP status code.

    +

    Returns number

    The HTTP status code.

    +
  • Sends the HTTP response.

    +

    Parameters

    • Optionalvalue: BodyInit

      Optional body content to send with the response.

      +

    Returns void

    Error if the response has already been sent.

    +
  • Sets response headers.

    +

    Parameters

    • arg1: string | Headers | {
          [key: string]: string;
      }

      Header name, object containing headers, or Headers instance.

      +
    • Optionalarg2: string

      Optional header value (if arg1 is a string).

      +

    Returns ResponseBuilder

    The current ResponseBuilder instance for chaining.

    +

    Error if headers have already been sent or if arguments are invalid.

    +
  • Sets the HTTP status code for the response.

    +

    Parameters

    • code: number

      The HTTP status code to set.

      +

    Returns ResponseBuilder

    The current ResponseBuilder instance for chaining.

    +

    Error if headers have already been sent.

    +
  • Writes data to a streaming response.

    +

    Parameters

    • value: BodyInit

      The data to write to the response.

      +

    Returns void

    Error if the response has already been sent.

    +
diff --git a/docs/enums/Llm.EmbeddingModels.html b/docs/enums/Llm.EmbeddingModels.html new file mode 100644 index 00000000..bd5a03b5 --- /dev/null +++ b/docs/enums/Llm.EmbeddingModels.html @@ -0,0 +1,3 @@ +EmbeddingModels | @fermyon/spin-sdk

Enumeration EmbeddingModels

Enum representing the available models for generating embeddings.

+

Enumeration Members

Enumeration Members

AllMiniLmL6V2: "all-minilm-l6-v2"
diff --git a/docs/enums/Llm.InferencingModels.html b/docs/enums/Llm.InferencingModels.html new file mode 100644 index 00000000..31183bc4 --- /dev/null +++ b/docs/enums/Llm.InferencingModels.html @@ -0,0 +1,4 @@ +InferencingModels | @fermyon/spin-sdk

Enumeration InferencingModels

Enum representing the available models for inferencing.

+

Enumeration Members

Enumeration Members

CodellamaInstruct: "codellama-instruct"
Llama2Chat: "llama2-chat"
diff --git a/docs/enums/Mqtt.QoS.html b/docs/enums/Mqtt.QoS.html new file mode 100644 index 00000000..7ea4b80f --- /dev/null +++ b/docs/enums/Mqtt.QoS.html @@ -0,0 +1,8 @@ +QoS | @fermyon/spin-sdk

Enum representing the Quality of Service (QoS) levels for MQTT.

+

Enumeration Members

Enumeration Members

AtLeastOnce: "at-least-once"

Messages are delivered at least once.

+
AtMostOnce: "at-most-once"

Messages are delivered at most once.

+
ExactlyOnce: "exactly-once"

Messages are delivered exactly once.

+
diff --git a/docs/enums/_internal_.RdbmsDataType.html b/docs/enums/_internal_.RdbmsDataType.html new file mode 100644 index 00000000..93c34ca6 --- /dev/null +++ b/docs/enums/_internal_.RdbmsDataType.html @@ -0,0 +1,15 @@ +RdbmsDataType | @fermyon/spin-sdk

Enumeration Members

RdbmsBinary: "binary"
RdbmsBoolean: "boolean"
RdbmsFloating32: "floating32"
RdbmsFloating64: "floating64"
RdbmsInt16: "int16"
RdbmsInt32: "int32"
RdbmsInt64: "int64"
RdbmsInt8: "int8"
RdbmsOther: "other"
RdbmsStr: "str"
RdbmsUint16: "uint16"
RdbmsUint32: "uint32"
RdbmsUint64: "uint64"
RdbmsUint8: "uint8"
diff --git a/docs/functions/Kv.open.html b/docs/functions/Kv.open.html new file mode 100644 index 00000000..d118ecb8 --- /dev/null +++ b/docs/functions/Kv.open.html @@ -0,0 +1,4 @@ +open | @fermyon/spin-sdk
  • Opens a key-value store with the specified label.

    +

    Parameters

    • label: string

      The label of the key-value store to open.

      +

    Returns Store

    The key-value store object.

    +
diff --git a/docs/functions/Kv.openDefault.html b/docs/functions/Kv.openDefault.html new file mode 100644 index 00000000..554a3cfd --- /dev/null +++ b/docs/functions/Kv.openDefault.html @@ -0,0 +1,3 @@ +openDefault | @fermyon/spin-sdk

Function openDefault

  • Opens the default key-value store.

    +

    Returns Store

    The default key-value store object.

    +
diff --git a/docs/functions/Llm.generateEmbeddings.html b/docs/functions/Llm.generateEmbeddings.html new file mode 100644 index 00000000..8679d121 --- /dev/null +++ b/docs/functions/Llm.generateEmbeddings.html @@ -0,0 +1,5 @@ +generateEmbeddings | @fermyon/spin-sdk

Function generateEmbeddings

Generates embeddings for the given text using the specified model.

+
  • Parameters

    • model: string

      The model to use for generating embeddings.

      +
    • text: string[]

      The text to generate embeddings for.

      +

    Returns EmbeddingResult

    The result of generating embeddings.

    +
diff --git a/docs/functions/Llm.infer.html b/docs/functions/Llm.infer.html new file mode 100644 index 00000000..89dcd7a3 --- /dev/null +++ b/docs/functions/Llm.infer.html @@ -0,0 +1,6 @@ +infer | @fermyon/spin-sdk
  • Performs inferencing using the specified model and prompt, with optional settings.

    +

    Parameters

    • model: string

      The model to use for inferencing.

      +
    • prompt: string

      The prompt to use for inferencing.

      +
    • Optionaloptions: InferencingOptions

      Optional settings for inferencing.

      +

    Returns InferenceResult

    The result of the inference.

    +
diff --git a/docs/functions/Mqtt.open.html b/docs/functions/Mqtt.open.html new file mode 100644 index 00000000..64487853 --- /dev/null +++ b/docs/functions/Mqtt.open.html @@ -0,0 +1,7 @@ +open | @fermyon/spin-sdk
  • Opens an MQTT connection with the specified parameters.

    +

    Parameters

    • address: string

      The address of the MQTT broker.

      +
    • username: string

      The username for the MQTT connection.

      +
    • password: string

      The password for the MQTT connection.

      +
    • keepAliveIntervalInSecs: number

      The keep-alive interval in seconds.

      +

    Returns MqttConnection

    The MQTT connection object.

    +
diff --git a/docs/functions/Mysql.open.html b/docs/functions/Mysql.open.html new file mode 100644 index 00000000..c6c5625d --- /dev/null +++ b/docs/functions/Mysql.open.html @@ -0,0 +1,4 @@ +open | @fermyon/spin-sdk
  • Opens a MySQL connection to the specified address.

    +

    Parameters

    • address: string

      The address of the MySQL server.

      +

    Returns MysqlConnection

    The MySQL connection object.

    +
diff --git a/docs/functions/Postgres.open.html b/docs/functions/Postgres.open.html new file mode 100644 index 00000000..d8f0b4d3 --- /dev/null +++ b/docs/functions/Postgres.open.html @@ -0,0 +1,4 @@ +open | @fermyon/spin-sdk
diff --git a/docs/functions/Redis.open.html b/docs/functions/Redis.open.html new file mode 100644 index 00000000..0d22d4b0 --- /dev/null +++ b/docs/functions/Redis.open.html @@ -0,0 +1,4 @@ +open | @fermyon/spin-sdk
  • Opens a connection to the Redis instance at the specified address.

    +

    Parameters

    • address: string

      The address of the Redis instance.

      +

    Returns RedisConnection

    The Redis connection object.

    +
diff --git a/docs/functions/Router.html b/docs/functions/Router.html new file mode 100644 index 00000000..a9dc6922 --- /dev/null +++ b/docs/functions/Router.html @@ -0,0 +1,3 @@ +Router | @fermyon/spin-sdk
diff --git a/docs/functions/Sqlite.open.html b/docs/functions/Sqlite.open.html new file mode 100644 index 00000000..e2362fee --- /dev/null +++ b/docs/functions/Sqlite.open.html @@ -0,0 +1,4 @@ +open | @fermyon/spin-sdk
  • Opens a connection to the SQLite database with the specified label.

    +

    Parameters

    • label: string

      The label of the database to connect to.

      +

    Returns SqliteConnection

    The SQLite connection object.

    +
diff --git a/docs/functions/Sqlite.openDefault.html b/docs/functions/Sqlite.openDefault.html new file mode 100644 index 00000000..c580f005 --- /dev/null +++ b/docs/functions/Sqlite.openDefault.html @@ -0,0 +1,3 @@ +openDefault | @fermyon/spin-sdk
diff --git a/docs/functions/Variables.get.html b/docs/functions/Variables.get.html new file mode 100644 index 00000000..b153c0ea --- /dev/null +++ b/docs/functions/Variables.get.html @@ -0,0 +1,4 @@ +get | @fermyon/spin-sdk
  • Gets the value of a variable if it exists, otherwise returns null.

    +

    Parameters

    • key: string

      The key of the variable to retrieve.

      +

    Returns string | null

    The value of the variable, or null if it does not exist or an error occurs.

    +
diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..9aa08801 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,13 @@ +@fermyon/spin-sdk

@fermyon/spin-sdk

Index

Modules

Namespaces

Classes

Functions

diff --git a/docs/interfaces/Kv.Store.html b/docs/interfaces/Kv.Store.html new file mode 100644 index 00000000..c99593c6 --- /dev/null +++ b/docs/interfaces/Kv.Store.html @@ -0,0 +1,29 @@ +Store | @fermyon/spin-sdk

Interface representing a key-value store with various utility methods. +Store

+
interface Store {
    delete: ((key: string) => void);
    exists: ((key: string) => boolean);
    get: ((key: string) => null | Uint8Array);
    getJson: ((key: string) => any);
    getKeys: (() => string[]);
    set: ((key: string, value: string | object | Uint8Array) => void);
    setJson: ((key: string, value: any) => void);
}

Properties

delete: ((key: string) => void)

Deletes the value associated with the given key.

+

Type declaration

    • (key): void
    • Parameters

      • key: string

        The key to delete the value for.

        +

      Returns void

exists: ((key: string) => boolean)

Checks if a key exists in the store.

+

Type declaration

    • (key): boolean
    • Parameters

      • key: string

        The key to check.

        +

      Returns boolean

      True if the key exists, false otherwise.

      +
get: ((key: string) => null | Uint8Array)

Retrieves the value associated with the given key.

+

Type declaration

    • (key): null | Uint8Array
    • Parameters

      • key: string

        The key to retrieve the value for.

        +

      Returns null | Uint8Array

      The value associated with the key, or null if the key does not exist.

      +
getJson: ((key: string) => any)

Retrieves the JSON value associated with the given key.

+

Type declaration

    • (key): any
    • Parameters

      • key: string

        The key to retrieve the JSON value for.

        +

      Returns any

      The JSON value associated with the key.

      +
getKeys: (() => string[])

Retrieves all the keys in the store.

+

Type declaration

    • (): string[]
    • Returns string[]

      An array of all the keys in the store.

      +
set: ((key: string, value: string | object | Uint8Array) => void)

Sets the value for the given key.

+

Type declaration

    • (key, value): void
    • Parameters

      • key: string

        The key to set the value for.

        +
      • value: string | object | Uint8Array

        The value to set. Can be a Uint8Array, string, or object.

        +

      Returns void

setJson: ((key: string, value: any) => void)

Sets the JSON value for the given key.

+

Type declaration

    • (key, value): void
    • Parameters

      • key: string

        The key to set the JSON value for.

        +
      • value: any

        The JSON value to set.

        +

      Returns void

diff --git a/docs/interfaces/Llm.EmbeddingResult.html b/docs/interfaces/Llm.EmbeddingResult.html new file mode 100644 index 00000000..fbad4059 --- /dev/null +++ b/docs/interfaces/Llm.EmbeddingResult.html @@ -0,0 +1,5 @@ +EmbeddingResult | @fermyon/spin-sdk

Interface EmbeddingResult

Interface representing the result of generating embeddings. +EmbeddingResult

+
interface EmbeddingResult {
    embeddings: number[][];
    usage: EmbeddingUsage;
}

Properties

Properties

embeddings: number[][]
diff --git a/docs/interfaces/Llm.EmbeddingUsage.html b/docs/interfaces/Llm.EmbeddingUsage.html new file mode 100644 index 00000000..71680502 --- /dev/null +++ b/docs/interfaces/Llm.EmbeddingUsage.html @@ -0,0 +1,4 @@ +EmbeddingUsage | @fermyon/spin-sdk

Interface EmbeddingUsage

Interface representing usage statistics for generating embeddings. +EmbeddingUsage

+
interface EmbeddingUsage {
    promptTokenCount: number;
}

Properties

Properties

promptTokenCount: number
diff --git a/docs/interfaces/Llm.InferenceResult.html b/docs/interfaces/Llm.InferenceResult.html new file mode 100644 index 00000000..28b53b8a --- /dev/null +++ b/docs/interfaces/Llm.InferenceResult.html @@ -0,0 +1,5 @@ +InferenceResult | @fermyon/spin-sdk

Interface InferenceResult

Interface representing the result of an inference. +InferenceResult

+
interface InferenceResult {
    text: string;
    usage: InferenceUsage;
}

Properties

Properties

text: string
diff --git a/docs/interfaces/Llm.InferenceUsage.html b/docs/interfaces/Llm.InferenceUsage.html new file mode 100644 index 00000000..2cc3c196 --- /dev/null +++ b/docs/interfaces/Llm.InferenceUsage.html @@ -0,0 +1,5 @@ +InferenceUsage | @fermyon/spin-sdk

Interface InferenceUsage

Interface representing usage statistics for inferencing. +InferenceUsage

+
interface InferenceUsage {
    generatedTokenCount: number;
    promptTokenCount: number;
}

Properties

generatedTokenCount: number
promptTokenCount: number
diff --git a/docs/interfaces/Llm.InferencingOptions.html b/docs/interfaces/Llm.InferencingOptions.html new file mode 100644 index 00000000..22b2adfe --- /dev/null +++ b/docs/interfaces/Llm.InferencingOptions.html @@ -0,0 +1,9 @@ +InferencingOptions | @fermyon/spin-sdk

Interface InferencingOptions

Interface representing options for inferencing. +InferencingOptions

+
interface InferencingOptions {
    maxTokens?: number;
    repeatPenalty?: number;
    repeatPenaltyLastNTokenCount?: number;
    temperature?: number;
    topK?: number;
    topP?: number;
}

Properties

maxTokens?: number
repeatPenalty?: number
repeatPenaltyLastNTokenCount?: number
temperature?: number
topK?: number
topP?: number
diff --git a/docs/interfaces/Llm.InternalInferencingOptions.html b/docs/interfaces/Llm.InternalInferencingOptions.html new file mode 100644 index 00000000..9ce9c7a6 --- /dev/null +++ b/docs/interfaces/Llm.InternalInferencingOptions.html @@ -0,0 +1,9 @@ +InternalInferencingOptions | @fermyon/spin-sdk

Interface InternalInferencingOptions

Interface representing internal options for inferencing. +InternalInferencingOptions

+
interface InternalInferencingOptions {
    maxTokens?: number;
    repeatPenalty?: number;
    repeatPenaltyLastNTokenCount?: number;
    temperature?: number;
    topK?: number;
    topP?: number;
}

Properties

maxTokens?: number
repeatPenalty?: number
repeatPenaltyLastNTokenCount?: number
temperature?: number
topK?: number
topP?: number
diff --git a/docs/interfaces/Mqtt.MqttConnection.html b/docs/interfaces/Mqtt.MqttConnection.html new file mode 100644 index 00000000..0368ddf7 --- /dev/null +++ b/docs/interfaces/Mqtt.MqttConnection.html @@ -0,0 +1,8 @@ +MqttConnection | @fermyon/spin-sdk

Interface MqttConnection

Interface representing an MQTT connection with a method for publishing messages. +MqttConnection

+
interface MqttConnection {
    publish: ((topic: string, payload: Uint8Array, qos: QoS) => void);
}

Properties

Properties

publish: ((topic: string, payload: Uint8Array, qos: QoS) => void)

Publishes a message to the specified MQTT topic.

+

Type declaration

    • (topic, payload, qos): void
    • Parameters

      • topic: string

        The topic to publish the message to.

        +
      • payload: Uint8Array

        The message payload as a Uint8Array.

        +
      • qos: QoS

        The Quality of Service level for message delivery.

        +

      Returns void

diff --git a/docs/interfaces/Mysql.MysqlConnection.html b/docs/interfaces/Mysql.MysqlConnection.html new file mode 100644 index 00000000..283f94d5 --- /dev/null +++ b/docs/interfaces/Mysql.MysqlConnection.html @@ -0,0 +1,5 @@ +MysqlConnection | @fermyon/spin-sdk

Interface MysqlConnection

Interface representing a MySQL connection with methods for querying and executing statements. +MysqlConnection

+
interface MysqlConnection {
    execute: ((statement: string, params: RdbmsParameterValue[]) => number);
    query: ((statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet);
}

Properties

Properties

execute: ((statement: string, params: RdbmsParameterValue[]) => number)
query: ((statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet)
diff --git a/docs/interfaces/Postgres.PostgresConnection.html b/docs/interfaces/Postgres.PostgresConnection.html new file mode 100644 index 00000000..f6d47572 --- /dev/null +++ b/docs/interfaces/Postgres.PostgresConnection.html @@ -0,0 +1,13 @@ +PostgresConnection | @fermyon/spin-sdk

Interface representing a PostgreSQL connection with methods for querying and executing statements. +PostgresConnection

+
interface PostgresConnection {
    execute: ((statement: string, params: RdbmsParameterValue[]) => number);
    query: ((statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet);
}

Properties

Properties

execute: ((statement: string, params: RdbmsParameterValue[]) => number)

Executes a statement on the database with the specified parameters.

+

Type declaration

    • (statement, params): number
    • Parameters

      • statement: string

        The SQL statement to execute.

        +
      • params: RdbmsParameterValue[]

        The parameters for the SQL statement.

        +

      Returns number

      The number of rows affected by the execution.

      +
query: ((statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet)

Queries the database with the specified statement and parameters.

+

Type declaration

    • (statement, params): RdbmsRowSet
    • Parameters

      • statement: string

        The SQL statement to execute.

        +
      • params: RdbmsParameterValue[]

        The parameters for the SQL statement.

        +

      Returns RdbmsRowSet

      The result set of the query.

      +
diff --git a/docs/interfaces/Redis.RedisConnection.html b/docs/interfaces/Redis.RedisConnection.html new file mode 100644 index 00000000..17c62e64 --- /dev/null +++ b/docs/interfaces/Redis.RedisConnection.html @@ -0,0 +1,35 @@ +RedisConnection | @fermyon/spin-sdk

Interface RedisConnection

Interface representing a Redis connection with various methods for interacting with Redis. +RedisConnection

+
interface RedisConnection {
    del: ((key: string) => number);
    execute: ((command: string, args: redisParameter[]) => redisResult[]);
    get: ((key: string) => null | Uint8Array);
    incr: ((key: string) => number);
    publish: ((channel: string, payload: Uint8Array) => void);
    sadd: ((key: string, value: string[]) => number);
    set: ((key: string, value: Uint8Array) => void);
    smembers: ((key: string) => string[]);
    srem: ((key: string, value: string[]) => number);
}

Properties

del: ((key: string) => number)

Deletes the given key.

+

Type declaration

    • (key): number
    • Parameters

      • key: string

        The key to delete.

        +

      Returns number

execute: ((command: string, args: redisParameter[]) => redisResult[])

Execute an arbitrary Redis command and receive the result.

+

Type declaration

get: ((key: string) => null | Uint8Array)

Get a value for the given key. Returns null if the key does not exist.

+

Type declaration

    • (key): null | Uint8Array
    • Parameters

      • key: string

        The key to retrieve the value for.

        +

      Returns null | Uint8Array

incr: ((key: string) => number)

Increment the value of a key.

+

Type declaration

    • (key): number
    • Parameters

      • key: string

        The key to increment.

        +

      Returns number

publish: ((channel: string, payload: Uint8Array) => void)

Publish a Redis message to the specified channel.

+

Type declaration

    • (channel, payload): void
    • Parameters

      • channel: string

        The channel to publish the message to.

        +
      • payload: Uint8Array

        The message payload.

        +

      Returns void

sadd: ((key: string, value: string[]) => number)

Adds a value to a set.

+

Type declaration

    • (key, value): number
    • Parameters

      • key: string

        The key of the set.

        +
      • value: string[]

        The values to add to the set.

        +

      Returns number

set: ((key: string, value: Uint8Array) => void)

Set a value for the given key.

+

Type declaration

    • (key, value): void
    • Parameters

      • key: string

        The key to set the value for.

        +
      • value: Uint8Array

        The value to set.

        +

      Returns void

smembers: ((key: string) => string[])

Retrieves the members of a set.

+

Type declaration

    • (key): string[]
    • Parameters

      • key: string

        The key of the set.

        +

      Returns string[]

srem: ((key: string, value: string[]) => number)

Removes values from a set.

+

Type declaration

    • (key, value): number
    • Parameters

      • key: string

        The key of the set.

        +
      • value: string[]

        The values to remove from the set.

        +

      Returns number

diff --git a/docs/interfaces/Sqlite.SqliteConnection.html b/docs/interfaces/Sqlite.SqliteConnection.html new file mode 100644 index 00000000..be426130 --- /dev/null +++ b/docs/interfaces/Sqlite.SqliteConnection.html @@ -0,0 +1,7 @@ +SqliteConnection | @fermyon/spin-sdk

Interface SqliteConnection

Interface representing a connection to an SQLite database with a method for executing queries. +SqliteConnection

+
interface SqliteConnection {
    execute: ((statement: string, parameters: ParameterValue[]) => SqliteResult);
}

Properties

Properties

execute: ((statement: string, parameters: ParameterValue[]) => SqliteResult)

Executes an SQLite statement with given parameters and returns the result.

+

Type declaration

diff --git a/docs/interfaces/Sqlite.SqliteResult.html b/docs/interfaces/Sqlite.SqliteResult.html new file mode 100644 index 00000000..310f8d4e --- /dev/null +++ b/docs/interfaces/Sqlite.SqliteResult.html @@ -0,0 +1,7 @@ +SqliteResult | @fermyon/spin-sdk

Interface representing the formatted result of an SQLite query. +SqliteResult

+
interface SqliteResult {
    columns: string[];
    rows: {
        [key: string]:
            | number
            | bigint
            | null
            | string
            | Uint8Array;
    }[];
}

Properties

Properties

columns: string[]

The column names in the result.

+
rows: {
    [key: string]:
        | number
        | bigint
        | null
        | string
        | Uint8Array;
}[]

The rows of results.

+
diff --git a/docs/interfaces/_internal_.RdbmsColumn.html b/docs/interfaces/_internal_.RdbmsColumn.html new file mode 100644 index 00000000..384188c3 --- /dev/null +++ b/docs/interfaces/_internal_.RdbmsColumn.html @@ -0,0 +1,3 @@ +RdbmsColumn | @fermyon/spin-sdk
interface RdbmsColumn {
    dataType: RdbmsDataType[];
    name: string;
}

Properties

Properties

dataType: RdbmsDataType[]
name: string
diff --git a/docs/interfaces/_internal_.RdbmsRowSet.html b/docs/interfaces/_internal_.RdbmsRowSet.html new file mode 100644 index 00000000..5fed8802 --- /dev/null +++ b/docs/interfaces/_internal_.RdbmsRowSet.html @@ -0,0 +1,3 @@ +RdbmsRowSet | @fermyon/spin-sdk
interface RdbmsRowSet {
    columns: RdbmsColumn[];
    rows: {
        [key: string]:
            | number
            | boolean
            | bigint
            | null
            | string
            | Uint8Array;
    }[];
}

Properties

Properties

columns: RdbmsColumn[]
rows: {
    [key: string]:
        | number
        | boolean
        | bigint
        | null
        | string
        | Uint8Array;
}[]
diff --git a/docs/interfaces/_internal_.RouteHandler.html b/docs/interfaces/_internal_.RouteHandler.html new file mode 100644 index 00000000..479e3517 --- /dev/null +++ b/docs/interfaces/_internal_.RouteHandler.html @@ -0,0 +1 @@ +RouteHandler | @fermyon/spin-sdk
  • Parameters

    Returns any

diff --git a/docs/interfaces/_internal_.SpinRouteHandler.html b/docs/interfaces/_internal_.SpinRouteHandler.html new file mode 100644 index 00000000..b752afd1 --- /dev/null +++ b/docs/interfaces/_internal_.SpinRouteHandler.html @@ -0,0 +1 @@ +SpinRouteHandler | @fermyon/spin-sdk
diff --git a/docs/interfaces/_internal_.routerType.html b/docs/interfaces/_internal_.routerType.html new file mode 100644 index 00000000..834bcc58 --- /dev/null +++ b/docs/interfaces/_internal_.routerType.html @@ -0,0 +1,11 @@ +routerType | @fermyon/spin-sdk
interface routerType {
    routes: RouteEntry[];
    all(path: string, ...handlers: SpinRouteHandler[]): RouterType;
    delete(path: string, ...handlers: SpinRouteHandler[]): RouterType;
    get(path: string, ...handlers: SpinRouteHandler[]): RouterType;
    handle(request: RequestLike, ...extras: any): Promise<any>;
    handleRequest(request: Request, response: ResponseBuilder, ...extras: any): Promise<any>;
    options(path: string, ...handlers: SpinRouteHandler[]): RouterType;
    patch(path: string, ...handlers: SpinRouteHandler[]): RouterType;
    post(path: string, ...handlers: SpinRouteHandler[]): RouterType;
    put(path: string, ...handlers: SpinRouteHandler[]): RouterType;
}

Properties

routes: RouteEntry[]

Methods

  • Parameters

    Returns Promise<any>

  • Parameters

    Returns Promise<any>

diff --git a/docs/modules/Kv.html b/docs/modules/Kv.html new file mode 100644 index 00000000..7ce8247f --- /dev/null +++ b/docs/modules/Kv.html @@ -0,0 +1,4 @@ +Kv | @fermyon/spin-sdk

Index

Interfaces

Functions

diff --git a/docs/modules/Llm.html b/docs/modules/Llm.html new file mode 100644 index 00000000..dffb80b0 --- /dev/null +++ b/docs/modules/Llm.html @@ -0,0 +1,11 @@ +Llm | @fermyon/spin-sdk
diff --git a/docs/modules/Mqtt.html b/docs/modules/Mqtt.html new file mode 100644 index 00000000..57863b1f --- /dev/null +++ b/docs/modules/Mqtt.html @@ -0,0 +1,4 @@ +Mqtt | @fermyon/spin-sdk

Namespace Mqtt

Index

Enumerations

QoS +

Interfaces

Functions

diff --git a/docs/modules/Mysql.html b/docs/modules/Mysql.html new file mode 100644 index 00000000..57c2c1b2 --- /dev/null +++ b/docs/modules/Mysql.html @@ -0,0 +1,3 @@ +Mysql | @fermyon/spin-sdk

Namespace Mysql

Index

Interfaces

Functions

diff --git a/docs/modules/Postgres.html b/docs/modules/Postgres.html new file mode 100644 index 00000000..40424fb8 --- /dev/null +++ b/docs/modules/Postgres.html @@ -0,0 +1,3 @@ +Postgres | @fermyon/spin-sdk

Namespace Postgres

Index

Interfaces

Functions

diff --git a/docs/modules/Redis.html b/docs/modules/Redis.html new file mode 100644 index 00000000..2fc30667 --- /dev/null +++ b/docs/modules/Redis.html @@ -0,0 +1,6 @@ +Redis | @fermyon/spin-sdk

Namespace Redis

Index

Interfaces

Type Aliases

Functions

diff --git a/docs/modules/Sqlite.html b/docs/modules/Sqlite.html new file mode 100644 index 00000000..79894832 --- /dev/null +++ b/docs/modules/Sqlite.html @@ -0,0 +1,12 @@ +Sqlite | @fermyon/spin-sdk
diff --git a/docs/modules/Variables.html b/docs/modules/Variables.html new file mode 100644 index 00000000..aaf26ca7 --- /dev/null +++ b/docs/modules/Variables.html @@ -0,0 +1,2 @@ +Variables | @fermyon/spin-sdk

Namespace Variables

Index

Functions

get +
diff --git a/docs/modules/_internal_.html b/docs/modules/_internal_.html new file mode 100644 index 00000000..efe8e34d --- /dev/null +++ b/docs/modules/_internal_.html @@ -0,0 +1,31 @@ +<internal> | @fermyon/spin-sdk
diff --git a/docs/types/Redis.payload.html b/docs/types/Redis.payload.html new file mode 100644 index 00000000..0c544d52 --- /dev/null +++ b/docs/types/Redis.payload.html @@ -0,0 +1 @@ +payload | @fermyon/spin-sdk
payload: Uint8Array
diff --git a/docs/types/Redis.redisParameter.html b/docs/types/Redis.redisParameter.html new file mode 100644 index 00000000..ddc2e601 --- /dev/null +++ b/docs/types/Redis.redisParameter.html @@ -0,0 +1 @@ +redisParameter | @fermyon/spin-sdk

Type Alias redisParameter

redisParameter: number | Uint8Array
diff --git a/docs/types/Redis.redisResult.html b/docs/types/Redis.redisResult.html new file mode 100644 index 00000000..4f825494 --- /dev/null +++ b/docs/types/Redis.redisResult.html @@ -0,0 +1 @@ +redisResult | @fermyon/spin-sdk

Type Alias redisResult

redisResult:
    | number
    | Uint8Array
    | null
    | string
diff --git a/docs/types/Sqlite.ParameterValue.html b/docs/types/Sqlite.ParameterValue.html new file mode 100644 index 00000000..65890ebc --- /dev/null +++ b/docs/types/Sqlite.ParameterValue.html @@ -0,0 +1 @@ +ParameterValue | @fermyon/spin-sdk

Type Alias ParameterValue

ParameterValue:
    | sqliteValues
    | number
    | bigint
    | null
    | string
    | Uint8Array
diff --git a/docs/types/Sqlite.ValueBlob.html b/docs/types/Sqlite.ValueBlob.html new file mode 100644 index 00000000..313764d2 --- /dev/null +++ b/docs/types/Sqlite.ValueBlob.html @@ -0,0 +1 @@ +ValueBlob | @fermyon/spin-sdk
ValueBlob: {
    tag: "blob";
    val: Uint8Array;
}
diff --git a/docs/types/Sqlite.ValueInteger.html b/docs/types/Sqlite.ValueInteger.html new file mode 100644 index 00000000..92a2b8a9 --- /dev/null +++ b/docs/types/Sqlite.ValueInteger.html @@ -0,0 +1 @@ +ValueInteger | @fermyon/spin-sdk
ValueInteger: {
    tag: "integer";
    val: number | bigint;
}
diff --git a/docs/types/Sqlite.ValueNull.html b/docs/types/Sqlite.ValueNull.html new file mode 100644 index 00000000..b5540724 --- /dev/null +++ b/docs/types/Sqlite.ValueNull.html @@ -0,0 +1 @@ +ValueNull | @fermyon/spin-sdk
ValueNull: {
    tag: "null";
}
diff --git a/docs/types/Sqlite.ValueReal.html b/docs/types/Sqlite.ValueReal.html new file mode 100644 index 00000000..dc0b241b --- /dev/null +++ b/docs/types/Sqlite.ValueReal.html @@ -0,0 +1 @@ +ValueReal | @fermyon/spin-sdk
ValueReal: {
    tag: "real";
    val: number | bigint;
}
diff --git a/docs/types/Sqlite.ValueText.html b/docs/types/Sqlite.ValueText.html new file mode 100644 index 00000000..7c198037 --- /dev/null +++ b/docs/types/Sqlite.ValueText.html @@ -0,0 +1 @@ +ValueText | @fermyon/spin-sdk
ValueText: {
    tag: "text";
    val: string;
}
diff --git a/docs/types/Sqlite.sqliteValues.html b/docs/types/Sqlite.sqliteValues.html new file mode 100644 index 00000000..08b5c4c4 --- /dev/null +++ b/docs/types/Sqlite.sqliteValues.html @@ -0,0 +1 @@ +sqliteValues | @fermyon/spin-sdk
sqliteValues:
    | ValueInteger
    | ValueReal
    | ValueText
    | ValueBlob
    | ValueNull
diff --git a/docs/types/_internal_.GenericTraps.html b/docs/types/_internal_.GenericTraps.html new file mode 100644 index 00000000..602e2226 --- /dev/null +++ b/docs/types/_internal_.GenericTraps.html @@ -0,0 +1 @@ +GenericTraps | @fermyon/spin-sdk
GenericTraps: {
    [key: string]: any;
}
diff --git a/docs/types/_internal_.IRequest.html b/docs/types/_internal_.IRequest.html new file mode 100644 index 00000000..133d5e4a --- /dev/null +++ b/docs/types/_internal_.IRequest.html @@ -0,0 +1 @@ +IRequest | @fermyon/spin-sdk
IRequest: {
    method: string;
    params: {
        [key: string]: string;
    };
    proxy?: any;
    query: {
        [key: string]: string | string[] | undefined;
    };
    url: string;
} & GenericTraps
diff --git a/docs/types/_internal_.RdbmsParameterValue.html b/docs/types/_internal_.RdbmsParameterValue.html new file mode 100644 index 00000000..b135f570 --- /dev/null +++ b/docs/types/_internal_.RdbmsParameterValue.html @@ -0,0 +1 @@ +RdbmsParameterValue | @fermyon/spin-sdk
RdbmsParameterValue:
    | SpinRdbmsParameterValue
    | number
    | bigint
    | boolean
    | null
    | Uint8Array
    | string
diff --git a/docs/types/_internal_.RdbmsValueBinary.html b/docs/types/_internal_.RdbmsValueBinary.html new file mode 100644 index 00000000..0024b0e3 --- /dev/null +++ b/docs/types/_internal_.RdbmsValueBinary.html @@ -0,0 +1 @@ +RdbmsValueBinary | @fermyon/spin-sdk
RdbmsValueBinary: {
    tag: "binary";
    val: Uint8Array;
}
diff --git a/docs/types/_internal_.RdbmsValueBoolean.html b/docs/types/_internal_.RdbmsValueBoolean.html new file mode 100644 index 00000000..456597a0 --- /dev/null +++ b/docs/types/_internal_.RdbmsValueBoolean.html @@ -0,0 +1 @@ +RdbmsValueBoolean | @fermyon/spin-sdk
RdbmsValueBoolean: {
    tag: "boolean";
    val: boolean;
}
diff --git a/docs/types/_internal_.RdbmsValueDbNull.html b/docs/types/_internal_.RdbmsValueDbNull.html new file mode 100644 index 00000000..5fb6094f --- /dev/null +++ b/docs/types/_internal_.RdbmsValueDbNull.html @@ -0,0 +1 @@ +RdbmsValueDbNull | @fermyon/spin-sdk
RdbmsValueDbNull: {
    tag: "db-null";
}
diff --git a/docs/types/_internal_.RdbmsValueFloating32.html b/docs/types/_internal_.RdbmsValueFloating32.html new file mode 100644 index 00000000..15fb9848 --- /dev/null +++ b/docs/types/_internal_.RdbmsValueFloating32.html @@ -0,0 +1 @@ +RdbmsValueFloating32 | @fermyon/spin-sdk
RdbmsValueFloating32: {
    tag: "floating32";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueFloating64.html b/docs/types/_internal_.RdbmsValueFloating64.html new file mode 100644 index 00000000..f0c1bf5c --- /dev/null +++ b/docs/types/_internal_.RdbmsValueFloating64.html @@ -0,0 +1 @@ +RdbmsValueFloating64 | @fermyon/spin-sdk
RdbmsValueFloating64: {
    tag: "floating64";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueInt16.html b/docs/types/_internal_.RdbmsValueInt16.html new file mode 100644 index 00000000..ba38091e --- /dev/null +++ b/docs/types/_internal_.RdbmsValueInt16.html @@ -0,0 +1 @@ +RdbmsValueInt16 | @fermyon/spin-sdk
RdbmsValueInt16: {
    tag: "int16";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueInt32.html b/docs/types/_internal_.RdbmsValueInt32.html new file mode 100644 index 00000000..f11c0bcc --- /dev/null +++ b/docs/types/_internal_.RdbmsValueInt32.html @@ -0,0 +1 @@ +RdbmsValueInt32 | @fermyon/spin-sdk
RdbmsValueInt32: {
    tag: "int32";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueInt64.html b/docs/types/_internal_.RdbmsValueInt64.html new file mode 100644 index 00000000..d7df2801 --- /dev/null +++ b/docs/types/_internal_.RdbmsValueInt64.html @@ -0,0 +1 @@ +RdbmsValueInt64 | @fermyon/spin-sdk
RdbmsValueInt64: {
    tag: "int64";
    val: bigint;
}
diff --git a/docs/types/_internal_.RdbmsValueInt8.html b/docs/types/_internal_.RdbmsValueInt8.html new file mode 100644 index 00000000..449fef1c --- /dev/null +++ b/docs/types/_internal_.RdbmsValueInt8.html @@ -0,0 +1 @@ +RdbmsValueInt8 | @fermyon/spin-sdk
RdbmsValueInt8: {
    tag: "int8";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueStr.html b/docs/types/_internal_.RdbmsValueStr.html new file mode 100644 index 00000000..717e655b --- /dev/null +++ b/docs/types/_internal_.RdbmsValueStr.html @@ -0,0 +1 @@ +RdbmsValueStr | @fermyon/spin-sdk
RdbmsValueStr: {
    tag: "str";
    val: string;
}
diff --git a/docs/types/_internal_.RdbmsValueUint16.html b/docs/types/_internal_.RdbmsValueUint16.html new file mode 100644 index 00000000..8b638df1 --- /dev/null +++ b/docs/types/_internal_.RdbmsValueUint16.html @@ -0,0 +1 @@ +RdbmsValueUint16 | @fermyon/spin-sdk
RdbmsValueUint16: {
    tag: "uint16";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueUint32.html b/docs/types/_internal_.RdbmsValueUint32.html new file mode 100644 index 00000000..1e9e821b --- /dev/null +++ b/docs/types/_internal_.RdbmsValueUint32.html @@ -0,0 +1 @@ +RdbmsValueUint32 | @fermyon/spin-sdk
RdbmsValueUint32: {
    tag: "uint32";
    val: number;
}
diff --git a/docs/types/_internal_.RdbmsValueUint64.html b/docs/types/_internal_.RdbmsValueUint64.html new file mode 100644 index 00000000..888e4104 --- /dev/null +++ b/docs/types/_internal_.RdbmsValueUint64.html @@ -0,0 +1 @@ +RdbmsValueUint64 | @fermyon/spin-sdk
RdbmsValueUint64: {
    tag: "uint64";
    val: bigint;
}
diff --git a/docs/types/_internal_.RdbmsValueUint8.html b/docs/types/_internal_.RdbmsValueUint8.html new file mode 100644 index 00000000..7256521f --- /dev/null +++ b/docs/types/_internal_.RdbmsValueUint8.html @@ -0,0 +1 @@ +RdbmsValueUint8 | @fermyon/spin-sdk
RdbmsValueUint8: {
    tag: "uint8";
    val: number;
}
diff --git a/docs/types/_internal_.RequestLike.html b/docs/types/_internal_.RequestLike.html new file mode 100644 index 00000000..4a1eb6f5 --- /dev/null +++ b/docs/types/_internal_.RequestLike.html @@ -0,0 +1 @@ +RequestLike | @fermyon/spin-sdk
RequestLike: {
    method: string;
    url: string;
} & GenericTraps
diff --git a/docs/types/_internal_.ResolveFunction.html b/docs/types/_internal_.ResolveFunction.html new file mode 100644 index 00000000..479be794 --- /dev/null +++ b/docs/types/_internal_.ResolveFunction.html @@ -0,0 +1,2 @@ +ResolveFunction | @fermyon/spin-sdk
ResolveFunction: ((value: Response | PromiseLike<Response>) => void)

Type for the resolve function that handles sending the final Response.

+
diff --git a/docs/types/_internal_.Route.html b/docs/types/_internal_.Route.html new file mode 100644 index 00000000..8994abf6 --- /dev/null +++ b/docs/types/_internal_.Route.html @@ -0,0 +1 @@ +Route | @fermyon/spin-sdk
Route: (<T>(path: string, ...handlers: RouteHandler[]) => T)
diff --git a/docs/types/_internal_.RouteEntry.html b/docs/types/_internal_.RouteEntry.html new file mode 100644 index 00000000..6de8a882 --- /dev/null +++ b/docs/types/_internal_.RouteEntry.html @@ -0,0 +1 @@ +RouteEntry | @fermyon/spin-sdk
RouteEntry: [string, RegExp, RouteHandler[]]
diff --git a/docs/types/_internal_.RouterHints.html b/docs/types/_internal_.RouterHints.html new file mode 100644 index 00000000..822e061f --- /dev/null +++ b/docs/types/_internal_.RouterHints.html @@ -0,0 +1 @@ +RouterHints | @fermyon/spin-sdk
RouterHints: {
    all: Route;
    delete: Route;
    get: Route;
    options: Route;
    patch: Route;
    post: Route;
    put: Route;
}
diff --git a/docs/types/_internal_.RouterType-1.html b/docs/types/_internal_.RouterType-1.html new file mode 100644 index 00000000..6119bab1 --- /dev/null +++ b/docs/types/_internal_.RouterType-1.html @@ -0,0 +1 @@ +RouterType | @fermyon/spin-sdk
RouterType: {
    __proto__: RouterType;
    handle: ((request: RequestLike, ...extra: any) => Promise<any>);
    routes: RouteEntry[];
} & RouterHints
diff --git a/docs/types/_internal_.SpinRdbmsParameterValue.html b/docs/types/_internal_.SpinRdbmsParameterValue.html new file mode 100644 index 00000000..91f78806 --- /dev/null +++ b/docs/types/_internal_.SpinRdbmsParameterValue.html @@ -0,0 +1 @@ +SpinRdbmsParameterValue | @fermyon/spin-sdk

Type Alias SpinRdbmsParameterValue

SpinRdbmsParameterValue:
    | RdbmsValueBoolean
    | RdbmsValueInt8
    | RdbmsValueInt16
    | RdbmsValueInt32
    | RdbmsValueInt64
    | RdbmsValueUint8
    | RdbmsValueUint16
    | RdbmsValueUint32
    | RdbmsValueUint64
    | RdbmsValueFloating32
    | RdbmsValueFloating64
    | RdbmsValueStr
    | RdbmsValueBinary
    | RdbmsValueDbNull
diff --git a/package-lock.json b/package-lock.json index e818b227..37550aec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@bytecodealliance/componentize-js": "^0.10.1", "@fermyon/knitwit": "https://github.com/fermyon/knitwit", "itty-router": "^3.0.12", + "typedoc-plugin-missing-exports": "^3.0.0", "yargs": "^17.7.2" }, "bin": { @@ -20,6 +21,7 @@ }, "devDependencies": { "prettier": "^3.2.5", + "typedoc": "^0.26.4", "typescript": "^5.4.3" } }, @@ -235,6 +237,27 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@shikijs/core": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.10.3.tgz", + "integrity": "sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==", + "dependencies": { + "@types/hast": "^3.0.4" + } + }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" + }, "node_modules/acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", @@ -271,6 +294,16 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, "node_modules/binaryen": { "version": "116.0.0", "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-116.0.0.tgz", @@ -280,6 +313,14 @@ "wasm2js": "bin/wasm2js" } }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -414,6 +455,17 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-module-lexer": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", @@ -486,6 +538,14 @@ "resolved": "https://registry.npmjs.org/itty-router/-/itty-router-3.0.12.tgz", "integrity": "sha512-s98XTPhle6GGbaFf0kYrOD3Q8gyhnqvOqkwYijC3AmkceNKqWUp13YHg6dWmqmVv4pP7l7c94XI92I0EXVGO0w==" }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/log-symbols": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", @@ -512,6 +572,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==" + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -520,6 +606,20 @@ "node": ">=6" } }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mkdirp": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", @@ -585,6 +685,7 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, +<<<<<<< HEAD "node_modules/proper-lockfile": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", @@ -600,6 +701,16 @@ "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==" }, +======= + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "engines": { + "node": ">=6" + } + }, +>>>>>>> a42cbb4 (add sdk reference docs) "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -623,12 +734,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, +<<<<<<< HEAD "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "engines": { "node": ">= 4" +======= + "node_modules/shiki": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.10.3.tgz", + "integrity": "sha512-eneCLncGuvPdTutJuLyUGS8QNPAVFO5Trvld2wgEq1e002mwctAhJKeMGWtWVXOIEzmlcLRqcgPSorR6AVzOmQ==", + "dependencies": { + "@shikijs/core": "1.10.3", + "@types/hast": "^3.0.4" +>>>>>>> a42cbb4 (add sdk reference docs) } }, "node_modules/signal-exit": { @@ -716,6 +837,7 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, +<<<<<<< HEAD "node_modules/tiny-case": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", @@ -742,6 +864,41 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, +======= + "node_modules/typedoc": { + "version": "0.26.4", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.4.tgz", + "integrity": "sha512-FlW6HpvULDKgc3rK04V+nbFyXogPV88hurarDPOjuuB5HAwuAlrCMQ5NeH7Zt68a/ikOKu6Z/0hFXAeC9xPccQ==", + "dependencies": { + "lunr": "^2.3.9", + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "shiki": "^1.9.1", + "yaml": "^2.4.5" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" + } + }, + "node_modules/typedoc-plugin-missing-exports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-3.0.0.tgz", + "integrity": "sha512-R7D8fYrK34mBFZSlF1EqJxfqiUSlQSmyrCiQgTQD52nNm6+kUtqwiaqaNkuJ2rA2wBgWFecUA8JzHT7x2r7ePg==", + "peerDependencies": { + "typedoc": "0.26.x" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", +>>>>>>> a42cbb4 (add sdk reference docs) "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -750,6 +907,11 @@ "node": ">=14.17" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -811,6 +973,17 @@ "node": ">=10" } }, + "node_modules/yaml": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 8535104b..48499975 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "fmt": "prettier --write \"src/**/*.{ts,tsx,js,jsx}\"", "fmt-check": "prettier --check \"src/**/*.{ts,tsx,js,jsx}\"", "build": "tsc && cp -r src/types ./lib/", + "build-docs": "typedoc --plugin typedoc-plugin-missing-exports src/index.ts --out ./docs --excludeExternals --readme none", "postinstall": "knitwit-postinstall" }, "sideEffects": false, @@ -19,12 +20,14 @@ "license": "Apache-2.0", "devDependencies": { "prettier": "^3.2.5", + "typedoc": "^0.26.4", "typescript": "^5.4.3" }, "dependencies": { "@bytecodealliance/componentize-js": "^0.10.1", "itty-router": "^3.0.12", "yargs": "^17.7.2", + "typedoc-plugin-missing-exports": "^3.0.0", "@fermyon/knitwit": "https://github.com/fermyon/knitwit" }, "config": { diff --git a/src/inboundHttp.ts b/src/inboundHttp.ts index e6880401..dcff39ce 100644 --- a/src/inboundHttp.ts +++ b/src/inboundHttp.ts @@ -1,5 +1,11 @@ +/** + * Type for the resolve function that handles sending the final Response. + */ type ResolveFunction = (value: Response | PromiseLike) => void; +/** + * Class for building HTTP responses. + */ export class ResponseBuilder { headers: Headers = new Headers(); statusCode: number = 200; @@ -11,6 +17,12 @@ export class ResponseBuilder { constructor(resolve: ResolveFunction) { this.resolveFunction = resolve; } + /** + * Sets the HTTP status code for the response. + * @param code - The HTTP status code to set. + * @returns The current ResponseBuilder instance for chaining. + * @throws Error if headers have already been sent. + */ status(code: number): ResponseBuilder { if (this.hasWrittenHeaders) { throw new Error('Headers and Status already sent'); @@ -18,9 +30,20 @@ export class ResponseBuilder { this.statusCode = code; return this; } + /** + * Gets the currently set HTTP status code. + * @returns The HTTP status code. + */ getStatus(): number { return this.statusCode; } + /** + * Sets response headers. + * @param arg1 - Header name, object containing headers, or Headers instance. + * @param arg2 - Optional header value (if arg1 is a string). + * @returns The current ResponseBuilder instance for chaining. + * @throws Error if headers have already been sent or if arguments are invalid. + */ set( arg1: string | { [key: string]: string } | Headers, arg2?: string, @@ -43,6 +66,11 @@ export class ResponseBuilder { } return this; } + /** + * Sends the HTTP response. + * @param value - Optional body content to send with the response. + * @throws Error if the response has already been sent. + */ send(value?: BodyInit) { if (this.hasSentResponse) { throw new Error('Response has already been sent'); @@ -64,6 +92,11 @@ export class ResponseBuilder { } this.hasSentResponse = true; } + /** + * Writes data to a streaming response. + * @param value - The data to write to the response. + * @throws Error if the response has already been sent. + */ write(value: BodyInit) { if (this.hasSentResponse) { throw new Error('Response has already been sent'); @@ -83,6 +116,11 @@ export class ResponseBuilder { this.internalWriter!.write(contents); return; } + /** + * Ends a streaming response by closing the writer. + * If not already streaming, it sends the response. + * @throws Error if the response has already been sent. + */ end() { if (this.hasSentResponse) { throw new Error('Response has already been sent'); diff --git a/src/inboundRedis.ts b/src/inboundRedis.ts index 48ba1fdd..0ec1012f 100644 --- a/src/inboundRedis.ts +++ b/src/inboundRedis.ts @@ -1,3 +1,11 @@ +/** + * Abstract class for handling Redis messages. + */ export abstract class RedisHandler { + /** + * Handles a Redis message. + * @param msg - The message data as a Uint8Array. + * @returns A Promise that resolves when the message has been handled. + */ abstract handleMessage(msg: Uint8Array): Promise; } diff --git a/src/keyValue.ts b/src/keyValue.ts index 1844eb3e..5cc0b2d9 100644 --- a/src/keyValue.ts +++ b/src/keyValue.ts @@ -4,13 +4,50 @@ import * as spinKv from 'fermyon:spin/key-value@2.0.0'; const encoder = new TextEncoder(); const decoder = new TextDecoder(); +/** + * Interface representing a key-value store with various utility methods. + * @interface Store + */ export interface Store { + /** + * Retrieves the value associated with the given key. + * @param {string} key - The key to retrieve the value for. + * @returns {Uint8Array | null} The value associated with the key, or null if the key does not exist. + */ get: (key: string) => Uint8Array | null; + /** + * Sets the value for the given key. + * @param {string} key - The key to set the value for. + * @param {Uint8Array | string | object} value - The value to set. Can be a Uint8Array, string, or object. + */ set: (key: string, value: Uint8Array | string | object) => void; + /** + * Deletes the value associated with the given key. + * @param {string} key - The key to delete the value for. + */ delete: (key: string) => void; + /** + * Checks if a key exists in the store. + * @param {string} key - The key to check. + * @returns {boolean} True if the key exists, false otherwise. + */ exists: (key: string) => boolean; + /** + * Retrieves all the keys in the store. + * @returns {string[]} An array of all the keys in the store. + */ getKeys: () => string[]; + /** + * Retrieves the JSON value associated with the given key. + * @param {string} key - The key to retrieve the JSON value for. + * @returns {any} The JSON value associated with the key. + */ getJson: (key: string) => any; + /** + * Sets the JSON value for the given key. + * @param {string} key - The key to set the JSON value for. + * @param {any} value - The JSON value to set. + */ setJson: (key: string, value: any) => void; } @@ -46,9 +83,19 @@ function createKvStore(store: spinKv.store): Store { return kv; } +/** + * Opens a key-value store with the specified label. + * @param {string} label - The label of the key-value store to open. + * @returns {Store} The key-value store object. + */ export function open(label: string): Store { return createKvStore(spinKv.Store.open(label)); } + +/** + * Opens the default key-value store. + * @returns {Store} The default key-value store object. + */ export function openDefault(): Store { return createKvStore(spinKv.Store.open('default')); } diff --git a/src/llm.ts b/src/llm.ts index 405ecc42..5b705bde 100644 --- a/src/llm.ts +++ b/src/llm.ts @@ -4,15 +4,27 @@ import { //@ts-ignore } from 'fermyon:spin/llm@2.0.0'; +/** + * Enum representing the available models for inferencing. + * @enum {string} + */ export enum InferencingModels { Llama2Chat = 'llama2-chat', CodellamaInstruct = 'codellama-instruct', } +/** + * Enum representing the available models for generating embeddings. + * @enum {string} + */ export enum EmbeddingModels { AllMiniLmL6V2 = 'all-minilm-l6-v2', } +/** + * Interface representing options for inferencing. + * @interface InferencingOptions + */ export interface InferencingOptions { maxTokens?: number; repeatPenalty?: number; @@ -22,6 +34,10 @@ export interface InferencingOptions { topP?: number; } +/** + * Interface representing internal options for inferencing. + * @interface InternalInferencingOptions + */ export interface InternalInferencingOptions { maxTokens?: number; repeatPenalty?: number; @@ -31,24 +47,49 @@ export interface InternalInferencingOptions { topP?: number; } +/** + * Interface representing usage statistics for inferencing. + * @interface InferenceUsage + */ export interface InferenceUsage { promptTokenCount: number; generatedTokenCount: number; } + +/** + * Interface representing the result of an inference. + * @interface InferenceResult + */ export interface InferenceResult { text: string; usage: InferenceUsage; } +/** + * Interface representing usage statistics for generating embeddings. + * @interface EmbeddingUsage + */ + export interface EmbeddingUsage { promptTokenCount: number; } +/** + * Interface representing the result of generating embeddings. + * @interface EmbeddingResult + */ export interface EmbeddingResult { embeddings: Array>; usage: EmbeddingUsage; } +/** + * Performs inferencing using the specified model and prompt, with optional settings. + * @param {InferencingModels | string} model - The model to use for inferencing. + * @param {string} prompt - The prompt to use for inferencing. + * @param {InferencingOptions} [options] - Optional settings for inferencing. + * @returns {InferenceResult} The result of the inference. + */ export function infer( model: InferencingModels | string, prompt: string, @@ -65,6 +106,12 @@ export function infer( return llmInfer(model, prompt, inference_options); } +/** + * Generates embeddings for the given text using the specified model. + * @param {EmbeddingModels | string} model - The model to use for generating embeddings. + * @param {Array} text - The text to generate embeddings for. + * @returns {EmbeddingResult} The result of generating embeddings. + */ export const generateEmbeddings = ( model: EmbeddingModels | string, text: Array, diff --git a/src/mqtt.ts b/src/mqtt.ts index e7390283..356e7003 100644 --- a/src/mqtt.ts +++ b/src/mqtt.ts @@ -1,15 +1,41 @@ //@ts-ignore import * as spinMqtt from 'fermyon:spin/mqtt@2.0.0'; + +/** + * Enum representing the Quality of Service (QoS) levels for MQTT. + * @enum {string} + */ export enum QoS { + /** Messages are delivered at most once. */ AtMostOnce = 'at-most-once', + /** Messages are delivered at least once. */ AtLeastOnce = 'at-least-once', + /** Messages are delivered exactly once. */ ExactlyOnce = 'exactly-once', } +/** + * Interface representing an MQTT connection with a method for publishing messages. + * @interface MqttConnection + */ export interface MqttConnection { + /** + * Publishes a message to the specified MQTT topic. + * @param topic - The topic to publish the message to. + * @param payload - The message payload as a Uint8Array. + * @param qos - The Quality of Service level for message delivery. + */ publish: (topic: string, payload: Uint8Array, qos: QoS) => void; } +/** + * Opens an MQTT connection with the specified parameters. + * @param {string} address - The address of the MQTT broker. + * @param {string} username - The username for the MQTT connection. + * @param {string} password - The password for the MQTT connection. + * @param {number} keepAliveIntervalInSecs - The keep-alive interval in seconds. + * @returns {MqttConnection} The MQTT connection object. + */ export function open( address: string, username: string, diff --git a/src/mysql.ts b/src/mysql.ts index 0b91bb8b..04fd3480 100644 --- a/src/mysql.ts +++ b/src/mysql.ts @@ -8,6 +8,10 @@ import { } from './types/rdbms'; import { convertRdbmsToWitTypes } from './rdbmsHelper'; +/** + * Interface representing a MySQL connection with methods for querying and executing statements. + * @interface MysqlConnection + */ export interface MysqlConnection { query: (statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet; execute: (statement: string, params: RdbmsParameterValue[]) => number; @@ -41,6 +45,11 @@ function createMysqlConnection( }; } +/** + * Opens a MySQL connection to the specified address. + * @param {string} address - The address of the MySQL server. + * @returns {MysqlConnection} The MySQL connection object. + */ export function open(address: string): MysqlConnection { return createMysqlConnection(spinMysql.Connection.open(address)); } diff --git a/src/postgres.ts b/src/postgres.ts index c9999d73..9fd276b8 100644 --- a/src/postgres.ts +++ b/src/postgres.ts @@ -9,8 +9,24 @@ import { } from './types/rdbms'; import { convertRdbmsToWitTypes } from './rdbmsHelper'; +/** + * Interface representing a PostgreSQL connection with methods for querying and executing statements. + * @interface PostgresConnection + */ export interface PostgresConnection { + /** + * Queries the database with the specified statement and parameters. + * @param {string} statement - The SQL statement to execute. + * @param {RdbmsParameterValue[]} params - The parameters for the SQL statement. + * @returns {RdbmsRowSet} The result set of the query. + */ query: (statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet; + /** + * Executes a statement on the database with the specified parameters. + * @param {string} statement - The SQL statement to execute. + * @param {RdbmsParameterValue[]} params - The parameters for the SQL statement. + * @returns {number} The number of rows affected by the execution. + */ execute: (statement: string, params: RdbmsParameterValue[]) => number; } @@ -42,6 +58,11 @@ function createPostgresConnection( }; } +/** + * Opens a PostgreSQL connection to the specified address. + * @param {string} address - The address of the PostgreSQL server. + * @returns {PostgresConnection} The PostgreSQL connection object. + */ export function open(address: string): PostgresConnection { return createPostgresConnection(spinPg.Connection.open(address)); } diff --git a/src/redis.ts b/src/redis.ts index e5d321bb..eca8abf5 100644 --- a/src/redis.ts +++ b/src/redis.ts @@ -5,18 +5,85 @@ export type payload = Uint8Array; export type redisParameter = number | Uint8Array; export type redisResult = number | Uint8Array | null | string; +/** + * Interface representing a Redis connection with various methods for interacting with Redis. + * @interface RedisConnection + */ export interface RedisConnection { + /** + * Publish a Redis message to the specified channel. + * @param {string} channel - The channel to publish the message to. + * @param {payload} payload - The message payload. + * @returns {void} + */ publish: (channel: string, payload: payload) => void; + + /** + * Get a value for the given key. Returns null if the key does not exist. + * @param {string} key - The key to retrieve the value for. + * @returns {payload | null} + */ get: (key: string) => payload | null; + + /** + * Set a value for the given key. + * @param {string} key - The key to set the value for. + * @param {payload} value - The value to set. + * @returns {void} + */ set: (key: string, value: payload) => void; + + /** + * Increment the value of a key. + * @param {string} key - The key to increment. + * @returns {number} + */ incr: (key: string) => number; + + /** + * Deletes the given key. + * @param {string} key - The key to delete. + * @returns {number} + */ del: (key: string) => number; + + /** + * Adds a value to a set. + * @param {string} key - The key of the set. + * @param {string[]} value - The values to add to the set. + * @returns {number} + */ sadd: (key: string, value: string[]) => number; + + /** + * Retrieves the members of a set. + * @param {string} key - The key of the set. + * @returns {string[]} + */ smembers: (key: string) => string[]; + + /** + * Removes values from a set. + * @param {string} key - The key of the set. + * @param {string[]} value - The values to remove from the set. + * @returns {number} + */ srem: (key: string, value: string[]) => number; + + /** + * Execute an arbitrary Redis command and receive the result. + * @param {string} command - The Redis command to execute. + * @param {redisParameter[]} args - The arguments for the Redis command. + * @returns {redisResult[]} + */ execute: (command: string, args: redisParameter[]) => redisResult[]; } +/** + * Opens a connection to the Redis instance at the specified address. + * @param {string} address - The address of the Redis instance. + * @returns {RedisConnection} The Redis connection object. + */ export function open(address: string): RedisConnection { return spinRedis.Connection.open(address); } diff --git a/src/router.ts b/src/router.ts index b0951bbb..e8a6da76 100644 --- a/src/router.ts +++ b/src/router.ts @@ -67,7 +67,10 @@ interface routerType { routes: RouteEntry[]; } -/** @internal */ +/** + * Creates a new router instance. + * @returns {routerType} The router instance. + */ function Router(): routerType { let _spinRouter = _router(); diff --git a/src/sqlite.ts b/src/sqlite.ts index 8ab8bdee..c0cbe51f 100644 --- a/src/sqlite.ts +++ b/src/sqlite.ts @@ -25,17 +25,39 @@ export type ValueText = { tag: 'text'; val: string }; export type ValueBlob = { tag: 'blob'; val: Uint8Array }; export type ValueNull = { tag: 'null' }; +/** + * Interface representing the result of an SQLite query. + * @interface SpinSqliteResult + * @property {string[]} columns - The column names in the result. + * @property {SqliteRowResult[]} rows - The rows of results. + */ interface SpinSqliteResult { columns: string[]; rows: SqliteRowResult[]; } +/** + * Interface representing the formatted result of an SQLite query. + * @interface SqliteResult + * @property {string[]} columns - The column names in the result. + * @property {Object[]} rows - The rows of results. + */ export interface SqliteResult { columns: string[]; rows: { [key: string]: number | bigint | null | string | Uint8Array }[]; } +/** + * Interface representing a connection to an SQLite database with a method for executing queries. + * @interface SqliteConnection + */ export interface SqliteConnection { + /** + * Executes an SQLite statement with given parameters and returns the result. + * @param {string} statement - The SQL statement to execute. + * @param {ParameterValue[]} parameters - The parameters for the SQL statement. + * @returns {SqliteResult} + */ execute: (statement: string, parameters: ParameterValue[]) => SqliteResult; } @@ -67,9 +89,19 @@ function createSqliteConnection( }; } +/** + * Opens a connection to the SQLite database with the specified label. + * @param {string} label - The label of the database to connect to. + * @returns {SqliteConnection} The SQLite connection object. + */ export function open(label: string): SqliteConnection { return createSqliteConnection(spinSqlite.Connection.open(label)); } + +/** + * Opens a connection to the default SQLite database. + * @returns {SqliteConnection} The SQLite connection object. + */ export function openDefault(): SqliteConnection { return createSqliteConnection(spinSqlite.Connection.open('default')); } diff --git a/src/variables.ts b/src/variables.ts index 33bd4049..9bf45698 100644 --- a/src/variables.ts +++ b/src/variables.ts @@ -1,6 +1,11 @@ //@ts-ignore import { get as spinGet } from 'fermyon:spin/variables@2.0.0'; +/** + * Gets the value of a variable if it exists, otherwise returns null. + * @param {string} key - The key of the variable to retrieve. + * @returns {string | null} The value of the variable, or null if it does not exist or an error occurs. + */ export function get(key: string): string | null { try { return spinGet(key); diff --git a/test/test-app/package-lock.json b/test/test-app/package-lock.json index 40f6eb01..f21b711b 100644 --- a/test/test-app/package-lock.json +++ b/test/test-app/package-lock.json @@ -29,6 +29,7 @@ "@bytecodealliance/componentize-js": "^0.10.1", "@fermyon/knitwit": "https://github.com/fermyon/knitwit", "itty-router": "^3.0.12", + "typedoc-plugin-missing-exports": "^3.0.0", "yargs": "^17.7.2" }, "bin": { @@ -36,6 +37,7 @@ }, "devDependencies": { "prettier": "^3.2.5", + "typedoc": "^0.26.4", "typescript": "^5.4.3" } }, From 70cf7828dfa4320a6bd6c61c8bb43484cfcd177f Mon Sep 17 00:00:00 2001 From: karthik2804 Date: Thu, 18 Jul 2024 23:43:17 +0200 Subject: [PATCH 2/2] add docs to exclude list in tsconfig Signed-off-by: karthik2804 --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index e8754ea4..a66057b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,6 +22,7 @@ "lib/**/*", "bin/**/*", "test/**/*", - "examples/**/*" + "examples/**/*", + "docs/**/*", ] } \ No newline at end of file