From cbc867641f8c75e8dae4d8335129fac97283f5c8 Mon Sep 17 00:00:00 2001 From: Chuck MANCHUCK Reeves Date: Wed, 1 Nov 2023 18:59:13 +0000 Subject: [PATCH] docs(numbers): adding doc blocks --- .../numbers/__tests__/__dataSets__/update.ts | 4 +- packages/numbers/docs/.nojekyll | 1 + packages/numbers/docs/assets/highlight.css | 78 + packages/numbers/docs/assets/main.js | 59 + packages/numbers/docs/assets/navigation.js | 1 + packages/numbers/docs/assets/search.js | 1 + packages/numbers/docs/assets/style.css | 1383 +++++++++++++++++ packages/numbers/docs/classes/Numbers.html | 708 +++++++++ packages/numbers/docs/enums/Feature.html | 110 ++ packages/numbers/docs/enums/LineType.html | 110 ++ .../docs/enums/MessagesCallbackTypeEnum.html | 90 ++ .../numbers/docs/enums/SearchPattern.html | 110 ++ .../docs/enums/VoiceCallbackTypeEnum.html | 110 ++ packages/numbers/docs/index.html | 110 ++ packages/numbers/docs/modules.html | 92 ++ packages/numbers/docs/types/Country.html | 66 + .../docs/types/NumbersAvailableList.html | 79 + .../docs/types/NumbersAvailableNumber.html | 99 ++ .../docs/types/NumbersClassParameters.html | 76 + .../docs/types/NumbersEmptyResponse.html | 93 ++ .../docs/types/NumbersOwnedFilter.html | 107 ++ .../numbers/docs/types/NumbersOwnedList.html | 79 + .../docs/types/NumbersOwnedNumber.html | 123 ++ .../numbers/docs/types/NumbersParams.html | 86 + .../docs/types/NumbersQueryOwnedFilter.html | 107 ++ .../docs/types/NumbersQueryParams.html | 86 + .../docs/types/NumbersQuerySearchFilter.html | 96 ++ .../docs/types/NumbersQueryUpdateParams.html | 124 ++ .../numbers/docs/types/NumbersResponse.html | 74 + .../docs/types/NumbersSearchFilter.html | 106 ++ .../docs/types/NumbersSearchSimple.html | 84 + .../docs/types/NumbersUpdateParams.html | 132 ++ packages/numbers/lib/enums/Feature.ts | 20 +- packages/numbers/lib/enums/LineType.ts | 20 +- .../lib/enums/MessagesCallbackTypeEnum.ts | 9 + packages/numbers/lib/enums/SearchPattern.ts | 20 +- .../lib/enums/VoiceCallbackTypeEnum.ts | 19 + packages/numbers/lib/enums/index.ts | 5 + packages/numbers/lib/index.ts | 20 +- packages/numbers/lib/numbers.ts | 125 +- packages/numbers/lib/types.ts | 145 -- packages/numbers/lib/types/Country.ts | 254 +++ .../numbers/lib/types/NumbersAvailableList.ts | 16 + .../lib/types/NumbersAvailableNumber.ts | 37 + .../lib/types/NumbersClassParameters.ts | 15 + .../numbers/lib/types/NumbersEmptyResponse.ts | 28 + .../numbers/lib/types/NumbersOwnedFilter.ts | 45 + .../numbers/lib/types/NumbersOwnedList.ts | 16 + .../numbers/lib/types/NumbersOwnedNumber.ts | 61 + packages/numbers/lib/types/NumbersParams.ts | 23 + .../lib/types/NumbersQueryOwnedFilter.ts | 44 + .../numbers/lib/types/NumbersQueryParams.ts | 23 + .../lib/types/NumbersQuerySearchFilter.ts | 33 + .../lib/types/NumbersQueryUpdateParams.ts | 62 + packages/numbers/lib/types/NumbersResponse.ts | 7 + .../numbers/lib/types/NumbersSearchFilter.ts | 44 + .../numbers/lib/types/NumbersSearchSimple.ts | 19 + .../numbers/lib/types/NumbersUpdateParams.ts | 68 + packages/numbers/lib/types/index.ts | 17 + packages/numbers/package.json | 25 +- packages/numbers/typedoc.json | 6 + 61 files changed, 5579 insertions(+), 231 deletions(-) create mode 100644 packages/numbers/docs/.nojekyll create mode 100644 packages/numbers/docs/assets/highlight.css create mode 100644 packages/numbers/docs/assets/main.js create mode 100644 packages/numbers/docs/assets/navigation.js create mode 100644 packages/numbers/docs/assets/search.js create mode 100644 packages/numbers/docs/assets/style.css create mode 100644 packages/numbers/docs/classes/Numbers.html create mode 100644 packages/numbers/docs/enums/Feature.html create mode 100644 packages/numbers/docs/enums/LineType.html create mode 100644 packages/numbers/docs/enums/MessagesCallbackTypeEnum.html create mode 100644 packages/numbers/docs/enums/SearchPattern.html create mode 100644 packages/numbers/docs/enums/VoiceCallbackTypeEnum.html create mode 100644 packages/numbers/docs/index.html create mode 100644 packages/numbers/docs/modules.html create mode 100644 packages/numbers/docs/types/Country.html create mode 100644 packages/numbers/docs/types/NumbersAvailableList.html create mode 100644 packages/numbers/docs/types/NumbersAvailableNumber.html create mode 100644 packages/numbers/docs/types/NumbersClassParameters.html create mode 100644 packages/numbers/docs/types/NumbersEmptyResponse.html create mode 100644 packages/numbers/docs/types/NumbersOwnedFilter.html create mode 100644 packages/numbers/docs/types/NumbersOwnedList.html create mode 100644 packages/numbers/docs/types/NumbersOwnedNumber.html create mode 100644 packages/numbers/docs/types/NumbersParams.html create mode 100644 packages/numbers/docs/types/NumbersQueryOwnedFilter.html create mode 100644 packages/numbers/docs/types/NumbersQueryParams.html create mode 100644 packages/numbers/docs/types/NumbersQuerySearchFilter.html create mode 100644 packages/numbers/docs/types/NumbersQueryUpdateParams.html create mode 100644 packages/numbers/docs/types/NumbersResponse.html create mode 100644 packages/numbers/docs/types/NumbersSearchFilter.html create mode 100644 packages/numbers/docs/types/NumbersSearchSimple.html create mode 100644 packages/numbers/docs/types/NumbersUpdateParams.html create mode 100644 packages/numbers/lib/enums/MessagesCallbackTypeEnum.ts create mode 100644 packages/numbers/lib/enums/VoiceCallbackTypeEnum.ts create mode 100644 packages/numbers/lib/enums/index.ts delete mode 100644 packages/numbers/lib/types.ts create mode 100644 packages/numbers/lib/types/Country.ts create mode 100644 packages/numbers/lib/types/NumbersAvailableList.ts create mode 100644 packages/numbers/lib/types/NumbersAvailableNumber.ts create mode 100644 packages/numbers/lib/types/NumbersClassParameters.ts create mode 100644 packages/numbers/lib/types/NumbersEmptyResponse.ts create mode 100644 packages/numbers/lib/types/NumbersOwnedFilter.ts create mode 100644 packages/numbers/lib/types/NumbersOwnedList.ts create mode 100644 packages/numbers/lib/types/NumbersOwnedNumber.ts create mode 100644 packages/numbers/lib/types/NumbersParams.ts create mode 100644 packages/numbers/lib/types/NumbersQueryOwnedFilter.ts create mode 100644 packages/numbers/lib/types/NumbersQueryParams.ts create mode 100644 packages/numbers/lib/types/NumbersQuerySearchFilter.ts create mode 100644 packages/numbers/lib/types/NumbersQueryUpdateParams.ts create mode 100644 packages/numbers/lib/types/NumbersResponse.ts create mode 100644 packages/numbers/lib/types/NumbersSearchFilter.ts create mode 100644 packages/numbers/lib/types/NumbersSearchSimple.ts create mode 100644 packages/numbers/lib/types/NumbersUpdateParams.ts create mode 100644 packages/numbers/lib/types/index.ts create mode 100644 packages/numbers/typedoc.json diff --git a/packages/numbers/__tests__/__dataSets__/update.ts b/packages/numbers/__tests__/__dataSets__/update.ts index 46b42eeb..a1382a4d 100644 --- a/packages/numbers/__tests__/__dataSets__/update.ts +++ b/packages/numbers/__tests__/__dataSets__/update.ts @@ -1,4 +1,4 @@ -import * as types from '../../lib/types'; +import { VoiceCallbackTypeEnum } from "../../lib"; const BASE_URL = 'https://rest.nexmo.com'; const CLIENT_METHOD = 'updateNumber'; @@ -33,7 +33,7 @@ export default [ country: 'US', msisdn: '12345', applicationId: '123abc', - voiceCallbackType: types.VoiceCallbackTypeEnum.App, + voiceCallbackType: VoiceCallbackTypeEnum.App, voiceCallbackValue: 'https://www.example.com/webhook', voiceStatusCallback: 'https://www.example.com/webhook/events', }, diff --git a/packages/numbers/docs/.nojekyll b/packages/numbers/docs/.nojekyll new file mode 100644 index 00000000..e2ac6616 --- /dev/null +++ b/packages/numbers/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/packages/numbers/docs/assets/highlight.css b/packages/numbers/docs/assets/highlight.css new file mode 100644 index 00000000..e12c8b2a --- /dev/null +++ b/packages/numbers/docs/assets/highlight.css @@ -0,0 +1,78 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #0000FF; + --dark-hl-3: #569CD6; + --light-hl-4: #0070C1; + --dark-hl-4: #4FC1FF; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #AF00DB; + --dark-hl-6: #C586C0; + --light-hl-7: #267F99; + --dark-hl-7: #4EC9B0; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +pre, code { background: var(--code-background); } diff --git a/packages/numbers/docs/assets/main.js b/packages/numbers/docs/assets/main.js new file mode 100644 index 00000000..01bcad55 --- /dev/null +++ b/packages/numbers/docs/assets/main.js @@ -0,0 +1,59 @@ +"use strict"; +"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(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),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,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 se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.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()}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){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}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&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}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="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(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=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){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",()=>{le(e,t)}),le(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");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s=i?r.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(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),e.blur()}}function ce(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(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!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(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var Z=class extends C{constructor(n){super(n);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 r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){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();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(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-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(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)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&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-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +/*! 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/packages/numbers/docs/assets/navigation.js b/packages/numbers/docs/assets/navigation.js new file mode 100644 index 00000000..988a57f6 --- /dev/null +++ b/packages/numbers/docs/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE52UQVPCMBCF/0vOjBVmHJWbw8AJFUW9OB627Q5kSEMm2aodx/9usQhpISTx2N33vmzfNn39YoSfxIZsgkClRtZjCmhZF1CWhUm25bMlFaLurbjM2fDqu7fzTbnEp0odGP/qbuctGgMLNCMQIoVstVGPa2+X5NK5yXMEnS1nQIRadnGtppvxsuYZ+kY7KnIz78oiRW32lEyAMWiSbaPt7A9s72hdStLV3kv1cSbZltvOwfn1Zf9icHjyzTtwAanAKTfURR3TxHKbZx+5eQ5kjzYZzUBDgdQKr8XuqI6ye03etTVHpTEDwpwdHjguFFWPaNRaGnQc19IEvsj9h8R8wgU5A7IUMcwTy9z1Y3gnl2gpApm/W3HtrWkGkh5K1JU/xq4shn5yWEsRw2z+OP6RbV0M/1nl9afsn9zWBfI91yDyBgQE8Y8MGsucF0q45rQlgdSAUP15vv0AG2XSiWAHAAA=" \ No newline at end of file diff --git a/packages/numbers/docs/assets/search.js b/packages/numbers/docs/assets/search.js new file mode 100644 index 00000000..c76ef5cc --- /dev/null +++ b/packages/numbers/docs/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE7VdW3PbuA7+K2fcV9drUtQtb9leznZOtt3TZLsPmY5HsdXGs76tJXdPttP/fkRKsgEakChZeXJsAeAnfgBIwJTzfbTf/p2Nru6/j/5cbhajq2g82iTrdHQ1epsm+WGfjsajw35VvE83h3X2U/Xp5DFfr4pL81WSZWlhYDT6Ma5tiOBo5NdfbxsMvCgvAyPj0S7Zp5scjE/avW22e9vX7qcP7169abJcC7jaPs3nzXKT3j3t7AmtP3ad0Zvr969v3r23QSIzL4AQDfQIhmbtw8/vbt7Mbj69bxwFifUZp4Y5u/twczN7+/GN210hcedxT0z8mmZZ8jXNXiWr1UMy/1MLvinGswbnxFyZut7tulh8UcrT98NCpu7vNk3288ffkjxP9xsLArrmeie3d9cf72Z/vLv7pdXaCyRL3wzGR4746sP7u+t37+0gJ8YDkr1He/P+9a3j7UHRbuOd+Pm0Xc7TFucjZZz5Wtqex5t7UQrT90IjJce8S1fuY5bCF495HmENYzaFV9uYchqHwpcn99weNvn+6Th4XqhkP1WfNrJkW3p/WD+k++z6W7JcJQ+r9GaZ5ZZZSqRxjMD3vdMkzWY5XHVabL44itMzReIF5EylOo481/PRceBJreQ+/KSCzKDYlCpdcZzULkHSRnf5vgVb+X5oyoHVrqRXqJtoPwuO9uEnJ8UuMFroX2fLbLHpDuaoNyCWXqxMelDTgmO+bU0yJD2Ze2A64fhSbpfbYpPAAjQvw8ME6Ctt9LdkX3yYs8nDEuqT99+sd/nTxzTbbTcZ4xpIZKAkcG7TMQVgvAyt6X6/3b/aLroOPoGK7jBanOxo9CZ5AHuUrpBq7WFxvZz3nabZ/DnmyeB5ueo9UwbVbDXAXDEB8+HvTbp4u1zl3KoJBAYKFtuiY6hApH1WSmZY11USqjcTn+x2q+U8yZfbzbtFNyy26kCIHpPs+mS5G6Qz3YEw7axy2gnMSWkgFBlZ2jthsVWHQrT8p1vcTCqNgcYvPkn/1w1ArdIfQVNy4iu44+UhE1PXyu2EsXvVRg7oVrGdVC+o1ujxHSu1BgRNdDZVaEBgSEq7V2YQae+1pn9FBtX7V2McCLdKrAOG7S95vvt9z+xwWBhAbSAknf3AqRZ0H7+5/uIwuNZe7ji+2e23boAo9edA9ilZHS6BVusP5cfEdwIdXZq28Ez4ekwfZ6I/QibVmyqeiYPy2kAJHhhzzO0VtD5p/Xww14xeafZP5sTQbnncaeQ82X9N8+vd8j+p+61bSr1QMO7z30O6f2otTW2pgVyKNOvoXGfA+7hZEwBXhzuz4VyzzpZM0doI68zAkOiKGnSWtBWwjfDOLQyJr7GWbcTlWNB2xFOWprP+sM4MDIqOrXCbMTmUuR2RNNS6jVCcCt52LE3Jr2kBBQJDprzuSylE2jvR9V9UoXr/lZUD4ba8umMol8siCy1nf3KrLIflTLc/pianK49atC65UGxIBzyz28UNEfbezshB6OSSyMilKweLqEty7oDIee1ggfVYPLrga149eFSuy0cHLG3rBwvGfQFpRtMUzL/vFkmetq4jUGzIYD6z2yWYEfbewcxB6BTMyMiFqwwLqMNa0wFPseFt3syzeI6aw85Pc6OwZYpc24XdUd2ud7vbp4zv97QhwwYGRefYymtG2LmhdxHKhr5UB5hOraleOG/zJD8cW2C9gZ6ZGdYrnZuRLc7ZoyV5KdbeDtCrPemAllkmm88JOR0RYiy3b6SfYQ/dd/t88c750k1zhx1X97t3+opnqB37pZv1zvv0xpMLLTt0x6MLHTA1f//FwnH9AmyQKuGiAmGY2uCysqBXRVAq3S7Xu1XjvJQSgyYkYLJTQqrAcgTnyT7P/ljmj93GniBFZxhtZ/02iz5YgNpQSObbTZ4sN40hSCABahcgYZyvvRJ9hiK0b/15cel5adU5UMF5Ya3ZrcxsO+/YVGi6H3jshqkPlkExtJS7l1e6wxa5w9S3w5e2w1W1z1DQDljLPkcZO2QF+yzF66B16/OUrMNWqy0YZWQvnkdQldkaVvOzq6hm2ieb7Mt2v26z9sKSPJnOs8XLZfZyuXlM98s8XRA3Bkb3hYT7kSzfH+b5dt88NhbsOzReBA75I3I9cmAg1cgc2ueoE08Ph6dSonkYKNZrnHmymacrl6EsyV6j6ZM9+FmvFt+hFfqODc6ctY9rCfca82Di0mV2LUnX0c48s90rqTjY7bd5Oi/i4F8XBEYRa1+WX1vjsZQZDAKa72SxuC5usZCttn9324/pX4cUnPWn56VJr2/WQMiyoip7na7SPHUCRIkPhuNtkYtvDw/rZe6MhVIZDM+/U3cgSHYwBL8l+fzRGYMlPRyKbeY+EVh4OAyHDhAOz4GgMqk7GK+TPGmHca4wNBZnDEONvdunWtRp+DPZ50mt1TA/bxdPTngqwWcCk+yz9OyLFhqOJXopoM/jqgl79X30rfhEn/u8GsmJN4kL+S/LdLUojN+XSIvhtuu1tvC5uvYp1XtRLVGK/DQdje+nYxVMVCw+fx7f1xrmgvnAiIninaDEBBKTxTtJiUkk5hXvPErMQ2KqeKcoMYXE/OKdT4n5SCwo3gWUWIDEwuJdSImFSCwq3kWUWITEClLu47ESE09JJBbj6dWzLaZjL5zEPp5fiwdDBM0EpkLoKS9qFmJsgdkQetYFyYfAhAg98YKkRGBOhJ57QbIiMC1CT78giRGYGRFykykwN0JzIMKx9IvZjLAkpkdoGgTJo8AMScNQPJbeJJCWb2OKpOZBTimc0ooWEy6CYF1ihqSmQdKBhRmSioeJGZI+O0kSMyQ1DdIbe2ISTmMsiRmSmodiS07cEGZIahok6R4SMyQ1DTKgTGKCPM2CJCPXwwR5hiCSdA8T5El2Nj0roxmGYtImZsjTNHhkyvUwQ56mwRNjGU+UF489Wf2FdTBXXlDpyEnkR0an+svTTIdTPIce5s/TLHlkfHuYQC/iZwYT6MWsn3mYQaVp8nwqcBRmUGmaPDJnKMyg0jR54djzJ0oEWBIzqDwuBStrVTIERqRJTKAyBMakJKZNaR4U6RQKU6RCduIVpkhFbB5SmCIVc3lIYYZ8TYMiVx8fM+QLFqaPGfIl6x8+Zsj32DzkY4p8s3OQxA351tbB5xKWjwnyAy4N+ZgfX5OgPEoQ0+NrDhQ5NGbH1xwonxLE7ASGHQpjgMkJNAOKTJUBJifgE2CAyQk8lsYAkxMolsYAsxNoDhSZqANrb2fih0y/AeYn4OMnwAQF/C4iwAwFmgefjN4AUxRqInwygELMUSjYxBVijkJNhE9u9ELMUeixmSvEHIWKzVwh5ig0u29y8xhijsKAnfnQ2oKH7MyHmKMwYn0pxByFhiNyaQsxR5HhiNybRJijiE9yEeYo4pNchDmKPJb3CHMUKZb3CHMU+SzvEeYoCljeI8xRpInwySU4siolfqsQYY4ifqsQYY7iKct7jDmKNRE+metizFEsuUUjxhTFmodiS0VVdZiiWHGLQYwZin1uMYgxQbFmwacrSkxQHHLLRoz5iSNu2YitWlZzEJBpLrbLWU1CQJepU6uinfJRVF6DsnwcldegrMet7eUlKKrYoCuvQVmf2yeWl6Aou2koL0HRkA3R8hqUjdggLa9BWcMZWTmW14Cs4EtccdaG0MQEdM/AbkSYdkNAdw3sVkTZi6C7FnYzwrQcArrHYLcjyn4Ec28WbWVHgnYyuyVhOg90IhJ2V8L0Huj6Rth9CdN9COiuiNWZEKb/QCYuYbUmhGlA0KlLSLt/JLnkJaz2hDBNCDJ9Cas/IUwXgk5gwupQCNOHIFOYsFoUwjQiyCQmrB6FKJsUVLUjrC6FML2IgFw8hNWnEKYdEdCtJKtVIUxDIiC3q8JqVgjTkgjJrCusdoUwTYmQTrue3fTTxIR0ZrBaFsI0JkKmQ2iRZhoSIR3tVrNCmPZDSEew1ZoQpgER0hFhNSeEaUGENG9We0KYJkRI82Y1KIRpQ4Q0b1aLQphGRETzZjUphGlFRDRvVptCmG5ERPOm7Hat5iaiebN6FcJ0JCKmt2vxZnoSEc2b1a8QpisR0bxZHQth+hIRzZvVsxCmNRHRvFVtC/Ndybd0n6eLd+V3Jvf3x+O130ez6ouUYlkwNvVXKkXCvPr+YzwqUpF5LaKmfI3K1wKxefVF+RpU14Pq86KSMa9RdT2q9PROpvxDTOs/fP3Hj9N3NPqdvo1ksUjQaYB8u6+/XTuhLtz7iFqU8Chb+vfsT0rgTuMKRshrmqclT8o+GDEWvBrWCgKAU8S8GvqlFTDq9KQfOKhj7WK5PWqr48yzs2XOp4A59uEcBw1atk8FMdScMpoPh6dNdeQGDDqFqtw8l8ehCG0BtSWnbX4WGEyTPGl5fuXy3P3Wh2jAoJBjj/ModBgOTFUElCXH8OksPwhcCTVrcj3WAg4gCciVnEdUP1sJtAA7sopp1aitD8cDzDBsq+Qg6xmvYtKvk4pXvVZyYZVkoup6VMfw9HjzHGf6oYzZ30vs3sKDtDVo2oqBgjHNOZn5rWfkZaKDlxlt208lCCuPRVxrVr8wDQAA8jzFqH+p/6XVSQ+ocaF8etwLoAVhIWtug5oz7sa/pnlSnznc1Of/QKxBp2fnoDCy1QcIKQOIdW4Wzn5bCmRkQGPIzUehz6h7YFYUl96qh8aAFmBeVb4TVot0dJxTLhDPPQFMAuuCq2SzWC03yBVA0uDW71ptlm9Xq9mXfYoMgPjnEqVWthcUEHEcZfXR7Xl1dPvMBMReuWNcpRQhubuhrGq/hJZBBucYsM18K8+VA3TALYJqpY7r3ZPkKFqv8YoAXJvT2D4sV+ls9Q05JRycVXzM850+6gNRg2j0K3eM62wsueBYb7P1bpc9ZTZFPpjJ2KvNsLdSPfQEMg5wa1lFhV+vIhW8sJrU+Lgd4vyQSB4SzLCs7lPVy5BsMXRMa6slXooF3AJwOwDbyPneRwIyJJcZKzPmHNYO/O8OYAaEKLt1q8yk+v8T7I/Hu4ARcEvsJq4yYjL1l+q5epCjQMyzmypowp5WBdYtxbk1NHA+pQrw7bfMxa56FhJog5kMWibhL/2LB8xMKJD8g5YbMXbOofggMkIu10ET5ePk51h8kEWjlhkxhsqj9QQikHOiFnopDwsAu3FL0HA3E8CEOW25m9JIVj1uDYzAHcm0BQk3GwEstQS3xJnTlNRkRDCDKA7D8QcLQJABF1VVQgvr4r3OwFMWT3nY9MEcNgVo4CafrQ4qZaK2j2A9pTjfsH+SDLgWYCSsiwXuHkozhBUBC9FqsVDHKeFiSB9HXphHB6imBaTJ42jSJvQDW5k58U+ZgdW14txWmyn2wdT8wjtj96Baf6fP2lMWYOAorgIyFoqykzIAg0Zxi5UxcCD14S5e8dxuFpQyDDZ2ZQDKugBcmMPtwAgsAhXrDkvUgBJwZF7nH9ydAF6j6l1M5YiRXzskGyY40cA9Aqehf03hvFqGlLM+Y36I4axehmSxuvbvYYJ4BlMdclFTqhfalrICsxdwU57j8kjABMT5B36wEtwtzH5sZ8Xe+kpwj7Lush7J5QKkXE6INhh0To+7a/PAMPI0sONq0mFLLGDAr24irjxWSM7fzkza9ZVAoeZi5by8Aib8ugKop5fdLBubmXmien58ohr4Jewn10W4JAF+Ho92y11qyumr+88/fvwfZDOM7VV8AAA="; \ No newline at end of file diff --git a/packages/numbers/docs/assets/style.css b/packages/numbers/docs/assets/style.css new file mode 100644 index 00000000..108428c3 --- /dev/null +++ b/packages/numbers/docs/assets/style.css @@ -0,0 +1,1383 @@ +: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-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: var(--light-color-ts-type-alias); + --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-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-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: var(--dark-color-ts-type-alias); + --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-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-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); + + --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-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); + + --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-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); + + --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-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); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + text-decoration: none; + color: var(--color-text); +} + +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; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.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: "Segoe UI", sans-serif; + 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; +} + +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: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-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 + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.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); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.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.5rem); +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: inline-flex; + 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-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-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 1.75rem - 0.5rem); +} + +.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 { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-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-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.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: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#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-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-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%; + } +} + +/* 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/packages/numbers/docs/classes/Numbers.html b/packages/numbers/docs/classes/Numbers.html new file mode 100644 index 00000000..b1fb75a1 --- /dev/null +++ b/packages/numbers/docs/classes/Numbers.html @@ -0,0 +1,708 @@ +Numbers | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Class Numbers

+
+

Represents a client for managing phone numbers.

+
+
+
+

Hierarchy

+
    +
  • Client +
      +
    • Numbers
+
+
+
+ +
+
+

Constructors

+
+ +
    + +
  • +

    Creates a new instance of the Client.

    +
    +
    +

    Parameters

    +
      +
    • +
      credentials: AuthParams | AuthInterface
      +

      The authentication credentials or an authentication instance.

      +
      +
    • +
    • +
      Optional options: ConfigParams
      +

      Optional configuration settings for the client.

      +
      +
    +

    Returns Numbers

    +
    +

    Example

    const client = new Client({ apiKey: 'YOUR_API_KEY', apiSecret: 'YOUR_API_SECRET' });
    +
    +
+
+

Properties

+
+ +
auth: AuthInterface
+

The authentication instance responsible for generating authentication headers and query parameters.

+
+
+
+ +
authType: AuthenticationType = AuthenticationType.QUERY_KEY_SECRET
+
+ +
config: ConfigParams
+

Configuration settings for the client, including default hosts for various services and other request settings.

+
+
+
+ +
transformers: __module
+

Static property containing utility transformers.

+
+
+

Static

+
+

Methods

+
+ +
    + +
  • +

    Adds the appropriate authentication headers or parameters to the request based on the authentication type.

    +
    +
    +

    Parameters

    +
      +
    • +
      request: VetchOptions
      +

      The request options to which authentication needs to be added.

      +
      +
    +

    Returns Promise<VetchOptions>

      +
    • The request options with the added authentication.
    • +
    + +
    +

    Example

    const requestOptions: VetchOptions = {
    url: 'https://api.example.com/data',
    method: HTTPMethods.GET
    };
    const authenticatedRequest = await client.addAuthenticationToRequest(requestOptions); +
    +
+
+ +
+
+ +
+
+ +
+
+ +
    + +
  • +

    Retrieves a list of owned phone numbers based on the provided filter criteria.

    +
    +
    +

    Parameters

    +
      +
    • +
      Optional filter: NumbersOwnedFilter
      +

      The filter criteria for searching owned numbers.

      +
      +
    +

    Returns Promise<NumbersOwnedList>

    A promise that resolves to a list of owned phone numbers or an error response.

    + +
+
+ +
    + +
  • +

    Parses the response based on its content type.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

      +

      The expected type of the parsed response data.

      +
      +
    +
    +

    Parameters

    +
      +
    • +
      request: VetchOptions
      +

      The request options.

      +
      +
    • +
    • +
      response: Response
      +

      The raw response from the request.

      +
      +
    +

    Returns Promise<VetchResponse<T>>

      +
    • The parsed response.
    • +
    + +
+
+ +
    + +
  • +

    Prepares the body for the request based on the content type.

    +
    +
    +

    Parameters

    +
      +
    • +
      request: VetchOptions
      +

      The request options.

      +
      +
    +

    Returns undefined | string

      +
    • The prepared request body as a string or undefined.
    • +
    + +
+
+ +
    + +
  • +

    Prepares the request with necessary headers, authentication, and query parameters.

    +
    +
    +

    Parameters

    +
      +
    • +
      request: VetchOptions
      +

      The initial request options.

      +
      +
    +

    Returns Promise<VetchOptions>

      +
    • The modified request options.
    • +
    + +
+
+ +
    + +
  • +

    Sends a DELETE request to the specified URL.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      url: string
      +

      The URL endpoint for the DELETE request.

      +
      +
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the DELETE request.
    • +
    + +
    +

    Example

    const response = await client.sendDeleteRequest('https://api.example.com/resource/123');
    +
    +
+
+ +
    + +
  • +

    Sends a POST request with form data to the specified URL.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      url: string
      +

      The URL endpoint for the POST request.

      +
      +
    • +
    • +
      Optional payload: Record<string, string>
      +

      Optional payload containing form data to send with the POST request.

      +
      +
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the POST request.
    • +
    + +
    +

    Example

    const response = await client.sendFormSubmitRequest('https://api.example.com/resource', { key: 'value' });
    +
    +
+
+ +
    + +
  • +

    Sends a GET request to the specified URL with optional query parameters.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      url: string
      +

      The URL endpoint for the GET request.

      +
      +
    • +
    • +
      Optional queryParams: {
          [key: string]: unknown;
      }
      +

      Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.

      +
      +
      +
        +
      • +
        [key: string]: unknown
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the GET request.
    • +
    + +
    +

    Example

    const response = await client.sendGetRequest('https://api.example.com/resource', { key: 'value' });
    +
    +
+
+ +
    + +
  • +

    Sends a PATCH request to the specified URL with an optional payload.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      url: string
      +

      The URL endpoint for the PATCH request.

      +
      +
    • +
    • +
      Optional payload: {
          [key: string]: unknown;
      }
      +

      Optional payload to be sent as the body of the PATCH request.

      +
      +
      +
        +
      • +
        [key: string]: unknown
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the PATCH request.
    • +
    + +
    +

    Example

    const response = await client.sendPatchRequest('https://api.example.com/resource/123', { key: 'updatedValue' });
    +
    +
+
+ +
    + +
  • +

    Sends a POST request to the specified URL with an optional payload.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      url: string
      +

      The URL endpoint for the POST request.

      +
      +
    • +
    • +
      Optional payload: {
          [key: string]: unknown;
      }
      +

      Optional payload to be sent as the body of the POST request.

      +
      +
      +
        +
      • +
        [key: string]: unknown
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the POST request.
    • +
    + +
    +

    Example

    const response = await client.sendPostRequest('https://api.example.com/resource', { key: 'value' });
    +
    +
+
+ +
    + +
  • +

    Sends a PUT request to the specified URL with an optional payload.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      url: string
      +

      The URL endpoint for the PUT request.

      +
      +
    • +
    • +
      Optional payload: {
          [key: string]: unknown;
      }
      +

      Optional payload to be sent as the body of the PUT request.

      +
      +
      +
        +
      • +
        [key: string]: unknown
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the PUT request.
    • +
    + +
    +

    Example

    const response = await client.sendPutRequest('https://api.example.com/resource/123', { key: 'updatedValue' });
    +
    +
+
+ +
    + +
  • +

    Sends a request adding necessary headers, handling authentication, and parsing the response.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      request: VetchOptions
      +

      The options defining the request, including URL, method, headers, and data.

      +
      +
    +

    Returns Promise<VetchResponse<T>>

      +
    • The parsed response from the request.
    • +
    + +
    +

    Example

    const requestOptions: VetchOptions = {
    url: 'https://api.example.com/data',
    method: HTTPMethods.GET,
    headers: { 'Custom-Header': 'value' }
    };
    const response = await client.sendRequest(requestOptions); +
    +
+
+ +
    + +
  • +

    Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.

    +
    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      method: POST | PUT | PATCH
      +

      The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).

      +
      +
    • +
    • +
      url: string
      +

      The URL endpoint for the request.

      +
      +
    • +
    • +
      Optional payload: {
          [key: string]: unknown;
      }
      +

      Optional payload to be sent as the body of the request, JSON-encoded.

      +
      +
      +
        +
      • +
        [key: string]: unknown
    +

    Returns Promise<VetchResponse<T>>

      +
    • The response from the request.
    • +
    + +
    +

    Example

    const response = await client.sendRequestWithData(HTTPMethods.POST, 'https://api.example.com/resource', { key: 'value' });
    +
    +
+
+ +
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/enums/Feature.html b/packages/numbers/docs/enums/Feature.html new file mode 100644 index 00000000..7ff31d62 --- /dev/null +++ b/packages/numbers/docs/enums/Feature.html @@ -0,0 +1,110 @@ +Feature | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Enumeration Feature

+
+

Enumeration of features for a virtual number.

+
+
+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
MMS: "MMS"
+

Supports Multimedia Messaging Service (MMS).

+
+
+
+ +
SMS: "SMS"
+

Supports Short Message Service (SMS).

+
+
+
+ +
VOICE: "VOICE"
+

Supports Voice calling.

+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/enums/LineType.html b/packages/numbers/docs/enums/LineType.html new file mode 100644 index 00000000..abb5c58b --- /dev/null +++ b/packages/numbers/docs/enums/LineType.html @@ -0,0 +1,110 @@ +LineType | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Enumeration LineType

+
+

Enumeration of line types for virtual numbers.

+
+
+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
LANDLINE: "landline"
+

Landline type.

+
+
+
+ +
LANDLINE_TOLL_FREE: "landline-toll-free"
+

Landline toll-free type.

+
+
+
+ +
MOBILE_LVN: "mobile-lvn"
+

Mobile LVN (Local Virtual Number) type.

+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/enums/MessagesCallbackTypeEnum.html b/packages/numbers/docs/enums/MessagesCallbackTypeEnum.html new file mode 100644 index 00000000..c5df09fc --- /dev/null +++ b/packages/numbers/docs/enums/MessagesCallbackTypeEnum.html @@ -0,0 +1,90 @@ +MessagesCallbackTypeEnum | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Enumeration MessagesCallbackTypeEnum

+
+

Enumeration of messages callback types.

+
+
+
+
+
+ +
+
+

Enumeration Members

+
App +
+
+

Enumeration Members

+
+ +
App: "app"
+

Callback type for an application.

+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/enums/SearchPattern.html b/packages/numbers/docs/enums/SearchPattern.html new file mode 100644 index 00000000..e8fe1674 --- /dev/null +++ b/packages/numbers/docs/enums/SearchPattern.html @@ -0,0 +1,110 @@ +SearchPattern | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Enumeration SearchPattern

+
+

Enumeration of search patterns.

+
+
+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
CONTAINS: 1
+

Indicates a search for values that contain the given pattern.

+
+
+
+ +
ENDS_WITH: 2
+

Indicates a search for values that end with the given pattern.

+
+
+
+ +
START_WITH: 0
+

Indicates a search for values that start with the given pattern.

+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/enums/VoiceCallbackTypeEnum.html b/packages/numbers/docs/enums/VoiceCallbackTypeEnum.html new file mode 100644 index 00000000..1de5839d --- /dev/null +++ b/packages/numbers/docs/enums/VoiceCallbackTypeEnum.html @@ -0,0 +1,110 @@ +VoiceCallbackTypeEnum | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Enumeration VoiceCallbackTypeEnum

+
+

Enumeration of voice callback types.

+
+
+
+
+
+ +
+
+

Enumeration Members

+
App +Sip +Tel +
+
+

Enumeration Members

+
+ +
App: "app"
+

Callback type for an application.

+
+
+
+ +
Sip: "sip"
+

Callback type for SIP.

+
+
+
+ +
Tel: "tel"
+

Callback type for telephone (tel).

+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/index.html b/packages/numbers/docs/index.html new file mode 100644 index 00000000..87131c34 --- /dev/null +++ b/packages/numbers/docs/index.html @@ -0,0 +1,110 @@ +Vonage Numbers - v1.9.0
+
+ +
+
+
+
+

Vonage Numbers - v1.9.0

+

Vonage Number SDK for Node.js

GitHub Workflow Status Codecov Latest Release Contributor Covenant License

+Vonage + +

This is the Vonage Number SDK for Node.js for use with Vonage APIs. To use it you will need a Vonage account. Sign up for free at vonage.com.

+

For full API documentation refer to developer.nexmo.com.

+

If you are updating from V2 to V3, please check the migration guide found here

+ +

Installation

We recommend using this SDK as part of the overall @vonage/server-sdk package. Please see the main package for installation.

+

You can also use this SDK standalone if you only need access to just the Numbers API.

+

With NPM

npm install @vonage/numbers
+
+

With Yarn

yarn add @vonage/numbers
+
+

Usage

As part of the Vonage Server SDK

If you are using this SDK as part of the Vonage Server SDK, you can access it as the numbers property off of the client that you instantiate.

+
const { Vonage, Auth } = require('@vonage/server-sdk');

const credentials = new Auth({
apiKey: API_KEY,
apiSecret: API_SECRET
});
const options = {};
const vonage = new Vonage(credentials, options);

vonage.numbers.getAvailableNumbers()
.then(resp => console.log(resp))
.catch(err => console.error(err)); +
+

Standalone

The SDK can be used standalone from the main Vonage Server SDK for Node.js if you only need to use the Numbers API. All you need to do is require('@vonage/numbers'), and use the returned object to create your own client.

+
const { Auth } = require('@vonage/auth');
const { Numbers } = require('@vonage/numbers');

const credentials = new Auth({
apiKey: API_KEY,
apiSecret: API_SECRET
});
const options = {};

const numbersClient = new Numbers(credentials, options); +
+

Where credentials is any option from @vonage/auth, and options is any option from @vonage/server-client

+

Promises

Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use await to wait for a response.

+
const resp = await vonage.numbers.basicLookup(PHONE_NUMBER)

vonage.numbers.getAvailableNumbers()
.then(resp => console.log(resp))
.catch(err => console.error(err)); +
+

Testing

Run:

+
npm run test
+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/modules.html b/packages/numbers/docs/modules.html new file mode 100644 index 00000000..bc625a81 --- /dev/null +++ b/packages/numbers/docs/modules.html @@ -0,0 +1,92 @@ +Vonage Numbers - v1.9.0
+
+ +
+ +
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/Country.html b/packages/numbers/docs/types/Country.html new file mode 100644 index 00000000..97640b13 --- /dev/null +++ b/packages/numbers/docs/types/Country.html @@ -0,0 +1,66 @@ +Country | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias Country

+
Country: "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | string
+

ISO 3166-1 alpha-2 country codes.

+
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersAvailableList.html b/packages/numbers/docs/types/NumbersAvailableList.html new file mode 100644 index 00000000..435dab57 --- /dev/null +++ b/packages/numbers/docs/types/NumbersAvailableList.html @@ -0,0 +1,79 @@ +NumbersAvailableList | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersAvailableList

+
NumbersAvailableList: {
    count?: number;
    numbers?: NumbersAvailableNumber[];
}
+

Represents a list of available numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional count?: number
    +

    The total count of available numbers.

    +
    +
  • +
  • +
    Optional numbers?: NumbersAvailableNumber[]
    +

    An array of available numbers and their details.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersAvailableNumber.html b/packages/numbers/docs/types/NumbersAvailableNumber.html new file mode 100644 index 00000000..14e080b2 --- /dev/null +++ b/packages/numbers/docs/types/NumbersAvailableNumber.html @@ -0,0 +1,99 @@ +NumbersAvailableNumber | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersAvailableNumber

+
NumbersAvailableNumber: {
    cost?: string;
    country?: Country;
    features?: Feature[];
    msisdn?: string;
    type?: LineType;
}
+

Represents an available phone number with its details.

+
+
+

Type declaration

+
    +
  • +
    Optional cost?: string
    +

    The cost associated with the phone number. +Example: "$10.00".

    +
    +
  • +
  • +
    Optional country?: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional features?: Feature[]
    +

    The capabilities/features of the phone number, such as SMS, VOICE, or MMS. +Example: ["SMS", "VOICE"].

    +
    +
  • +
  • +
    Optional msisdn?: string
    +

    An available inbound virtual phone number. +Example: "447700900000".

    +
    +
  • +
  • +
    Optional type?: LineType
    +

    The type of phone number. +Example: "mobile-lvn" or "landline".

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersClassParameters.html b/packages/numbers/docs/types/NumbersClassParameters.html new file mode 100644 index 00000000..8f020553 --- /dev/null +++ b/packages/numbers/docs/types/NumbersClassParameters.html @@ -0,0 +1,76 @@ +NumbersClassParameters | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersClassParameters

+
NumbersClassParameters: AuthParams & VetchOptions & {
    auth?: AuthInterface;
}
+

Represents the parameters for configuring the NumbersClass.

+
+
+

Type declaration

+
    +
  • +
    Optional auth?: AuthInterface
    +

    The authentication configuration.

    +
    +
+
+

Deprecated

This is no longer in use

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersEmptyResponse.html b/packages/numbers/docs/types/NumbersEmptyResponse.html new file mode 100644 index 00000000..08bfe332 --- /dev/null +++ b/packages/numbers/docs/types/NumbersEmptyResponse.html @@ -0,0 +1,93 @@ +NumbersEmptyResponse | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersEmptyResponse

+
NumbersEmptyResponse: {
    error-code?: 200 | 401 | number;
    error-code-label?: string;
    errorCode?: string;
    errorCodeLabel?: string;
}
+

Represents a response with optional error code and label for empty number-related operations.

+
+
+

Type declaration

+
    +
  • +
    Optional error-code?: 200 | 401 | number
    +

    The error code, if an error occurred during the operation. +Example: "E001".

    +
    +
  • +
  • +
    Optional error-code-label?: string
    +

    A human-readable label or description of the error code. +Example: "Invalid request."

    +
    +
  • +
  • +
    Optional errorCode?: string
    +

    The error code, if an error occurred during the operation. +Example: "E001".

    +
    +
  • +
  • +
    Optional errorCodeLabel?: string
    +

    A human-readable label or description of the error code. +Example: "Invalid request."

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersOwnedFilter.html b/packages/numbers/docs/types/NumbersOwnedFilter.html new file mode 100644 index 00000000..dfb141c7 --- /dev/null +++ b/packages/numbers/docs/types/NumbersOwnedFilter.html @@ -0,0 +1,107 @@ +NumbersOwnedFilter | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersOwnedFilter

+
NumbersOwnedFilter: {
    applicationId?: string;
    country?: Country;
    hasApplication?: boolean;
    index?: number;
    pattern?: string;
    searchPattern?: SearchPattern;
    size?: number;
}
+

Represents filters for searching owned numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional applicationId?: string
    +

    An Application ID. +Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

    +
    +
  • +
  • +
    Optional country?: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional hasApplication?: boolean
    +

    Indicates whether numbers have an associated application.

    +
    +
  • +
  • +
    Optional index?: number
    +

    The starting index for paginated results.

    +
    +
  • +
  • +
    Optional pattern?: string
    +

    A pattern to filter numbers.

    +
    +
  • +
  • +
    Optional searchPattern?: SearchPattern
    +

    The search pattern type. +Example: SearchPattern.START_WITH.

    +
    +
  • +
  • +
    Optional size?: number
    +

    The maximum number of results to return.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersOwnedList.html b/packages/numbers/docs/types/NumbersOwnedList.html new file mode 100644 index 00000000..93af35da --- /dev/null +++ b/packages/numbers/docs/types/NumbersOwnedList.html @@ -0,0 +1,79 @@ +NumbersOwnedList | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersOwnedList

+
NumbersOwnedList: {
    count?: number;
    numbers?: NumbersOwnedNumber[];
}
+

Represents a list of owned numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional count?: number
    +

    The total count of owned numbers.

    +
    +
  • +
  • +
    Optional numbers?: NumbersOwnedNumber[]
    +

    An array of owned numbers and their details.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersOwnedNumber.html b/packages/numbers/docs/types/NumbersOwnedNumber.html new file mode 100644 index 00000000..3420f4c9 --- /dev/null +++ b/packages/numbers/docs/types/NumbersOwnedNumber.html @@ -0,0 +1,123 @@ +NumbersOwnedNumber | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersOwnedNumber

+
NumbersOwnedNumber: {
    country?: Country;
    features?: Feature[];
    messagesCallbackType?: string;
    messagesCallbackValue?: string;
    moHttpUrl?: string;
    msisdn?: string;
    type?: LineType;
    voiceCallbackType?: string;
    voiceCallbackValue?: string;
}
+

Represents an owned phone number with its details.

+
+
+

Type declaration

+
    +
  • +
    Optional country?: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional features?: Feature[]
    +

    The capabilities/features of the phone number, such as SMS, VOICE, or MMS. +Example: ["SMS", "VOICE"].

    +
    +
  • +
  • +
    Optional messagesCallbackType?: string
    +

    The type of messages callback for the number. +Example: "app".

    +
    +
  • +
  • +
    Optional messagesCallbackValue?: string
    +

    The value associated with the messages callback. +Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

    +
    +
  • +
  • +
    Optional moHttpUrl?: string
    +

    The URL of the webhook endpoint that handles inbound messages for the number. +Example: "https://example.com/webhooks/inbound-sms".

    +
    +
  • +
  • +
    Optional msisdn?: string
    +

    The owned phone number. +Example: "447700900000".

    +
    +
  • +
  • +
    Optional type?: LineType
    +

    The type of phone number. +Example: "mobile-lvn" or "landline".

    +
    +
  • +
  • +
    Optional voiceCallbackType?: string
    +

    The type of voice callback for the number. +Example: "app" or "sip".

    +
    +
  • +
  • +
    Optional voiceCallbackValue?: string
    +

    The value associated with the voice callback. +Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersParams.html b/packages/numbers/docs/types/NumbersParams.html new file mode 100644 index 00000000..3636ab80 --- /dev/null +++ b/packages/numbers/docs/types/NumbersParams.html @@ -0,0 +1,86 @@ +NumbersParams | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersParams

+
NumbersParams: {
    country: Country;
    msisdn: string;
    targetApiKey?: string;
}
+

Represents parameters for configuring a phone number.

+
+
+

Type declaration

+
    +
  • +
    country: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    msisdn: string
    +

    The phone number. +Example: "447700900000".

    +
    +
  • +
  • +
    Optional targetApiKey?: string
    +

    An optional target API key.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersQueryOwnedFilter.html b/packages/numbers/docs/types/NumbersQueryOwnedFilter.html new file mode 100644 index 00000000..a4156a93 --- /dev/null +++ b/packages/numbers/docs/types/NumbersQueryOwnedFilter.html @@ -0,0 +1,107 @@ +NumbersQueryOwnedFilter | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersQueryOwnedFilter

+
NumbersQueryOwnedFilter: {
    application_id?: string;
    country?: Country;
    has_application?: boolean;
    index?: number;
    pattern?: string;
    search_pattern?: number;
    size?: number;
}
+

Represents filters for querying owned numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional application_id?: string
    +

    An Application ID. +Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

    +
    +
  • +
  • +
    Optional country?: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional has_application?: boolean
    +

    Indicates whether numbers have an associated application.

    +
    +
  • +
  • +
    Optional index?: number
    +

    The starting index for paginated results.

    +
    +
  • +
  • +
    Optional pattern?: string
    +

    A pattern to filter numbers.

    +
    +
  • +
  • +
    Optional search_pattern?: number
    +

    The search pattern type. +Example: 0 for "START_WITH".

    +
    +
  • +
  • +
    Optional size?: number
    +

    The maximum number of results to return.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersQueryParams.html b/packages/numbers/docs/types/NumbersQueryParams.html new file mode 100644 index 00000000..b7ce7aca --- /dev/null +++ b/packages/numbers/docs/types/NumbersQueryParams.html @@ -0,0 +1,86 @@ +NumbersQueryParams | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersQueryParams

+
NumbersQueryParams: {
    country: Country;
    msisdn: string;
    target_api_key?: string;
}
+

Represents parameters for querying phone numbers.

+
+
+

Type declaration

+
    +
  • +
    country: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    msisdn: string
    +

    The phone number. +Example: "447700900000".

    +
    +
  • +
  • +
    Optional target_api_key?: string
    +

    An optional target API key.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersQuerySearchFilter.html b/packages/numbers/docs/types/NumbersQuerySearchFilter.html new file mode 100644 index 00000000..47d61009 --- /dev/null +++ b/packages/numbers/docs/types/NumbersQuerySearchFilter.html @@ -0,0 +1,96 @@ +NumbersQuerySearchFilter | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersQuerySearchFilter

+
NumbersQuerySearchFilter: {
    country?: Country;
    index?: number;
    pattern?: string;
    search_pattern?: number;
    size?: number;
}
+

Represents filters for searching phone numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional country?: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional index?: number
    +

    The starting index for paginated results.

    +
    +
  • +
  • +
    Optional pattern?: string
    +

    A pattern to filter numbers.

    +
    +
  • +
  • +
    Optional search_pattern?: number
    +

    The search pattern type. +Example: 0 for "START_WITH".

    +
    +
  • +
  • +
    Optional size?: number
    +

    The maximum number of results to return.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersQueryUpdateParams.html b/packages/numbers/docs/types/NumbersQueryUpdateParams.html new file mode 100644 index 00000000..3291d13c --- /dev/null +++ b/packages/numbers/docs/types/NumbersQueryUpdateParams.html @@ -0,0 +1,124 @@ +NumbersQueryUpdateParams | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersQueryUpdateParams

+
NumbersQueryUpdateParams: {
    app_id?: string;
    country: Country;
    messagesCallbackType?: MessagesCallbackTypeEnum;
    messagesCallbackValue?: string;
    moHttpUrl?: string;
    moSmppSysType?: string;
    msisdn: string;
    voiceCallbackType?: VoiceCallbackTypeEnum;
    voiceCallbackValue?: string;
    voiceStatusCallback?: string;
}
+

Represents parameters for updating phone number settings.

+
+
+

Type declaration

+
    +
  • +
    Optional app_id?: string
    +

    An Application ID. +Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

    +
    +
  • +
  • +
    country: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional messagesCallbackType?: MessagesCallbackTypeEnum
    +

    The messages callback type.

    +
    +
    +

    Deprecated

  • +
  • +
    Optional messagesCallbackValue?: string
    +

    The messages callback value.

    +
    +
    +

    Deprecated

  • +
  • +
    Optional moHttpUrl?: string
    +

    The HTTP URL for handling MO (Mobile Originated) messages.

    +
    +
  • +
  • +
    Optional moSmppSysType?: string
    +

    The SMPP system type for MO (Mobile Originated) messages.

    +
    +
  • +
  • +
    msisdn: string
    +

    The phone number. +Example: "447700900000".

    +
    +
  • +
  • +
    Optional voiceCallbackType?: VoiceCallbackTypeEnum
    +

    The voice callback type.

    +
    +
  • +
  • +
    Optional voiceCallbackValue?: string
    +

    The voice callback value.

    +
    +
  • +
  • +
    Optional voiceStatusCallback?: string
    +

    The voice status callback URL.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersResponse.html b/packages/numbers/docs/types/NumbersResponse.html new file mode 100644 index 00000000..61429564 --- /dev/null +++ b/packages/numbers/docs/types/NumbersResponse.html @@ -0,0 +1,74 @@ +NumbersResponse | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersResponse<T>

+
NumbersResponse<T>: VetchResponse<T>
+

Represents a response for phone numbers.

+
+
+

Type Parameters

+
    +
  • +

    T

    +

    The type of the response data.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersSearchFilter.html b/packages/numbers/docs/types/NumbersSearchFilter.html new file mode 100644 index 00000000..57f8a81a --- /dev/null +++ b/packages/numbers/docs/types/NumbersSearchFilter.html @@ -0,0 +1,106 @@ +NumbersSearchFilter | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersSearchFilter

+
NumbersSearchFilter: {
    country: Country;
    features?: Feature[];
    index?: number;
    pattern?: string;
    searchPattern?: SearchPattern;
    size?: number;
    type?: LineType;
}
+

Represents filters for searching phone numbers.

+
+
+

Type declaration

+
    +
  • +
    country: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional features?: Feature[]
    +

    The capabilities or features of the number.

    +
    +
  • +
  • +
    Optional index?: number
    +

    The starting index for paginated results.

    +
    +
  • +
  • +
    Optional pattern?: string
    +

    A pattern to filter numbers.

    +
    +
  • +
  • +
    Optional searchPattern?: SearchPattern
    +

    The search pattern type. +Example: 0 for "START_WITH".

    +
    +
  • +
  • +
    Optional size?: number
    +

    The maximum number of results to return.

    +
    +
  • +
  • +
    Optional type?: LineType
    +

    The type of the phone number.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersSearchSimple.html b/packages/numbers/docs/types/NumbersSearchSimple.html new file mode 100644 index 00000000..fa7ad232 --- /dev/null +++ b/packages/numbers/docs/types/NumbersSearchSimple.html @@ -0,0 +1,84 @@ +NumbersSearchSimple | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersSearchSimple

+
NumbersSearchSimple: {
    contains?: string;
    endsWith?: string;
    startsWith?: string;
}
+

Represents simple search options for phone numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional contains?: string
    +

    Filter numbers that contain a specific string.

    +
    +
  • +
  • +
    Optional endsWith?: string
    +

    Filter numbers that end with a specific string.

    +
    +
  • +
  • +
    Optional startsWith?: string
    +

    Filter numbers that start with a specific string.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/docs/types/NumbersUpdateParams.html b/packages/numbers/docs/types/NumbersUpdateParams.html new file mode 100644 index 00000000..356d8f20 --- /dev/null +++ b/packages/numbers/docs/types/NumbersUpdateParams.html @@ -0,0 +1,132 @@ +NumbersUpdateParams | Vonage Numbers - v1.9.0
+
+ +
+
+
+
+ +

Type alias NumbersUpdateParams

+
NumbersUpdateParams: {
    appId?: string;
    applicationId?: string;
    country: Country;
    messagesCallbackType?: MessagesCallbackTypeEnum;
    messagesCallbackValue?: string;
    moHttpUrl?: string;
    moSmppSysType?: string;
    msisdn: string;
    voiceCallbackType?: VoiceCallbackTypeEnum;
    voiceCallbackValue?: string;
    voiceStatusCallback?: string;
}
+

Represents parameters for updating phone numbers.

+
+
+

Type declaration

+
    +
  • +
    Optional appId?: string
    +

    The application ID associated with the phone number.

    +
    +
  • +
  • +
    Optional applicationId?: string
    +

    The application ID associated with the phone number.

    +
    +
    +

    Deprecated

    Please use app_id

    +
  • +
  • +
    country: Country
    +

    The two-character country code in ISO 3166-1 alpha-2 format. +Example: "US" for the United States.

    +
    +
  • +
  • +
    Optional messagesCallbackType?: MessagesCallbackTypeEnum
    +

    The type of messages callback: "app".

    +
    +
    +

    Deprecated

    Use voiceCallbackType instead.

    +
  • +
  • +
    Optional messagesCallbackValue?: string
    +

    The value for messages callback.

    +
    +
    +

    Deprecated

    Use voiceCallbackValue instead.

    +
  • +
  • +
    Optional moHttpUrl?: string
    +

    The URL of the webhook endpoint that handles inbound messages.

    +
    +
  • +
  • +
    Optional moSmppSysType?: string
    +

    The system type for SMPP MO messages.

    +
    +
  • +
  • +
    msisdn: string
    +

    The phone number in E.164 format. +Example: "+1234567890".

    +
    +
  • +
  • +
    Optional voiceCallbackType?: VoiceCallbackTypeEnum
    +

    The type of voice callback: "sip", "tel", or "app".

    +
    +
  • +
  • +
    Optional voiceCallbackValue?: string
    +

    The value for voice callback.

    +
    +
  • +
  • +
    Optional voiceStatusCallback?: string
    +

    The URL of the voice status callback.

    +
    +
+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/packages/numbers/lib/enums/Feature.ts b/packages/numbers/lib/enums/Feature.ts index aeebf107..52a5201f 100644 --- a/packages/numbers/lib/enums/Feature.ts +++ b/packages/numbers/lib/enums/Feature.ts @@ -1,5 +1,19 @@ +/** + * Enumeration of features for a virtual number. + */ export enum Feature { - 'MMS' = 'MMS', - 'SMS' = 'SMS', - 'VOICE' = 'VOICE', + /** + * Supports Multimedia Messaging Service (MMS). + */ + MMS = 'MMS', + + /** + * Supports Short Message Service (SMS). + */ + SMS = 'SMS', + + /** + * Supports Voice calling. + */ + VOICE = 'VOICE', } diff --git a/packages/numbers/lib/enums/LineType.ts b/packages/numbers/lib/enums/LineType.ts index b463e824..9cd4ef5c 100644 --- a/packages/numbers/lib/enums/LineType.ts +++ b/packages/numbers/lib/enums/LineType.ts @@ -1,5 +1,19 @@ +/** + * Enumeration of line types for virtual numbers. + */ export enum LineType { - 'LANDLINE' = 'landline', - 'MOBILE-LVN' = 'mobile-lvn', - 'LANDLINE-TOLL-FREE' = 'landline-toll-free', + /** + * Landline type. + */ + LANDLINE = 'landline', + + /** + * Mobile LVN (Local Virtual Number) type. + */ + MOBILE_LVN = 'mobile-lvn', + + /** + * Landline toll-free type. + */ + LANDLINE_TOLL_FREE = 'landline-toll-free', } diff --git a/packages/numbers/lib/enums/MessagesCallbackTypeEnum.ts b/packages/numbers/lib/enums/MessagesCallbackTypeEnum.ts new file mode 100644 index 00000000..86fb5c92 --- /dev/null +++ b/packages/numbers/lib/enums/MessagesCallbackTypeEnum.ts @@ -0,0 +1,9 @@ +/** + * Enumeration of messages callback types. + */ +export enum MessagesCallbackTypeEnum { + /** + * Callback type for an application. + */ + App = 'app', +} diff --git a/packages/numbers/lib/enums/SearchPattern.ts b/packages/numbers/lib/enums/SearchPattern.ts index d82b9f44..15c48388 100644 --- a/packages/numbers/lib/enums/SearchPattern.ts +++ b/packages/numbers/lib/enums/SearchPattern.ts @@ -1,5 +1,19 @@ +/** + * Enumeration of search patterns. + */ export enum SearchPattern { - 'START_WITH' = 0, - 'CONTAINS' = 1, - 'ENDS_WITH' = 2, + /** + * Indicates a search for values that start with the given pattern. + */ + START_WITH = 0, + + /** + * Indicates a search for values that contain the given pattern. + */ + CONTAINS = 1, + + /** + * Indicates a search for values that end with the given pattern. + */ + ENDS_WITH = 2, } diff --git a/packages/numbers/lib/enums/VoiceCallbackTypeEnum.ts b/packages/numbers/lib/enums/VoiceCallbackTypeEnum.ts new file mode 100644 index 00000000..44e6ed26 --- /dev/null +++ b/packages/numbers/lib/enums/VoiceCallbackTypeEnum.ts @@ -0,0 +1,19 @@ +/** + * Enumeration of voice callback types. + */ +export enum VoiceCallbackTypeEnum { + /** + * Callback type for SIP. + */ + Sip = 'sip', + + /** + * Callback type for telephone (tel). + */ + Tel = 'tel', + + /** + * Callback type for an application. + */ + App = 'app', +} diff --git a/packages/numbers/lib/enums/index.ts b/packages/numbers/lib/enums/index.ts new file mode 100644 index 00000000..40baf65f --- /dev/null +++ b/packages/numbers/lib/enums/index.ts @@ -0,0 +1,5 @@ +export * from './Feature'; +export * from './LineType'; +export * from './MessagesCallbackTypeEnum'; +export * from './SearchPattern'; +export * from './VoiceCallbackTypeEnum'; diff --git a/packages/numbers/lib/index.ts b/packages/numbers/lib/index.ts index a4a6afdd..7b9153e3 100644 --- a/packages/numbers/lib/index.ts +++ b/packages/numbers/lib/index.ts @@ -1,17 +1,3 @@ -export { Numbers } from './numbers' - -export { - NumbersClassParameters, - NumbersResponse, - NumbersAvailableList, - NumbersOwnedList, - NumbersEmptyResponse, - NumbersParams, - NumbersAvailableNumber, - Country, - NumbersUpdateParams, - VoiceCallbackTypeEnum, - MessagesCallbackTypeEnum, - NumbersOwnedNumber, - NumbersOwnedFilter, -} from './types' +export * from './enums'; +export * from './types'; +export * from './numbers'; diff --git a/packages/numbers/lib/numbers.ts b/packages/numbers/lib/numbers.ts index eccd49fe..69d9aa59 100644 --- a/packages/numbers/lib/numbers.ts +++ b/packages/numbers/lib/numbers.ts @@ -1,30 +1,17 @@ import { AuthenticationType, Client } from '@vonage/server-client'; -import { Feature } from './enums/Feature'; +import { Feature, SearchPattern } from './enums'; +import omit from 'lodash.omit'; import { NumbersAvailableList, - NumbersOwnedFilter, NumbersOwnedList, - NumbersOwnedNumber, NumbersEmptyResponse, - NumbersUpdateParams, - NumbersSearchFilter, NumbersParams, + NumbersOwnedFilter, NumbersQuerySearchFilter, NumbersSearchSimple, -} from './types'; -import { SearchPattern } from './enums/SearchPattern'; -import omit from 'lodash.omit'; - -const remapObjects = (mapping, newObject: T, oldObject: O): T => { - for (const key in mapping) { - if (oldObject[mapping[key]]) { - newObject[key] = oldObject[mapping[key]]; - delete oldObject[mapping[key]]; - } - } - newObject = { ...newObject, ...oldObject }; - return newObject; -}; + NumbersSearchFilter, + NumbersUpdateParams, +} from "./types"; const buildSearch = ({ endsWith, @@ -46,7 +33,7 @@ const buildSearch = ({ }; } - // order of precdent contains, endsWith, startsWith + // order of precedent contains, endsWith, startsWith if (contains) { return { search_pattern: SearchPattern.CONTAINS, @@ -74,7 +61,7 @@ const buildSearch = ({ return {}; }; -const sortFeatures = (features: string[]): string => { +const sortFeatures = (features: Feature[]): string => { // API expects these as a CSV in a specific order if (features.length > 4) { throw new Error('Invalid number of features request'); @@ -104,64 +91,90 @@ const sortFeatures = (features: string[]): string => { return newOrder.join(','); }; +/** + * Represents a client for managing phone numbers. + */ export class Numbers extends Client { - protected authType = AuthenticationType.QUERY_KEY_SECRET; - + public authType = AuthenticationType.QUERY_KEY_SECRET; + + /** + * Buys a phone number. + * + * @param {NumbersParams} params - The parameters for buying a number. + * @return {Promise} A promise that resolves to an empty response or an error response. + */ public async buyNumber( - params?: NumbersParams, + params: NumbersParams, ): Promise { - const mapping = { target_api_key: 'targetApiKey' }; - const data = remapObjects(mapping, {}, params); const resp = await this.sendFormSubmitRequest( `${this.config.restHost}/number/buy`, - data, + Client.transformers.snakeCaseObjectKeys(params) as Record, ); return { - errorCode: resp.data['error-code'], + errorCode: `${resp.data['error-code']}`, errorCodeLabel: resp.data['error-code-label'], }; } + /** + * Cancels a phone number. + * + * @param {NumbersParams} params - The parameters for canceling a number. + * @return {Promise} A promise that resolves to an empty response or an error response. + */ public async cancelNumber( - params?: NumbersParams, + params: NumbersParams, ): Promise { - const mapping = { target_api_key: 'targetApiKey' }; - const data = remapObjects(mapping, {}, params); const resp = await this.sendFormSubmitRequest( `${this.config.restHost}/number/cancel`, - data, + Client.transformers.snakeCaseObjectKeys(params) as Record, ); return { - errorCode: resp.data['error-code'], + errorCode: `${resp.data['error-code']}`, errorCodeLabel: resp.data['error-code-label'], }; } - + /** + * Retrieves a list of available phone numbers based on the provided filter criteria. + * + * @param {NumbersSearchFilter} filter - The filter criteria for searching available numbers. + * @return {Promise} A promise that resolves to a list of available phone numbers or an error response. + */ public async getAvailableNumbers( filter: NumbersSearchFilter, ): Promise { - const mapping = { - search_pattern: 'searchPattern', - }; - const data: any = omit( - remapObjects(mapping, {}, { ...filter, ...buildSearch(filter) }), - ['startsWith', 'contains', 'endsWith', 'searchPattern'], + omit( + Client.transformers.snakeCaseObjectKeys({ + ...filter, + ...buildSearch(filter), + country: filter.country, + }), + ['starts_with', 'contains', 'ends_with', 'search_pattern'], ); - if (data.features?.length > 0) { - data.features = sortFeatures(data.features); - } - const resp = await this.sendGetRequest( `${this.config.restHost}/number/search`, - data, + { + country: filter.country, + type: filter.type, + size: filter.size, + index: filter.index, + ...buildSearch(filter), + ...(filter.features ? { features: sortFeatures(filter.features) } : {}), + }, ); return resp.data; } + /** + * Retrieves a list of owned phone numbers based on the provided filter criteria. + * + * @param {NumbersOwnedFilter} [filter] - The filter criteria for searching owned numbers. + * @return {Promise} A promise that resolves to a list of owned phone numbers or an error response. + */ public async getOwnedNumbers( filter?: NumbersOwnedFilter, ): Promise { @@ -175,20 +188,26 @@ export class Numbers extends Client { return resp.data; } + /** + * Updates the settings of a phone number. + * + * @param {NumbersUpdateParams} [params] - The parameters for updating a phone number. + * @return {Promise} A promise that resolves to an empty response or an error response. + */ public async updateNumber( - params?: NumbersUpdateParams, + params: NumbersUpdateParams, ): Promise { - const mapping = { - app_id: 'applicationId', - }; - const data = remapObjects(mapping, {}, params); - const resp = await this.sendFormSubmitRequest( + params.appId = params.applicationId || params.appId; + const resp = await this.sendFormSubmitRequest( `${this.config.restHost}/number/update`, - data, + { + ...params, + ...(params.appId ? { app_id: params.appId } : {}), + }, ); return { - errorCode: resp.data['error-code'], + errorCode: `${resp.data['error-code']}`, errorCodeLabel: resp.data['error-code-label'], }; } diff --git a/packages/numbers/lib/types.ts b/packages/numbers/lib/types.ts deleted file mode 100644 index b9cac9bc..00000000 --- a/packages/numbers/lib/types.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { AuthOpts, AuthInterface } from '@vonage/auth'; -import { VetchResponse, VetchOptions } from '@vonage/vetch'; -import { Feature } from './enums/Feature'; -import { SearchPattern } from './enums/SearchPattern'; -import { LineType } from './enums/LineType'; - -export type NumbersClassParameters = AuthOpts & - VetchOptions & { - auth?: AuthInterface - } - -export type NumbersResponse = VetchResponse - -export interface NumbersAvailableList { - count?: number - numbers?: NumbersAvailableNumber[] -} - -export interface NumbersOwnedList { - count?: number - numbers?: NumbersOwnedNumber[] -} - -export interface NumbersEmptyResponse { - errorCode?: string - errorCodeLabel?: string -} - -export interface NumbersParams { - country: Country - msisdn: string - targetApiKey?: string -} - -export interface NumbersQueryParams { - country: Country - msisdn: string - target_api_key?: string -} - -export interface NumbersAvailableNumber { - country?: Country - msisdn?: string - type?: LineType - cost?: string - features?: Feature[] -} - -export type Country = string - -export interface NumbersUpdateParams { - country: Country - msisdn: string - applicationId?: string - moHttpUrl?: string - moSmppSysType?: string - voiceCallbackType?: VoiceCallbackTypeEnum - voiceCallbackValue?: string - voiceStatusCallback?: string - /** @deprecated */ - messagesCallbackType?: MessagesCallbackTypeEnum - /** @deprecated */ - messagesCallbackValue?: string -} - -export interface NumbersQueryUpdateParams { - country: Country - msisdn: string - app_id?: string - moHttpUrl?: string - moSmppSysType?: string - voiceCallbackType?: VoiceCallbackTypeEnum - voiceCallbackValue?: string - voiceStatusCallback?: string - /** @deprecated */ - messagesCallbackType?: MessagesCallbackTypeEnum - /** @deprecated */ - messagesCallbackValue?: string -} - -export enum VoiceCallbackTypeEnum { - Sip = 'sip', - Tel = 'tel', - App = 'app', -} - -export enum MessagesCallbackTypeEnum { - App = 'app', -} - -export interface NumbersOwnedNumber { - country?: Country - msisdn?: string - moHttpUrl?: string - type?: LineType - features?: Feature[] - voiceCallbackType?: string - voiceCallbackValue?: string - messagesCallbackType?: string - messagesCallbackValue?: string -} - -export interface NumbersSearchFilter { - country: Country - type?: LineType - pattern?: string - searchPattern?: SearchPattern - features?: Feature[] - size?: number - index?: number -} - -export interface NumbersSearchSimple { - startsWith?: string - endsWith?: string - contains?: string -} - -export interface NumbersQuerySearchFilter { - country: Country - pattern?: string - search_pattern?: number - size?: number - index?: number -} - -export interface NumbersOwnedFilter { - country?: Country - applicationId?: string - hasApplication?: boolean - pattern?: string - searchPattern?: SearchPattern - size?: number - index?: number -} - -export interface NumbersQueryOwnedFilter { - country?: Country - application_id?: string - has_application?: boolean - pattern?: string - search_pattern?: number - size?: number - index?: number -} diff --git a/packages/numbers/lib/types/Country.ts b/packages/numbers/lib/types/Country.ts new file mode 100644 index 00000000..13836ce2 --- /dev/null +++ b/packages/numbers/lib/types/Country.ts @@ -0,0 +1,254 @@ +/** + * ISO 3166-1 alpha-2 country codes. + */ +export type Country = + | 'AD' // Andorra + | 'AE' // United Arab Emirates + | 'AF' // Afghanistan + | 'AG' // Antigua and Barbuda + | 'AI' // Anguilla + | 'AL' // Albania + | 'AM' // Armenia + | 'AO' // Angola + | 'AQ' // Antarctica + | 'AR' // Argentina + | 'AS' // American Samoa + | 'AT' // Austria + | 'AU' // Australia + | 'AW' // Aruba + | 'AX' // Åland Islands + | 'AZ' // Azerbaijan + | 'BA' // Bosnia and Herzegovina + | 'BB' // Barbados + | 'BD' // Bangladesh + | 'BE' // Belgium + | 'BF' // Burkina Faso + | 'BG' // Bulgaria + | 'BH' // Bahrain + | 'BI' // Burundi + | 'BJ' // Benin + | 'BL' // Saint Barthélemy + | 'BM' // Bermuda + | 'BN' // Brunei Darussalam + | 'BO' // Bolivia (Plurinational State of) + | 'BQ' // Bonaire, Sint Eustatius and Saba + | 'BR' // Brazil + | 'BS' // Bahamas + | 'BT' // Bhutan + | 'BV' // Bouvet Island + | 'BW' // Botswana + | 'BY' // Belarus + | 'BZ' // Belize + | 'CA' // Canada + | 'CC' // Cocos (Keeling) Islands + | 'CD' // Congo, Democratic Republic of the + | 'CF' // Central African Republic + | 'CG' // Congo + | 'CH' // Switzerland + | 'CI' // Côte d'Ivoire + | 'CK' // Cook Islands + | 'CL' // Chile + | 'CM' // Cameroon + | 'CN' // China + | 'CO' // Colombia + | 'CR' // Costa Rica + | 'CU' // Cuba + | 'CV' // Cabo Verde + | 'CW' // Curaçao + | 'CX' // Christmas Island + | 'CY' // Cyprus + | 'CZ' // Czechia + | 'DE' // Germany + | 'DJ' // Djibouti + | 'DK' // Denmark + | 'DM' // Dominica + | 'DO' // Dominican Republic + | 'DZ' // Algeria + | 'EC' // Ecuador + | 'EE' // Estonia + | 'EG' // Egypt + | 'EH' // Western Sahara + | 'ER' // Eritrea + | 'ES' // Spain + | 'ET' // Ethiopia + | 'FI' // Finland + | 'FJ' // Fiji + | 'FK' // Falkland Islands (Malvinas) + | 'FM' // Micronesia (Federated States of) + | 'FO' // Faroe Islands + | 'FR' // France + | 'GA' // Gabon + | 'GB' // United Kingdom of Great Britain and Northern Ireland + | 'GD' // Grenada + | 'GE' // Georgia + | 'GF' // French Guiana + | 'GG' // Guernsey + | 'GH' // Ghana + | 'GI' // Gibraltar + | 'GL' // Greenland + | 'GM' // Gambia + | 'GN' // Guinea + | 'GP' // Guadeloupe + | 'GQ' // Equatorial Guinea + | 'GR' // Greece + | 'GS' // South Georgia and the South Sandwich Islands + | 'GT' // Guatemala + | 'GU' // Guam + | 'GW' // Guinea-Bissau + | 'GY' // Guyana + | 'HK' // Hong Kong + | 'HM' // Heard Island and McDonald Islands + | 'HN' // Honduras + | 'HR' // Croatia + | 'HT' // Haiti + | 'HU' // Hungary + | 'ID' // Indonesia + | 'IE' // Ireland + | 'IL' // Israel + | 'IM' // Isle of Man + | 'IN' // India + | 'IO' // British Indian Ocean Territory + | 'IQ' // Iraq + | 'IR' // Iran (Islamic Republic of) + | 'IS' // Iceland + | 'IT' // Italy + | 'JE' // Jersey + | 'JM' // Jamaica + | 'JO' // Jordan + | 'JP' // Japan + | 'KE' // Kenya + | 'KG' // Kyrgyzstan + | 'KH' // Cambodia + | 'KI' // Kiribati + | 'KM' // Comoros + | 'KN' // Saint Kitts and Nevis + | 'KP' // Korea (Democratic People's Republic of) + | 'KR' // Korea, Republic of + | 'KW' // Kuwait + | 'KY' // Cayman Islands + | 'KZ' // Kazakhstan + | 'LA' // Lao People's Democratic Republic + | 'LB' // Lebanon + | 'LC' // Saint Lucia + | 'LI' // Liechtenstein + | 'LK' // Sri Lanka + | 'LR' // Liberia + | 'LS' // Lesotho + | 'LT' // Lithuania + | 'LU' // Luxembourg + | 'LV' // Latvia + | 'LY' // Libya + | 'MA' // Morocco + | 'MC' // Monaco + | 'MD' // Moldova, Republic of + | 'ME' // Montenegro + | 'MF' // Saint Martin (French part) + | 'MG' // Madagascar + | 'MH' // Marshall Islands + | 'MK' // North Macedonia + | 'ML' // Mali + | 'MM' // Myanmar + | 'MN' // Mongolia + | 'MO' // Macao + | 'MP' // Northern Mariana Islands + | 'MQ' // Martinique + | 'MR' // Mauritania + | 'MS' // Montserrat + | 'MT' // Malta + | 'MU' // Mauritius + | 'MV' // Maldives + | 'MW' // Malawi + | 'MX' // Mexico + | 'MY' // Malaysia + | 'MZ' // Mozambique + | 'NA' // Namibia + | 'NC' // New Caledonia + | 'NE' // Niger + | 'NF' // Norfolk Island + | 'NG' // Nigeria + | 'NI' // Nicaragua + | 'NL' // Netherlands, Kingdom of the + | 'NO' // Norway + | 'NP' // Nepal + | 'NR' // Nauru + | 'NU' // Niue + | 'NZ' // New Zealand + | 'OM' // Oman + | 'PA' // Panama + | 'PE' // Peru + | 'PF' // French Polynesia + | 'PG' // Papua New Guinea + | 'PH' // Philippines + | 'PK' // Pakistan + | 'PL' // Poland + | 'PM' // Saint Pierre and Miquelon + | 'PN' // Pitcairn + | 'PR' // Puerto Rico + | 'PS' // Palestine, State of + | 'PT' // Portugal + | 'PW' // Palau + | 'PY' // Paraguay + | 'QA' // Qatar + | 'RE' // Réunion + | 'RO' // Romania + | 'RS' // Serbia + | 'RU' // Russian Federation + | 'RW' // Rwanda + | 'SA' // Saudi Arabia + | 'SB' // Solomon Islands + | 'SC' // Seychelles + | 'SD' // Sudan + | 'SE' // Sweden + | 'SG' // Singapore + | 'SH' // Saint Helena, Ascension and Tristan da Cunha + | 'SI' // Slovenia + | 'SJ' // Svalbard and Jan Mayen + | 'SK' // Slovakia + | 'SL' // Sierra Leone + | 'SM' // San Marino + | 'SN' // Senegal + | 'SO' // Somalia + | 'SR' // Suriname + | 'SS' // South Sudan + | 'ST' // Sao Tome and Principe + | 'SV' // El Salvador + | 'SX' // Sint Maarten (Dutch part) + | 'SY' // Syrian Arab Republic + | 'SZ' // Eswatini + | 'TC' // Turks and Caicos Islands + | 'TD' // Chad + | 'TF' // French Southern Territories + | 'TG' // Togo + | 'TH' // Thailand + | 'TJ' // Tajikistan + | 'TK' // Tokelau + | 'TL' // Timor-Leste + | 'TM' // Turkmenistan + | 'TN' // Tunisia + | 'TO' // Tonga + | 'TR' // Türkiye + | 'TT' // Trinidad and Tobago + | 'TV' // Tuvalu + | 'TW' // Taiwan, Province of China + | 'TZ' // Tanzania, United Republic of + | 'UA' // Ukraine + | 'UG' // Uganda | 'UM' // United States Minor Outlying Islands + | 'US' // United States of America + | 'UY' // Uruguay + | 'UZ' // Uzbekistan + | 'VA' // Holy See + | 'VC' // Saint Vincent and the Grenadines + | 'VE' // Venezuela (Bolivarian Republic of) + | 'VG' // Virgin Islands (British) + | 'VI' // Virgin Islands (U.S.) + | 'VN' // Viet Nam + | 'VU' // Vanuatu + | 'WF' // Wallis and Futuna + | 'WS' // Samoa + | 'YE' // Yemen + | 'YT' // Mayotte + | 'ZA' // South Africa + | 'ZM' // Zambia + | 'ZW' // Zimbabwe + | string; // Fallback + diff --git a/packages/numbers/lib/types/NumbersAvailableList.ts b/packages/numbers/lib/types/NumbersAvailableList.ts new file mode 100644 index 00000000..2e95118a --- /dev/null +++ b/packages/numbers/lib/types/NumbersAvailableList.ts @@ -0,0 +1,16 @@ +import { NumbersAvailableNumber } from "./NumbersAvailableNumber"; + +/** + * Represents a list of available numbers. + */ +export type NumbersAvailableList = { + /** + * The total count of available numbers. + */ + count?: number; + + /** + * An array of available numbers and their details. + */ + numbers?: NumbersAvailableNumber[]; +} diff --git a/packages/numbers/lib/types/NumbersAvailableNumber.ts b/packages/numbers/lib/types/NumbersAvailableNumber.ts new file mode 100644 index 00000000..9a1370e7 --- /dev/null +++ b/packages/numbers/lib/types/NumbersAvailableNumber.ts @@ -0,0 +1,37 @@ +import { LineType, Feature } from "../enums"; +import { Country } from "./Country"; + +/** + * Represents an available phone number with its details. + */ +export type NumbersAvailableNumber = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country?: Country; + + /** + * An available inbound virtual phone number. + * Example: "447700900000". + */ + msisdn?: string; + + /** + * The type of phone number. + * Example: "mobile-lvn" or "landline". + */ + type?: LineType; + + /** + * The cost associated with the phone number. + * Example: "$10.00". + */ + cost?: string; + + /** + * The capabilities/features of the phone number, such as SMS, VOICE, or MMS. + * Example: ["SMS", "VOICE"]. + */ + features?: Feature[]; +}; diff --git a/packages/numbers/lib/types/NumbersClassParameters.ts b/packages/numbers/lib/types/NumbersClassParameters.ts new file mode 100644 index 00000000..e5e89042 --- /dev/null +++ b/packages/numbers/lib/types/NumbersClassParameters.ts @@ -0,0 +1,15 @@ +import { AuthInterface, AuthParams } from "@vonage/auth"; +import { VetchOptions } from "@vonage/vetch"; + +/** + * Represents the parameters for configuring the NumbersClass. + * + * @deprecated This is no longer in use + */ +export type NumbersClassParameters = AuthParams & + VetchOptions & { + /** + * The authentication configuration. + */ + auth?: AuthInterface; +}; diff --git a/packages/numbers/lib/types/NumbersEmptyResponse.ts b/packages/numbers/lib/types/NumbersEmptyResponse.ts new file mode 100644 index 00000000..d8e227b9 --- /dev/null +++ b/packages/numbers/lib/types/NumbersEmptyResponse.ts @@ -0,0 +1,28 @@ +/** + * Represents a response with optional error code and label for empty number-related operations. + */ +export type NumbersEmptyResponse = { + /** + * The error code, if an error occurred during the operation. + * Example: "E001". + */ + errorCode?: string; + + /** + * A human-readable label or description of the error code. + * Example: "Invalid request." + */ + errorCodeLabel?: string; + + /** + * The error code, if an error occurred during the operation. + * Example: "E001". + */ + 'error-code'?: 200 | 401 | number; + + /** + * A human-readable label or description of the error code. + * Example: "Invalid request." + */ + 'error-code-label'?: string +}; diff --git a/packages/numbers/lib/types/NumbersOwnedFilter.ts b/packages/numbers/lib/types/NumbersOwnedFilter.ts new file mode 100644 index 00000000..df99612c --- /dev/null +++ b/packages/numbers/lib/types/NumbersOwnedFilter.ts @@ -0,0 +1,45 @@ +import { SearchPattern } from "../enums"; +import { Country } from "./Country"; + +/** + * Represents filters for searching owned numbers. + */ +export type NumbersOwnedFilter = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country?: Country; + + /** + * An Application ID. + * Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab". + */ + applicationId?: string; + + /** + * Indicates whether numbers have an associated application. + */ + hasApplication?: boolean; + + /** + * A pattern to filter numbers. + */ + pattern?: string; + + /** + * The search pattern type. + * Example: SearchPattern.START_WITH. + */ + searchPattern?: SearchPattern; + + /** + * The maximum number of results to return. + */ + size?: number; + + /** + * The starting index for paginated results. + */ + index?: number; +}; diff --git a/packages/numbers/lib/types/NumbersOwnedList.ts b/packages/numbers/lib/types/NumbersOwnedList.ts new file mode 100644 index 00000000..50117c90 --- /dev/null +++ b/packages/numbers/lib/types/NumbersOwnedList.ts @@ -0,0 +1,16 @@ +import { NumbersOwnedNumber } from "./NumbersOwnedNumber"; + +/** + * Represents a list of owned numbers. + */ +export type NumbersOwnedList = { + /** + * The total count of owned numbers. + */ + count?: number; + + /** + * An array of owned numbers and their details. + */ + numbers?: NumbersOwnedNumber[]; +}; diff --git a/packages/numbers/lib/types/NumbersOwnedNumber.ts b/packages/numbers/lib/types/NumbersOwnedNumber.ts new file mode 100644 index 00000000..fc1c7096 --- /dev/null +++ b/packages/numbers/lib/types/NumbersOwnedNumber.ts @@ -0,0 +1,61 @@ +import { LineType, Feature } from "../enums"; +import { Country } from "./Country"; + +/** + * Represents an owned phone number with its details. + */ +export type NumbersOwnedNumber = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country?: Country; + + /** + * The owned phone number. + * Example: "447700900000". + */ + msisdn?: string; + + /** + * The URL of the webhook endpoint that handles inbound messages for the number. + * Example: "https://example.com/webhooks/inbound-sms". + */ + moHttpUrl?: string; + + /** + * The type of phone number. + * Example: "mobile-lvn" or "landline". + */ + type?: LineType; + + /** + * The capabilities/features of the phone number, such as SMS, VOICE, or MMS. + * Example: ["SMS", "VOICE"]. + */ + features?: Feature[]; + + /** + * The type of voice callback for the number. + * Example: "app" or "sip". + */ + voiceCallbackType?: string; + + /** + * The value associated with the voice callback. + * Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab". + */ + voiceCallbackValue?: string; + + /** + * The type of messages callback for the number. + * Example: "app". + */ + messagesCallbackType?: string; + + /** + * The value associated with the messages callback. + * Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab". + */ + messagesCallbackValue?: string; +}; diff --git a/packages/numbers/lib/types/NumbersParams.ts b/packages/numbers/lib/types/NumbersParams.ts new file mode 100644 index 00000000..3891a374 --- /dev/null +++ b/packages/numbers/lib/types/NumbersParams.ts @@ -0,0 +1,23 @@ +import { Country } from "./Country"; + +/** + * Represents parameters for configuring a phone number. + */ +export type NumbersParams = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country: Country; + + /** + * The phone number. + * Example: "447700900000". + */ + msisdn: string; + + /** + * An optional target API key. + */ + targetApiKey?: string; +}; diff --git a/packages/numbers/lib/types/NumbersQueryOwnedFilter.ts b/packages/numbers/lib/types/NumbersQueryOwnedFilter.ts new file mode 100644 index 00000000..6f211804 --- /dev/null +++ b/packages/numbers/lib/types/NumbersQueryOwnedFilter.ts @@ -0,0 +1,44 @@ +import { Country } from "./Country"; + +/** + * Represents filters for querying owned numbers. + */ +export type NumbersQueryOwnedFilter = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country?: Country; + + /** + * An Application ID. + * Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab". + */ + application_id?: string; + + /** + * Indicates whether numbers have an associated application. + */ + has_application?: boolean; + + /** + * A pattern to filter numbers. + */ + pattern?: string; + + /** + * The search pattern type. + * Example: 0 for "START_WITH". + */ + search_pattern?: number; + + /** + * The maximum number of results to return. + */ + size?: number; + + /** + * The starting index for paginated results. + */ + index?: number; +}; diff --git a/packages/numbers/lib/types/NumbersQueryParams.ts b/packages/numbers/lib/types/NumbersQueryParams.ts new file mode 100644 index 00000000..28cd1020 --- /dev/null +++ b/packages/numbers/lib/types/NumbersQueryParams.ts @@ -0,0 +1,23 @@ +import { Country } from "./Country"; + +/** + * Represents parameters for querying phone numbers. + */ +export type NumbersQueryParams = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country: Country; + + /** + * The phone number. + * Example: "447700900000". + */ + msisdn: string; + + /** + * An optional target API key. + */ + target_api_key?: string; +}; diff --git a/packages/numbers/lib/types/NumbersQuerySearchFilter.ts b/packages/numbers/lib/types/NumbersQuerySearchFilter.ts new file mode 100644 index 00000000..fed5afec --- /dev/null +++ b/packages/numbers/lib/types/NumbersQuerySearchFilter.ts @@ -0,0 +1,33 @@ +import { Country } from "./Country"; + +/** + * Represents filters for searching phone numbers. + */ +export type NumbersQuerySearchFilter = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country?: Country; + + /** + * A pattern to filter numbers. + */ + pattern?: string; + + /** + * The search pattern type. + * Example: 0 for "START_WITH". + */ + search_pattern?: number; + + /** + * The maximum number of results to return. + */ + size?: number; + + /** + * The starting index for paginated results. + */ + index?: number; +}; diff --git a/packages/numbers/lib/types/NumbersQueryUpdateParams.ts b/packages/numbers/lib/types/NumbersQueryUpdateParams.ts new file mode 100644 index 00000000..705bc172 --- /dev/null +++ b/packages/numbers/lib/types/NumbersQueryUpdateParams.ts @@ -0,0 +1,62 @@ +import { VoiceCallbackTypeEnum, MessagesCallbackTypeEnum } from "../enums"; +import { Country } from "./Country"; + +/** + * Represents parameters for updating phone number settings. + */ +export type NumbersQueryUpdateParams = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country: Country; + + /** + * The phone number. + * Example: "447700900000". + */ + msisdn: string; + + /** + * An Application ID. + * Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab". + */ + app_id?: string; + + /** + * The HTTP URL for handling MO (Mobile Originated) messages. + */ + moHttpUrl?: string; + + /** + * The SMPP system type for MO (Mobile Originated) messages. + */ + moSmppSysType?: string; + + /** + * The voice callback type. + */ + voiceCallbackType?: VoiceCallbackTypeEnum; + + /** + * The voice callback value. + */ + voiceCallbackValue?: string; + + /** + * The voice status callback URL. + */ + voiceStatusCallback?: string; + + /** + * The messages callback type. + * @deprecated + */ + messagesCallbackType?: MessagesCallbackTypeEnum; + + /** + * The messages callback value. + * @deprecated + */ + messagesCallbackValue?: string; +}; diff --git a/packages/numbers/lib/types/NumbersResponse.ts b/packages/numbers/lib/types/NumbersResponse.ts new file mode 100644 index 00000000..38fa000c --- /dev/null +++ b/packages/numbers/lib/types/NumbersResponse.ts @@ -0,0 +1,7 @@ +import { VetchResponse } from "@vonage/vetch"; + +/** + * Represents a response for phone numbers. + * @template T The type of the response data. + */ +export type NumbersResponse = VetchResponse; diff --git a/packages/numbers/lib/types/NumbersSearchFilter.ts b/packages/numbers/lib/types/NumbersSearchFilter.ts new file mode 100644 index 00000000..e50f9ff6 --- /dev/null +++ b/packages/numbers/lib/types/NumbersSearchFilter.ts @@ -0,0 +1,44 @@ +import { LineType, Feature, SearchPattern } from "../enums"; +import { Country } from "./Country"; + +/** + * Represents filters for searching phone numbers. + */ +export type NumbersSearchFilter = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country: Country; + + /** + * The type of the phone number. + */ + type?: LineType; + + /** + * A pattern to filter numbers. + */ + pattern?: string; + + /** + * The search pattern type. + * Example: 0 for "START_WITH". + */ + searchPattern?: SearchPattern; + + /** + * The capabilities or features of the number. + */ + features?: Feature[]; + + /** + * The maximum number of results to return. + */ + size?: number; + + /** + * The starting index for paginated results. + */ + index?: number; +}; diff --git a/packages/numbers/lib/types/NumbersSearchSimple.ts b/packages/numbers/lib/types/NumbersSearchSimple.ts new file mode 100644 index 00000000..d8c02387 --- /dev/null +++ b/packages/numbers/lib/types/NumbersSearchSimple.ts @@ -0,0 +1,19 @@ +/** + * Represents simple search options for phone numbers. + */ +export type NumbersSearchSimple = { + /** + * Filter numbers that start with a specific string. + */ + startsWith?: string; + + /** + * Filter numbers that end with a specific string. + */ + endsWith?: string; + + /** + * Filter numbers that contain a specific string. + */ + contains?: string; +}; diff --git a/packages/numbers/lib/types/NumbersUpdateParams.ts b/packages/numbers/lib/types/NumbersUpdateParams.ts new file mode 100644 index 00000000..f927b08f --- /dev/null +++ b/packages/numbers/lib/types/NumbersUpdateParams.ts @@ -0,0 +1,68 @@ +import { VoiceCallbackTypeEnum, MessagesCallbackTypeEnum } from "../enums"; +import { Country } from "./Country"; + +/** + * Represents parameters for updating phone numbers. + */ +export type NumbersUpdateParams = { + /** + * The two-character country code in ISO 3166-1 alpha-2 format. + * Example: "US" for the United States. + */ + country: Country; + + /** + * The phone number in E.164 format. + * Example: "+1234567890". + */ + msisdn: string; + + /** + * The application ID associated with the phone number. + * @deprecated Please use app_id + */ + applicationId?: string; + + /** + * The application ID associated with the phone number. + */ + appId?: string; + + /** + * The URL of the webhook endpoint that handles inbound messages. + */ + moHttpUrl?: string; + + /** + * The system type for SMPP MO messages. + */ + moSmppSysType?: string; + + /** + * The type of voice callback: "sip", "tel", or "app". + */ + voiceCallbackType?: VoiceCallbackTypeEnum; + + /** + * The value for voice callback. + */ + voiceCallbackValue?: string; + + /** + * The URL of the voice status callback. + */ + voiceStatusCallback?: string; + + /** + * The type of messages callback: "app". + * + * @deprecated Use voiceCallbackType instead. + */ + messagesCallbackType?: MessagesCallbackTypeEnum; + + /** + * The value for messages callback. + * @deprecated Use voiceCallbackValue instead. + */ + messagesCallbackValue?: string; +}; diff --git a/packages/numbers/lib/types/index.ts b/packages/numbers/lib/types/index.ts new file mode 100644 index 00000000..c6d02597 --- /dev/null +++ b/packages/numbers/lib/types/index.ts @@ -0,0 +1,17 @@ +export * from './Country'; +export * from './NumbersAvailableList'; +export * from './NumbersAvailableNumber'; +export * from './NumbersClassParameters'; +export * from './NumbersEmptyResponse'; +export * from './NumbersOwnedFilter'; +export * from './NumbersOwnedList'; +export * from './NumbersOwnedNumber'; +export * from './NumbersParams'; +export * from './NumbersQueryOwnedFilter'; +export * from './NumbersQueryParams'; +export * from './NumbersQuerySearchFilter'; +export * from './NumbersQueryUpdateParams'; +export * from './NumbersResponse'; +export * from './NumbersSearchFilter'; +export * from './NumbersSearchSimple'; +export * from './NumbersUpdateParams'; diff --git a/packages/numbers/package.json b/packages/numbers/package.json index b6ce0a14..ac4608f0 100644 --- a/packages/numbers/package.json +++ b/packages/numbers/package.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/package.json", "name": "@vonage/numbers", "version": "1.9.0", "description": "Vonage Numbers SDK Package", @@ -11,7 +12,20 @@ "url": "git+https://github.com/Vonage/vonage-node-sdk.git" }, "license": "Apache-2.0", - "author": "Kelly J Andrews ", + "contributors": [ + { + "name": "Kelly J Andrews", + "email": "kelly@kellyjandrews.com" + }, + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com" + }, + { + "name": "Chuck MANCHUCK Reeves", + "email": "chuck@manchuck.com" + } + ], "main": "dist/index.js", "types": "dist/index.d.ts", "directories": { @@ -24,19 +38,20 @@ "scripts": { "build": "npm run clean && npm run compile", "clean": "npx shx rm -rf dist tsconfig.tsbuildinfo", - "compile": "npx tsc --build --verbose" + "compile": "npx tsc --build --verbose", + "prepublishOnly": "npm run build" }, "dependencies": { + "@types/lodash.omit": "4.5.8", "@vonage/auth": "^1.7.0", "@vonage/server-client": "^1.9.0", "@vonage/vetch": "^1.6.0", - "lodash.omit": "^4.5.0" + "lodash.omit": "4.5.0" }, "devDependencies": { "nock": "^13.3.4" }, "publishConfig": { "directory": "dist" - }, - "gitHead": "328f18e5c8a458cb4d06d7955ec2399a6ce6f5d8" + } } diff --git a/packages/numbers/typedoc.json b/packages/numbers/typedoc.json new file mode 100644 index 00000000..7f70fb7a --- /dev/null +++ b/packages/numbers/typedoc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "extends": ["../../typedoc.base.json"], + "entryPoints": ["lib/index.ts"], + "name": "Vonage Numbers" +}