Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/404.html b/404.html index 0dd90769e..cbd1dbc18 100644 --- a/404.html +++ b/404.html @@ -2,18 +2,18 @@
- +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
rctl acl create
",id:"rctl-acl-create",level:2},{value:"rctl acl delete [REF]
",id:"rctl-acl-delete-ref",level:2},{value:"rctl acl describe [REF]
",id:"rctl-acl-describe-ref",level:2},{value:"rctl acl get [REF]
",id:"rctl-acl-get-ref",level:2},{value:"rctl acl update REF
",id:"rctl-acl-update-ref",level:2},{value:"rctl agents create
",id:"rctl-agents-create",level:2},{value:"rctl agents delete [REF]
",id:"rctl-agents-delete-ref",level:2},{value:"rctl agents describe [REF]
",id:"rctl-agents-describe-ref",level:2},{value:"rctl agents get [REF]
",id:"rctl-agents-get-ref",level:2},{value:"rctl agents update REF
",id:"rctl-agents-update-ref",level:2},{value:"rctl autocomplete [SHELL]
",id:"rctl-autocomplete-shell",level:2},{value:"rctl credentials create
",id:"rctl-credentials-create",level:2},{value:"rctl credentials delete [REF]
",id:"rctl-credentials-delete-ref",level:2},{value:"rctl credentials describe [REF]
",id:"rctl-credentials-describe-ref",level:2},{value:"rctl credentials get [REF]
",id:"rctl-credentials-get-ref",level:2},{value:"rctl credentials update REF
",id:"rctl-credentials-update-ref",level:2},{value:"rctl domains create
",id:"rctl-domains-create",level:2},{value:"rctl domains delete [REF]
",id:"rctl-domains-delete-ref",level:2},{value:"rctl domains describe [REF]
",id:"rctl-domains-describe-ref",level:2},{value:"rctl domains get [REF]
",id:"rctl-domains-get-ref",level:2},{value:"rctl domains update REF
",id:"rctl-domains-update-ref",level:2},{value:"rctl numbers create
",id:"rctl-numbers-create",level:2},{value:"rctl numbers delete [REF]
",id:"rctl-numbers-delete-ref",level:2},{value:"rctl numbers describe [REF]
",id:"rctl-numbers-describe-ref",level:2},{value:"rctl numbers get [REF]
",id:"rctl-numbers-get-ref",level:2},{value:"rctl numbers update REF
",id:"rctl-numbers-update-ref",level:2},{value:"rctl peers create
",id:"rctl-peers-create",level:2},{value:"rctl peers delete [REF]
",id:"rctl-peers-delete-ref",level:2},{value:"rctl peers describe [REF]
",id:"rctl-peers-describe-ref",level:2},{value:"rctl peers get [REF]
",id:"rctl-peers-get-ref",level:2},{value:"rctl peers update REF
",id:"rctl-peers-update-ref",level:2},{value:"rctl plugins
",id:"rctl-plugins",level:2},{value:"rctl plugins:install PLUGIN...
",id:"rctl-pluginsinstall-plugin",level:2},{value:"rctl plugins:inspect PLUGIN...
",id:"rctl-pluginsinspect-plugin",level:2},{value:"rctl plugins:install PLUGIN...
",id:"rctl-pluginsinstall-plugin-1",level:2},{value:"rctl plugins:link PLUGIN
",id:"rctl-pluginslink-plugin",level:2},{value:"rctl plugins:uninstall PLUGIN...
",id:"rctl-pluginsuninstall-plugin",level:2},{value:"rctl plugins:uninstall PLUGIN...
",id:"rctl-pluginsuninstall-plugin-1",level:2},{value:"rctl plugins:uninstall PLUGIN...
",id:"rctl-pluginsuninstall-plugin-2",level:2},{value:"rctl plugins update
",id:"rctl-plugins-update",level:2},{value:"rctl trunks create
",id:"rctl-trunks-create",level:2},{value:"rctl trunks delete [REF]
",id:"rctl-trunks-delete-ref",level:2},{value:"rctl trunks describe [REF]
",id:"rctl-trunks-describe-ref",level:2},{value:"rctl trunks get [REF]
",id:"rctl-trunks-get-ref",level:2},{value:"rctl trunks update REF
",id:"rctl-trunks-update-ref",level:2}];function a(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"ctl",children:"CTL"}),"\n",(0,r.jsx)(n.p,{children:"Command-Line for Routr server."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#usage",children:"Usage"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#commands",children:"Commands"})}),"\n"]}),"\n",(0,r.jsx)(n.h1,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh-session",children:"$ npm install -g @routr/ctl\n$ rctl COMMAND\nrunning command...\n$ rctl (--version)\n@routr/ctl/2.1.11 linux-x64 node-v18.17.1\n$ rctl --help [COMMAND]\nUSAGE\n $ rctl COMMAND\n...\n"})}),"\n",(0,r.jsx)(n.h1,{id:"commands",children:"Commands"}),"\n",(0,r.jsx)(n.h2,{id:"rctl-acl-create",children:(0,r.jsx)(n.code,{children:"rctl acl create"})}),"\n",(0,r.jsx)(n.p,{children:"Creates a new ACL"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"USAGE\n $ rctl acl create [-i] [-c ["'])(?.*?)\1/,ve=/\{(? [\d,-]+)\}/,Ne={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Ce={...Ne,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},Ae=Object.keys(Ne);function ke(e,t){const n=e.map((e=>{const{start:n,end:s}=Ce[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function Le(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ve.test(o)){const e=o.match(ve).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=ge()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return ke(["js","jsBlock"],t);case"jsx":case"tsx":return ke(["js","jsBlock","jsx"],t);case"html":return ke(["js","jsBlock","html"],t);case"python":case"py":case"bash":return ke(["bash"],t);case"markdown":case"md":return ke(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return ke(["tex"],t);case"lua":case"haskell":case"sql":return ke(["lua"],t);case"wasm":return ke(["wasm"],t);case"vb":case"vba":case"visual-basic":return ke(["vb","rem"],t);case"vbnet":return ke(["vbnet","rem"],t);case"batch":return ke(["rem"],t);case"basic":return ke(["rem","f90"],t);case"fsharp":return ke(["js","ml"],t);case"ocaml":case"sml":return ke(["ml"],t);case"fortran":return ke(["f90"],t);case"cobol":return ke(["cobol"],t);default:return ke(Ae,t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;ge()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const ye={codeBlockContainer:"codeBlockContainer_Ckt0"};function _e(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(xe());return(0,i.jsx)(t,{...n,style:s,className:(0,u.A)(n.className,ye.codeBlockContainer,v.G.common.codeBlock)})}const Be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function we(e){let{children:t,className:n}=e;return(0,i.jsx)(_e,{as:"pre",tabIndex:0,className:(0,u.A)(Be.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:Be.codeBlockLines,children:t})})}const Te={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ee(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=Te);const a=(0,o._q)(t),i=(0,o.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var He=n(8181);const Me={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function Ie(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.A)(n,s&&Me.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e,key:t})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Me.codeLineNumber}),(0,i.jsx)("span",{className:Me.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Se(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Ue(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Ve={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Re(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,h.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",n,Ve.copyButton,a&&Ve.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:Ve.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Se,{className:Ve.copyButtonIcon}),(0,i.jsx)(Ue,{className:Ve.copyButtonSuccessIcon})]})})}function ze(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Oe={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Pe(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,h.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.A)("clean-btn",t,s&&Oe.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(ze,{className:Oe.wordWrapButtonIcon,"aria-hidden":"true"})})}function Ge(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,W.p)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=xe(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return Ee(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(je)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=Le(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(_e,{as:"div",className:(0,u.A)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:Be.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:Be.codeBlockContent,children:[(0,i.jsx)(He.f4,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.A)(t,Be.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.A)(Be.codeBlockLines,g&&Be.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(Ie,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:Be.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Pe,{className:Be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(Re,{className:Be.codeButton,code:b})]})]})]})}function De(e){let{children:t,...n}=e;const a=(0,pe.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Ge:we;return(0,i.jsx)(l,{...n,children:o},String(a))}function We(e){return(0,i.jsx)("code",{...e})}var $e=n(5066),Fe=n(3427);const qe={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Ze(e){return!!e&&("SUMMARY"===e.tagName||Ze(e.parentElement))}function Ye(e,t){return!!e&&(e===t||Ye(e.parentElement,t))}function Je(e){let{summary:t,children:n,...a}=e;(0,Fe.A)().collectAnchor(a.id);const o=(0,pe.A)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,D.u)({initialState:!a.open}),[d,u]=(0,s.useState)(a.open),m=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,$e.A)(qe.details,o&&qe.isBrowser,a.className),onMouseDown:e=>{Ze(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Ze(t)&&Ye(t,l.current)&&(e.preventDefault(),c?(r(!1),u(!0)):r(!0))},children:[m,(0,i.jsx)(D.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),u(!e)},children:(0,i.jsx)("div",{className:qe.collapsibleContent,children:n})})]})}const Ke={details:"details_b_Ee"},Qe="alert alert--info";function Xe(e){let{...t}=e;return(0,i.jsx)(Je,{...t,className:(0,u.A)(Qe,Ke.details,t.className)})}function et(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Xe,{...e,summary:n,children:a})}function tt(e){return(0,i.jsx)(ue.A,{...e})}const nt={containsTaskList:"containsTaskList_mC6p"};function st(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&nt.containsTaskList)}const at={img:"img_ev3q"};function ot(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const it={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function lt(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.A)(v.G.common.admonition,v.G.common.admonitionType(t),it.admonition,n),children:s})}function ct(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:it.admonitionHeading,children:[(0,i.jsx)("span",{className:it.admonitionIcon,children:t}),n]})}function rt(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:it.admonitionContent,children:t}):null}function dt(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(lt,{type:t,className:o,children:[(0,i.jsx)(ct,{title:s,icon:n}),(0,i.jsx)(rt,{children:a})]})}function ut(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const mt={icon:(0,i.jsx)(ut,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function ht(e){return(0,i.jsx)(dt,{...mt,...e,className:(0,u.A)("alert alert--secondary",e.className),children:e.children})}function pt(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const ft={icon:(0,i.jsx)(pt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function xt(e){return(0,i.jsx)(dt,{...ft,...e,className:(0,u.A)("alert alert--success",e.className),children:e.children})}function bt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const gt={icon:(0,i.jsx)(bt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function jt(e){return(0,i.jsx)(dt,{...gt,...e,className:(0,u.A)("alert alert--info",e.className),children:e.children})}function vt(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const Nt={icon:(0,i.jsx)(vt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Ct(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const At={icon:(0,i.jsx)(Ct,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const kt={icon:(0,i.jsx)(vt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const Lt={...{note:ht,tip:xt,info:jt,warning:function(e){return(0,i.jsx)(dt,{...Nt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(dt,{...At,...e,className:(0,u.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(ht,{title:"secondary",...e}),important:e=>(0,i.jsx)(jt,{title:"important",...e}),success:e=>(0,i.jsx)(xt,{title:"success",...e}),caution:function(e){return(0,i.jsx)(dt,{...kt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})}}};function yt(e){const t=ot(e),n=(s=t.type,Lt[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),Lt.info));var s;return(0,i.jsx)(n,{...t})}const _t={Head:he.A,details:et,Details:et,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,i.jsx)(We,{...e}):(0,i.jsx)(De,{...e})},a:function(e){return(0,i.jsx)(p.A,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:st(e.className)})},li:function(e){return(0,Fe.A)().collectAnchor(e.id),(0,i.jsx)("li",{...e})},img:function(e){return(0,i.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,at.img))});var t},h1:e=>(0,i.jsx)(tt,{as:"h1",...e}),h2:e=>(0,i.jsx)(tt,{as:"h2",...e}),h3:e=>(0,i.jsx)(tt,{as:"h3",...e}),h4:e=>(0,i.jsx)(tt,{as:"h4",...e}),h5:e=>(0,i.jsx)(tt,{as:"h5",...e}),h6:e=>(0,i.jsx)(tt,{as:"h6",...e}),admonition:yt,mermaid:()=>null};function Bt(e){let{children:t}=e;return(0,i.jsx)(me.x,{components:_t,children:t})}function wt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.A)(v.G.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ue.A,{as:"h1",children:n})}),(0,i.jsx)(Bt,{children:t})]})}var Tt=n(1754),Et=n(9169),Ht=n(6025);function Mt(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function St(){const e=(0,Ht.A)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(p.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Mt,{className:It.breadcrumbHomeIcon})})})}const Ut={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Vt(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,i.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,i.jsx)(p.A,{className:a,href:n,itemProp:"item",children:(0,i.jsx)("span",{itemProp:"name",children:t})}):(0,i.jsx)("span",{className:a,children:t})}function Rt(e){let{children:t,active:n,index:s,addMicrodata:a}=e;return(0,i.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,i.jsx)("meta",{itemProp:"position",content:String(s+1)})]})}function zt(){const e=(0,Tt.OF)(),t=(0,Et.Dt)();return e?(0,i.jsx)("nav",{className:(0,u.A)(v.G.docs.docBreadcrumbs,Ut.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,i.jsx)(St,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,i.jsx)(Rt,{active:s,index:n,addMicrodata:!!a,children:(0,i.jsx)(Vt,{href:a,isLast:s,children:t.label})},n)}))]})}):null}function Ot(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Pt(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Gt(){return(0,i.jsx)(he.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Dt(e){let{className:t}=e;return(0,i.jsx)(yt,{type:"caution",title:(0,i.jsx)(Ot,{}),className:(0,u.A)(t,v.G.common.unlistedBanner),children:(0,i.jsx)(Pt,{})})}function Wt(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gt,{}),(0,i.jsx)(Dt,{...e})]})}const $t={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Ft(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.l)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(oe,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(de,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&$t.docItemCol),children:[s&&(0,i.jsx)(Wt,{}),(0,i.jsx)(_,{}),(0,i.jsxs)("div",{className:$t.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(zt,{}),(0,i.jsx)(B,{}),n.mobile,(0,i.jsx)(wt,{children:t}),(0,i.jsx)(G,{})]}),(0,i.jsx)(b,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function qt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.e3,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Ft,{children:(0,i.jsx)(n,{})})]})})}},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{R:()=>i,x:()=>l});var s=n(6540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17896441.40137c41.js b/assets/js/17896441.40137c41.js new file mode 100644 index 000000000..fffa64288 --- /dev/null +++ b/assets/js/17896441.40137c41.js @@ -0,0 +1 @@ +(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8401],{5150:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>qt});var s=n(6540),a=n(9024),o=n(9532),i=n(4848);const l=s.createContext(null);function c(e){let{children:t,content:n}=e;const a=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,i.jsx)(l.Provider,{value:a,children:t})}function r(){const e=(0,s.useContext)(l);if(null===e)throw new o.dV("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=r();return(0,i.jsx)(a.be,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(8215),m=n(4581),h=n(1312),p=n(8774);function f(e){const{permalink:t,title:n,subLabel:s,isNext:a}=e;return(0,i.jsxs)(p.A,{className:(0,u.A)("pagination-nav__link",a?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,i.jsx)("div",{className:"pagination-nav__label",children:n})]})}function x(e){const{previous:t,next:n}=e;return(0,i.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,h.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(f,{...t,subLabel:(0,i.jsx)(h.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,i.jsx)(f,{...n,subLabel:(0,i.jsx)(h.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}function b(){const{metadata:e}=r();return(0,i.jsx)(x,{previous:e.previous,next:e.next})}var g=n(4586),j=n(4070),v=n(7559),N=n(5597),C=n(2252);const A={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,i.jsx)(h.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,i.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,i.jsx)(h.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,i.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function k(e){const t=A[e.versionMetadata.banner];return(0,i.jsx)(t,{...e})}function y(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,i.jsx)(h.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,i.jsx)("b",{children:(0,i.jsx)(p.A,{to:n,onClick:s,children:(0,i.jsx)(h.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function L(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:s}}=(0,g.A)(),{pluginId:a}=(0,j.vT)({failfast:!0}),{savePreferredVersionName:o}=(0,N.g1)(a),{latestDocSuggestion:l,latestVersionSuggestion:c}=(0,j.HW)(a),r=l??(d=c).docs.find((e=>e.id===d.mainDocId));var d;return(0,i.jsxs)("div",{className:(0,u.A)(t,v.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,i.jsx)("div",{children:(0,i.jsx)(k,{siteTitle:s,versionMetadata:n})}),(0,i.jsx)("div",{className:"margin-top--md",children:(0,i.jsx)(y,{versionLabel:c.label,to:r.path,onClick:()=>o(c.name)})})]})}function _(e){let{className:t}=e;const n=(0,C.r)();return n.banner?(0,i.jsx)(L,{className:t,versionMetadata:n}):null}function B(e){let{className:t}=e;const n=(0,C.r)();return n.badge?(0,i.jsx)("span",{className:(0,u.A)(t,v.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,i.jsx)(h.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}const w={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function T(e){let{permalink:t,label:n,count:s,description:a}=e;return(0,i.jsxs)(p.A,{href:t,title:a,className:(0,u.A)(w.tag,s?w.tagWithCount:w.tagRegular),children:[n,s&&(0,i.jsx)("span",{children:s})]})}const E={tags:"tags_jXut",tag:"tag_QGVx"};function H(e){let{tags:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(h.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,u.A)(E.tags,"padding--none","margin-left--sm"),children:t.map((e=>(0,i.jsx)("li",{className:E.tag,children:(0,i.jsx)(T,{...e})},e.permalink)))})]})}const M={iconEdit:"iconEdit_Z9Sw"};function I(e){let{className:t,...n}=e;return(0,i.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(M.iconEdit,t),"aria-hidden":"true",...n,children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function S(e){let{editUrl:t}=e;return(0,i.jsxs)(p.A,{to:t,className:v.G.common.editThisPage,children:[(0,i.jsx)(I,{}),(0,i.jsx)(h.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}function U(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,g.A)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,g.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}function V(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=U({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,i.jsx)(h.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function R(e){let{lastUpdatedBy:t}=e;return(0,i.jsx)(h.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:t})},children:" by {user}"})}function z(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,i.jsxs)("span",{className:v.G.common.lastUpdated,children:[(0,i.jsx)(h.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,i.jsx)(V,{lastUpdatedAt:t}):"",byUser:n?(0,i.jsx)(R,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const O={lastUpdated:"lastUpdated_JAkA"};function P(e){let{className:t,editUrl:n,lastUpdatedAt:s,lastUpdatedBy:a}=e;return(0,i.jsxs)("div",{className:(0,u.A)("row",t),children:[(0,i.jsx)("div",{className:"col",children:n&&(0,i.jsx)(S,{editUrl:n})}),(0,i.jsx)("div",{className:(0,u.A)("col",O.lastUpdated),children:(s||a)&&(0,i.jsx)(z,{lastUpdatedAt:s,lastUpdatedBy:a})})]})}function G(){const{metadata:e}=r(),{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,tags:a}=e,o=a.length>0,l=!!(t||n||s);return o||l?(0,i.jsxs)("footer",{className:(0,u.A)(v.G.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,i.jsx)("div",{className:(0,u.A)("row margin-top--sm",v.G.docs.docFooterTagsRow),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(H,{tags:a})})}),l&&(0,i.jsx)(P,{className:(0,u.A)("margin-top--sm",v.G.docs.docFooterEditMetaRow),editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s})]}):null}var D=n(1422),W=n(6342);function $(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...a}=e;n>=0?t[n].children.push(a):s.push(a)})),s}function F(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=F({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function q(e){const t=e.getBoundingClientRect();return t.top===t.bottom?q(e.parentNode):t}function Z(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>q(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom {e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function Y(e){const t=(0,s.useRef)(void 0),n=J();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:i}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let a=t;a<=n;a+=1)s.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:o,maxHeadingLevel:i}),c=Z(l,{anchorTopOffset:n.current}),r=e.find((e=>c&&c.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(a),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===r)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])}function K(e){let{toc:t,className:n,linkClassName:s,isChild:a}=e;return t.length?(0,i.jsx)("ul",{className:a?void 0:n,children:t.map((e=>(0,i.jsxs)("li",{children:[(0,i.jsx)(p.A,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,i.jsx)(K,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const Q=s.memo(K);function X(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:a="table-of-contents__link",linkActiveClassName:o,minHeadingLevel:l,maxHeadingLevel:c,...r}=e;const d=(0,W.p)(),u=l??d.tableOfContents.minHeadingLevel,m=c??d.tableOfContents.maxHeadingLevel,h=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return(0,s.useMemo)((()=>F({toc:$(t),minHeadingLevel:n,maxHeadingLevel:a})),[t,n,a])}({toc:t,minHeadingLevel:u,maxHeadingLevel:m});return Y((0,s.useMemo)((()=>{if(a&&o)return{linkClassName:a,linkActiveClassName:o,minHeadingLevel:u,maxHeadingLevel:m}}),[a,o,u,m])),(0,i.jsx)(Q,{toc:h,className:n,linkClassName:a,...r})}const ee={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function te(e){let{collapsed:t,...n}=e;return(0,i.jsx)("button",{type:"button",...n,className:(0,u.A)("clean-btn",ee.tocCollapsibleButton,!t&&ee.tocCollapsibleButtonExpanded,n.className),children:(0,i.jsx)(h.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const ne={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function se(e){let{toc:t,className:n,minHeadingLevel:s,maxHeadingLevel:a}=e;const{collapsed:o,toggleCollapsed:l}=(0,D.u)({initialState:!0});return(0,i.jsxs)("div",{className:(0,u.A)(ne.tocCollapsible,!o&&ne.tocCollapsibleExpanded,n),children:[(0,i.jsx)(te,{collapsed:o,onClick:l}),(0,i.jsx)(D.N,{lazy:!0,className:ne.tocCollapsibleContent,collapsed:o,children:(0,i.jsx)(X,{toc:t,minHeadingLevel:s,maxHeadingLevel:a})})]})}const ae={tocMobile:"tocMobile_ITEo"};function oe(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(se,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.A)(v.G.docs.docTocMobile,ae.tocMobile)})}const ie={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},le="table-of-contents__link toc-highlight",ce="table-of-contents__link--active";function re(e){let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,u.A)(ie.tableOfContents,"thin-scrollbar",t),children:(0,i.jsx)(X,{...n,linkClassName:le,linkActiveClassName:ce})})}function de(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(re,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:v.G.docs.docTocDesktop})}var ue=n(1107),me=n(8453),he=n(5260),pe=n(2303),fe=n(5293);function xe(){const{prism:e}=(0,W.p)(),{colorMode:t}=(0,fe.G)(),n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var be=n(8426),ge=n.n(be);const je=/title=(? ["'])(?.*?)\1/,ve=/\{(? [\d,-]+)\}/,Ne={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Ce={...Ne,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},Ae=Object.keys(Ne);function ke(e,t){const n=e.map((e=>{const{start:n,end:s}=Ce[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function ye(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ve.test(o)){const e=o.match(ve).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=ge()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return ke(["js","jsBlock"],t);case"jsx":case"tsx":return ke(["js","jsBlock","jsx"],t);case"html":return ke(["js","jsBlock","html"],t);case"python":case"py":case"bash":return ke(["bash"],t);case"markdown":case"md":return ke(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return ke(["tex"],t);case"lua":case"haskell":case"sql":return ke(["lua"],t);case"wasm":return ke(["wasm"],t);case"vb":case"vba":case"visual-basic":return ke(["vb","rem"],t);case"vbnet":return ke(["vbnet","rem"],t);case"batch":return ke(["rem"],t);case"basic":return ke(["rem","f90"],t);case"fsharp":return ke(["js","ml"],t);case"ocaml":case"sml":return ke(["ml"],t);case"fortran":return ke(["f90"],t);case"cobol":return ke(["cobol"],t);default:return ke(Ae,t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;ge()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const Le={codeBlockContainer:"codeBlockContainer_Ckt0"};function _e(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(xe());return(0,i.jsx)(t,{...n,style:s,className:(0,u.A)(n.className,Le.codeBlockContainer,v.G.common.codeBlock)})}const Be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function we(e){let{children:t,className:n}=e;return(0,i.jsx)(_e,{as:"pre",tabIndex:0,className:(0,u.A)(Be.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:Be.codeBlockLines,children:t})})}const Te={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ee(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=Te);const a=(0,o._q)(t),i=(0,o.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var He=n(8181);const Me={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function Ie(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.A)(n,s&&Me.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Me.codeLineNumber}),(0,i.jsx)("span",{className:Me.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Se(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Ue(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Ve={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Re(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,h.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",n,Ve.copyButton,a&&Ve.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:Ve.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Se,{className:Ve.copyButtonIcon}),(0,i.jsx)(Ue,{className:Ve.copyButtonSuccessIcon})]})})}function ze(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Oe={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Pe(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,h.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.A)("clean-btn",t,s&&Oe.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(ze,{className:Oe.wordWrapButtonIcon,"aria-hidden":"true"})})}function Ge(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,W.p)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=xe(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return Ee(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(je)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=ye(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(_e,{as:"div",className:(0,u.A)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:Be.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:Be.codeBlockContent,children:[(0,i.jsx)(He.f4,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.A)(t,Be.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.A)(Be.codeBlockLines,g&&Be.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(Ie,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:Be.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Pe,{className:Be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(Re,{className:Be.codeButton,code:b})]})]})]})}function De(e){let{children:t,...n}=e;const a=(0,pe.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Ge:we;return(0,i.jsx)(l,{...n,children:o},String(a))}function We(e){return(0,i.jsx)("code",{...e})}var $e=n(5066),Fe=n(3427);const qe={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Ze(e){return!!e&&("SUMMARY"===e.tagName||Ze(e.parentElement))}function Je(e,t){return!!e&&(e===t||Je(e.parentElement,t))}function Ye(e){let{summary:t,children:n,...a}=e;(0,Fe.A)().collectAnchor(a.id);const o=(0,pe.A)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,D.u)({initialState:!a.open}),[d,u]=(0,s.useState)(a.open),m=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,$e.A)(qe.details,o&&qe.isBrowser,a.className),onMouseDown:e=>{Ze(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Ze(t)&&Je(t,l.current)&&(e.preventDefault(),c?(r(!1),u(!0)):r(!0))},children:[m,(0,i.jsx)(D.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),u(!e)},children:(0,i.jsx)("div",{className:qe.collapsibleContent,children:n})})]})}const Ke={details:"details_b_Ee"},Qe="alert alert--info";function Xe(e){let{...t}=e;return(0,i.jsx)(Ye,{...t,className:(0,u.A)(Qe,Ke.details,t.className)})}function et(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Xe,{...e,summary:n,children:a})}function tt(e){return(0,i.jsx)(ue.A,{...e})}const nt={containsTaskList:"containsTaskList_mC6p"};function st(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&nt.containsTaskList)}const at={img:"img_ev3q"};function ot(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const it={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function lt(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.A)(v.G.common.admonition,v.G.common.admonitionType(t),it.admonition,n),children:s})}function ct(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:it.admonitionHeading,children:[(0,i.jsx)("span",{className:it.admonitionIcon,children:t}),n]})}function rt(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:it.admonitionContent,children:t}):null}function dt(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(lt,{type:t,className:o,children:[s||n?(0,i.jsx)(ct,{title:s,icon:n}):null,(0,i.jsx)(rt,{children:a})]})}function ut(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const mt={icon:(0,i.jsx)(ut,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function ht(e){return(0,i.jsx)(dt,{...mt,...e,className:(0,u.A)("alert alert--secondary",e.className),children:e.children})}function pt(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const ft={icon:(0,i.jsx)(pt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function xt(e){return(0,i.jsx)(dt,{...ft,...e,className:(0,u.A)("alert alert--success",e.className),children:e.children})}function bt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const gt={icon:(0,i.jsx)(bt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function jt(e){return(0,i.jsx)(dt,{...gt,...e,className:(0,u.A)("alert alert--info",e.className),children:e.children})}function vt(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const Nt={icon:(0,i.jsx)(vt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Ct(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const At={icon:(0,i.jsx)(Ct,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const kt={icon:(0,i.jsx)(vt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const yt={...{note:ht,tip:xt,info:jt,warning:function(e){return(0,i.jsx)(dt,{...Nt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(dt,{...At,...e,className:(0,u.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(ht,{title:"secondary",...e}),important:e=>(0,i.jsx)(jt,{title:"important",...e}),success:e=>(0,i.jsx)(xt,{title:"success",...e}),caution:function(e){return(0,i.jsx)(dt,{...kt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})}}};function Lt(e){const t=ot(e),n=(s=t.type,yt[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),yt.info));var s;return(0,i.jsx)(n,{...t})}const _t={Head:he.A,details:et,Details:et,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,i.jsx)(We,{...e}):(0,i.jsx)(De,{...e})},a:function(e){return(0,i.jsx)(p.A,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:st(e.className)})},li:function(e){return(0,Fe.A)().collectAnchor(e.id),(0,i.jsx)("li",{...e})},img:function(e){return(0,i.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,at.img))});var t},h1:e=>(0,i.jsx)(tt,{as:"h1",...e}),h2:e=>(0,i.jsx)(tt,{as:"h2",...e}),h3:e=>(0,i.jsx)(tt,{as:"h3",...e}),h4:e=>(0,i.jsx)(tt,{as:"h4",...e}),h5:e=>(0,i.jsx)(tt,{as:"h5",...e}),h6:e=>(0,i.jsx)(tt,{as:"h6",...e}),admonition:Lt,mermaid:()=>null};function Bt(e){let{children:t}=e;return(0,i.jsx)(me.x,{components:_t,children:t})}function wt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.A)(v.G.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ue.A,{as:"h1",children:n})}),(0,i.jsx)(Bt,{children:t})]})}var Tt=n(1754),Et=n(9169),Ht=n(6025);function Mt(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function St(){const e=(0,Ht.Ay)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(p.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Mt,{className:It.breadcrumbHomeIcon})})})}const Ut={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Vt(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,i.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,i.jsx)(p.A,{className:a,href:n,itemProp:"item",children:(0,i.jsx)("span",{itemProp:"name",children:t})}):(0,i.jsx)("span",{className:a,children:t})}function Rt(e){let{children:t,active:n,index:s,addMicrodata:a}=e;return(0,i.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,i.jsx)("meta",{itemProp:"position",content:String(s+1)})]})}function zt(){const e=(0,Tt.OF)(),t=(0,Et.Dt)();return e?(0,i.jsx)("nav",{className:(0,u.A)(v.G.docs.docBreadcrumbs,Ut.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,i.jsx)(St,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,i.jsx)(Rt,{active:s,index:n,addMicrodata:!!a,children:(0,i.jsx)(Vt,{href:a,isLast:s,children:t.label})},n)}))]})}):null}function Ot(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Pt(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Gt(){return(0,i.jsx)(he.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Dt(e){let{className:t}=e;return(0,i.jsx)(Lt,{type:"caution",title:(0,i.jsx)(Ot,{}),className:(0,u.A)(t,v.G.common.unlistedBanner),children:(0,i.jsx)(Pt,{})})}function Wt(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gt,{}),(0,i.jsx)(Dt,{...e})]})}const $t={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Ft(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.l)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(oe,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(de,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&$t.docItemCol),children:[s&&(0,i.jsx)(Wt,{}),(0,i.jsx)(_,{}),(0,i.jsxs)("div",{className:$t.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(zt,{}),(0,i.jsx)(B,{}),n.mobile,(0,i.jsx)(wt,{children:t}),(0,i.jsx)(G,{})]}),(0,i.jsx)(b,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function qt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.e3,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Ft,{children:(0,i.jsx)(n,{})})]})})}},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{R:()=>i,x:()=>l});var s=n(6540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/19dd4331.92fe643f.js b/assets/js/19dd4331.27596e02.js similarity index 97% rename from assets/js/19dd4331.92fe643f.js rename to assets/js/19dd4331.27596e02.js index bb23db4dd..413eaff0b 100644 --- a/assets/js/19dd4331.92fe643f.js +++ b/assets/js/19dd4331.27596e02.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[4126],{5624:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var s=t(4848),r=t(8453);const i={},o="updateAgent",a={id:"api/agents/update",title:"updateAgent",description:"Updates an existing Agent resource.",source:"@site/versioned_docs/version-1.x.x/api/agents/update.md",sourceDirName:"api/agents",slug:"/api/agents/update",permalink:"/docs/1.x.x/api/agents/update",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/agents/update.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"listAgents",permalink:"/docs/1.x.x/api/agents/list"},next:{title:"getConfiguration",permalink:"/docs/1.x.x/api/config/get"}},c={},d=[];function p(e){const n={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"updateagent",children:"updateAgent"}),"\n",(0,s.jsx)(n.p,{children:"Updates an existing Agent resource."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"URL"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"/agents/{ref}"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Method"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"PUT"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsx)(n.p,{children:"This method does not receive any parameters."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Request body"})}),"\n",(0,s.jsxs)(n.p,{children:["A file containing an ",(0,s.jsx)(n.a,{href:"/docs/1.x.x/configuration/agents",children:"Agent"})," resource in ",(0,s.jsx)(n.code,{children:"json"})," format."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Response"})}),"\n",(0,s.jsx)(n.p,{children:"If successful this method updates an Agent resource."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Sample Call"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'PUT /api/v1beta1/agents/ag3f77f6\n{\n "apiVersion": "v1beta1",\n "kind": "Agent",\n "metadata": {\n "name": "John Doe",\n "ref": "ag3f77f6"\n },\n "spec": {\n \t"credentials": {\n \t\t"username": "1001",\n \t\t"secret": "1234"\n \t},\n \t"domains": [\n \t\t"sip.local"\n \t]\n }\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(6540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[4126],{3723:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var s=t(4848),r=t(8453);const i={},o="updateAgent",a={id:"api/agents/update",title:"updateAgent",description:"Updates an existing Agent resource.",source:"@site/versioned_docs/version-1.x.x/api/agents/update.md",sourceDirName:"api/agents",slug:"/api/agents/update",permalink:"/docs/1.x.x/api/agents/update",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/agents/update.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"listAgents",permalink:"/docs/1.x.x/api/agents/list"},next:{title:"getConfiguration",permalink:"/docs/1.x.x/api/config/get"}},c={},d=[];function p(e){const n={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"updateagent",children:"updateAgent"}),"\n",(0,s.jsx)(n.p,{children:"Updates an existing Agent resource."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"URL"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"/agents/{ref}"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Method"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"PUT"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,s.jsx)(n.p,{children:"This method does not receive any parameters."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Request body"})}),"\n",(0,s.jsxs)(n.p,{children:["A file containing an ",(0,s.jsx)(n.a,{href:"/docs/1.x.x/configuration/agents",children:"Agent"})," resource in ",(0,s.jsx)(n.code,{children:"json"})," format."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Response"})}),"\n",(0,s.jsx)(n.p,{children:"If successful this method updates an Agent resource."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Sample Call"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'PUT /api/v1beta1/agents/ag3f77f6\n{\n "apiVersion": "v1beta1",\n "kind": "Agent",\n "metadata": {\n "name": "John Doe",\n "ref": "ag3f77f6"\n },\n "spec": {\n \t"credentials": {\n \t\t"username": "1001",\n \t\t"secret": "1234"\n \t},\n \t"domains": [\n \t\t"sip.local"\n \t]\n }\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(6540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1a1a9e3d.1234f680.js b/assets/js/1a1a9e3d.1234f680.js new file mode 100644 index 000000000..e9641d6a4 --- /dev/null +++ b/assets/js/1a1a9e3d.1234f680.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8512],{215:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>u,toc:()=>a});var r=n(4848),o=n(8453);const s={},i="Intercom System with Routr and Kubernetes",u={id:"tutorials/intercom-system-with-routr-and-kubernetes",title:"Intercom System with Routr and Kubernetes",description:"Coming soon.",source:"@site/docs/tutorials/intercom-system-with-routr-and-kubernetes.md",sourceDirName:"tutorials",slug:"/tutorials/intercom-system-with-routr-and-kubernetes",permalink:"/docs/2.11.5/tutorials/intercom-system-with-routr-and-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/tutorials/intercom-system-with-routr-and-kubernetes.md",tags:[],version:"current",frontMatter:{}},c={},a=[];function m(t){const e={h1:"h1",p:"p",...(0,o.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"intercom-system-with-routr-and-kubernetes",children:"Intercom System with Routr and Kubernetes"}),"\n",(0,r.jsx)(e.p,{children:"Coming soon."})]})}function d(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(m,{...t})}):m(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>i,x:()=>u});var r=n(6540);const o={},s=r.createContext(o);function i(t){const e=r.useContext(s);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function u(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:i(t.components),r.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/1a1a9e3d.25a9d97e.js b/assets/js/1a1a9e3d.25a9d97e.js deleted file mode 100644 index 502a91d6e..000000000 --- a/assets/js/1a1a9e3d.25a9d97e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8512],{332:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>u,toc:()=>a});var r=n(4848),o=n(8453);const s={},i="Intercom System with Routr and Kubernetes",u={id:"tutorials/intercom-system-with-routr-and-kubernetes",title:"Intercom System with Routr and Kubernetes",description:"Coming soon.",source:"@site/docs/tutorials/intercom-system-with-routr-and-kubernetes.md",sourceDirName:"tutorials",slug:"/tutorials/intercom-system-with-routr-and-kubernetes",permalink:"/docs/2.0.0/tutorials/intercom-system-with-routr-and-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/tutorials/intercom-system-with-routr-and-kubernetes.md",tags:[],version:"current",frontMatter:{}},c={},a=[];function m(t){const e={h1:"h1",p:"p",...(0,o.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"intercom-system-with-routr-and-kubernetes",children:"Intercom System with Routr and Kubernetes"}),"\n",(0,r.jsx)(e.p,{children:"Coming soon."})]})}function d(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(m,{...t})}):m(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>i,x:()=>u});var r=n(6540);const o={},s=r.createContext(o);function i(t){const e=r.useContext(s);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function u(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:i(t.components),r.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.9432810d.js b/assets/js/1a4e3797.9432810d.js deleted file mode 100644 index 06badd98a..000000000 --- a/assets/js/1a4e3797.9432810d.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1a4e3797.9432810d.js.LICENSE.txt */ -(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2138],{2733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(n(s))for(c=Array.prototype.slice.call(arguments,1),a=(o=s.slice()).length,u=0;u0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,s=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=a;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){s=c;break}if(s<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},4103:(e,t,r)=>{"use strict";var n=r(6571),i=r(3371),s=r(7691);function a(e,t,r,i){return new n(e,t,r,i)}a.version=r(6938),a.AlgoliaSearchHelper=n,a.SearchParameters=i,a.SearchResults=s,e.exports=a},6732:(e,t,r)=>{"use strict";var n=r(2733);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(3014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},1673:(e,t,r)=>{"use strict";var n=r(9110),i=r(317),s=r(1383),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,s=e[t]?e[t].concat(i):[i],c={};return c[t]=s,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,r)}));return c.length!==a.length&&(n=!0),i[s]=c,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},3371:(e,t,r)=>{"use strict";var n=r(9110),i=r(849),s=r(4843),a=r(4728),c=r(317),u=r(1383),o=r(7507),h=r(2208),f=r(1673);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=o(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,o(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var s=r[i],a={};return s=s||{},Object.keys(s).forEach((function(r){var n=s[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),a[r]=c})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var s,a,c=o(r),u=void 0!==(s=this.numericRefinements[e][t],a=c,i(s,(function(e){return l(e,a)})));return n&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=s(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m {"use strict";var n=r(8965),i=r(9110),s=r(2909),a=r(849),c=r(3917),u=r(7577),o=r(4728),h=r(8601),f=s.escapeFacetValue,l=s.unescapeFacetValue,m=r(6673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var s=t[0];this._rawResults=t;var u=this;Object.keys(s).forEach((function(e){u[e]=s[e]}));var h=o({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){u[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),v=d(e.facets),g=d(e.disjunctiveFacets),y=1,R=s.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],o=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(o){var h=o.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===o.name}));u.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=g[t],u.disjunctiveFacets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(u.disjunctiveFacets[l],s.facets_stats,t)),d&&(l=v[t],u.facets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(u.facets[l],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(u.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;u.hierarchicalFacets[r][m].data=o({},u.hierarchicalFacets[r][m].data,f)}else{r=g[t];var d=s.facets&&s.facets[t]||{};u.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(u.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!u.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(u.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var o=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(u.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(a.length>0&&!u.persistHierarchicalRootCount){var m=a[0].split(s)[0];l[m]=u.hierarchicalFacets[h][f].data[m]}u.hierarchicalFacets[h][f].data=i(l,o,u.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=v[t];u.facets[n]={name:t,data:R[t],exhaustive:s.exhaustiveFacetsCount},r.forEach((function(e){u.facets[n]=u.facets[n]||{name:t},u.facets[n].data=u.facets[n].data||{},u.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(c),o=l(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(c.rootPath)&&(o=o.replace(c.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(s,h,0),s}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return R(e,t,r,n+1)})),a=e(s,r[n]);return i({data:a},t)}function F(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var s=a(i,(function(e){return e.name===r})),c=s&&s.data&&s.data[n]?s.data[n]:0,u=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,s=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,a=t.sortRemainingBy;return"hidden"===a?r:(s="alpha"===a?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=u(s.sortBy,v.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(i),c=r.split(s),u=a(n,(function(e){return e.name===t})),o=c.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},6571:(e,t,r)=>{"use strict";var n=r(2733),i=r(6732),s=r(2909).escapeFacetValue,a=r(3014),c=r(4728),u=r(317),o=r(1383),h=r(9228),f=r(3371),l=r(7691),m=r(6938);function d(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var i=r||{};i.index=t,this.state=f.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._searchResultsOptions=n}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}a(d,n),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new l(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new l(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:o(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f,l=this;return i?f=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?f=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,f=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),f.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=p,d.prototype.setPage=p,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},d.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=v,d.prototype.getPage=v,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),s=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t 0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},8965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},9110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r {"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r {"use strict";var n=r(849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),s=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!s?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},3014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},4728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var s=n[i],a=e[i];void 0!==a&&void 0===s||(t(a)&&t(s)?e[i]=r(a,s):e[i]="object"==typeof(c=s)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},1383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n =0||(i[r]=e[r]);return i}},8601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,s=null===t;if(!s&&e>t||n&&i||!r)return 1;if(!n&&e =n.length?s:"desc"===n[i]?-s:s}return e.index-r.index})),i.map((function(e){return e.value}))}},7507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},9228:(e,t,r)=>{"use strict";var n=r(4728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(c).length>1){var u=a[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,a){var c=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[a-1];c.facetFilters=a>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),a.length>0&&(u.numericFilters=a),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),u=s._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),a.length>0&&(o.facetFilters=a),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var s=i[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){(s[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var s=(c[i]||[])[0];if(void 0!==s){var a,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===s.indexOf(h)||!f&&!0===r||f&&f.split(h).length===s.split(h).length)return;f?(u=f.split(h).length-1,s=f):(u=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=o.attributes[u]}else u=s.split(h).length-1,a=o.attributes[u];a&&n.push([a+":"+s])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),s=n.split(i).length,a=r.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),s=0;return i&&(s=i.split(n).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},s._getHitsSearchParams(c),u))}};e.exports=s},2208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},6938:e=>{"use strict";e.exports="3.16.3"},3643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n =0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,s=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t 2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return s()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],s=t[1];return Promise.all([n,s||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=s();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=s();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=s(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);var a=n(),c=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return c(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n 0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(s(r),s(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function P(e,t,n,i){var a=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,s){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(a)};var m={data:c,headers:u,method:o,url:_(h,n.path,f),connectTimeout:s(l,e.timeouts.connect),responseTimeout:s(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return a.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,s)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(a))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return j(e.hostsCache,t).then((function(e){return m(s(e.statelessHosts).reverse(),e.getTimeout)}))}function x(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function _(e,t,r){var n=E(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function E(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var A=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),s=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,s=e.requestsCache,a=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:s,responsesCache:a,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return P(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var s={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(s,(function(){return f.requestsCache.get(s,(function(){return f.requestsCache.set(s,n()).then((function(e){return Promise.all([f.requestsCache.delete(s),e])}),(function(e){return Promise.all([f.requestsCache.delete(s),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(s,e)}})},write:function(e,t){return P(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:s,appId:t,addAlgoliaAgent:function(e,t){s.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then((function(){}))}},e.methods)},N=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var s=t.params,a=s.facetName,c=s.facetQuery,u=n(s,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:D}}).searchForFacetValues(a,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},D=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},I=1,k=2,q=3;function V(e,t,n){var i,s={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},s=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return I>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[a({key:"".concat("4.22.1","-").concat(e)}),u()]}),userAgent:x("4.22.1").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return A(r(r(r({},s),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:N,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:D,findAnswers:Q}})}}}}))}return V.version="4.22.1",V}()},2672:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T});var n=r(6540);function i(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t e.includes(t)))}const g={locale:"en",pluralForms:v(["one","other"]),select:e=>1===e?"one":"other"};function y(){const{i18n:{currentLocale:e}}=(0,d.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:v(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),g}}),[e])}function R(){const e=y();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),s=r.pluralForms.indexOf(i);return n[Math.min(s,n.length-1)]}(r,t,e)}}var F=r(4255),b=r(9532),j=r(9024),P=r(481),x=r(1312),_=r(8126),E=r(1062),O=r(9201),w=r(1107);const A={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};var N=r(4848);function H(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return(0,N.jsx)("div",{className:s("col","col--3","padding-left--none",A.searchVersionColumn),children:r.map((e=>{let[n,i]=e;const s=r.length>1?`${n}: `:"";return(0,N.jsx)("select",{onChange:e=>t.setSearchVersion(n,e.target.value),defaultValue:t.searchVersions[n],className:A.searchVersionInput,children:i.versions.map(((e,t)=>(0,N.jsx)("option",{label:`${s}${e.label}`,value:e.name},t)))},n)}))})}function S(){const{i18n:{currentLocale:e}}=(0,d.A)(),{algolia:{appId:t,apiKey:r,indexName:i}}=(0,_.c)(),a=(0,E.C)(),u=function(){const{selectMessage:e}=R();return t=>e(t,(0,x.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),p=function(){const e=(0,m.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),[v,g]=(0,F.b)(),y={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[j,S]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return y;case"loading":return{...e,loading:!0};case"update":return v!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),y),T=o()(t,r),Q=c()(T,i,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});Q.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:s}}=e;if(""===t||!Array.isArray(r))return void S({type:"reset"});const c=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),u=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=Object.keys(r).map((e=>c(r[e].value)));return{title:i.pop(),url:a(t),summary:n.content?`${c(n.content.value)}...`:"",breadcrumbs:i}}));S({type:"update",value:{items:u,query:t,totalResults:i,totalPages:s,lastPage:n,hasMore:s>n+1,loading:!1}})}));const[C,D]=(0,n.useState)(null),I=(0,n.useRef)(0),k=(0,n.useRef)(h.A.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&I.current>r&&S({type:"advance"}),I.current=r}),{threshold:1})),q=()=>v?(0,x.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:v}):(0,x.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),V=(0,b._q)((function(t){void 0===t&&(t=0),Q.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Q.addDisjunctiveFacetRefinement("language",e),Object.entries(p.searchVersions).forEach((e=>{let[t,r]=e;Q.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),Q.setQuery(v).setPage(t).search()}));return(0,n.useEffect)((()=>{if(!C)return;const e=k.current;return e?(e.observe(C),()=>e.unobserve(C)):()=>!0}),[C]),(0,n.useEffect)((()=>{S({type:"reset"}),v&&(S({type:"loading"}),setTimeout((()=>{V()}),300))}),[v,p.searchVersions,V]),(0,n.useEffect)((()=>{j.lastPage&&0!==j.lastPage&&V(j.lastPage)}),[V,j.lastPage]),(0,N.jsxs)(O.A,{children:[(0,N.jsxs)(f.A,{children:[(0,N.jsx)("title",{children:(0,P.s)(q())}),(0,N.jsx)("meta",{property:"robots",content:"noindex, follow"})]}),(0,N.jsxs)("div",{className:"container margin-vert--lg",children:[(0,N.jsx)(w.A,{as:"h1",children:q()}),(0,N.jsxs)("form",{className:"row",onSubmit:e=>e.preventDefault(),children:[(0,N.jsx)("div",{className:s("col",A.searchQueryColumn,{"col--9":p.versioningEnabled,"col--12":!p.versioningEnabled}),children:(0,N.jsx)("input",{type:"search",name:"q",className:A.searchQueryInput,placeholder:(0,x.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,x.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>g(e.target.value),value:v,autoComplete:"off",autoFocus:!0})}),p.versioningEnabled&&(0,N.jsx)(H,{docsSearchVersionsHelpers:p})]}),(0,N.jsxs)("div",{className:"row",children:[(0,N.jsx)("div",{className:s("col","col--8",A.searchResultsColumn),children:!!j.totalResults&&u(j.totalResults)}),(0,N.jsx)("div",{className:s("col","col--4","text--right",A.searchLogoColumn),children:(0,N.jsx)(l.A,{to:"https://www.algolia.com/","aria-label":(0,x.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"}),children:(0,N.jsx)("svg",{viewBox:"0 0 168 24",className:A.algoliaLogo,children:(0,N.jsxs)("g",{fill:"none",children:[(0,N.jsx)("path",{className:A.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),(0,N.jsx)("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),(0,N.jsx)("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})]})})})})]}),j.items.length>0?(0,N.jsx)("main",{children:j.items.map(((e,t)=>{let{title:r,url:n,summary:i,breadcrumbs:a}=e;return(0,N.jsxs)("article",{className:A.searchResultItem,children:[(0,N.jsx)(w.A,{as:"h2",className:A.searchResultItemHeading,children:(0,N.jsx)(l.A,{to:n,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,N.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,N.jsx)("ul",{className:s("breadcrumbs",A.searchResultItemPath),children:a.map(((e,t)=>(0,N.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t)))})}),i&&(0,N.jsx)("p",{className:A.searchResultItemSummary,dangerouslySetInnerHTML:{__html:i}})]},t)}))}):[v&&!j.loading&&(0,N.jsx)("p",{children:(0,N.jsx)(x.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!j.loading&&(0,N.jsx)("div",{className:A.loadingSpinner},"spinner")],j.hasMore&&(0,N.jsx)("div",{className:A.loader,ref:D,children:(0,N.jsx)(x.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function T(){return(0,N.jsx)(j.e3,{className:"search-page-wrapper",children:(0,N.jsx)(S,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.9432810d.js.LICENSE.txt b/assets/js/1a4e3797.9432810d.js.LICENSE.txt deleted file mode 100644 index 9caab8b19..000000000 --- a/assets/js/1a4e3797.9432810d.js.LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -/*! algoliasearch-lite.umd.js | 4.22.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/assets/js/1a4e3797.eb7bfe21.js b/assets/js/1a4e3797.eb7bfe21.js new file mode 100644 index 000000000..f24cca445 --- /dev/null +++ b/assets/js/1a4e3797.eb7bfe21.js @@ -0,0 +1,2 @@ +/*! For license information please see 1a4e3797.eb7bfe21.js.LICENSE.txt */ +(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2138],{2733:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,o,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(s=this._events[e]))return!1;if(r(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(n(s))for(c=Array.prototype.slice.call(arguments,1),a=(u=s.slice()).length,o=0;o0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,s,a,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,s=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=a;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){s=c;break}if(s<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},4103:(e,t,r)=>{"use strict";var n=r(6571),i=r(9127),s=r(2223),a=r(3371),c=r(7691);function o(e,t,r,i){return new n(e,t,r,i)}o.version=r(6938),o.AlgoliaSearchHelper=n,o.SearchParameters=a,o.RecommendParameters=i,o.SearchResults=c,o.RecommendResults=s,e.exports=o},6732:(e,t,r)=>{"use strict";var n=r(2733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(3014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},9127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice();return r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter((function(e){return void 0===t[e.$$id]})).map((function(t){var r=Object.assign({},t,{indexName:e});return delete r.$$id,r}))}},e.exports=t},2223:e=>{"use strict";function t(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach((function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]}))}t.prototype={constructor:t},e.exports=t},1673:(e,t,r)=>{"use strict";var n=r(9110),i=r(317),s=r(1383),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,s=e[t]?e[t].concat(i):[i],c={};return c[t]=s,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return s(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,r)}));return c.length!==a.length&&(n=!0),i[s]=c,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},3371:(e,t,r)=>{"use strict";var n=r(9110),i=r(849),s=r(4843),a=r(4728),c=r(317),o=r(1383),u=r(7507),h=r(2208),f=r(1673);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return a(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,u(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return o(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var s=r[i],a={};return s=s||{},Object.keys(s).forEach((function(r){var n=s[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),a[r]=c})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var s,a,c=u(r),o=void 0!==(s=this.numericRefinements[e][t],a=c,i(s,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),s=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?o(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=s(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,s){return function(u,h,f){var l=u;if(f>0){var m=0;for(l=u;m{"use strict";var n=r(8965),i=r(9110),s=r(2909),a=r(849),c=r(3917),o=r(7577),u=r(4728),h=r(8601),f=s.escapeFacetValue,l=s.unescapeFacetValue,m=r(6673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var s=t[0]||{};this._rawResults=t;var o=this;Object.keys(s).forEach((function(e){o[e]=s[e]}));var h=u({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){o[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),g=d(e.facets),v=d(e.disjunctiveFacets),y=1,R=s.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var h=u.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));o.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:s.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=v[t],o.disjunctiveFacets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[l],s.facets_stats,t)),d&&(l=g[t],o.facets[l]={name:t,data:i,exhaustive:s.exhaustiveFacetsCount},p(o.facets[l],s.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=u({},o.hierarchicalFacets[r][m].data,f)}else{r=v[t];var d=s.facets&&s.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),s=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(s).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(a.length>0&&!o.persistHierarchicalRootCount){var m=a[0].split(s)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,u,o.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=g[t];o.facets[n]={name:t,data:R[t],exhaustive:s.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=a(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=a(e.hierarchicalFacets,r);if(!s)return s;var c=e._state.getHierarchicalFacetByName(t),o=e._state._getHierarchicalFacetSeparator(c),u=l(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(c.rootPath)&&(u=u.replace(c.rootPath+o,""));var h=u.split(o);return h.unshift(t),y(s,h,0),s}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return R(e,t,r,n+1)})),a=e(s,r[n]);return i({data:a},t)}function F(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var s=a(i,(function(e){return e.name===r})),c=s&&s.data&&s.data[n]?s.data[n]:0,o=s&&s.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:o}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,s=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(r)return function(e,t){var r=[],n=[],i=t.hide||[],s=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name,a=i.indexOf(t)>-1;a||void 0===s[t]?a||n.push(e):r[s[t]]=e})),r=r.filter((function(e){return e}));var a,c=t.sortRemainingBy;return"hidden"===c?r:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,g.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(i),c=r.split(s),o=a(n,(function(e){return e.name===t})),u=c.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),o),h=u&&u.count||0,f=u&&u.exhaustive||!1,l=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=g},6571:(e,t,r)=>{"use strict";var n=r(2733),i=r(6732),s=r(2909).escapeFacetValue,a=r(3014),c=r(4728),o=r(317),u=r(1383),h=r(9127),f=r(2223),l=r(9228),m=r(3371),d=r(7691),p=r(7749),g=r(6938);function v(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=m.make(i),this.recommendState=new h({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function R(){return this.state.page}a(v,n),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=l._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},v.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(l._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(s);var a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(s);return a.findAnswers(n.query,e.queryLanguages,i)},v.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),o=c.isDisjunctiveFacet(e),u=l.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:u}]):a?h=this.client.initIndex(c.index).searchForFacetValues(u):(delete u.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=s(t.value),t.isRefined=o?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:m.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new m(e),this},v.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=R,v.prototype.getPage=R,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=l._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?l._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),s=Array.prototype.concat.apply(n,i),a=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(c){this.emit("error",{error:c})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map((function(e){return e.$$id}));this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var s=this._recommendCache,a=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var a=t.getModifiedRecommendState(new h);return n.push({state:a,index:r,helper:t}),i=Array.prototype.concat.apply(i,a.params.map((function(e){return e.$$id}))),t.emit("fetch",{recommend:{state:a,results:t.lastRecommendResults}}),a._buildQueries(r,s)})),c=Array.prototype.concat.apply(this.recommendState._buildQueries(r,s),a);if(0!==c.length)if(c.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var o=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(c).then(this._dispatchRecommendResponse.bind(this,o,n,i)).catch(this._dispatchRecommendError.bind(this,o))}catch(u){this.emit("error",{error:u})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t 0},v.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},8965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},9110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r {"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r {e.exports=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}},7577:(e,t,r)=>{"use strict";var n=r(849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),s=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!s?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},3014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},4728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var s=n[i],a=e[i];void 0!==a&&void 0===s||(t(a)&&t(s)?e[i]=r(a,s):e[i]="object"==typeof(c=s)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},1383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n =0||(i[r]=e[r]);return i}},8601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,s=null===t;if(!s&&e>t||n&&i||!r)return 1;if(!n&&e =n.length?s:"desc"===n[i]?-s:s}return e.index-r.index})),i.map((function(e){return e.value}))}},7507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},9228:(e,t,r)=>{"use strict";var n=r(4728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var s={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(c).length>1){var o=a[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);o.forEach((function(n,a){var c=s._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=o[a-1];c.facetFilters=a>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)).sort(),r=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),o={};return t.length>0&&(o.facets=t.indexOf("*")>-1?["*"]:t),c.length>0&&(o.tagFilters=c),r.length>0&&(o.facetFilters=r),a.length>0&&(o.numericFilters=a),i(n({},e.getQueryParams(),o))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=s._getFacetFilters(e,t,r),c=s._getNumericFilters(e,t),o=s._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};o.length>0&&(u.tagFilters=o);var h=e.getHierarchicalFacetByName(t);return u.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(u.numericFilters=c),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var s=i[e]||[];t!==n&&s.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).sort().forEach((function(e){(s[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var s=(c[i]||[])[0];if(void 0!==s){var a,o,u=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===s.indexOf(h)||!f&&!0===r||f&&f.split(h).length===s.split(h).length)return;f?(o=f.split(h).length-1,s=f):(o=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=u.attributes[o]}else o=s.split(h).length-1,a=u.attributes[o];a&&n.push([a+":"+s])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),s=n.split(i).length,a=r.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),s=0;return i&&(s=i.split(n).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,o={facetQuery:t,facetName:e};return"number"==typeof r&&(o.maxFacetHits=r),i(n({},s._getHitsSearchParams(c),o))}};e.exports=s},2208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},7749:(e,t,r)=>{"use strict";var n=r(849),i=r(8657);e.exports=function(e){var t={};return e.forEach((function(e){e.forEach((function(e,r){t[e.objectID]?t[e.objectID]={indexSum:t[e.objectID].indexSum+r,count:t[e.objectID].count+1}:t[e.objectID]={indexSum:r,count:1}}))})),function(e,t){var r=[];return Object.keys(e).forEach((function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})})),r.sort((function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1}))}(t,e.length).reduce((function(t,r){var s=n(i(e),(function(e){return e.objectID===r.objectID}));return s?t.concat(s):t}),[])}},6938:e=>{"use strict";e.exports="3.22.1"},3643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n =0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,s=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t 2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return s()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],s=t[1];return Promise.all([n,s||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=s();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=s();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=s(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);var a=n(),c=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return c(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n 0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,g=2,v=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function j(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(s(r),s(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function _(e,t,n,i){var a=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),o=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,s){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(a)};var m={data:c,headers:o,method:u,url:x(h,n.path,f),connectTimeout:s(l,e.timeouts.connect),responseTimeout:s(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return a.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?v:g))]).then((function(){return t(r,s)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(a))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return j(e.hostsCache,t).then((function(e){return m(s(e.statelessHosts).reverse(),e.getTimeout)}))}function P(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function x(e,t,r){var n=E(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function E(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var S=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),s=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,s=e.requestsCache,a=e.responsesCache,c=e.timeouts,o=e.userAgent,u=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:s,responsesCache:a,timeouts:c,userAgent:o,headers:e.headers,queryParameters:h,hosts:u.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return _(f,f.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var s={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(s,(function(){return f.requestsCache.get(s,(function(){return f.requestsCache.set(s,n()).then((function(e){return Promise.all([f.requestsCache.delete(s),e])}),(function(e){return Promise.all([f.requestsCache.delete(s),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(s,e)}})},write:function(e,t){return _(f,f.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:s,appId:t,addAlgoliaAgent:function(e,t){s.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},N=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},T=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},H=function(e){return function(t,i){return Promise.all(t.map((function(t){var s=t.params,a=s.facetName,c=s.facetQuery,o=n(s,["facetName","facetQuery"]);return N(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(a,c,r(r({},i),o))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,k=2,q=3,L=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:b,path:"1/indexes/*/recommendations",data:{requests:i},cacheable:!0},n)}};function V(e,t,n){var i,s={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},s=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return k>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:o(),requestsCache:o({serializable:!1}),hostsCache:c({caches:[a({key:"".concat("4.23.3","-").concat(e)}),o()]}),userAgent:P("4.23.3").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return S(r(r(r({},s),n),{},{methods:{search:T,searchForFacetValues:H,multipleQueries:T,multipleSearchForFacetValues:H,customRequest:A,initIndex:function(e){return function(t){return N(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:Q}})}},getRecommendations:L}}))}return V.version="4.23.3",V}()},2672:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>H});var n=r(6540);function i(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t e.includes(t)))}const v={locale:"en",pluralForms:g(["one","other"]),select:e=>1===e?"one":"other"};function y(){const{i18n:{currentLocale:e}}=(0,d.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:g(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),v}}),[e])}function R(){const e=y();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),s=r.pluralForms.indexOf(i);return n[Math.min(s,n.length-1)]}(r,t,e)}}var F=r(4255),b=r(9532),j=r(9024),_=r(481),P=r(1312),x=r(8126),E=r(1062),O=r(9201),w=r(1107);const S={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};var A=r(4848);function N(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return(0,A.jsx)("div",{className:s("col","col--3","padding-left--none",S.searchVersionColumn),children:r.map((e=>{let[n,i]=e;const s=r.length>1?`${n}: `:"";return(0,A.jsx)("select",{onChange:e=>t.setSearchVersion(n,e.target.value),defaultValue:t.searchVersions[n],className:S.searchVersionInput,children:i.versions.map(((e,t)=>(0,A.jsx)("option",{label:`${s}${e.label}`,value:e.name},t)))},n)}))})}function T(){const{i18n:{currentLocale:e}}=(0,d.A)(),{algolia:{appId:t,apiKey:r,indexName:i,contextualSearch:a}}=(0,x.c)(),o=(0,E.C)(),p=function(){const{selectMessage:e}=R();return t=>e(t,(0,P.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),g=function(){const e=(0,m.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),[v,y]=(0,F.b)(),j={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[T,H]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return j;case"loading":return{...e,loading:!0};case"update":return v!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),j),Q=a?["language","docusaurus_tag"]:[],C=u()(t,r),I=c()(C,i,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:Q});I.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:s}}=e;if(""===t||!Array.isArray(r))return void H({type:"reset"});const a=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=Object.keys(r).map((e=>a(r[e].value)));return{title:i.pop(),url:o(t),summary:n.content?`${a(n.content.value)}...`:"",breadcrumbs:i}}));H({type:"update",value:{items:c,query:t,totalResults:i,totalPages:s,lastPage:n,hasMore:s>n+1,loading:!1}})}));const[D,k]=(0,n.useState)(null),q=(0,n.useRef)(0),L=(0,n.useRef)(h.A.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&q.current>r&&H({type:"advance"}),q.current=r}),{threshold:1})),V=()=>v?(0,P.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:v}):(0,P.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),B=(0,b._q)((function(t){void 0===t&&(t=0),a&&(I.addDisjunctiveFacetRefinement("docusaurus_tag","default"),I.addDisjunctiveFacetRefinement("language",e),Object.entries(g.searchVersions).forEach((e=>{let[t,r]=e;I.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)}))),I.setQuery(v).setPage(t).search()}));return(0,n.useEffect)((()=>{if(!D)return;const e=L.current;return e?(e.observe(D),()=>e.unobserve(D)):()=>!0}),[D]),(0,n.useEffect)((()=>{H({type:"reset"}),v&&(H({type:"loading"}),setTimeout((()=>{B()}),300))}),[v,g.searchVersions,B]),(0,n.useEffect)((()=>{T.lastPage&&0!==T.lastPage&&B(T.lastPage)}),[B,T.lastPage]),(0,A.jsxs)(O.A,{children:[(0,A.jsxs)(f.A,{children:[(0,A.jsx)("title",{children:(0,_.s)(V())}),(0,A.jsx)("meta",{property:"robots",content:"noindex, follow"})]}),(0,A.jsxs)("div",{className:"container margin-vert--lg",children:[(0,A.jsx)(w.A,{as:"h1",children:V()}),(0,A.jsxs)("form",{className:"row",onSubmit:e=>e.preventDefault(),children:[(0,A.jsx)("div",{className:s("col",S.searchQueryColumn,{"col--9":g.versioningEnabled,"col--12":!g.versioningEnabled}),children:(0,A.jsx)("input",{type:"search",name:"q",className:S.searchQueryInput,placeholder:(0,P.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,P.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>y(e.target.value),value:v,autoComplete:"off",autoFocus:!0})}),a&&g.versioningEnabled&&(0,A.jsx)(N,{docsSearchVersionsHelpers:g})]}),(0,A.jsxs)("div",{className:"row",children:[(0,A.jsx)("div",{className:s("col","col--8",S.searchResultsColumn),children:!!T.totalResults&&p(T.totalResults)}),(0,A.jsx)("div",{className:s("col","col--4","text--right",S.searchLogoColumn),children:(0,A.jsx)(l.A,{to:"https://www.algolia.com/","aria-label":(0,P.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"}),children:(0,A.jsx)("svg",{viewBox:"0 0 168 24",className:S.algoliaLogo,children:(0,A.jsxs)("g",{fill:"none",children:[(0,A.jsx)("path",{className:S.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),(0,A.jsx)("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),(0,A.jsx)("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})]})})})})]}),T.items.length>0?(0,A.jsx)("main",{children:T.items.map(((e,t)=>{let{title:r,url:n,summary:i,breadcrumbs:a}=e;return(0,A.jsxs)("article",{className:S.searchResultItem,children:[(0,A.jsx)(w.A,{as:"h2",className:S.searchResultItemHeading,children:(0,A.jsx)(l.A,{to:n,dangerouslySetInnerHTML:{__html:r}})}),a.length>0&&(0,A.jsx)("nav",{"aria-label":"breadcrumbs",children:(0,A.jsx)("ul",{className:s("breadcrumbs",S.searchResultItemPath),children:a.map(((e,t)=>(0,A.jsx)("li",{className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}},t)))})}),i&&(0,A.jsx)("p",{className:S.searchResultItemSummary,dangerouslySetInnerHTML:{__html:i}})]},t)}))}):[v&&!T.loading&&(0,A.jsx)("p",{children:(0,A.jsx)(P.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result",children:"No results were found"})},"no-results"),!!T.loading&&(0,A.jsx)("div",{className:S.loadingSpinner},"spinner")],T.hasMore&&(0,A.jsx)("div",{className:S.loader,ref:k,children:(0,A.jsx)(P.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results",children:"Fetching new results..."})})]})]})}function H(){return(0,A.jsx)(j.e3,{className:"search-page-wrapper",children:(0,A.jsx)(T,{})})}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.eb7bfe21.js.LICENSE.txt b/assets/js/1a4e3797.eb7bfe21.js.LICENSE.txt new file mode 100644 index 000000000..92dc1757f --- /dev/null +++ b/assets/js/1a4e3797.eb7bfe21.js.LICENSE.txt @@ -0,0 +1 @@ +/*! algoliasearch-lite.umd.js | 4.23.3 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/assets/js/1a5391ac.f630e9df.js b/assets/js/1a5391ac.f630e9df.js new file mode 100644 index 000000000..6d90e400d --- /dev/null +++ b/assets/js/1a5391ac.f630e9df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[9795],{3113:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>a,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var t=s(4848),r=s(8453);const i={},d="APIServer",c={id:"development/components/apiserver",title:"APIServer",description:"The APIServer is an optional component that can be used to describe a VoIP network in terms of Domains, Agents, Trunks, Numbers, and Peers. The data is stored in a PostgreSQL database and is accessed by other components via gRPC.",source:"@site/versioned_docs/version-2.0.0/development/components/apiserver.md",sourceDirName:"development/components",slug:"/development/components/apiserver",permalink:"/docs/2.0.0/development/components/apiserver",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/development/components/apiserver.md",tags:[],version:"2.0.0",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RTPRelay",permalink:"/docs/2.0.0/development/components/rtprelay"},next:{title:"SimpleAuth Service",permalink:"/docs/2.0.0/development/components/simpleauth"}},o={},l=[{value:"Configuration Spec",id:"configuration-spec",level:2},{value:"Communication and Protobuf Spec",id:"communication-and-protobuf-spec",level:2},{value:"Launching the APIServer",id:"launching-the-apiserver",level:2},{value:"Quick Test with gRPCurl",id:"quick-test-with-grpcurl",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"apiserver",children:"APIServer"}),"\n",(0,t.jsx)(n.p,{children:"The APIServer is an optional component that can be used to describe a VoIP network in terms of Domains, Agents, Trunks, Numbers, and Peers. The data is stored in a PostgreSQL database and is accessed by other components via gRPC."}),"\n",(0,t.jsxs)(n.p,{children:["The APIServer has two implementations: the ",(0,t.jsx)(n.code,{children:"pgdata"})," for persistent data storage in a PostgreSQL database and the ",(0,t.jsx)(n.code,{children:"simpledata"})," for storing data in files. The ",(0,t.jsx)(n.code,{children:"simpledata"})," implementation is intended for testing and small deployments."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"pgdata"})," has several advantages over the ",(0,t.jsx)(n.code,{children:"simpledata"})," implementation. The first advantage is that the ",(0,t.jsx)(n.code,{children:"pgdata"})," allows you to manage the data using the CTL and SDK. Additionally, all the data entities support the ",(0,t.jsx)(n.code,{children:"extended"})," attribute, enabling you to store additional data in the database in JSON format\u2014more on this in later sections."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Data Migration"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"pgdata"})," implementation uses ",(0,t.jsx)(n.a,{href:"https://www.prisma.io/",children:"Prisma"})," to manage the database schema. Prisma is important because it allows us to migrate the database schema to newer versions of Routr easily."]}),"\n",(0,t.jsx)(n.h2,{id:"configuration-spec",children:"Configuration Spec"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"pgdata"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"pgdata"})," has the following environment variables available for configuration:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"DATABASE_URL"})," - The URL of the PostgreSQL database. Example: ",(0,t.jsx)(n.code,{children:"postgresql://postgres:postgres@localhost:5432/routr"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BIND_ADDR"})," - The address where the APIServer will listen for gRPC requests. Default to ",(0,t.jsx)(n.code,{children:"0.0.0.0:51907"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"EXTERNAL_SERVER_BIND_ADDR"})," - The address where the APIServer will listen for HTTP requests. Default to ",(0,t.jsx)(n.code,{children:"0.0.0.0:51908"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"TLS_ON"})," - Enables TLS for the gRPC server. Default to ",(0,t.jsx)(n.code,{children:"false"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"VERIFY_CLIENT_CERT"})," - Enables client certificate verification. Default to ",(0,t.jsx)(n.code,{children:"false"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"CACERT"})," - The path to the CA certificate. Default to ",(0,t.jsx)(n.code,{children:"/etc/routr/certs/ca.crt"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"SERVER_CERT"})," - The path to the server certificate. Default to ",(0,t.jsx)(n.code,{children:"/etc/routr/certs/server.crt"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"ENFORCE_E164"})," - Enables E164 validation for Numbers. Default to ",(0,t.jsx)(n.code,{children:"false"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"ENFORCE_E164_WITH_MOBILE_PREFIX"})," - Enables E164 validation for Numbers with mobile prefixes. Default to ",(0,t.jsx)(n.code,{children:"false"})]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For details about connecting to the ",(0,t.jsx)(n.code,{children:"pgdata"})," to manage the data, see the ",(0,t.jsx)(n.a,{href:"/docs/2.0.0/connect/command-line/overview",children:"CTL"})," and ",(0,t.jsx)(n.a,{href:"/docs/2.0.0/connect/nodesdk/overview",children:"SDK"})," documentation."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"simpledata"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"simpledata"})," has the following environment variables available for configuration:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"PATH_TO_RESOURCES"})," - The path to the directory where the data will be stored. Example: ",(0,t.jsx)(n.code,{children:"/etc/routr/resources"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BIND_ADDR"})," - The address where the APIServer will listen for gRPC requests. Default to ",(0,t.jsx)(n.code,{children:"0.0.0.0:51907"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Both implementations provide Routr with the same protobuf interface, so you can switch between them without changing the other components."}),"\n",(0,t.jsx)(n.p,{children:"In your resources directory, you will find the following files:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"agents.yaml"})," - A list of Agents"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"domains.yaml"})," - A list of Domains to which Agents belong"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"trunks.yaml"})," - Represents the list of Trunks"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"numbers.yaml"})," - A list of Numbers to which Trunks belong"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"peers.yaml"})," - A list of Peers that cooperate with Routr (e.g., Asterisk, FreeSWITCH, etc.)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"credentials.yaml"})," - A list of Credentials for Peers and Agents"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"acl.yaml"})," - The list of ACLs"]}),"\n"]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["You may also provide a ",(0,t.jsx)(n.code,{children:".json"})," file instead of a ",(0,t.jsx)(n.code,{children:".yaml"})," file."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The Agents configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the Agent"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the Agent"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the Agent"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.username"})}),(0,t.jsx)(n.td,{children:"The username of the Agent"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.domainRef"})}),(0,t.jsx)(n.td,{children:"Reference to the Domain of the Agent"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.credentialsRef"})}),(0,t.jsx)(n.td,{children:"Reference to the Credentials of the Agent"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.privacy"})}),(0,t.jsxs)(n.td,{children:["The privacy settings of the Agent (",(0,t.jsx)(n.code,{children:"Private"})," or ",(0,t.jsx)(n.code,{children:"None"}),")"]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.enabled"})}),(0,t.jsx)(n.td,{children:"The enabled status of the Agent (reserved for future use)"}),(0,t.jsx)(n.td,{children:"No"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"An example of an Agents configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"agents.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'- apiVersion: v2beta1\n kind: Agent\n ref: agent-01\n metadata:\n name: John Doe\n spec:\n username: "1001"\n domainRef: domain-01\n credentialsRef: credentials-01\n privacy: Private\n'})}),"\n",(0,t.jsxs)(n.p,{children:["In the example above, the Agent ",(0,t.jsx)(n.code,{children:"agent-01"})," has the username ",(0,t.jsx)(n.code,{children:"1001"}),", belongs to the Domain ",(0,t.jsx)(n.code,{children:"domain-01"}),", and uses the Credentials ",(0,t.jsx)(n.code,{children:"credentials-01"}),". Both the Domain and the Credentials are required for the Agent to work."]}),"\n",(0,t.jsx)(n.p,{children:"The Domains configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the Domain"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the Domain"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the Domain"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.context.domainUri"})}),(0,t.jsx)(n.td,{children:"The domain URI"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.context.egressPolicies"})}),(0,t.jsx)(n.td,{children:"The list of egress policies"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.context.egressPolicies[*].rule"})}),(0,t.jsx)(n.td,{children:"The regular expression to match the number"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.context.egressPolicies[*].numberRef"})}),(0,t.jsx)(n.td,{children:"Reference to the Number"}),(0,t.jsx)(n.td,{children:"Yes"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"An example of a Domains configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"domains.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'- apiVersion: v2beta1\n kind: Domain\n ref: domain-01\n metadata:\n name: Local Domain\n spec:\n context:\n domainUri: sip.local\n egressPolicies:\n - rule: ".*"\n numberRef: number-01\n'})}),"\n",(0,t.jsxs)(n.p,{children:["In the example above, the Domain ",(0,t.jsx)(n.code,{children:"domain-01"})," has the Domain URI ",(0,t.jsx)(n.code,{children:"sip.local"})," and the egress policy ",(0,t.jsx)(n.code,{children:".*"})," that matches all numbers. The egress policy is associated with the Number ",(0,t.jsx)(n.code,{children:"number-01"}),". The Number ",(0,t.jsx)(n.code,{children:"number-01"})," is required for the Domain to work."]}),"\n",(0,t.jsx)(n.p,{children:"Numbers are used to route calls from and to the PSTN. The Numbers configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the Number"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the Number"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the Number"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.geoInfo.city"})}),(0,t.jsx)(n.td,{children:"The city where the Number is located"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.geoInfo.country"})}),(0,t.jsx)(n.td,{children:"The country where the Number is located"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.geoInfo.countryISOCode"})}),(0,t.jsx)(n.td,{children:"The ISO code of the country"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.trunkRef"})}),(0,t.jsx)(n.td,{children:"Reference to the Trunk"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.location.telUrl"})}),(0,t.jsx)(n.td,{children:"The tel URL of the Number"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.location.aorLink"})}),(0,t.jsx)(n.td,{children:"The Address of Record (AOR) of the Number"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.location.sessionAffinityHeader"})}),(0,t.jsx)(n.td,{children:"The session affinity header of the Number"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.location.extraHeaders"})}),(0,t.jsx)(n.td,{children:"The extra headers of the Number"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.location.extraHeaders[*].name"})}),(0,t.jsx)(n.td,{children:"The name of the extra header"}),(0,t.jsx)(n.td,{children:"Yes"})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["Tthe ' tel: ' scheme is required when setting the ",(0,t.jsx)(n.code,{children:"spec.location.telUrl"})," property. For example, ",(0,t.jsx)(n.code,{children:"tel:+17066041487"}),". Here, ",(0,t.jsx)(n.code,{children:"tel:"})," indicates that the URI is a telephone number. Please remember that it must match the number sent by your VoIP provider."]}),"\n",(0,t.jsxs)(n.p,{children:["Another important property is the ",(0,t.jsx)(n.code,{children:"spec.location.aorLink"}),". The important thing is that the AOR must be present in the location table in the Location Service. Otherwise, the call will fail. The AOR can be a SIP URI or a backend URI. Typically, you will use SIP URIs to route calls to Agents and backend URIs to route calls to Peers."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"spec.location.sessionAffinityHeader"}),' tells the Location Service to use a specific header to identify the session. This property is helpful in combination with "backend" URIs. For example, if you have a conference server and want to ensure that all calls to the same conference room are routed to the same server, you can use the ',(0,t.jsx)(n.code,{children:"X-Room-Id"})," header to identify the session. The Location Service will use the header's value to identify the session."]}),"\n",(0,t.jsx)(n.p,{children:"An example of a Numbers configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"numbers.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'- apiVersion: v2beta1\n kind: Number\n ref: number-01\n metadata:\n name: "(706)604-1487"\n geoInfo:\n city: Columbus, GA\n country: USA\n countryISOCode: US\n spec:\n trunkRef: trunk-01\n location:\n telUrl: tel:+17066041487\n aorLink: sip:conference@sip.local\n sessionAffinityHeader: X-Room-Id\n extraHeaders:\n - name: X-Room-Id\n value: jsa-shqm-iyo\n'})}),"\n",(0,t.jsx)(n.p,{children:"Numbers must be associated with a Trunk to work."}),"\n",(0,t.jsx)(n.p,{children:"The Trunks configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the Trunk"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the Trunk"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the Trunk"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.region"})}),(0,t.jsx)(n.td,{children:"Reserved for future use"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.inbound.uri"})}),(0,t.jsx)(n.td,{children:"The inbound URI of the Trunk"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.inbound.accessControlListRef"})}),(0,t.jsx)(n.td,{children:"Reference to the ACL of the Trunk"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.sendRegister"})}),(0,t.jsx)(n.td,{children:"Enables outbound registration"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.credentialsRef"})}),(0,t.jsx)(n.td,{children:"Reference to the Credentials of the Trunk"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris"})}),(0,t.jsx)(n.td,{children:"The list of outbound URIs"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].uri"})}),(0,t.jsx)(n.td,{children:"The outbound URI"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].priority"})}),(0,t.jsx)(n.td,{children:"Reserved for future use"}),(0,t.jsx)(n.td,{children:"NA"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].weight"})}),(0,t.jsx)(n.td,{children:"Reserved for future use"}),(0,t.jsx)(n.td,{children:"NA"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].enabled"})}),(0,t.jsx)(n.td,{children:"Reserved for future use"}),(0,t.jsx)(n.td,{children:"NA"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].transport"})}),(0,t.jsx)(n.td,{children:"The transport of the outbound URI"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].user"})}),(0,t.jsx)(n.td,{children:"The user of the outbound URI"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].host"})}),(0,t.jsx)(n.td,{children:"The host of the outbound URI"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.outbound.uris[*].port"})}),(0,t.jsx)(n.td,{children:"The port of the outbound URI"}),(0,t.jsx)(n.td,{children:"No"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"An example of a Trunks configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"trunks.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v2beta1\n kind: Trunk\n ref: trunk-01\n metadata:\n name: Test Trunk\n region: us-east1\n spec:\n inbound:\n uri: trunk01.acme.com\n accessControlListRef: acl-01\n outbound:\n sendRegister: true\n credentialsRef: credentials-04\n uris:\n - uri:\n user: pbx-1\n host: sip.provider.net\n port: 7060\n transport: udp\n enabled: true\n"})}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"spec.inbound"})," section, the ",(0,t.jsx)(n.code,{children:"uri"})," property helps Routr to identify the Trunk. Calls from the PSTN using the ",(0,t.jsx)(n.code,{children:"uri"})," will be routed to the Trunk. The ",(0,t.jsx)(n.code,{children:"accessControlListRef"})," property restricts the access to the Trunk. The ",(0,t.jsx)(n.code,{children:"accessControlListRef"})," is optional."]}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"spec.outbound"})," section, the ",(0,t.jsx)(n.code,{children:"sendRegister"})," property enables registration outbound registrations while the ",(0,t.jsx)(n.code,{children:"credentialsRef"})," property for authentication with your trunk provider."]}),"\n",(0,t.jsx)(n.p,{children:"In Routr, a Peer is a SIP entity that belongs to the same network as Routr. For example, Asterisk, FreeSWITCH, etc. The Peers configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the Peer"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the Peer"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the Peer"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.aor"})}),(0,t.jsx)(n.td,{children:"The Address of Record (AOR) of the Peer"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.username"})}),(0,t.jsx)(n.td,{children:"The username of the Peer"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.credentialsRef"})}),(0,t.jsx)(n.td,{children:"Reference to the Credentials of the Peer"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.loadBalancing.withSessionAffinity"})}),(0,t.jsx)(n.td,{children:"Enables session affinity"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.loadBalancing.algorithm"})}),(0,t.jsx)(n.td,{children:"The load balancing algorithm"}),(0,t.jsx)(n.td,{children:"No"})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"spec.loadBalancing.withSessionAffinity"})," property enables session affinity, and the ",(0,t.jsx)(n.code,{children:"spec.loadBalancing.algorithm"})," property sets the load-balancing algorithm. The available algorithms are ",(0,t.jsx)(n.code,{children:"least-sessions"})," and ",(0,t.jsx)(n.code,{children:"round-robin"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Remember that for the ",(0,t.jsx)(n.code,{children:"least-sessions"})," algorithm to work, your SIP backend includes the special header ",(0,t.jsx)(n.code,{children:"X-Session-Count"})," with the number of active sessions as part of the registration request."]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"We are evaluating more flexible options to provide the session count, but as of now, you also need to make sure that registration requests happen frequently enough to keep the session count up to date."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"An example of a Peers configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"peers.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v2beta1\n kind: Peer\n ref: peer-01\n metadata:\n name: Asterisk (Media Server)\n spec:\n aor: sip:conference@sip.local\n username: asterisk\n credentialsRef: credentials-03\n loadBalancing:\n withSessionAffinity: true\n algorithm: least-sessions\n"})}),"\n",(0,t.jsx)(n.p,{children:"Credentials in Routr help Agents and Peers authenticate with Routr."}),"\n",(0,t.jsx)(n.p,{children:"The Credentials configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the Credentials"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the Credentials"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the Credentials"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.credentials.username"})}),(0,t.jsx)(n.td,{children:"The username of the Credentials"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.credentials.password"})}),(0,t.jsx)(n.td,{children:"The password of the Credentials"}),(0,t.jsx)(n.td,{children:"Yes"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"An example of a Credentials configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"credentials.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:'- apiVersion: v2beta1\n kind: Credentials\n ref: credentials-01\n metadata:\n name: Agent Credentials\n spec:\n credentials:\n username: "1001"\n password: "1234"\n'})}),"\n",(0,t.jsx)(n.p,{children:"Routr also supports ACLs. ACLs are used to restrict access to Trunks and Domains."}),"\n",(0,t.jsx)(n.p,{children:"The ACLs configuration file has the following structure:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Property"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"apiVersion"})}),(0,t.jsx)(n.td,{children:"The API version of the ACL"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"kind"})}),(0,t.jsx)(n.td,{children:"The kind of resource"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ref"})}),(0,t.jsx)(n.td,{children:"Reference to the ACL"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"metadata.name"})}),(0,t.jsx)(n.td,{children:"A friendly name for the ACL"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.accessControlList.deny"})}),(0,t.jsx)(n.td,{children:"The list of deny rules"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.accessControlList.deny[*]"})}),(0,t.jsx)(n.td,{children:"The deny rule"}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.accessControlList.allow"})}),(0,t.jsx)(n.td,{children:"The list of allow rules"}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"spec.accessControlList.allow[*]"})}),(0,t.jsx)(n.td,{children:"The allow rule"}),(0,t.jsx)(n.td,{children:"Yes"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"An example of an ACLs configuration file:"}),"\n",(0,t.jsxs)(n.p,{children:["Filename: ",(0,t.jsx)(n.code,{children:"acl.yaml"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v2beta1\n kind: AccessControlList\n ref: acl-01\n metadata:\n name: Europe ACL\n spec:\n accessControlList:\n deny:\n - 0.0.0.0/1\n allow:\n - 192.168.1.3/31\n - 127.0.0.1/8\n - 10.111.221.22/31\n"})}),"\n",(0,t.jsx)(n.h2,{id:"communication-and-protobuf-spec",children:"Communication and Protobuf Spec"}),"\n",(0,t.jsx)(n.p,{children:"Components communicate with the APIServer using gRPC. That includes SDKs, Command-line tools, Processors, Middleware, etc."}),"\n",(0,t.jsx)(n.p,{children:"The following protobuf defines the Agent service interface:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-protobuf",children:'syntax = "proto3";\n\npackage fonoster.routr.connect.agents.v2beta1;\n\n// The Agents service definition\nservice Agents {\n // Creates a new Agent\n rpc Create (CreateAgentRequest) returns (Agent) {}\n // Updates an existing Agent\n rpc Update (UpdateAgentRequest) returns (Agent) {}\n // Gets an existing Agent\n rpc Get (GetAgentRequest) returns (Agent) {}\n // Deletes an existing Agent\n rpc Delete (DeleteAgentRequest) returns (.google.protobuf.Empty) {}\n // Lists all Agents\n rpc List (ListAgentsRequest) returns (ListAgentsResponse) {}\n // Find Agents by field name and value\n rpc FindBy (FindByRequest) returns (FindByResponse) {}\n}\n\nenum Privacy {\n PRIVATE = 0;\n NONE = 1;\n}\n\n// The message for the Agent resource\nmessage Agent {\n // The API version of the Agent\n string api_version = 1;\n // The unique identifier of the Agent\n string ref = 2;\n // The name of the Agent\n string name = 3;\n // The username of the Agent\n string username = 4;\n // The password of the Agent\n Privacy privacy = 5;\n // The enabled status of the Agent\n bool enabled = 6;\n // The created_at timestamp of the Agent\n int32 created_at = 7;\n // The updated_at timestamp of the Agent\n int32 updated_at = 8;\n // The domain of the Agent\n fonoster.routr.connect.domains.v2beta1.Domain domain = 9;\n // The credentials of the Agent\n fonoster.routr.connect.credentials.v2beta1.Credentials credentials = 10;\n // The extended attributes of the Agent\n .google.protobuf.Struct extended = 11; \n}\n\n// The request message for the Agents.Create method\nmessage CreateAgentRequest {\n // The name of the Agent\n string name = 1;\n // The username of the Agent\n string username = 2;\n // The password of the Agent\n Privacy privacy = 3;\n // The enabled status of the Agent\n bool enabled = 4;\n // Reference to the Domain of the Agent\n string domain_ref = 5;\n // Reference to the Credentials of the Agent\n string credentials_ref = 6;\n // The extended attributes of the Agent\n .google.protobuf.Struct extended = 7; \n}\n\n// The request message for the Agents.Update method\nmessage UpdateAgentRequest {\n // The unique identifier of the Agent\n string ref = 1;\n // The name of the Agent\n string name = 2;\n // The privacy settings of the Agent\n Privacy privacy = 3;\n // The enabled status of the Agent\n bool enabled = 4;\n // Reference to the Domain of the Agent\n string domain_ref = 5;\n // Reference to the Credentials of the Agent\n string credentials_ref = 6;\n // The extended attributes of the Agent\n .google.protobuf.Struct extended = 7;\n}\n\n// The request message for the Agents.Get method\nmessage GetAgentRequest {\n // The unique identifier of the Agent\n string ref = 1;\n}\n\n// The request message for the Agents.Delete method\nmessage DeleteAgentRequest {\n // The unique identifier of the Agent\n string ref = 1;\n}\n\n// The request message for the Agents.FindBy method\nmessage FindByRequest {\n // The field name to search\n string field_name = 1;\n // The value to search\n string field_value = 2;\n}\n\n// The response message for the Agents.FindBy method\nmessage FindByResponse {\n // The list of Agents\n repeated Agent items = 1;\n} \n\n// The request message for the Agents.List method\nmessage ListAgentsRequest {\n // The maximum number of items in the list\n int32 page_size = 1;\n\n // The next_page_token value returned from the previous request, if any\n string page_token = 2;\n}\n\n// The response message for the Agents.List method\nmessage ListAgentsResponse {\n // List of Agents\n repeated Agent items = 1;\n\n // Token to retrieve the next page of results or empty if there are no more results in the list\n string next_page_token = 2;\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["To see the complete protobuf spec, please visit the ",(0,t.jsx)(n.a,{href:"https://github.com/fonoster/routr/tree/main/mods/common/src/connect/protos",children:"protobuf directory."})]}),"\n",(0,t.jsx)(n.h2,{id:"launching-the-apiserver",children:"Launching the APIServer"}),"\n",(0,t.jsxs)(n.p,{children:["Both implementations are available as Docker images from Docker Hub as ",(0,t.jsx)(n.code,{children:"fonoster/routr-pgdata"})," and ",(0,t.jsx)(n.code,{children:"fonoster/routr-simpledata"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"pgdata"})}),"\n",(0,t.jsxs)(n.p,{children:["To launch the ",(0,t.jsx)(n.code,{children:"pgdata"})," implementation with Docker, you can use the following command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'docker run -it \\\n -e DATABASE_URL="postgresql://postgres:postgres@localhost:5432/routr" \\\n -p 51907:51907 \\\n -p 51908:51908 \\\n fonoster/routr-pgdata\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The port ",(0,t.jsx)(n.code,{children:"51907"})," is used for internal communication, and the port ",(0,t.jsx)(n.code,{children:"51908"})," is used for external communication. The CTL and SDK use the external port to manage the data."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"simpledata"})}),"\n",(0,t.jsxs)(n.p,{children:["To launch the ",(0,t.jsx)(n.code,{children:"simpledata"})," implementation with Docker, you can use the following command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker run -it \\\n -v /path/to/resources:/etc/routr/resources \\\n -p 51907:51907 \\\n fonoster/routr-simpledata\n"})}),"\n",(0,t.jsx)(n.h2,{id:"quick-test-with-grpcurl",children:"Quick Test with gRPCurl"}),"\n",(0,t.jsxs)(n.p,{children:["One easy way to interact with the APIServer for testing and development is to use ",(0,t.jsx)(n.a,{href:"https://github.com/fullstorydev/grpcurl",children:"gRPCurl"}),". The following example shows how to send a request to the Agents service within the APIServer:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"grpcurl -plaintext \\\n -import-path /path/to/protos \\\n -proto agents.proto -d '{...}' \\\n localhost:51907 \\\n fonoster.routr.connect.agents.v2beta1.Agents/Get\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Please remember that the ",(0,t.jsx)(n.code,{children:"simpledata"})," implementation does not accept write operations."]})]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>d,x:()=>c});var t=s(6540);const r={},i=t.createContext(r);function d(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ad9bfe0.169bd2e0.js b/assets/js/1ad9bfe0.169bd2e0.js new file mode 100644 index 000000000..0cf8ca1cb --- /dev/null +++ b/assets/js/1ad9bfe0.169bd2e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[3383],{9760:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>a});var n=o(4848),r=o(8453);const c={},s="Orchestration with Docker",i={id:"development/orchestration-with-docker",title:"Orchestration with Docker",description:"Coming soon.",source:"@site/docs/development/orchestration-with-docker.md",sourceDirName:"development",slug:"/development/orchestration-with-docker",permalink:"/docs/2.11.5/development/orchestration-with-docker",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/orchestration-with-docker.md",tags:[],version:"current",frontMatter:{}},d={},a=[];function h(t){const e={h1:"h1",p:"p",...(0,r.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{id:"orchestration-with-docker",children:"Orchestration with Docker"}),"\n",(0,n.jsx)(e.p,{children:"Coming soon."})]})}function u(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(h,{...t})}):h(t)}},8453:(t,e,o)=>{o.d(e,{R:()=>s,x:()=>i});var n=o(6540);const r={},c=n.createContext(r);function s(t){const e=n.useContext(c);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function i(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),n.createElement(c.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ad9bfe0.ba73e09d.js b/assets/js/1ad9bfe0.ba73e09d.js deleted file mode 100644 index fe5065bef..000000000 --- a/assets/js/1ad9bfe0.ba73e09d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[3383],{6807:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>a});var n=o(4848),r=o(8453);const c={},s="Orchestration with Docker",i={id:"development/orchestration-with-docker",title:"Orchestration with Docker",description:"Coming soon.",source:"@site/docs/development/orchestration-with-docker.md",sourceDirName:"development",slug:"/development/orchestration-with-docker",permalink:"/docs/2.0.0/development/orchestration-with-docker",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/orchestration-with-docker.md",tags:[],version:"current",frontMatter:{}},d={},a=[];function h(t){const e={h1:"h1",p:"p",...(0,r.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{id:"orchestration-with-docker",children:"Orchestration with Docker"}),"\n",(0,n.jsx)(e.p,{children:"Coming soon."})]})}function u(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(h,{...t})}):h(t)}},8453:(t,e,o)=>{o.d(e,{R:()=>s,x:()=>i});var n=o(6540);const r={},c=n.createContext(r);function s(t){const e=n.useContext(c);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function i(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),n.createElement(c.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b166456.afa392b3.js b/assets/js/1b166456.4275854e.js similarity index 97% rename from assets/js/1b166456.afa392b3.js rename to assets/js/1b166456.4275854e.js index bf05d0a67..5eed1992f 100644 --- a/assets/js/1b166456.afa392b3.js +++ b/assets/js/1b166456.4275854e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[208],{9778:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var t=s(4848),r=s(8453);const o={},i="getServerInfo",a={id:"api/sys/info",title:"getServerInfo",description:"This method returns information about the server.",source:"@site/versioned_docs/version-1.x.x/api/sys/info.md",sourceDirName:"api/sys",slug:"/api/sys/info",permalink:"/docs/1.x.x/api/sys/info",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/sys/info.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"restartServer",permalink:"/docs/1.x.x/api/status/update"},next:{title:"getServerLogs",permalink:"/docs/1.x.x/api/sys/logs"}},c={},d=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"getserverinfo",children:"getServerInfo"}),"\n",(0,t.jsx)(n.p,{children:"This method returns information about the server."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"URL"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"/system/info"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Method"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"GET"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,t.jsx)(n.p,{children:"This method does not receive any parameters."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Request body"})}),"\n",(0,t.jsx)(n.p,{children:"Do not supply a request body with this method."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Response"})}),"\n",(0,t.jsx)(n.p,{children:"If successful this method returns relevant information about the server."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Sample Call"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'GET /api/{apiversion}/system/info\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status":200,\n "message":"Successful request",\n "data":{\n "version":"v1.0",\n "apiVersion":"v1beta1",\n "apiPath":"/api/v1beta1",\n "env":[\n {\n "var":"EXTERN_ADDR",\n "value":"172.220.246.46"\n },\n {\n "var":"LOCALNETS",\n "value": "192.168.1.149/31"\n },\n {\n "var":"REGISTRAR_INTF",\n "value": "External"\n }\n ]\n }\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var t=s(6540);const r={},o=t.createContext(r);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[208],{7499:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var t=s(4848),r=s(8453);const o={},i="getServerInfo",a={id:"api/sys/info",title:"getServerInfo",description:"This method returns information about the server.",source:"@site/versioned_docs/version-1.x.x/api/sys/info.md",sourceDirName:"api/sys",slug:"/api/sys/info",permalink:"/docs/1.x.x/api/sys/info",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/sys/info.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"restartServer",permalink:"/docs/1.x.x/api/status/update"},next:{title:"getServerLogs",permalink:"/docs/1.x.x/api/sys/logs"}},c={},d=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"getserverinfo",children:"getServerInfo"}),"\n",(0,t.jsx)(n.p,{children:"This method returns information about the server."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"URL"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"/system/info"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Method"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"GET"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,t.jsx)(n.p,{children:"This method does not receive any parameters."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Request body"})}),"\n",(0,t.jsx)(n.p,{children:"Do not supply a request body with this method."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Response"})}),"\n",(0,t.jsx)(n.p,{children:"If successful this method returns relevant information about the server."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Sample Call"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'GET /api/{apiversion}/system/info\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status":200,\n "message":"Successful request",\n "data":{\n "version":"v1.0",\n "apiVersion":"v1beta1",\n "apiPath":"/api/v1beta1",\n "env":[\n {\n "var":"EXTERN_ADDR",\n "value":"172.220.246.46"\n },\n {\n "var":"LOCALNETS",\n "value": "192.168.1.149/31"\n },\n {\n "var":"REGISTRAR_INTF",\n "value": "External"\n }\n ]\n }\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var t=s(6540);const r={},o=t.createContext(r);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b36d84b.233d8a82.js b/assets/js/1b36d84b.233d8a82.js new file mode 100644 index 000000000..ed4ac040a --- /dev/null +++ b/assets/js/1b36d84b.233d8a82.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[751],{4754:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>a});var n=o(4848),r=o(8453);const s={},c="Orchestration with Docker",i={id:"development/orchestration-with-docker",title:"Orchestration with Docker",description:"Coming soon.",source:"@site/versioned_docs/version-2.0.0/development/orchestration-with-docker.md",sourceDirName:"development",slug:"/development/orchestration-with-docker",permalink:"/docs/2.0.0/development/orchestration-with-docker",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/development/orchestration-with-docker.md",tags:[],version:"2.0.0",frontMatter:{}},d={},a=[];function h(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"orchestration-with-docker",children:"Orchestration with Docker"}),"\n",(0,n.jsx)(t.p,{children:"Coming soon."})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>c,x:()=>i});var n=o(6540);const r={},s=n.createContext(r);function c(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1caae7f3.a5685f41.js b/assets/js/1caae7f3.a5685f41.js new file mode 100644 index 000000000..7af92c77f --- /dev/null +++ b/assets/js/1caae7f3.a5685f41.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[5188],{2214:(t,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>u});var r=o(4848),e=o(8453);const s={},i="Load-balancing Asterisk with Routr",a={id:"tutorials/load-balancing-asterisk-with-routr",title:"Load-balancing Asterisk with Routr",description:"Coming soon.",source:"@site/versioned_docs/version-2.0.0/tutorials/load-balancing-asterisk-with-routr.md",sourceDirName:"tutorials",slug:"/tutorials/load-balancing-asterisk-with-routr",permalink:"/docs/2.0.0/tutorials/load-balancing-asterisk-with-routr",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/tutorials/load-balancing-asterisk-with-routr.md",tags:[],version:"2.0.0",frontMatter:{}},c={},u=[];function l(t){const n={h1:"h1",p:"p",...(0,e.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"load-balancing-asterisk-with-routr",children:"Load-balancing Asterisk with Routr"}),"\n",(0,r.jsx)(n.p,{children:"Coming soon."})]})}function d(t={}){const{wrapper:n}={...(0,e.R)(),...t.components};return n?(0,r.jsx)(n,{...t,children:(0,r.jsx)(l,{...t})}):l(t)}},8453:(t,n,o)=>{o.d(n,{R:()=>i,x:()=>a});var r=o(6540);const e={},s=r.createContext(e);function i(t){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof t?t(n):{...n,...t}}),[n,t])}function a(t){let n;return n=t.disableParentContext?"function"==typeof t.components?t.components(e):t.components||e:i(t.components),r.createElement(s.Provider,{value:n},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/1cd31f12.a5a94d63.js b/assets/js/1cd31f12.c59917a2.js similarity index 98% rename from assets/js/1cd31f12.a5a94d63.js rename to assets/js/1cd31f12.c59917a2.js index 4bfc95b5e..8d7edb02a 100644 --- a/assets/js/1cd31f12.a5a94d63.js +++ b/assets/js/1cd31f12.c59917a2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[5056],{5622:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var s=n(4848),r=n(8453);const i={},d="deleteAgent",l={id:"api/agents/delete",title:"deleteAgent",description:"Removes an Agent resource from a persistent database.",source:"@site/versioned_docs/version-1.x.x/api/agents/delete.md",sourceDirName:"api/agents",slug:"/api/agents/delete",permalink:"/docs/1.x.x/api/agents/delete",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/agents/delete.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"createAgent",permalink:"/docs/1.x.x/api/agents/create"},next:{title:"getAgent",permalink:"/docs/1.x.x/api/agents/get"}},o={},c=[];function a(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"deleteagent",children:"deleteAgent"}),"\n",(0,s.jsx)(t.p,{children:"Removes an Agent resource from a persistent database."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"URL"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"/agents/{ref}"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Method"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"DELETE"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"ref"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"string"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Resource reference"})]})})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Request body"})}),"\n",(0,s.jsx)(t.p,{children:"Do not supply a request body with this method."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Response"})}),"\n",(0,s.jsx)(t.p,{children:"If successful this method removes an Agent resource."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Sample Call"})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'DELETE /api/v1beta1/agents/ag3f77f6\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>l});var s=n(6540);const r={},i=s.createContext(r);function d(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[5056],{1597:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var s=n(4848),r=n(8453);const i={},d="deleteAgent",l={id:"api/agents/delete",title:"deleteAgent",description:"Removes an Agent resource from a persistent database.",source:"@site/versioned_docs/version-1.x.x/api/agents/delete.md",sourceDirName:"api/agents",slug:"/api/agents/delete",permalink:"/docs/1.x.x/api/agents/delete",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/agents/delete.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"createAgent",permalink:"/docs/1.x.x/api/agents/create"},next:{title:"getAgent",permalink:"/docs/1.x.x/api/agents/get"}},o={},c=[];function a(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"deleteagent",children:"deleteAgent"}),"\n",(0,s.jsx)(t.p,{children:"Removes an Agent resource from a persistent database."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"URL"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"/agents/{ref}"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Method"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"DELETE"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"ref"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"string"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Resource reference"})]})})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Request body"})}),"\n",(0,s.jsx)(t.p,{children:"Do not supply a request body with this method."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Response"})}),"\n",(0,s.jsx)(t.p,{children:"If successful this method removes an Agent resource."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Sample Call"})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'DELETE /api/v1beta1/agents/ag3f77f6\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>l});var s=n(6540);const r={},i=s.createContext(r);function d(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1da39e10.c8be82ed.js b/assets/js/1da39e10.c8be82ed.js new file mode 100644 index 000000000..44f069de0 --- /dev/null +++ b/assets/js/1da39e10.c8be82ed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6593],{3473:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>v,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var n=o(4848),r=o(8453);const i={},s="Overview",a={id:"development/alterations/overview",title:"Overview",description:"Coming soon.",source:"@site/versioned_docs/version-2.0.0/development/alterations/overview.md",sourceDirName:"development/alterations",slug:"/development/alterations/overview",permalink:"/docs/2.0.0/development/alterations/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/development/alterations/overview.md",tags:[],version:"2.0.0",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SimpleAuth Service",permalink:"/docs/2.0.0/development/components/simpleauth"},next:{title:"Alteration Methods",permalink:"/docs/2.0.0/development/alterations/methods"}},c={},d=[];function l(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"overview",children:"Overview"}),"\n",(0,n.jsx)(t.p,{children:"Coming soon."})]})}function v(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var n=o(6540);const r={},i=n.createContext(r);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ea220c7.919e9360.js b/assets/js/1ea220c7.65bd37b3.js similarity index 97% rename from assets/js/1ea220c7.919e9360.js rename to assets/js/1ea220c7.65bd37b3.js index e26bbaa39..ec4d21d7b 100644 --- a/assets/js/1ea220c7.919e9360.js +++ b/assets/js/1ea220c7.65bd37b3.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6792],{1009:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>u,default:()=>a,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var t=r(4848),s=r(8453);const o={},u="Running on Kubernetes",i={id:"guides/running-on-kubernetes",title:"Running on Kubernetes",description:"This document is a short guide about running the dockerized version of Routr Server on Kubernetes.",source:"@site/versioned_docs/version-1.x.x/guides/running-on-kubernetes.md",sourceDirName:"guides",slug:"/guides/running-on-kubernetes",permalink:"/docs/1.x.x/guides/running-on-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/guides/running-on-kubernetes.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Routr as Asterisk frontend",permalink:"/docs/1.x.x/guides/routr-as-asterisk-frontend"},next:{title:"Running with Docker",permalink:"/docs/1.x.x/guides/running-with-docker-or-compose"}},c={},d=[{value:"Run in Kubernetes",id:"run-in-kubernetes",level:2}];function l(e){const n={blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"running-on-kubernetes",children:"Running on Kubernetes"}),"\n",(0,t.jsx)(n.p,{children:"This document is a short guide about running the dockerized version of Routr Server on Kubernetes."}),"\n",(0,t.jsx)(n.h2,{id:"run-in-kubernetes",children:"Run in Kubernetes"}),"\n",(0,t.jsxs)(n.p,{children:["To run Routr in Kubernetes, you must set your EXTERN_ADDR in ",(0,t.jsx)(n.code,{children:".k8s/routr.yml"}),"."]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"This variable must be set to the public address(if running Routr locally, use your host address)"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Additionally, you must create the following Kubernetes resources:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"kubectl create -f k8s/configmaps.yml\nkubectl create -f k8s/redis.yml\nkubectl create -f k8s/routr.yml\n"})})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>u,x:()=>i});var t=r(6540);const s={},o=t.createContext(s);function u(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:u(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6792],{9952:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>u,default:()=>a,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var t=r(4848),s=r(8453);const o={},u="Running on Kubernetes",i={id:"guides/running-on-kubernetes",title:"Running on Kubernetes",description:"This document is a short guide about running the dockerized version of Routr Server on Kubernetes.",source:"@site/versioned_docs/version-1.x.x/guides/running-on-kubernetes.md",sourceDirName:"guides",slug:"/guides/running-on-kubernetes",permalink:"/docs/1.x.x/guides/running-on-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/guides/running-on-kubernetes.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Routr as Asterisk frontend",permalink:"/docs/1.x.x/guides/routr-as-asterisk-frontend"},next:{title:"Running with Docker",permalink:"/docs/1.x.x/guides/running-with-docker-or-compose"}},c={},d=[{value:"Run in Kubernetes",id:"run-in-kubernetes",level:2}];function l(e){const n={blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"running-on-kubernetes",children:"Running on Kubernetes"}),"\n",(0,t.jsx)(n.p,{children:"This document is a short guide about running the dockerized version of Routr Server on Kubernetes."}),"\n",(0,t.jsx)(n.h2,{id:"run-in-kubernetes",children:"Run in Kubernetes"}),"\n",(0,t.jsxs)(n.p,{children:["To run Routr in Kubernetes, you must set your EXTERN_ADDR in ",(0,t.jsx)(n.code,{children:".k8s/routr.yml"}),"."]}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"This variable must be set to the public address(if running Routr locally, use your host address)"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Additionally, you must create the following Kubernetes resources:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"kubectl create -f k8s/configmaps.yml\nkubectl create -f k8s/redis.yml\nkubectl create -f k8s/routr.yml\n"})})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>u,x:()=>i});var t=r(6540);const s={},o=t.createContext(s);function u(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:u(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ffdd7de.43072233.js b/assets/js/1ffdd7de.43072233.js deleted file mode 100644 index 4f796393f..000000000 --- a/assets/js/1ffdd7de.43072233.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[7782],{3437:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>n,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>u});var o=r(4848),s=r(8453);const i={},n="FAQs",a={id:"faqs",title:"FAQs",description:"What is Routr?",source:"@site/docs/faqs.md",sourceDirName:".",slug:"/faqs",permalink:"/docs/2.0.0/faqs",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/faqs.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Contributing Guide",permalink:"/docs/2.0.0/contributing"},next:{title:"Changelog",permalink:"/docs/2.0.0/changelog"}},c={},u=[{value:"What is Routr?",id:"what-is-routr",level:2},{value:"What dependencies does Routr have?",id:"what-dependencies-does-routr-have",level:2},{value:"How does Routr compare with other SIP servers",id:"how-does-routr-compare-with-other-sip-servers",level:2},{value:"Is Routr a Media Server?",id:"is-routr-a-media-server",level:2},{value:"Which language is the team using to build Routr?",id:"which-language-is-the-team-using-to-build-routr",level:2},{value:"What license does Routr use?",id:"what-license-does-routr-use",level:2}];function d(e){const t={a:"a",blockquote:"blockquote",h1:"h1",h2:"h2",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"faqs",children:"FAQs"}),"\n",(0,o.jsx)(t.h2,{id:"what-is-routr",children:"What is Routr?"}),"\n",(0,o.jsx)(t.p,{children:"Routr is a lightweight SIP proxy, location server, registrar, and foundational element for your SIP infrastructure. Due to its modular design, you can enhance Routr's capabilities by integrating custom modules, which we call Processors and Middlewares. Our primary objective is to help you incorporate real-time communication into your application or service."}),"\n",(0,o.jsx)(t.h2,{id:"what-dependencies-does-routr-have",children:"What dependencies does Routr have?"}),"\n",(0,o.jsx)(t.p,{children:"The Core of Routr has no external dependencies, although you might need Redis in certain situations. For example, if you need to scale the Location service horizontally, use Redis as a shared cache."}),"\n",(0,o.jsx)(t.p,{children:"In Connect Mode, Routr relies on PostgreSQL and Redis. However, you can orchestrate both dependencies using Docker Compose or Kubernetes."}),"\n",(0,o.jsx)(t.h2,{id:"how-does-routr-compare-with-other-sip-servers",children:"How does Routr compare with other SIP servers"}),"\n",(0,o.jsx)(t.p,{children:"Routr is similar to Kamalio and OpenSIPS because it is a programmable SIP server. However, Routr architecture is different. In Routr, we use a microservice architecture, meaning each component is a separate service. This design allows you to scale each service independently."}),"\n",(0,o.jsx)(t.p,{children:"For example, adding more service instances can scale the Location service horizontally. This design also allows you to replace any component with your implementation. For example, you can implement your security Middleware and replace the default one."}),"\n",(0,o.jsx)(t.h2,{id:"is-routr-a-media-server",children:"Is Routr a Media Server?"}),"\n",(0,o.jsx)(t.p,{children:"Routr is not a media server. By itself, Routr does not handle media. However, you can use Routr as a frontend for FreeSWITCH or Asterisk."}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsx)(t.p,{children:"This is useful when you need load balancing"}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"which-language-is-the-team-using-to-build-routr",children:"Which language is the team using to build Routr?"}),"\n",(0,o.jsx)(t.p,{children:"The EdgePort, which processes SIP messages, is written in Java. We implement the rest of the services using NodeJS."}),"\n",(0,o.jsx)(t.h2,{id:"what-license-does-routr-use",children:"What license does Routr use?"}),"\n",(0,o.jsxs)(t.p,{children:["We release Routr under the ",(0,o.jsx)(t.a,{href:"https://github.com/fonoster/routr/blob/main/LICENSE",children:"MIT license"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>n,x:()=>a});var o=r(6540);const s={},i=o.createContext(s);function n(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:n(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ffdd7de.a6f4c3c4.js b/assets/js/1ffdd7de.a6f4c3c4.js new file mode 100644 index 000000000..a3179697d --- /dev/null +++ b/assets/js/1ffdd7de.a6f4c3c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[7782],{5888:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>n,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>u});var o=r(4848),s=r(8453);const i={},n="FAQs",a={id:"faqs",title:"FAQs",description:"What is Routr?",source:"@site/docs/faqs.md",sourceDirName:".",slug:"/faqs",permalink:"/docs/2.11.5/faqs",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/faqs.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Contributing Guide",permalink:"/docs/2.11.5/contributing"},next:{title:"Changelog",permalink:"/docs/2.11.5/changelog"}},c={},u=[{value:"What is Routr?",id:"what-is-routr",level:2},{value:"What dependencies does Routr have?",id:"what-dependencies-does-routr-have",level:2},{value:"How does Routr compare with other SIP servers",id:"how-does-routr-compare-with-other-sip-servers",level:2},{value:"Is Routr a Media Server?",id:"is-routr-a-media-server",level:2},{value:"Which language is the team using to build Routr?",id:"which-language-is-the-team-using-to-build-routr",level:2},{value:"What license does Routr use?",id:"what-license-does-routr-use",level:2}];function d(e){const t={a:"a",blockquote:"blockquote",h1:"h1",h2:"h2",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"faqs",children:"FAQs"}),"\n",(0,o.jsx)(t.h2,{id:"what-is-routr",children:"What is Routr?"}),"\n",(0,o.jsx)(t.p,{children:"Routr is a lightweight SIP proxy, location server, registrar, and foundational element for your SIP infrastructure. Due to its modular design, you can enhance Routr's capabilities by integrating custom modules, which we call Processors and Middlewares. Our primary objective is to help you incorporate real-time communication into your application or service."}),"\n",(0,o.jsx)(t.h2,{id:"what-dependencies-does-routr-have",children:"What dependencies does Routr have?"}),"\n",(0,o.jsx)(t.p,{children:"The Core of Routr has no external dependencies, although you might need Redis in certain situations. For example, if you need to scale the Location service horizontally, use Redis as a shared cache."}),"\n",(0,o.jsx)(t.p,{children:"In Connect Mode, Routr relies on PostgreSQL and Redis. However, you can orchestrate both dependencies using Docker Compose or Kubernetes."}),"\n",(0,o.jsx)(t.h2,{id:"how-does-routr-compare-with-other-sip-servers",children:"How does Routr compare with other SIP servers"}),"\n",(0,o.jsx)(t.p,{children:"Routr is similar to Kamalio and OpenSIPS because it is a programmable SIP server. However, Routr architecture is different. In Routr, we use a microservice architecture, meaning each component is a separate service. This design allows you to scale each service independently."}),"\n",(0,o.jsx)(t.p,{children:"For example, adding more service instances can scale the Location service horizontally. This design also allows you to replace any component with your implementation. For example, you can implement your security Middleware and replace the default one."}),"\n",(0,o.jsx)(t.h2,{id:"is-routr-a-media-server",children:"Is Routr a Media Server?"}),"\n",(0,o.jsx)(t.p,{children:"Routr is not a media server. By itself, Routr does not handle media. However, you can use Routr as a frontend for FreeSWITCH or Asterisk."}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsx)(t.p,{children:"This is useful when you need load balancing"}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"which-language-is-the-team-using-to-build-routr",children:"Which language is the team using to build Routr?"}),"\n",(0,o.jsx)(t.p,{children:"The EdgePort, which processes SIP messages, is written in Java. We implement the rest of the services using NodeJS."}),"\n",(0,o.jsx)(t.h2,{id:"what-license-does-routr-use",children:"What license does Routr use?"}),"\n",(0,o.jsxs)(t.p,{children:["We release Routr under the ",(0,o.jsx)(t.a,{href:"https://github.com/fonoster/routr/blob/main/LICENSE",children:"MIT license"}),"."]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>n,x:()=>a});var o=r(6540);const s={},i=o.createContext(s);function n(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:n(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/210b7c69.543dacd7.js b/assets/js/210b7c69.543dacd7.js new file mode 100644 index 000000000..7517a1c45 --- /dev/null +++ b/assets/js/210b7c69.543dacd7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[1703],{5054:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var s=t(4848),o=t(8453);const r={},i="SimpleAuth Service",a={id:"development/components/simpleauth",title:"SimpleAuth Service",description:"The SimpleAuth component is an optional middleware service to authenticate SIP requests in Routr. The SimpleAuth is ideal for testing and small deployments.",source:"@site/docs/development/components/simpleauth.md",sourceDirName:"development/components",slug:"/development/components/simpleauth",permalink:"/docs/2.11.5/development/components/simpleauth",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/components/simpleauth.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"APIServer",permalink:"/docs/2.11.5/development/components/apiserver"},next:{title:"Overview",permalink:"/docs/2.11.5/development/alterations/overview"}},c={},l=[{value:"Configuration Spec",id:"configuration-spec",level:2},{value:"Communication and Protobuf Spec",id:"communication-and-protobuf-spec",level:2},{value:"Launching the SimpleAuth with Docker",id:"launching-the-simpleauth-with-docker",level:2},{value:"Quick Test with gRPCurl",id:"quick-test-with-grpcurl",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"simpleauth-service",children:"SimpleAuth Service"}),"\n",(0,s.jsx)(n.p,{children:"The SimpleAuth component is an optional middleware service to authenticate SIP requests in Routr. The SimpleAuth is ideal for testing and small deployments."}),"\n",(0,s.jsx)(n.h2,{id:"configuration-spec",children:"Configuration Spec"}),"\n",(0,s.jsx)(n.p,{children:"The SimpleAuth provides the following environment variables for configuration:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"BIND_ADDR"})," - The address where the service will listen for gRPC requests. Default: ",(0,s.jsx)(n.code,{children:"0.0.0.0:51903"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ALLOWLIST"})," - A comma-separated list of Users allowed to bypass authentication"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"METHODS"})," - A comma-separated list of SIP methods that require authentication (e.g., ",(0,s.jsx)(n.code,{children:"INVITE, REGISTER, MESSAGE"}),"). Required."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"PATH_TO_AUTH"})," - The path to a file containing the credentials for the users"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Example of the authentication file:"}),"\n",(0,s.jsxs)(n.p,{children:["Filename ",(0,s.jsx)(n.code,{children:"auth.json"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'[\n { \n "username": "1001", \n "secret": "1234" \n },\n { \n "username": "john",\n "secret": "1234" \n }\n]\n'})}),"\n",(0,s.jsx)(n.h2,{id:"communication-and-protobuf-spec",children:"Communication and Protobuf Spec"}),"\n",(0,s.jsx)(n.p,{children:"The Message Dispatcher communicates SimpleAuth service using gRPC. The SimpleAuth, in turn, authenticates SIP requests and forwards them if the request is valid."}),"\n",(0,s.jsx)(n.p,{children:"The following is the protobuf definition for the SimpleAuth service:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-protobuf",children:'\n```protobuf\nsyntax = "proto3";\n\npackage fonoster.routr.processor.v2beta1;\n\nimport "common.proto";\nimport "sipmessage.proto";\n\n// Processor service\nservice Processor {\n // Process Message Request\n rpc ProcessMessage (MessageRequest) returns (MessageResponse) {}\n}\n\nenum Method {\n UNKNOWN = 0;\n // Communicates user location (hostname, IP)\n REGISTER = 1;\n // Establishes a session\n INVITE = 2;\n // Transports Instant Messages\n MESSAGE = 3;\n // Publishes an event to the Server\n PUBLISH = 4;\n // Notifies the subscriber of a new event\n NOTIFY = 5;\n // Subscribes for Notification from the notifier\n SUBSCRIBE = 6;\n // Confirms an INVITE request\n ACK = 7;\n // Terminates a session\n BYE = 8;\n // Cancels establishing of a session\n CANCEL = 9;\n // Communicates information about the capabilities of calling and receiving SIP phones\n OPTIONS = 10;\n // Provisional Acknowledgement\n PRACK = 11;\n // Sends mid-session information\n INFO = 12;\n // Asks the recipient to issue a call transfer\n REFER = 13;\n // Modifies the state of a session\n UPDATE = 14;\n}\n\nmessage NetInterface {\n string host = 1;\n int32 port = 2;\n fonoster.routr.common.v2beta1.Transport transport = 3;\n}\n\nmessage MessageRequest {\n // Same as the Call-Id header \n string ref = 1;\n string edge_port_ref = 2;\n Method method = 3;\n NetInterface sender = 4;\n repeated NetInterface listening_points = 5;\n repeated string external_addrs = 6;\n repeated string localnets = 7;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 8;\n mapmetadata = 9;\n}\n\nmessage MessageResponse {\n NetInterface sender = 1;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 2;\n map metadata = 3;\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Link to the ",(0,s.jsx)(n.a,{href:"https://github.com/fonoster/routr/blob/main/mods/common/src/protos/processor.proto",children:"protobuf definition."})]}),"\n",(0,s.jsx)(n.h2,{id:"launching-the-simpleauth-with-docker",children:"Launching the SimpleAuth with Docker"}),"\n",(0,s.jsxs)(n.p,{children:["The SimpleAuth is available as a Docker image from ",(0,s.jsx)(n.a,{href:"https://hub.docker.com/r/fonoster/routr-simpleauth",children:"Docker Hub"}),". To launch the SimpleAuth with Docker, you can use the following command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"docker run -it \\\n -p 51903:51903 \\\n -e ALLOWLIST=anonymous,1001 \\\n -e METHODS=INVITE,REGISTER,MESSAGE \\\n -e PATH_TO_AUTH=/path/to/auth.json \\\n -v /path/to/auth.json:/path/to/auth.json \\\n fonoster/routr-simpleauth\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The previous example will pull the latest version of the SimpleAuth from Docker Hub and launch the service. The service will listen on the default port, ",(0,s.jsx)(n.code,{children:"51903"}),", for gRPC requests. Remember, your Docker container must expose the service's ports, too."]}),"\n",(0,s.jsx)(n.h2,{id:"quick-test-with-grpcurl",children:"Quick Test with gRPCurl"}),"\n",(0,s.jsxs)(n.p,{children:["One easy way to interact with SimpleAuth for testing and development is to use ",(0,s.jsx)(n.a,{href:"https://github.com/fullstorydev/grpcurl",children:"gRPCurl"}),". The following example shows how to send a SIP Message to the SimpleAuth."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"grpcurl -plaintext \\\n -import-path /path/to/protos \\\n -proto processor.proto -d '{...}' \\\n localhost:51901 \\\n fonoster.routr.processor.v2beta1.Processor/ProcessMessage\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(6540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/210b7c69.f12cb937.js b/assets/js/210b7c69.f12cb937.js deleted file mode 100644 index 4d99389dc..000000000 --- a/assets/js/210b7c69.f12cb937.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[1703],{9633:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var s=t(4848),o=t(8453);const r={},i="SimpleAuth Service",a={id:"development/components/simpleauth",title:"SimpleAuth Service",description:"The SimpleAuth component is an optional middleware service to authenticate SIP requests in Routr. The SimpleAuth is ideal for testing and small deployments.",source:"@site/docs/development/components/simpleauth.md",sourceDirName:"development/components",slug:"/development/components/simpleauth",permalink:"/docs/2.0.0/development/components/simpleauth",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/components/simpleauth.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"APIServer",permalink:"/docs/2.0.0/development/components/apiserver"},next:{title:"Overview",permalink:"/docs/2.0.0/development/alterations/overview"}},c={},l=[{value:"Configuration Spec",id:"configuration-spec",level:2},{value:"Communication and Protobuf Spec",id:"communication-and-protobuf-spec",level:2},{value:"Launching the SimpleAuth with Docker",id:"launching-the-simpleauth-with-docker",level:2},{value:"Quick Test with gRPCurl",id:"quick-test-with-grpcurl",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"simpleauth-service",children:"SimpleAuth Service"}),"\n",(0,s.jsx)(n.p,{children:"The SimpleAuth component is an optional middleware service to authenticate SIP requests in Routr. The SimpleAuth is ideal for testing and small deployments."}),"\n",(0,s.jsx)(n.h2,{id:"configuration-spec",children:"Configuration Spec"}),"\n",(0,s.jsx)(n.p,{children:"The SimpleAuth provides the following environment variables for configuration:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"BIND_ADDR"})," - The address where the service will listen for gRPC requests. Default: ",(0,s.jsx)(n.code,{children:"0.0.0.0:51903"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ALLOWLIST"})," - A comma-separated list of Users allowed to bypass authentication"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"METHODS"})," - A comma-separated list of SIP methods that require authentication (e.g., ",(0,s.jsx)(n.code,{children:"INVITE, REGISTER, MESSAGE"}),"). Required."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"PATH_TO_AUTH"})," - The path to a file containing the credentials for the users"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Example of the authentication file:"}),"\n",(0,s.jsxs)(n.p,{children:["Filename ",(0,s.jsx)(n.code,{children:"auth.json"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'[\n { \n "username": "1001", \n "secret": "1234" \n },\n { \n "username": "john",\n "secret": "1234" \n }\n]\n'})}),"\n",(0,s.jsx)(n.h2,{id:"communication-and-protobuf-spec",children:"Communication and Protobuf Spec"}),"\n",(0,s.jsx)(n.p,{children:"The Message Dispatcher communicates SimpleAuth service using gRPC. The SimpleAuth, in turn, authenticates SIP requests and forwards them if the request is valid."}),"\n",(0,s.jsx)(n.p,{children:"The following is the protobuf definition for the SimpleAuth service:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-protobuf",children:'\n```protobuf\nsyntax = "proto3";\n\npackage fonoster.routr.processor.v2beta1;\n\nimport "common.proto";\nimport "sipmessage.proto";\n\n// Processor service\nservice Processor {\n // Process Message Request\n rpc ProcessMessage (MessageRequest) returns (MessageResponse) {}\n}\n\nenum Method {\n UNKNOWN = 0;\n // Communicates user location (hostname, IP)\n REGISTER = 1;\n // Establishes a session\n INVITE = 2;\n // Transports Instant Messages\n MESSAGE = 3;\n // Publishes an event to the Server\n PUBLISH = 4;\n // Notifies the subscriber of a new event\n NOTIFY = 5;\n // Subscribes for Notification from the notifier\n SUBSCRIBE = 6;\n // Confirms an INVITE request\n ACK = 7;\n // Terminates a session\n BYE = 8;\n // Cancels establishing of a session\n CANCEL = 9;\n // Communicates information about the capabilities of calling and receiving SIP phones\n OPTIONS = 10;\n // Provisional Acknowledgement\n PRACK = 11;\n // Sends mid-session information\n INFO = 12;\n // Asks the recipient to issue a call transfer\n REFER = 13;\n // Modifies the state of a session\n UPDATE = 14;\n}\n\nmessage NetInterface {\n string host = 1;\n int32 port = 2;\n fonoster.routr.common.v2beta1.Transport transport = 3;\n}\n\nmessage MessageRequest {\n // Same as the Call-Id header \n string ref = 1;\n string edge_port_ref = 2;\n Method method = 3;\n NetInterface sender = 4;\n repeated NetInterface listening_points = 5;\n repeated string external_addrs = 6;\n repeated string localnets = 7;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 8;\n map metadata = 9;\n}\n\nmessage MessageResponse {\n NetInterface sender = 1;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 2;\n map metadata = 3;\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Link to the ",(0,s.jsx)(n.a,{href:"https://github.com/fonoster/routr/blob/main/mods/common/src/protos/processor.proto",children:"protobuf definition."})]}),"\n",(0,s.jsx)(n.h2,{id:"launching-the-simpleauth-with-docker",children:"Launching the SimpleAuth with Docker"}),"\n",(0,s.jsxs)(n.p,{children:["The SimpleAuth is available as a Docker image from ",(0,s.jsx)(n.a,{href:"https://hub.docker.com/r/fonoster/routr-simpleauth",children:"Docker Hub"}),". To launch the SimpleAuth with Docker, you can use the following command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"docker run -it \\\n -p 51903:51903 \\\n -e ALLOWLIST=anonymous,1001 \\\n -e METHODS=INVITE,REGISTER,MESSAGE \\\n -e PATH_TO_AUTH=/path/to/auth.json \\\n -v /path/to/auth.json:/path/to/auth.json \\\n fonoster/routr-simpleauth\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The previous example will pull the latest version of the SimpleAuth from Docker Hub and launch the service. The service will listen on the default port, ",(0,s.jsx)(n.code,{children:"51903"}),", for gRPC requests. Remember, your Docker container must expose the service's ports, too."]}),"\n",(0,s.jsx)(n.h2,{id:"quick-test-with-grpcurl",children:"Quick Test with gRPCurl"}),"\n",(0,s.jsxs)(n.p,{children:["One easy way to interact with SimpleAuth for testing and development is to use ",(0,s.jsx)(n.a,{href:"https://github.com/fullstorydev/grpcurl",children:"gRPCurl"}),". The following example shows how to send a SIP Message to the SimpleAuth."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"grpcurl -plaintext \\\n -import-path /path/to/protos \\\n -proto processor.proto -d '{...}' \\\n localhost:51901 \\\n fonoster.routr.processor.v2beta1.Processor/ProcessMessage\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(6540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21169ea0.00bc1f21.js b/assets/js/21169ea0.00bc1f21.js new file mode 100644 index 000000000..9d2b690bd --- /dev/null +++ b/assets/js/21169ea0.00bc1f21.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[9504],{4640:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var o=n(4848),r=n(8453);const s={},i="Orchestration with Kubernetes",c={id:"development/orchestration-with-kubernetes",title:"Orchestration with Kubernetes",description:"Coming soon.",source:"@site/docs/development/orchestration-with-kubernetes.md",sourceDirName:"development",slug:"/development/orchestration-with-kubernetes",permalink:"/docs/2.11.5/development/orchestration-with-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/orchestration-with-kubernetes.md",tags:[],version:"current",frontMatter:{}},u={},a=[];function d(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"orchestration-with-kubernetes",children:"Orchestration with Kubernetes"}),"\n",(0,o.jsx)(t.p,{children:"Coming soon."})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(6540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21169ea0.41ddd5b2.js b/assets/js/21169ea0.41ddd5b2.js deleted file mode 100644 index 5e84fe411..000000000 --- a/assets/js/21169ea0.41ddd5b2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[9504],{7235:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var o=n(4848),r=n(8453);const s={},i="Orchestration with Kubernetes",c={id:"development/orchestration-with-kubernetes",title:"Orchestration with Kubernetes",description:"Coming soon.",source:"@site/docs/development/orchestration-with-kubernetes.md",sourceDirName:"development",slug:"/development/orchestration-with-kubernetes",permalink:"/docs/2.0.0/development/orchestration-with-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/orchestration-with-kubernetes.md",tags:[],version:"current",frontMatter:{}},u={},a=[];function d(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"orchestration-with-kubernetes",children:"Orchestration with Kubernetes"}),"\n",(0,o.jsx)(t.p,{children:"Coming soon."})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(6540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/23efd64d.69bca8aa.js b/assets/js/23efd64d.8db9d4fc.js similarity index 96% rename from assets/js/23efd64d.69bca8aa.js rename to assets/js/23efd64d.8db9d4fc.js index 27fe33b57..b517fb4eb 100644 --- a/assets/js/23efd64d.69bca8aa.js +++ b/assets/js/23efd64d.8db9d4fc.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[7225],{2575:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>u,contentTitle:()=>s,default:()=>g,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var t=o(4848),r=o(8453);const i={},s="Running with Docker",c={id:"guides/running-with-docker-or-compose",title:"Running with Docker",description:"Please refer to Docker Hub for a detail guide on how to use Routr's docker image.",source:"@site/versioned_docs/version-1.x.x/guides/running-with-docker-or-compose.md",sourceDirName:"guides",slug:"/guides/running-with-docker-or-compose",permalink:"/docs/1.x.x/guides/running-with-docker-or-compose",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/guides/running-with-docker-or-compose.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Running on Kubernetes",permalink:"/docs/1.x.x/guides/running-on-kubernetes"},next:{title:"Securing the signaling path",permalink:"/docs/1.x.x/guides/securing-the-signaling-path"}},u={},d=[];function a(e){const n={a:"a",h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"running-with-docker",children:"Running with Docker"}),"\n",(0,t.jsxs)(n.p,{children:["Please refer to ",(0,t.jsx)(n.a,{href:"https://hub.docker.com/repository/docker/fonoster/routr",children:"Docker Hub"})," for a detail guide on how to use Routr's docker image."]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>c});var t=o(6540);const r={},i=t.createContext(r);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[7225],{6152:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>u,contentTitle:()=>s,default:()=>g,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var t=o(4848),r=o(8453);const i={},s="Running with Docker",c={id:"guides/running-with-docker-or-compose",title:"Running with Docker",description:"Please refer to Docker Hub for a detail guide on how to use Routr's docker image.",source:"@site/versioned_docs/version-1.x.x/guides/running-with-docker-or-compose.md",sourceDirName:"guides",slug:"/guides/running-with-docker-or-compose",permalink:"/docs/1.x.x/guides/running-with-docker-or-compose",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/guides/running-with-docker-or-compose.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Running on Kubernetes",permalink:"/docs/1.x.x/guides/running-on-kubernetes"},next:{title:"Securing the signaling path",permalink:"/docs/1.x.x/guides/securing-the-signaling-path"}},u={},d=[];function a(e){const n={a:"a",h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"running-with-docker",children:"Running with Docker"}),"\n",(0,t.jsxs)(n.p,{children:["Please refer to ",(0,t.jsx)(n.a,{href:"https://hub.docker.com/repository/docker/fonoster/routr",children:"Docker Hub"})," for a detail guide on how to use Routr's docker image."]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>c});var t=o(6540);const r={},i=t.createContext(r);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/26da1a01.3be03227.js b/assets/js/26da1a01.3be03227.js deleted file mode 100644 index 7d3205cca..000000000 --- a/assets/js/26da1a01.3be03227.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2401],{1080:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>a});var t=o(4848),s=o(8453);const r={},i="Building a SCAIP Processor",c={id:"development/building-a-scaip-processor",title:"Building a SCAIP Processor",description:"Comin soon.",source:"@site/docs/development/building-a-scaip-processor.md",sourceDirName:"development",slug:"/development/building-a-scaip-processor",permalink:"/docs/2.0.0/development/building-a-scaip-processor",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/building-a-scaip-processor.md",tags:[],version:"current",frontMatter:{}},d={},a=[];function u(e){const n={h1:"h1",p:"p",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"building-a-scaip-processor",children:"Building a SCAIP Processor"}),"\n",(0,t.jsx)(n.p,{children:"Comin soon."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>c});var t=o(6540);const s={},r=t.createContext(s);function i(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/26da1a01.46b9023b.js b/assets/js/26da1a01.46b9023b.js new file mode 100644 index 000000000..5b6ee83cc --- /dev/null +++ b/assets/js/26da1a01.46b9023b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2401],{4769:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>a});var t=o(4848),s=o(8453);const r={},i="Building a SCAIP Processor",c={id:"development/building-a-scaip-processor",title:"Building a SCAIP Processor",description:"Comin soon.",source:"@site/docs/development/building-a-scaip-processor.md",sourceDirName:"development",slug:"/development/building-a-scaip-processor",permalink:"/docs/2.11.5/development/building-a-scaip-processor",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/building-a-scaip-processor.md",tags:[],version:"current",frontMatter:{}},d={},a=[];function u(e){const n={h1:"h1",p:"p",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"building-a-scaip-processor",children:"Building a SCAIP Processor"}),"\n",(0,t.jsx)(n.p,{children:"Comin soon."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>c});var t=o(6540);const s={},r=t.createContext(s);function i(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/295fe310.b9248d1a.js b/assets/js/295fe310.b9248d1a.js new file mode 100644 index 000000000..6b894b74d --- /dev/null +++ b/assets/js/295fe310.b9248d1a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[242],{1393:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>u,toc:()=>a});var r=n(4848),o=n(8453);const s={},i="Intercom System with Routr and Kubernetes",u={id:"tutorials/intercom-system-with-routr-and-kubernetes",title:"Intercom System with Routr and Kubernetes",description:"Coming soon.",source:"@site/versioned_docs/version-2.0.0/tutorials/intercom-system-with-routr-and-kubernetes.md",sourceDirName:"tutorials",slug:"/tutorials/intercom-system-with-routr-and-kubernetes",permalink:"/docs/2.0.0/tutorials/intercom-system-with-routr-and-kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/tutorials/intercom-system-with-routr-and-kubernetes.md",tags:[],version:"2.0.0",frontMatter:{}},c={},a=[];function d(t){const e={h1:"h1",p:"p",...(0,o.R)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"intercom-system-with-routr-and-kubernetes",children:"Intercom System with Routr and Kubernetes"}),"\n",(0,r.jsx)(e.p,{children:"Coming soon."})]})}function m(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(d,{...t})}):d(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>i,x:()=>u});var r=n(6540);const o={},s=r.createContext(o);function i(t){const e=r.useContext(s);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function u(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:i(t.components),r.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/2a36568f.d948f060.js b/assets/js/2a36568f.d948f060.js deleted file mode 100644 index 69f95a821..000000000 --- a/assets/js/2a36568f.d948f060.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2964],{7173:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var n=o(4848),c=o(8453);const r={},s="Home or Office Setup",i={id:"connect/home-or-office-setup",title:"Home or Office Setup",description:"Coming soon.",source:"@site/docs/connect/home-or-office-setup.md",sourceDirName:"connect",slug:"/connect/home-or-office-setup",permalink:"/docs/2.0.0/connect/home-or-office-setup",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/connect/home-or-office-setup.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SDK",permalink:"/docs/2.0.0/connect/nodesdk/sdk"},next:{title:"WebRTC Support",permalink:"/docs/2.0.0/connect/webrtc-support"}},u={},p=[];function f(e){const t={h1:"h1",p:"p",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"home-or-office-setup",children:"Home or Office Setup"}),"\n",(0,n.jsx)(t.p,{children:"Coming soon."})]})}function d(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(f,{...e})}):f(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>i});var n=o(6540);const c={},r=n.createContext(c);function s(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:s(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2a36568f.df40b923.js b/assets/js/2a36568f.df40b923.js new file mode 100644 index 000000000..744ed46af --- /dev/null +++ b/assets/js/2a36568f.df40b923.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2964],{2860:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var n=o(4848),c=o(8453);const r={},s="Home or Office Setup",i={id:"connect/home-or-office-setup",title:"Home or Office Setup",description:"Coming soon.",source:"@site/docs/connect/home-or-office-setup.md",sourceDirName:"connect",slug:"/connect/home-or-office-setup",permalink:"/docs/2.11.5/connect/home-or-office-setup",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/connect/home-or-office-setup.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SDK",permalink:"/docs/2.11.5/connect/nodesdk/sdk"},next:{title:"WebRTC Support",permalink:"/docs/2.11.5/connect/webrtc-support"}},u={},p=[];function f(e){const t={h1:"h1",p:"p",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"home-or-office-setup",children:"Home or Office Setup"}),"\n",(0,n.jsx)(t.p,{children:"Coming soon."})]})}function d(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(f,{...e})}):f(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>i});var n=o(6540);const c={},r=n.createContext(c);function s(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:s(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/321dfeeb.607289a8.js b/assets/js/321dfeeb.2c12f614.js similarity index 98% rename from assets/js/321dfeeb.607289a8.js rename to assets/js/321dfeeb.2c12f614.js index efe3b32f0..e890a23ef 100644 --- a/assets/js/321dfeeb.607289a8.js +++ b/assets/js/321dfeeb.2c12f614.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[537],{9683:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=n(4848),i=n(8453);const r={},o=void 0,a={id:"api/overview",title:"overview",description:"Routr API version is currently v1beta1. We continue to improve the API, resource definition, and other artifacts until we reach a final version. We can then establish a policy to ensure backward compatibility. Until then keep an eye on this document.",source:"@site/versioned_docs/version-1.x.x/api/overview.md",sourceDirName:"api",slug:"/api/overview",permalink:"/docs/1.x.x/api/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/overview.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Securing the signaling path",permalink:"/docs/1.x.x/guides/securing-the-signaling-path"},next:{title:"createAgent",permalink:"/docs/1.x.x/api/agents/create"}},c={},d=[{value:"Authentication",id:"authentication",level:2},{value:"Error Responses",id:"error-responses",level:2}];function l(e){const t={a:"a",blockquote:"blockquote",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["Routr API version is currently ",(0,s.jsx)(t.code,{children:"v1beta1"}),". We continue to improve the API, resource definition, and other artifacts until we reach a final version. We can then establish a policy to ensure backward compatibility. Until then keep an eye on this document."]}),"\n",(0,s.jsx)(t.p,{children:"The endpoint for the API is:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"/api/{apiversion}"})}),"\n",(0,s.jsx)(t.h2,{id:"authentication",children:"Authentication"}),"\n",(0,s.jsxs)(t.p,{children:["A JWT token is used to authenticate the server. To obtain the token, use the ",(0,s.jsx)(t.code,{children:"/api/{apiversion}/token"})," endpoint with basic authentication. Use the information from the ",(0,s.jsx)(t.a,{href:"/docs/1.x.x/configuration/users",children:"User"})," resource."]}),"\n",(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:["You must append the ",(0,s.jsx)(t.code,{children:"token"})," to all requests as a query parameter."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Sample call"})}),"\n",(0,s.jsx)(t.p,{children:"To obtain the token"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'curl -k -u "admin:changeit" https://localhost:4567/api/v1beta1/token\n\n# Resulted in\n{\n "status":200,\n "message":"Successful request",\n "data":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiJ9.TZZ4kp5xIdYzs5RRt6_qVxJcOiLdk1IEHFMBSZ7SRENx6kyVhwfAlm-oeM4L2XFIr4evlTCxKEIKc0fZKwPcjw"\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"To use the token"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'curl -k -u "admin:changeit" https://localhost:4567/api/v1beta1/location?token=eyJhbGciOiJIUzUxMiJ9.e...\n\n# Resulted in\n{ \n "status":200,\n "message":"Successful request",\n "data":[ \n { \n "addressOfRecord":"sip:1001@sip.local",\n "contactInfo":"sip:45962087@192.168.1.127:61147;transport=tcp;nat=false;expires=600"\n }\n ]\n}\n'})}),"\n",(0,s.jsx)(t.h2,{id:"error-responses",children:"Error Responses"}),"\n",(0,s.jsx)(t.p,{children:"The following are general errors we might have to account for:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Code"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Content"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"400 BAD_REQUEST"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "400", message : "Bad Request" }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"401 UNAUTHORIZED"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "401", message : "You are unauthorized to make this request." }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"405 NOT_SUPPORTED"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "405", message : "Operation not supported by data source provider" }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"409 CONFLICT"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "409", message : "An attempt was made to create an object that already exists" }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"4091 UNFULFILLED_DEPENDENCY_RESPONSE"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "4091", message : "Found one or more unfulfilled dependencies" }'})})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(6540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[537],{7142:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=n(4848),i=n(8453);const r={},o=void 0,a={id:"api/overview",title:"overview",description:"Routr API version is currently v1beta1. We continue to improve the API, resource definition, and other artifacts until we reach a final version. We can then establish a policy to ensure backward compatibility. Until then keep an eye on this document.",source:"@site/versioned_docs/version-1.x.x/api/overview.md",sourceDirName:"api",slug:"/api/overview",permalink:"/docs/1.x.x/api/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/overview.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Securing the signaling path",permalink:"/docs/1.x.x/guides/securing-the-signaling-path"},next:{title:"createAgent",permalink:"/docs/1.x.x/api/agents/create"}},c={},d=[{value:"Authentication",id:"authentication",level:2},{value:"Error Responses",id:"error-responses",level:2}];function l(e){const t={a:"a",blockquote:"blockquote",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["Routr API version is currently ",(0,s.jsx)(t.code,{children:"v1beta1"}),". We continue to improve the API, resource definition, and other artifacts until we reach a final version. We can then establish a policy to ensure backward compatibility. Until then keep an eye on this document."]}),"\n",(0,s.jsx)(t.p,{children:"The endpoint for the API is:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"/api/{apiversion}"})}),"\n",(0,s.jsx)(t.h2,{id:"authentication",children:"Authentication"}),"\n",(0,s.jsxs)(t.p,{children:["A JWT token is used to authenticate the server. To obtain the token, use the ",(0,s.jsx)(t.code,{children:"/api/{apiversion}/token"})," endpoint with basic authentication. Use the information from the ",(0,s.jsx)(t.a,{href:"/docs/1.x.x/configuration/users",children:"User"})," resource."]}),"\n",(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:["You must append the ",(0,s.jsx)(t.code,{children:"token"})," to all requests as a query parameter."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Sample call"})}),"\n",(0,s.jsx)(t.p,{children:"To obtain the token"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'curl -k -u "admin:changeit" https://localhost:4567/api/v1beta1/token\n\n# Resulted in\n{\n "status":200,\n "message":"Successful request",\n "data":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiJ9.TZZ4kp5xIdYzs5RRt6_qVxJcOiLdk1IEHFMBSZ7SRENx6kyVhwfAlm-oeM4L2XFIr4evlTCxKEIKc0fZKwPcjw"\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"To use the token"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'curl -k -u "admin:changeit" https://localhost:4567/api/v1beta1/location?token=eyJhbGciOiJIUzUxMiJ9.e...\n\n# Resulted in\n{ \n "status":200,\n "message":"Successful request",\n "data":[ \n { \n "addressOfRecord":"sip:1001@sip.local",\n "contactInfo":"sip:45962087@192.168.1.127:61147;transport=tcp;nat=false;expires=600"\n }\n ]\n}\n'})}),"\n",(0,s.jsx)(t.h2,{id:"error-responses",children:"Error Responses"}),"\n",(0,s.jsx)(t.p,{children:"The following are general errors we might have to account for:"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Code"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Content"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"400 BAD_REQUEST"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "400", message : "Bad Request" }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"401 UNAUTHORIZED"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "401", message : "You are unauthorized to make this request." }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"405 NOT_SUPPORTED"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "405", message : "Operation not supported by data source provider" }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"409 CONFLICT"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "409", message : "An attempt was made to create an object that already exists" }'})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"4091 UNFULFILLED_DEPENDENCY_RESPONSE"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:'{ status: "4091", message : "Found one or more unfulfilled dependencies" }'})})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(6540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3325c53c.2eb5404e.js b/assets/js/3325c53c.2eb5404e.js deleted file mode 100644 index 743149a7f..000000000 --- a/assets/js/3325c53c.2eb5404e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6944],{7496:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var r=n(4848),s=n(8453);const o={},i="Installation",l={id:"introduction/installation",title:"Installation",description:"Instant Server Installation with Snaps",source:"@site/versioned_docs/version-1.x.x/introduction/installation.md",sourceDirName:"introduction",slug:"/introduction/installation",permalink:"/docs/1.x.x/introduction/installation",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/introduction/installation.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/1.x.x/introduction/overview"},next:{title:"Comparison",permalink:"/docs/1.x.x/introduction/comparison"}},a={},d=[{value:"Instant Server Installation with Snaps",id:"instant-server-installation-with-snaps",level:2},{value:"DigitalOcean droplet",id:"digitalocean-droplet",level:2},{value:"Docker",id:"docker",level:2},{value:"Kubernetes",id:"kubernetes",level:2},{value:"Google Cloud Shell",id:"google-cloud-shell",level:2},{value:"Custom",id:"custom",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(t.h2,{id:"instant-server-installation-with-snaps",children:"Instant Server Installation with Snaps"}),"\n",(0,r.jsx)(t.p,{children:"Install Routr in seconds on Linux (Ubuntu and others) with:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"sudo snap install routr-server\n"})}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://snapcraft.io/routr-server",children:(0,r.jsx)(t.img,{src:"https://snapcraft.io/static/images/badges/en/snap-store-black.svg",alt:"Get it from the Snap Store"})})}),"\n",(0,r.jsx)(t.p,{children:"Routr Snap is recommended for Linux deployments"}),"\n",(0,r.jsx)(t.p,{children:"Installing snaps is very quick. By running that command you have your full Routr server up and running. Snaps are secure. They are isolated with all of their dependencies. Snaps also auto-update when we release new versions."}),"\n",(0,r.jsx)(t.h2,{id:"digitalocean-droplet",children:"DigitalOcean droplet"}),"\n",(0,r.jsx)(t.p,{children:"Build and Deploy to a DigitalOcean droplet"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/tree/master/.digitalocean/README.md",children:(0,r.jsx)(t.img,{src:"https://user-images.githubusercontent.com/51996/58146107-50512580-7c1a-11e9-8ec9-e032ba387c2a.png",alt:"do-btn-blue"})})}),"\n",(0,r.jsx)(t.h2,{id:"docker",children:"Docker"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"/docs/1.x.x/guides/running-with-docker-or-compose",children:"Deploy with docker compose"})}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://hub.docker.com/r/fonoster/routr/",children:(0,r.jsx)(t.img,{src:"https://d207aa93qlcgug.cloudfront.net/1.95.5.qa/img/nav/docker-logo-loggedout.png",alt:"Docker logo"})})}),"\n",(0,r.jsxs)(t.p,{children:["OR Use the automated build image of our ",(0,r.jsx)(t.a,{href:"https://hub.docker.com/r/fonoster/routr/",children:"most recent release"})]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"docker pull fonoster/routr:latest\n"})}),"\n",(0,r.jsxs)(t.p,{children:["OR select a specific release (",(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases",children:"details of releases available"}),"):"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"docker pull fonoster/routr:vX.X.X\n"})}),"\n",(0,r.jsx)(t.h2,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,r.jsxs)(t.p,{children:["Deploy to Kubernetes in ",(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/tree/master/.k8s/README.md",children:"few easy steps"})]}),"\n",(0,r.jsx)(t.h2,{id:"google-cloud-shell",children:"Google Cloud Shell"}),"\n",(0,r.jsx)(t.p,{children:"Routr one-click interactive tutorial will get you familiar with Routr server and the command-line interface."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/fonoster/routr-walkthrough-tutorial&tutorial=tutorial.md",children:(0,r.jsx)(t.img,{src:"https://gstatic.com/cloudssh/images/open-btn.svg",alt:"Open in Cloud Shell"})})}),"\n",(0,r.jsx)(t.h2,{id:"custom",children:"Custom"}),"\n",(0,r.jsx)(t.p,{children:"There are no special requirements to install and run the server. Just follow this easy steps:"}),"\n",(0,r.jsx)(t.p,{children:"\u278a Download the server for your platform"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Platform"}),(0,r.jsx)(t.th,{children:"Download"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Linux"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_linux-x64_bin.tar.gz",children:"tar.gz"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"macOS"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_osx-x64_bin.tar.gz",children:"tar.gz"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Windows"}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_windows-x64_bin.tar.gz",children:"tar.gz"}),", ",(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_windows-x64_bin.zip",children:"zip"})]})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"\u278b Then extract it:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"tar xvfz routr-*.tar.gz\ncd routr-*\n"})}),"\n",(0,r.jsxs)(t.p,{children:["\u278c Run the server using the ",(0,r.jsx)(t.code,{children:"routr"})," command"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"./routr\n"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>l});var r=n(6540);const s={},o=r.createContext(s);function i(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3325c53c.e7144622.js b/assets/js/3325c53c.e7144622.js new file mode 100644 index 000000000..9095c83ee --- /dev/null +++ b/assets/js/3325c53c.e7144622.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6944],{579:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var r=n(4848),s=n(8453);const o={},i="Installation",l={id:"introduction/installation",title:"Installation",description:"Instant Server Installation with Snaps",source:"@site/versioned_docs/version-1.x.x/introduction/installation.md",sourceDirName:"introduction",slug:"/introduction/installation",permalink:"/docs/1.x.x/introduction/installation",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/introduction/installation.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/1.x.x/introduction/overview"},next:{title:"Comparison",permalink:"/docs/1.x.x/introduction/comparison"}},a={},d=[{value:"Instant Server Installation with Snaps",id:"instant-server-installation-with-snaps",level:2},{value:"DigitalOcean droplet",id:"digitalocean-droplet",level:2},{value:"Docker",id:"docker",level:2},{value:"Kubernetes",id:"kubernetes",level:2},{value:"Google Cloud Shell",id:"google-cloud-shell",level:2},{value:"Custom",id:"custom",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(t.h2,{id:"instant-server-installation-with-snaps",children:"Instant Server Installation with Snaps"}),"\n",(0,r.jsx)(t.p,{children:"Install Routr in seconds on Linux (Ubuntu and others) with:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"sudo snap install routr-server\n"})}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://snapcraft.io/routr-server",children:(0,r.jsx)(t.img,{src:"https://snapcraft.io/static/images/badges/en/snap-store-black.svg",alt:"Get it from the Snap Store"})})}),"\n",(0,r.jsx)(t.p,{children:"Routr Snap is recommended for Linux deployments"}),"\n",(0,r.jsx)(t.p,{children:"Installing snaps is very quick. By running that command you have your full Routr server up and running. Snaps are secure. They are isolated with all of their dependencies. Snaps also auto-update when we release new versions."}),"\n",(0,r.jsx)(t.h2,{id:"digitalocean-droplet",children:"DigitalOcean droplet"}),"\n",(0,r.jsx)(t.p,{children:"Build and Deploy to a DigitalOcean droplet"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/tree/master/.digitalocean/README.md",children:(0,r.jsx)(t.img,{src:"https://user-images.githubusercontent.com/51996/58146107-50512580-7c1a-11e9-8ec9-e032ba387c2a.png",alt:"do-btn-blue"})})}),"\n",(0,r.jsx)(t.h2,{id:"docker",children:"Docker"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"/docs/1.x.x/guides/running-with-docker-or-compose",children:"Deploy with docker compose"})}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://hub.docker.com/r/fonoster/routr/",children:(0,r.jsx)(t.img,{src:"https://d207aa93qlcgug.cloudfront.net/1.95.5.qa/img/nav/docker-logo-loggedout.png",alt:"Docker logo"})})}),"\n",(0,r.jsxs)(t.p,{children:["OR Use the automated build image of our ",(0,r.jsx)(t.a,{href:"https://hub.docker.com/r/fonoster/routr/",children:"most recent release"})]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"docker pull fonoster/routr:latest\n"})}),"\n",(0,r.jsxs)(t.p,{children:["OR select a specific release (",(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases",children:"details of releases available"}),"):"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"docker pull fonoster/routr:vX.X.X\n"})}),"\n",(0,r.jsx)(t.h2,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,r.jsxs)(t.p,{children:["Deploy to Kubernetes in ",(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/tree/master/.k8s/README.md",children:"few easy steps"})]}),"\n",(0,r.jsx)(t.h2,{id:"google-cloud-shell",children:"Google Cloud Shell"}),"\n",(0,r.jsx)(t.p,{children:"Routr one-click interactive tutorial will get you familiar with Routr server and the command-line interface."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/fonoster/routr-walkthrough-tutorial&tutorial=tutorial.md",children:(0,r.jsx)(t.img,{src:"https://gstatic.com/cloudssh/images/open-btn.svg",alt:"Open in Cloud Shell"})})}),"\n",(0,r.jsx)(t.h2,{id:"custom",children:"Custom"}),"\n",(0,r.jsx)(t.p,{children:"There are no special requirements to install and run the server. Just follow this easy steps:"}),"\n",(0,r.jsx)(t.p,{children:"\u278a Download the server for your platform"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Platform"}),(0,r.jsx)(t.th,{children:"Download"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Linux"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_linux-x64_bin.tar.gz",children:"tar.gz"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"macOS"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_osx-x64_bin.tar.gz",children:"tar.gz"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Windows"}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_windows-x64_bin.tar.gz",children:"tar.gz"}),", ",(0,r.jsx)(t.a,{href:"https://github.com/fonoster/routr/releases/download/1.2.7/routr-1.2.7_windows-x64_bin.zip",children:"zip"})]})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"\u278b Then extract it:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"tar xvfz routr-*.tar.gz\ncd routr-*\n"})}),"\n",(0,r.jsxs)(t.p,{children:["\u278c Run the server using the ",(0,r.jsx)(t.code,{children:"routr"})," command"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"./routr\n"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>l});var r=n(6540);const s={},o=r.createContext(s);function i(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/335fd65a.fc634c6a.js b/assets/js/335fd65a.fc634c6a.js new file mode 100644 index 000000000..270325a74 --- /dev/null +++ b/assets/js/335fd65a.fc634c6a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[3452],{6e3:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var s=t(4848),o=t(8453);const r={},i="SimpleAuth Service",a={id:"development/components/simpleauth",title:"SimpleAuth Service",description:"The SimpleAuth component is an optional middleware service to authenticate SIP requests in Routr. The SimpleAuth is ideal for testing and small deployments.",source:"@site/versioned_docs/version-2.0.0/development/components/simpleauth.md",sourceDirName:"development/components",slug:"/development/components/simpleauth",permalink:"/docs/2.0.0/development/components/simpleauth",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/development/components/simpleauth.md",tags:[],version:"2.0.0",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"APIServer",permalink:"/docs/2.0.0/development/components/apiserver"},next:{title:"Overview",permalink:"/docs/2.0.0/development/alterations/overview"}},c={},l=[{value:"Configuration Spec",id:"configuration-spec",level:2},{value:"Communication and Protobuf Spec",id:"communication-and-protobuf-spec",level:2},{value:"Launching the SimpleAuth with Docker",id:"launching-the-simpleauth-with-docker",level:2},{value:"Quick Test with gRPCurl",id:"quick-test-with-grpcurl",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"simpleauth-service",children:"SimpleAuth Service"}),"\n",(0,s.jsx)(n.p,{children:"The SimpleAuth component is an optional middleware service to authenticate SIP requests in Routr. The SimpleAuth is ideal for testing and small deployments."}),"\n",(0,s.jsx)(n.h2,{id:"configuration-spec",children:"Configuration Spec"}),"\n",(0,s.jsx)(n.p,{children:"The SimpleAuth provides the following environment variables for configuration:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"BIND_ADDR"})," - The address where the service will listen for gRPC requests. Default: ",(0,s.jsx)(n.code,{children:"0.0.0.0:51903"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ALLOWLIST"})," - A comma-separated list of Users allowed to bypass authentication"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"METHODS"})," - A comma-separated list of SIP methods that require authentication (e.g., ",(0,s.jsx)(n.code,{children:"INVITE, REGISTER, MESSAGE"}),"). Required."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"PATH_TO_AUTH"})," - The path to a file containing the credentials for the users"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Example of the authentication file:"}),"\n",(0,s.jsxs)(n.p,{children:["Filename ",(0,s.jsx)(n.code,{children:"auth.json"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'[\n { \n "username": "1001", \n "secret": "1234" \n },\n { \n "username": "john",\n "secret": "1234" \n }\n]\n'})}),"\n",(0,s.jsx)(n.h2,{id:"communication-and-protobuf-spec",children:"Communication and Protobuf Spec"}),"\n",(0,s.jsx)(n.p,{children:"The Message Dispatcher communicates SimpleAuth service using gRPC. The SimpleAuth, in turn, authenticates SIP requests and forwards them if the request is valid."}),"\n",(0,s.jsx)(n.p,{children:"The following is the protobuf definition for the SimpleAuth service:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-protobuf",children:'\n```protobuf\nsyntax = "proto3";\n\npackage fonoster.routr.processor.v2beta1;\n\nimport "common.proto";\nimport "sipmessage.proto";\n\n// Processor service\nservice Processor {\n // Process Message Request\n rpc ProcessMessage (MessageRequest) returns (MessageResponse) {}\n}\n\nenum Method {\n UNKNOWN = 0;\n // Communicates user location (hostname, IP)\n REGISTER = 1;\n // Establishes a session\n INVITE = 2;\n // Transports Instant Messages\n MESSAGE = 3;\n // Publishes an event to the Server\n PUBLISH = 4;\n // Notifies the subscriber of a new event\n NOTIFY = 5;\n // Subscribes for Notification from the notifier\n SUBSCRIBE = 6;\n // Confirms an INVITE request\n ACK = 7;\n // Terminates a session\n BYE = 8;\n // Cancels establishing of a session\n CANCEL = 9;\n // Communicates information about the capabilities of calling and receiving SIP phones\n OPTIONS = 10;\n // Provisional Acknowledgement\n PRACK = 11;\n // Sends mid-session information\n INFO = 12;\n // Asks the recipient to issue a call transfer\n REFER = 13;\n // Modifies the state of a session\n UPDATE = 14;\n}\n\nmessage NetInterface {\n string host = 1;\n int32 port = 2;\n fonoster.routr.common.v2beta1.Transport transport = 3;\n}\n\nmessage MessageRequest {\n // Same as the Call-Id header \n string ref = 1;\n string edge_port_ref = 2;\n Method method = 3;\n NetInterface sender = 4;\n repeated NetInterface listening_points = 5;\n repeated string external_addrs = 6;\n repeated string localnets = 7;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 8;\n map metadata = 9;\n}\n\nmessage MessageResponse {\n NetInterface sender = 1;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 2;\n map metadata = 3;\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Link to the ",(0,s.jsx)(n.a,{href:"https://github.com/fonoster/routr/blob/main/mods/common/src/protos/processor.proto",children:"protobuf definition."})]}),"\n",(0,s.jsx)(n.h2,{id:"launching-the-simpleauth-with-docker",children:"Launching the SimpleAuth with Docker"}),"\n",(0,s.jsxs)(n.p,{children:["The SimpleAuth is available as a Docker image from ",(0,s.jsx)(n.a,{href:"https://hub.docker.com/r/fonoster/routr-simpleauth",children:"Docker Hub"}),". To launch the SimpleAuth with Docker, you can use the following command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"docker run -it \\\n -p 51903:51903 \\\n -e ALLOWLIST=anonymous,1001 \\\n -e METHODS=INVITE,REGISTER,MESSAGE \\\n -e PATH_TO_AUTH=/path/to/auth.json \\\n -v /path/to/auth.json:/path/to/auth.json \\\n fonoster/routr-simpleauth\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The previous example will pull the latest version of the SimpleAuth from Docker Hub and launch the service. The service will listen on the default port, ",(0,s.jsx)(n.code,{children:"51903"}),", for gRPC requests. Remember, your Docker container must expose the service's ports, too."]}),"\n",(0,s.jsx)(n.h2,{id:"quick-test-with-grpcurl",children:"Quick Test with gRPCurl"}),"\n",(0,s.jsxs)(n.p,{children:["One easy way to interact with SimpleAuth for testing and development is to use ",(0,s.jsx)(n.a,{href:"https://github.com/fullstorydev/grpcurl",children:"gRPCurl"}),". The following example shows how to send a SIP Message to the SimpleAuth."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"grpcurl -plaintext \\\n -import-path /path/to/protos \\\n -proto processor.proto -d '{...}' \\\n localhost:51901 \\\n fonoster.routr.processor.v2beta1.Processor/ProcessMessage\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(6540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33664cb1.cc1e07c5.js b/assets/js/33664cb1.cc1e07c5.js new file mode 100644 index 000000000..6f39db7f1 --- /dev/null +++ b/assets/js/33664cb1.cc1e07c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[9953],{7904:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>a,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var n=s(4848),r=s(8453);const o={},d="EdgePort",i={id:"development/components/edgeport",title:"EdgePort",description:"The EdgePort component accepts SIP Messages, parses them into protobuf, and sends them to the Message Dispatcher. After a SIP Message is processed, the EdgePort will forward the SIP Message to the next hop.",source:"@site/docs/development/components/edgeport.md",sourceDirName:"development/components",slug:"/development/components/edgeport",permalink:"/docs/2.11.5/development/components/edgeport",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/components/edgeport.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/2.11.5/development/components/overview"},next:{title:"Message Dispatcher",permalink:"/docs/2.11.5/development/components/dispatcher"}},c={},l=[{value:"Configuration Spec",id:"configuration-spec",level:2},{value:"Communication and Protobuf Spec",id:"communication-and-protobuf-spec",level:2},{value:"Launching the EdgePort with Docker",id:"launching-the-edgeport-with-docker",level:2}];function h(e){const t={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"edgeport",children:"EdgePort"}),"\n",(0,n.jsx)(t.p,{children:"The EdgePort component accepts SIP Messages, parses them into protobuf, and sends them to the Message Dispatcher. After a SIP Message is processed, the EdgePort will forward the SIP Message to the next hop."}),"\n",(0,n.jsx)(t.p,{children:"The following diagram shows the relation between a SIP client, the EdgePort, and the Dispatcher."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-text",children:"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502SIP Client\u2502 \u2502EdgePort\u2502 \u2502Message Dispatcher\u2502\n\u2514\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502 \u2502 \u2502 \n \u2502SIP request \u2502 \u2502 \n \u2502\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500>\u2502 \u2502 \n \u2502 \u2502 \u2502 \n \u2502 \u2502gRPC request \u2502 \n \u2502 \u2502\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500>\u2502 \n \u2502 \u2502 \u2502 \n \u2502 \u2502gRPC response\u2502 \n \u2502 \u2502<\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2502 \n \u2502 \u2502 \u2502 \n \u2502SIP response\u2502 \u2502 \n \u2502<\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2502 \u2502 \n\u250c\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502SIP Client\u2502 \u2502EdgePort\u2502 \u2502Message Dispatcher\u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,n.jsx)(t.p,{children:"While we show the Dispatcher, we could also use a Processor. Both components share the same protobuf. However, the Dispatcher is required when you expect multiple Processors or at least one Middleware."}),"\n",(0,n.jsx)(t.p,{children:"For example, if your use case requires having one Processor for SIP INVITE and another for SIP MESSAGE requests, you will need to use a Dispatcher. Similarly, if you want to use a Middleware, you will need to use a Dispatcher."}),"\n",(0,n.jsx)(t.p,{children:"If you only have one Processor and have not Middleware, you can use the Processor directly. Running the Processor directly will make your deployment simpler and faster."}),"\n",(0,n.jsx)(t.h2,{id:"configuration-spec",children:"Configuration Spec"}),"\n",(0,n.jsx)(t.p,{children:"To configure the EdgePort, you must provide a YAML or JSON configuration with the following structure."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Property"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"ref"})}),(0,n.jsx)(t.td,{children:"Reference to the EdgePort"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"metadata.region"})}),(0,n.jsx)(t.td,{children:"Region where the EdgePort is located (reserved for future use)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.unknownMethodAction"})}),(0,n.jsx)(t.td,{children:"What to do if an incoming request type is not allowed (reserved for future use)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport"})}),(0,n.jsx)(t.td,{children:"Enabled Transport Protocols"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport[*].protocol"})}),(0,n.jsx)(t.td,{children:"Transport protocol"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport[*].bindAddr"})}),(0,n.jsx)(t.td,{children:"Ipv4 interface to accept requests on"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport[*].port"})}),(0,n.jsx)(t.td,{children:"Port to listen on"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.methods"})}),(0,n.jsx)(t.td,{children:"Acceptable SIP Methods"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.processor"})}),(0,n.jsx)(t.td,{children:"Adjacent service for message routing"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.processor.addr"})}),(0,n.jsx)(t.td,{children:"Address of the adjacent service"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.localnets"})}),(0,n.jsx)(t.td,{children:"Networks considered to be in the same local network"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.externalAddrs"})}),(0,n.jsx)(t.td,{children:"EdgePort external ip addresses"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.bindAddr"})}),(0,n.jsx)(t.td,{children:"Ipv4 interface to accept requests on"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext"})}),(0,n.jsx)(t.td,{children:"Security context"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.client"})}),(0,n.jsx)(t.td,{children:"Client security context"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.client.protocols"})}),(0,n.jsx)(t.td,{children:"TLS protocols used by the client (e.g., SSLv3, TLSv1.2)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.client.authType"})}),(0,n.jsx)(t.td,{children:"Client authentication type (e.g., Disabled, DisabledAll, Required, Wanted)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.keyStore"})}),(0,n.jsx)(t.td,{children:"Path to the key store file"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.trustStore"})}),(0,n.jsx)(t.td,{children:"Path to the trust store file"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.keyStorePassword"})}),(0,n.jsx)(t.td,{children:"Password for the key store"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.trustStorePassword"})}),(0,n.jsx)(t.td,{children:"Password for the trust store"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.keyStoreType"})}),(0,n.jsx)(t.td,{children:"Type of the key store (e.g., pkcs12)"}),(0,n.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,n.jsxs)(t.p,{children:["The security context is required if the EdgePort is configured to use a secure protocol such as ",(0,n.jsx)(t.code,{children:"TLS"})," or ",(0,n.jsx)(t.code,{children:"WSS"}),"."]}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:["Please see JAINSIP docs for details on the security context ",(0,n.jsx)(t.a,{href:"https://javadoc.io/doc/javax.sip/jain-sip-ri/1.2.220/gov/nist/javax/sip/SipStackImpl.html",children:"properties."})]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Here is an example of a configuration file:"}),"\n",(0,n.jsxs)(t.p,{children:["Filename: ",(0,n.jsx)(t.code,{children:"dispatcher.yaml"})," or ",(0,n.jsx)(t.code,{children:"dispatcher.json"})]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-yaml",children:'kind: EdgePort\napiVersion: v2beta1\nref: edgeport-01\nmetadata:\n region: default\nspec:\n unknownMethodAction: Discard\n processor:\n addr: dispatcher:51901 \n securityContext:\n client:\n protocols:\n - SSLv3\n - TLSv1.2\n authType: DisabledAll\n keyStorePassword: changeme\n trustStorePassword: changeme\n keyStore: "/etc/routr/certs/signaling.p12"\n trustStore: "/etc/routr/certs/signaling.p12"\n keyStoreType: pkcs12\n externalAddrs:\n - 10.111.220.2\n - sip01.edgeport.net\n localnets:\n - 127.0.0.1/8\n - 10.111.221.2/24\n methods:\n - REGISTER\n - MESSAGE\n - INVITE\n - ACK\n - BYE\n - CANCEL\n transport:\n - protocol: tcp\n port: 5060\n - protocol: udp\n port: 5060\n - protocol: tls\n port: 5061\n - protocol: ws \n port: 5062\n - protocol: wss\n port: 5063\n'})}),"\n",(0,n.jsxs)(t.p,{children:["The EdgePort requires the ",(0,n.jsx)(t.code,{children:"spec.externalAddrs"})," field to function properly in NATed environments like Docker. When provided, the ",(0,n.jsx)(t.code,{children:"spec.externalAddrs"})," is added as metadata to the SIP message and can later be used by a Processor to determine the correct advertised address."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Environment Variables"})}),"\n",(0,n.jsx)(t.p,{children:"The EdgePort provides the following environment variables as a convenient way to overwrite some configuration properties or provide additional behavior not covered by the configuration spec."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"PROCESSOR_ADDR"})," - Overwrites the ",(0,n.jsx)(t.code,{children:"spec.processor.addr"})," property"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"HOSTNAME"})," - Overwrites the ",(0,n.jsx)(t.code,{children:"ref"})," property. If running in K8s, ",(0,n.jsx)(t.code,{children:"ref"})," will be set to the pod's hostname."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"IGNORE_LOOPBACK_FROM_LOCALNETS"})," - If set to ",(0,n.jsx)(t.code,{children:"true"}),", the EdgePort will ignore the loopback address from the ",(0,n.jsx)(t.code,{children:"localnets"})," property. In Docker deployments, this is set to ",(0,n.jsx)(t.code,{children:"true"})," by default."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"CONSOLE_PUBLISHER_ENABLED"})," - If set to ",(0,n.jsx)(t.code,{children:"true"}),", the EdgePort will publish SIP messages to the console publisher. Useful for debugging purposes."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_ENABLED"})," - If set to ",(0,n.jsx)(t.code,{children:"true"}),", the EdgePort will publish SIP messages to the NATS publisher."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_SUBJECT"})," - Overwrites the default subject the NATS publisher uses. The default subject is ",(0,n.jsx)(t.code,{children:"routr"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_URL"})," - This is required if ",(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_ENABLED"})," is set to ",(0,n.jsx)(t.code,{children:"true"}),". It should contain the NATS server URL. For example: ",(0,n.jsx)(t.code,{children:"nats://nats:4222"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"communication-and-protobuf-spec",children:"Communication and Protobuf Spec"}),"\n",(0,n.jsx)(t.p,{children:"While the entry point to the EdgePort is SIP, the communication with downstream services happens via gRPC. The EdgePort uses the following protobuf messages to communicate with the Dispatcher or Processor, which shares the protobuf definition."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-protobuf",children:'syntax = "proto3";\n\npackage fonoster.routr.processor.v2beta1;\n\nimport "common.proto";\nimport "sipmessage.proto";\n\n// Processor service\nservice Processor {\n // Process Message Request\n rpc ProcessMessage (MessageRequest) returns (MessageResponse) {}\n}\n\nenum Method {\n UNKNOWN = 0;\n // Communicates user location (hostname, IP)\n REGISTER = 1;\n // Establishes a session\n INVITE = 2;\n // Transports Instant Messages\n MESSAGE = 3;\n // Publishes an event to the Server\n PUBLISH = 4;\n // Notifies the subscriber of a new event\n NOTIFY = 5;\n // Subscribes for Notification from the notifier\n SUBSCRIBE = 6;\n // Confirms an INVITE request\n ACK = 7;\n // Terminates a session\n BYE = 8;\n // Cancels establishing of a session\n CANCEL = 9;\n // Communicates information about the capabilities of the calling and receiving SIP phones\n OPTIONS = 10;\n // Provisional Acknowledgement\n PRACK = 11;\n // Sends mid session information\n INFO = 12;\n // Asks the recipient to issue call transfer\n REFER = 13;\n // Modifies the state of a session\n UPDATE = 14;\n}\n\nmessage NetInterface {\n string host = 1;\n int32 port = 2;\n fonoster.routr.common.v2beta1.Transport transport = 3;\n}\n\nmessage MessageRequest {\n // Same as the Call-Id header \n string ref = 1;\n string edge_port_ref = 2;\n Method method = 3;\n NetInterface sender = 4;\n repeated NetInterface listening_points = 5;\n repeated string external_addrs = 6;\n repeated string localnets = 7;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 8;\n map metadata = 9;\n}\n\nmessage MessageResponse {\n NetInterface sender = 1;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 2;\n map metadata = 3;\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Link to the ",(0,n.jsx)(t.a,{href:"https://github.com/fonoster/routr/blob/main/mods/common/src/protos/processor.proto",children:"protobuf definition."})]}),"\n",(0,n.jsx)(t.h2,{id:"launching-the-edgeport-with-docker",children:"Launching the EdgePort with Docker"}),"\n",(0,n.jsxs)(t.p,{children:["The EdgePort is available as a Docker image from ",(0,n.jsx)(t.a,{href:"https://hub.docker.com/r/fonoster/routr-edgeport",children:"Docker Hub"}),". To launch the EdgePort with Docker, you can use the following command:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"docker run -it -v $(pwd)/edgeport.yaml:/etc/routr/edgeport.yaml -p 5060:5060/udp fonoster/routr-edgeport\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The previous example will pull the latest version of the EdgePort from Docker Hub and launch it with the default configuration. The EdgePort will be listening on port ",(0,n.jsx)(t.code,{children:"5060"})," for UDP traffic. Remember, your Docker container must expose the ports in your configuration file. For example, if you want the port ",(0,n.jsx)(t.code,{children:"5061"})," for TLS traffic, you must add the following flag to the ",(0,n.jsx)(t.code,{children:"docker run"})," command: ",(0,n.jsx)(t.code,{children:"-p 5061:5061"}),"."]})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>d,x:()=>i});var n=s(6540);const r={},o=n.createContext(r);function d(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33664cb1.e1df95ca.js b/assets/js/33664cb1.e1df95ca.js deleted file mode 100644 index f846c0a5b..000000000 --- a/assets/js/33664cb1.e1df95ca.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[9953],{4987:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>a,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var n=s(4848),r=s(8453);const o={},d="EdgePort",i={id:"development/components/edgeport",title:"EdgePort",description:"The EdgePort component accepts SIP Messages, parses them into protobuf, and sends them to the Message Dispatcher. After a SIP Message is processed, the EdgePort will forward the SIP Message to the next hop.",source:"@site/docs/development/components/edgeport.md",sourceDirName:"development/components",slug:"/development/components/edgeport",permalink:"/docs/2.0.0/development/components/edgeport",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/components/edgeport.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/2.0.0/development/components/overview"},next:{title:"Message Dispatcher",permalink:"/docs/2.0.0/development/components/dispatcher"}},c={},l=[{value:"Configuration Spec",id:"configuration-spec",level:2},{value:"Communication and Protobuf Spec",id:"communication-and-protobuf-spec",level:2},{value:"Launching the EdgePort with Docker",id:"launching-the-edgeport-with-docker",level:2}];function h(e){const t={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"edgeport",children:"EdgePort"}),"\n",(0,n.jsx)(t.p,{children:"The EdgePort component accepts SIP Messages, parses them into protobuf, and sends them to the Message Dispatcher. After a SIP Message is processed, the EdgePort will forward the SIP Message to the next hop."}),"\n",(0,n.jsx)(t.p,{children:"The following diagram shows the relation between a SIP client, the EdgePort, and the Dispatcher."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-text",children:"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502SIP Client\u2502 \u2502EdgePort\u2502 \u2502Message Dispatcher\u2502\n\u2514\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502 \u2502 \u2502 \n \u2502SIP request \u2502 \u2502 \n \u2502\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500>\u2502 \u2502 \n \u2502 \u2502 \u2502 \n \u2502 \u2502gRPC request \u2502 \n \u2502 \u2502\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500>\u2502 \n \u2502 \u2502 \u2502 \n \u2502 \u2502gRPC response\u2502 \n \u2502 \u2502<\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2502 \n \u2502 \u2502 \u2502 \n \u2502SIP response\u2502 \u2502 \n \u2502<\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2502 \u2502 \n\u250c\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502SIP Client\u2502 \u2502EdgePort\u2502 \u2502Message Dispatcher\u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"})}),"\n",(0,n.jsx)(t.p,{children:"While we show the Dispatcher, we could also use a Processor. Both components share the same protobuf. However, the Dispatcher is required when you expect multiple Processors or at least one Middleware."}),"\n",(0,n.jsx)(t.p,{children:"For example, if your use case requires having one Processor for SIP INVITE and another for SIP MESSAGE requests, you will need to use a Dispatcher. Similarly, if you want to use a Middleware, you will need to use a Dispatcher."}),"\n",(0,n.jsx)(t.p,{children:"If you only have one Processor and have not Middleware, you can use the Processor directly. Running the Processor directly will make your deployment simpler and faster."}),"\n",(0,n.jsx)(t.h2,{id:"configuration-spec",children:"Configuration Spec"}),"\n",(0,n.jsx)(t.p,{children:"To configure the EdgePort, you must provide a YAML or JSON configuration with the following structure."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Property"}),(0,n.jsx)(t.th,{children:"Description"}),(0,n.jsx)(t.th,{children:"Required"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"ref"})}),(0,n.jsx)(t.td,{children:"Reference to the EdgePort"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"metadata.region"})}),(0,n.jsx)(t.td,{children:"Region where the EdgePort is located (reserved for future use)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.unknownMethodAction"})}),(0,n.jsx)(t.td,{children:"What to do if an incoming request type is not allowed (reserved for future use)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport"})}),(0,n.jsx)(t.td,{children:"Enabled Transport Protocols"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport[*].protocol"})}),(0,n.jsx)(t.td,{children:"Transport protocol"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport[*].bindAddr"})}),(0,n.jsx)(t.td,{children:"Ipv4 interface to accept requests on"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.transport[*].port"})}),(0,n.jsx)(t.td,{children:"Port to listen on"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.methods"})}),(0,n.jsx)(t.td,{children:"Acceptable SIP Methods"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.processor"})}),(0,n.jsx)(t.td,{children:"Adjacent service for message routing"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.processor.addr"})}),(0,n.jsx)(t.td,{children:"Address of the adjacent service"}),(0,n.jsx)(t.td,{children:"Yes"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.localnets"})}),(0,n.jsx)(t.td,{children:"Networks considered to be in the same local network"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.externalAddrs"})}),(0,n.jsx)(t.td,{children:"EdgePort external ip addresses"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.bindAddr"})}),(0,n.jsx)(t.td,{children:"Ipv4 interface to accept requests on"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext"})}),(0,n.jsx)(t.td,{children:"Security context"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.client"})}),(0,n.jsx)(t.td,{children:"Client security context"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.client.protocols"})}),(0,n.jsx)(t.td,{children:"TLS protocols used by the client (e.g., SSLv3, TLSv1.2)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.client.authType"})}),(0,n.jsx)(t.td,{children:"Client authentication type (e.g., Disabled, DisabledAll, Required, Wanted)"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.keyStore"})}),(0,n.jsx)(t.td,{children:"Path to the key store file"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.trustStore"})}),(0,n.jsx)(t.td,{children:"Path to the trust store file"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.keyStorePassword"})}),(0,n.jsx)(t.td,{children:"Password for the key store"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.trustStorePassword"})}),(0,n.jsx)(t.td,{children:"Password for the trust store"}),(0,n.jsx)(t.td,{children:"No"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"spec.securityContext.keyStoreType"})}),(0,n.jsx)(t.td,{children:"Type of the key store (e.g., pkcs12)"}),(0,n.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,n.jsxs)(t.p,{children:["The security context is required if the EdgePort is configured to use a secure protocol such as ",(0,n.jsx)(t.code,{children:"TLS"})," or ",(0,n.jsx)(t.code,{children:"WSS"}),"."]}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:["Please see JAINSIP docs for details on the security context ",(0,n.jsx)(t.a,{href:"https://javadoc.io/doc/javax.sip/jain-sip-ri/1.2.220/gov/nist/javax/sip/SipStackImpl.html",children:"properties."})]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Here is an example of a configuration file:"}),"\n",(0,n.jsxs)(t.p,{children:["Filename: ",(0,n.jsx)(t.code,{children:"dispatcher.yaml"})," or ",(0,n.jsx)(t.code,{children:"dispatcher.json"})]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-yaml",children:'kind: EdgePort\napiVersion: v2beta1\nref: edgeport-01\nmetadata:\n region: default\nspec:\n unknownMethodAction: Discard\n processor:\n addr: dispatcher:51901 \n securityContext:\n client:\n protocols:\n - SSLv3\n - TLSv1.2\n authType: DisabledAll\n keyStorePassword: changeme\n trustStorePassword: changeme\n keyStore: "/etc/routr/certs/signaling.p12"\n trustStore: "/etc/routr/certs/signaling.p12"\n keyStoreType: pkcs12\n externalAddrs:\n - 10.111.220.2\n - sip01.edgeport.net\n localnets:\n - 127.0.0.1/8\n - 10.111.221.2/24\n methods:\n - REGISTER\n - MESSAGE\n - INVITE\n - ACK\n - BYE\n - CANCEL\n transport:\n - protocol: tcp\n port: 5060\n - protocol: udp\n port: 5060\n - protocol: tls\n port: 5061\n - protocol: ws \n port: 5062\n - protocol: wss\n port: 5063\n'})}),"\n",(0,n.jsxs)(t.p,{children:["The EdgePort requires the ",(0,n.jsx)(t.code,{children:"spec.externalAddrs"})," field to function properly in NATed environments like Docker. When provided, the ",(0,n.jsx)(t.code,{children:"spec.externalAddrs"})," is added as metadata to the SIP message and can later be used by a Processor to determine the correct advertised address."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Environment Variables"})}),"\n",(0,n.jsx)(t.p,{children:"The EdgePort provides the following environment variables as a convenient way to overwrite some configuration properties or provide additional behavior not covered by the configuration spec."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"PROCESSOR_ADDR"})," - Overwrites the ",(0,n.jsx)(t.code,{children:"spec.processor.addr"})," property"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"HOSTNAME"})," - Overwrites the ",(0,n.jsx)(t.code,{children:"ref"})," property. If running in K8s, ",(0,n.jsx)(t.code,{children:"ref"})," will be set to the pod's hostname."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"IGNORE_LOOPBACK_FROM_LOCALNETS"})," - If set to ",(0,n.jsx)(t.code,{children:"true"}),", the EdgePort will ignore the loopback address from the ",(0,n.jsx)(t.code,{children:"localnets"})," property. In Docker deployments, this is set to ",(0,n.jsx)(t.code,{children:"true"})," by default."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"CONSOLE_PUBLISHER_ENABLED"})," - If set to ",(0,n.jsx)(t.code,{children:"true"}),", the EdgePort will publish SIP messages to the console publisher. Useful for debugging purposes."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_ENABLED"})," - If set to ",(0,n.jsx)(t.code,{children:"true"}),", the EdgePort will publish SIP messages to the NATS publisher."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_SUBJECT"})," - Overwrites the default subject the NATS publisher uses. The default subject is ",(0,n.jsx)(t.code,{children:"routr"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_URL"})," - This is required if ",(0,n.jsx)(t.code,{children:"NATS_PUBLISHER_ENABLED"})," is set to ",(0,n.jsx)(t.code,{children:"true"}),". It should contain the NATS server URL. For example: ",(0,n.jsx)(t.code,{children:"nats://nats:4222"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"communication-and-protobuf-spec",children:"Communication and Protobuf Spec"}),"\n",(0,n.jsx)(t.p,{children:"While the entry point to the EdgePort is SIP, the communication with downstream services happens via gRPC. The EdgePort uses the following protobuf messages to communicate with the Dispatcher or Processor, which shares the protobuf definition."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-protobuf",children:'syntax = "proto3";\n\npackage fonoster.routr.processor.v2beta1;\n\nimport "common.proto";\nimport "sipmessage.proto";\n\n// Processor service\nservice Processor {\n // Process Message Request\n rpc ProcessMessage (MessageRequest) returns (MessageResponse) {}\n}\n\nenum Method {\n UNKNOWN = 0;\n // Communicates user location (hostname, IP)\n REGISTER = 1;\n // Establishes a session\n INVITE = 2;\n // Transports Instant Messages\n MESSAGE = 3;\n // Publishes an event to the Server\n PUBLISH = 4;\n // Notifies the subscriber of a new event\n NOTIFY = 5;\n // Subscribes for Notification from the notifier\n SUBSCRIBE = 6;\n // Confirms an INVITE request\n ACK = 7;\n // Terminates a session\n BYE = 8;\n // Cancels establishing of a session\n CANCEL = 9;\n // Communicates information about the capabilities of the calling and receiving SIP phones\n OPTIONS = 10;\n // Provisional Acknowledgement\n PRACK = 11;\n // Sends mid session information\n INFO = 12;\n // Asks the recipient to issue call transfer\n REFER = 13;\n // Modifies the state of a session\n UPDATE = 14;\n}\n\nmessage NetInterface {\n string host = 1;\n int32 port = 2;\n fonoster.routr.common.v2beta1.Transport transport = 3;\n}\n\nmessage MessageRequest {\n // Same as the Call-Id header \n string ref = 1;\n string edge_port_ref = 2;\n Method method = 3;\n NetInterface sender = 4;\n repeated NetInterface listening_points = 5;\n repeated string external_addrs = 6;\n repeated string localnets = 7;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 8;\n map metadata = 9;\n}\n\nmessage MessageResponse {\n NetInterface sender = 1;\n fonoster.routr.sipmessage.v2beta1.SIPMessage message = 2;\n map metadata = 3;\n}\n'})}),"\n",(0,n.jsxs)(t.p,{children:["Link to the ",(0,n.jsx)(t.a,{href:"https://github.com/fonoster/routr/blob/main/mods/common/src/protos/processor.proto",children:"protobuf definition."})]}),"\n",(0,n.jsx)(t.h2,{id:"launching-the-edgeport-with-docker",children:"Launching the EdgePort with Docker"}),"\n",(0,n.jsxs)(t.p,{children:["The EdgePort is available as a Docker image from ",(0,n.jsx)(t.a,{href:"https://hub.docker.com/r/fonoster/routr-edgeport",children:"Docker Hub"}),". To launch the EdgePort with Docker, you can use the following command:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"docker run -it -v $(pwd)/edgeport.yaml:/etc/routr/edgeport.yaml -p 5060:5060/udp fonoster/routr-edgeport\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The previous example will pull the latest version of the EdgePort from Docker Hub and launch it with the default configuration. The EdgePort will be listening on port ",(0,n.jsx)(t.code,{children:"5060"})," for UDP traffic. Remember, your Docker container must expose the ports in your configuration file. For example, if you want the port ",(0,n.jsx)(t.code,{children:"5061"})," for TLS traffic, you must add the following flag to the ",(0,n.jsx)(t.code,{children:"docker run"})," command: ",(0,n.jsx)(t.code,{children:"-p 5061:5061"}),"."]})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>d,x:()=>i});var n=s(6540);const r={},o=n.createContext(r);function d(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/35bee977.4e13b84b.js b/assets/js/35bee977.4e13b84b.js deleted file mode 100644 index a7426ee60..000000000 --- a/assets/js/35bee977.4e13b84b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[1304],{5644:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>a,toc:()=>c});var s=i(4848),o=i(8453);const t={sidebar_position:2},r="Concepts",a={id:"concepts",title:"Concepts",description:"The following are some key concepts, including some of the essential routing strategies implemented in Routr.",source:"@site/versioned_docs/version-1.x.x/concepts.md",sourceDirName:".",slug:"/concepts",permalink:"/docs/1.x.x/concepts",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/concepts.md",tags:[],version:"1.x.x",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Test Plan",permalink:"/docs/1.x.x/introduction/test-plan"},next:{title:"Cheatsheet",permalink:"/docs/1.x.x/administration/cli/cheatsheet"}},l={},c=[{value:"Intra-Domain Routing",id:"intra-domain-routing",level:2},{value:"Double Agents",id:"double-agents",level:3},{value:"Single Domain Example",id:"single-domain-example",level:3},{value:"Domain Ingress Routing",id:"domain-ingress-routing",level:2},{value:"Domain Egress Routing",id:"domain-egress-routing",level:2},{value:"Peers Routing",id:"peers-routing",level:2}];function d(e){const n={blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"concepts",children:"Concepts"}),"\n",(0,s.jsx)(n.p,{children:"The following are some key concepts, including some of the essential routing strategies implemented in Routr."}),"\n",(0,s.jsx)(n.h2,{id:"intra-domain-routing",children:"Intra-Domain Routing"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Intra-Domain Routing(IDR)"})," offers a mechanism for user segmentation. For a small or medium size company, a single domain may be sufficient, but for a multinational or an IP telephony service provider, it may not."]}),"\n",(0,s.jsxs)(n.p,{children:["For a small company with less than 50 users, you may define a domain ",(0,s.jsx)(n.code,{children:"sip.domain.com"}),". Regardless of how many offices they have, the chances are that they still need to communicate with each other, and therefore we keep them in the same Domain. Needless to say, that in a company this size you are not going to run out usernames."]}),"\n",(0,s.jsxs)(n.p,{children:["A multinational company like ",(0,s.jsx)(n.em,{children:"Walmart"})," have thousands of stores that operate independently. In such a case, you need a multi-domain setting. For example, you may define the domains ",(0,s.jsx)(n.code,{children:"sip.0001.walmart.com"})," and ",(0,s.jsx)(n.code,{children:"sip.0002.walmart.com"}),", and... you get the idea."]}),"\n",(0,s.jsx)(n.h3,{id:"double-agents",children:"Double Agents"}),"\n",(0,s.jsx)("img",{src:"https://raw.githubusercontent.com/wiki/fonoster/routr/images/double_agent.png",width:"400"}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsxs)(n.p,{children:["Yes, you can have double Agents, or Agents that exist in a multi-domain setup. For this to work, you need to do is include the Domain in the Agent's ",(0,s.jsx)(n.code,{children:"spec.domain[*]"})," list. In the example before, John can send or receive calls from both domains, while the rest of the Agents are only allowed to call within the Domain."]}),"\n",(0,s.jsx)(n.h3,{id:"single-domain-example",children:"Single Domain Example"}),"\n",(0,s.jsx)(n.p,{children:"The following yaml configuration shows a simple setup, involving one Domain and two Agents:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Domain configuration"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Domain\n metadata:\n name: Local Office\n spec:\n context:\n domainUri: sip.local\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Agents configuration"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Agent\n metadata:\n name: John Doe\n spec:\n credentials:\n username: john\n secret: '1234'\n domains: [sip.local]\n- kind: Agent\n apiVersion: v1beta1\n metadata:\n name: Janie Doe\n spec:\n credentials:\n username: janie\n secret: '1234'\n domains: [sip.local]\n"})}),"\n",(0,s.jsx)(n.p,{children:'Voila! That\'s all the configuration you need for intra-domain communication. For calls outside the Domain, see "Domain Egress Routing" section and to receive calls from the PSTN check section "Domain Ingress Routing."'}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["To configure your sip devices use the information found in ",(0,s.jsx)(n.code,{children:"config/agents.yml"}),". Also, you must use the Host/IP of Routr server as\nthe OUTBOUND PROXY of your sip device."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsx)(n.p,{children:"The following rules apply to Intra-Domain Routing:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Agents can only call other Agents in the same Domain"}),"\n",(0,s.jsx)(n.li,{children:"Agents must belong to a Domain"}),"\n",(0,s.jsxs)(n.li,{children:["Agents Are not allowed to send a Digest username different than the username in the ",(0,s.jsx)(n.code,{children:"From-Header"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"domain-ingress-routing",children:"Domain Ingress Routing"}),"\n",(0,s.jsxs)(n.p,{children:["In Routr, the process of receiving a call from PSTN to a Domain is as ",(0,s.jsx)(n.em,{children:"Domain Ingress Routing(DIR)"})," and it is done using a Gateway resource. The yaml file ",(0,s.jsx)(n.code,{children:"config/gateways.yml"})," contains the Gateways. The following example shows a typical Gateway configuration."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Gateway\n metadata:\n name: Plain Old Phone Service Provider\n spec:\n regService:\n host: sip.provider.net\n credentials:\n username: 'gwuser'\n secret: gwsecret\n transport: udp\n registries: [sip.nyc.provider.net] # These are additional registrars within the provider's network\n"})}),"\n",(0,s.jsx)(n.p,{children:"You also need to define Numbers. Routr uses the Address Of Record(AOR) to routes incoming calls from a Number to an existing Agent or Peer. The AOR must be available in the location service at the time of the call, or the call gets rejected."}),"\n",(0,s.jsx)(n.p,{children:"Please examine the following example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Number\n metadata:\n gwRef: dd50baa4\n geoInfo:\n city: Columbus, GA\n country: USA\n countryISOCode: US\n spec:\n location:\n telUrl: 'tel:17066041487'\n aorLink: 'sip:john@sip.local' # This is the sip uri of an agent that is expected to be logged in\n"})}),"\n",(0,s.jsx)(n.p,{children:'Easy right? Any incoming call is routed from this Gateway and Number to "Jhon Doe" @ Ocean New York.'}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"spec.location"})," block of a ",(0,s.jsx)(n.code,{children:"Number"})," resource configuration, determines the path of an inbound call from the PSTN. The ",(0,s.jsx)(n.code,{children:"aorLink"})," refers to an Address of Record(Agent or Peer) that is available in the ",(0,s.jsx)(n.code,{children:"location service"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"domain-egress-routing",children:"Domain Egress Routing"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Domain Egress Routing(DER)"})," is the way that ",(0,s.jsx)(n.strong,{children:"Routr"})," deals with a call request to a ",(0,s.jsx)(n.em,{children:"callee"})," that exists in the Public Switched Telephone Network(PSTN) and not in the ",(0,s.jsx)(n.em,{children:"callers'"})," Domain. The EgressPolicy consists of a ",(0,s.jsx)(n.code,{children:"rule"}),", and a ",(0,s.jsx)(n.code,{children:"numberRef"})," defined in the ",(0,s.jsx)(n.code,{children:"spec.context"})," section of ",(0,s.jsx)(n.code,{children:"Domains"})," resources."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"rule"})," and ",(0,s.jsx)(n.code,{children:"numberRef"})," is defined as follows:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"rule"})," is a regex to match callee in the call request. The location service uses this only after a search in the caller's Domain first."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"numberRef"})," is the identifier of the Number that will to route the call. The Number must already exist and have a parent Gateway."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsxs)(n.p,{children:["Agents can only perform outbound calls using the ",(0,s.jsx)(n.code,{children:"Egress Policy"})," of their Domains."]}),"\n",(0,s.jsx)(n.h2,{id:"peers-routing",children:"Peers Routing"}),"\n",(0,s.jsx)(n.p,{children:"Peers are very similar to Agents, but they are not bound to any Domain, and usually, collocated in the same network with Routr. A typical case is peering with Asterisk, where Asterisk acts as a Media Server and Routr provides the signaling."}),"\n",(0,s.jsxs)(n.p,{children:["Peers can perform inbound/outbound signaling within the network without any special consideration since they exist inside the ",(0,s.jsx)(n.em,{children:"Location Service"})," just like Agents. So it is possible to perform signaling from Peer to Peer, Peer to Agent."]}),"\n",(0,s.jsxs)(n.p,{children:["The same is true for Inbound from the PSTN. For example, we can redirect incoming calls from the PSTN using the ",(0,s.jsx)(n.code,{children:"spec.location"})," settings in the ",(0,s.jsx)(n.code,{children:"numbers.yml"})," configuration file."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsx)(n.p,{children:"Agents are not allowed to call Peers."}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["A future version of the ",(0,s.jsx)(n.code,{children:"Peer resource"})," might feature a ",(0,s.jsx)(n.code,{children:"spec.acceptFrom.*"})," field to allow calls from Domains or specific Agents."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>a});var s=i(6540);const o={},t=s.createContext(o);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/35bee977.e2deba05.js b/assets/js/35bee977.e2deba05.js new file mode 100644 index 000000000..65858d963 --- /dev/null +++ b/assets/js/35bee977.e2deba05.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[1304],{229:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>a,toc:()=>c});var s=i(4848),o=i(8453);const t={sidebar_position:2},r="Concepts",a={id:"concepts",title:"Concepts",description:"The following are some key concepts, including some of the essential routing strategies implemented in Routr.",source:"@site/versioned_docs/version-1.x.x/concepts.md",sourceDirName:".",slug:"/concepts",permalink:"/docs/1.x.x/concepts",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/concepts.md",tags:[],version:"1.x.x",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Test Plan",permalink:"/docs/1.x.x/introduction/test-plan"},next:{title:"Cheatsheet",permalink:"/docs/1.x.x/administration/cli/cheatsheet"}},l={},c=[{value:"Intra-Domain Routing",id:"intra-domain-routing",level:2},{value:"Double Agents",id:"double-agents",level:3},{value:"Single Domain Example",id:"single-domain-example",level:3},{value:"Domain Ingress Routing",id:"domain-ingress-routing",level:2},{value:"Domain Egress Routing",id:"domain-egress-routing",level:2},{value:"Peers Routing",id:"peers-routing",level:2}];function d(e){const n={blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"concepts",children:"Concepts"}),"\n",(0,s.jsx)(n.p,{children:"The following are some key concepts, including some of the essential routing strategies implemented in Routr."}),"\n",(0,s.jsx)(n.h2,{id:"intra-domain-routing",children:"Intra-Domain Routing"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Intra-Domain Routing(IDR)"})," offers a mechanism for user segmentation. For a small or medium size company, a single domain may be sufficient, but for a multinational or an IP telephony service provider, it may not."]}),"\n",(0,s.jsxs)(n.p,{children:["For a small company with less than 50 users, you may define a domain ",(0,s.jsx)(n.code,{children:"sip.domain.com"}),". Regardless of how many offices they have, the chances are that they still need to communicate with each other, and therefore we keep them in the same Domain. Needless to say, that in a company this size you are not going to run out usernames."]}),"\n",(0,s.jsxs)(n.p,{children:["A multinational company like ",(0,s.jsx)(n.em,{children:"Walmart"})," have thousands of stores that operate independently. In such a case, you need a multi-domain setting. For example, you may define the domains ",(0,s.jsx)(n.code,{children:"sip.0001.walmart.com"})," and ",(0,s.jsx)(n.code,{children:"sip.0002.walmart.com"}),", and... you get the idea."]}),"\n",(0,s.jsx)(n.h3,{id:"double-agents",children:"Double Agents"}),"\n",(0,s.jsx)("img",{src:"https://raw.githubusercontent.com/wiki/fonoster/routr/images/double_agent.png",width:"400"}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsxs)(n.p,{children:["Yes, you can have double Agents, or Agents that exist in a multi-domain setup. For this to work, you need to do is include the Domain in the Agent's ",(0,s.jsx)(n.code,{children:"spec.domain[*]"})," list. In the example before, John can send or receive calls from both domains, while the rest of the Agents are only allowed to call within the Domain."]}),"\n",(0,s.jsx)(n.h3,{id:"single-domain-example",children:"Single Domain Example"}),"\n",(0,s.jsx)(n.p,{children:"The following yaml configuration shows a simple setup, involving one Domain and two Agents:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Domain configuration"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Domain\n metadata:\n name: Local Office\n spec:\n context:\n domainUri: sip.local\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Agents configuration"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Agent\n metadata:\n name: John Doe\n spec:\n credentials:\n username: john\n secret: '1234'\n domains: [sip.local]\n- kind: Agent\n apiVersion: v1beta1\n metadata:\n name: Janie Doe\n spec:\n credentials:\n username: janie\n secret: '1234'\n domains: [sip.local]\n"})}),"\n",(0,s.jsx)(n.p,{children:'Voila! That\'s all the configuration you need for intra-domain communication. For calls outside the Domain, see "Domain Egress Routing" section and to receive calls from the PSTN check section "Domain Ingress Routing."'}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["To configure your sip devices use the information found in ",(0,s.jsx)(n.code,{children:"config/agents.yml"}),". Also, you must use the Host/IP of Routr server as\nthe OUTBOUND PROXY of your sip device."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsx)(n.p,{children:"The following rules apply to Intra-Domain Routing:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Agents can only call other Agents in the same Domain"}),"\n",(0,s.jsx)(n.li,{children:"Agents must belong to a Domain"}),"\n",(0,s.jsxs)(n.li,{children:["Agents Are not allowed to send a Digest username different than the username in the ",(0,s.jsx)(n.code,{children:"From-Header"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"domain-ingress-routing",children:"Domain Ingress Routing"}),"\n",(0,s.jsxs)(n.p,{children:["In Routr, the process of receiving a call from PSTN to a Domain is as ",(0,s.jsx)(n.em,{children:"Domain Ingress Routing(DIR)"})," and it is done using a Gateway resource. The yaml file ",(0,s.jsx)(n.code,{children:"config/gateways.yml"})," contains the Gateways. The following example shows a typical Gateway configuration."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Gateway\n metadata:\n name: Plain Old Phone Service Provider\n spec:\n regService:\n host: sip.provider.net\n credentials:\n username: 'gwuser'\n secret: gwsecret\n transport: udp\n registries: [sip.nyc.provider.net] # These are additional registrars within the provider's network\n"})}),"\n",(0,s.jsx)(n.p,{children:"You also need to define Numbers. Routr uses the Address Of Record(AOR) to routes incoming calls from a Number to an existing Agent or Peer. The AOR must be available in the location service at the time of the call, or the call gets rejected."}),"\n",(0,s.jsx)(n.p,{children:"Please examine the following example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- apiVersion: v1beta1\n kind: Number\n metadata:\n gwRef: dd50baa4\n geoInfo:\n city: Columbus, GA\n country: USA\n countryISOCode: US\n spec:\n location:\n telUrl: 'tel:17066041487'\n aorLink: 'sip:john@sip.local' # This is the sip uri of an agent that is expected to be logged in\n"})}),"\n",(0,s.jsx)(n.p,{children:'Easy right? Any incoming call is routed from this Gateway and Number to "Jhon Doe" @ Ocean New York.'}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"spec.location"})," block of a ",(0,s.jsx)(n.code,{children:"Number"})," resource configuration, determines the path of an inbound call from the PSTN. The ",(0,s.jsx)(n.code,{children:"aorLink"})," refers to an Address of Record(Agent or Peer) that is available in the ",(0,s.jsx)(n.code,{children:"location service"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"domain-egress-routing",children:"Domain Egress Routing"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.em,{children:"Domain Egress Routing(DER)"})," is the way that ",(0,s.jsx)(n.strong,{children:"Routr"})," deals with a call request to a ",(0,s.jsx)(n.em,{children:"callee"})," that exists in the Public Switched Telephone Network(PSTN) and not in the ",(0,s.jsx)(n.em,{children:"callers'"})," Domain. The EgressPolicy consists of a ",(0,s.jsx)(n.code,{children:"rule"}),", and a ",(0,s.jsx)(n.code,{children:"numberRef"})," defined in the ",(0,s.jsx)(n.code,{children:"spec.context"})," section of ",(0,s.jsx)(n.code,{children:"Domains"})," resources."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"rule"})," and ",(0,s.jsx)(n.code,{children:"numberRef"})," is defined as follows:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"rule"})," is a regex to match callee in the call request. The location service uses this only after a search in the caller's Domain first."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"numberRef"})," is the identifier of the Number that will to route the call. The Number must already exist and have a parent Gateway."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsxs)(n.p,{children:["Agents can only perform outbound calls using the ",(0,s.jsx)(n.code,{children:"Egress Policy"})," of their Domains."]}),"\n",(0,s.jsx)(n.h2,{id:"peers-routing",children:"Peers Routing"}),"\n",(0,s.jsx)(n.p,{children:"Peers are very similar to Agents, but they are not bound to any Domain, and usually, collocated in the same network with Routr. A typical case is peering with Asterisk, where Asterisk acts as a Media Server and Routr provides the signaling."}),"\n",(0,s.jsxs)(n.p,{children:["Peers can perform inbound/outbound signaling within the network without any special consideration since they exist inside the ",(0,s.jsx)(n.em,{children:"Location Service"})," just like Agents. So it is possible to perform signaling from Peer to Peer, Peer to Agent."]}),"\n",(0,s.jsxs)(n.p,{children:["The same is true for Inbound from the PSTN. For example, we can redirect incoming calls from the PSTN using the ",(0,s.jsx)(n.code,{children:"spec.location"})," settings in the ",(0,s.jsx)(n.code,{children:"numbers.yml"})," configuration file."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Routing Rules"})}),"\n",(0,s.jsx)(n.p,{children:"Agents are not allowed to call Peers."}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["A future version of the ",(0,s.jsx)(n.code,{children:"Peer resource"})," might feature a ",(0,s.jsx)(n.code,{children:"spec.acceptFrom.*"})," field to allow calls from Domains or specific Agents."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>a});var s=i(6540);const o={},t=s.createContext(o);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/39d73575.1b5c629a.js b/assets/js/39d73575.1b5c629a.js new file mode 100644 index 000000000..d0fb8c6a5 --- /dev/null +++ b/assets/js/39d73575.1b5c629a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[1780],{5352:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var n=o(4848),r=o(8453);const s={},i="Alteration Methods",a={id:"development/alterations/methods",title:"Alteration Methods",description:"Coming soon.",source:"@site/docs/development/alterations/methods.md",sourceDirName:"development/alterations",slug:"/development/alterations/methods",permalink:"/docs/2.11.5/development/alterations/methods",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/alterations/methods.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/2.11.5/development/alterations/overview"},next:{title:"Building a Processor",permalink:"/docs/2.11.5/development/building-a-processor"}},d={},c=[];function l(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"alteration-methods",children:"Alteration Methods"}),"\n",(0,n.jsx)(t.p,{children:"Coming soon."})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var n=o(6540);const r={},s=n.createContext(r);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/39d73575.2275c69d.js b/assets/js/39d73575.2275c69d.js deleted file mode 100644 index cc777bfc3..000000000 --- a/assets/js/39d73575.2275c69d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[1780],{2655:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var n=o(4848),r=o(8453);const s={},i="Alteration Methods",a={id:"development/alterations/methods",title:"Alteration Methods",description:"Coming soon.",source:"@site/docs/development/alterations/methods.md",sourceDirName:"development/alterations",slug:"/development/alterations/methods",permalink:"/docs/2.0.0/development/alterations/methods",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/alterations/methods.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/2.0.0/development/alterations/overview"},next:{title:"Building a Processor",permalink:"/docs/2.0.0/development/building-a-processor"}},d={},c=[];function l(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"alteration-methods",children:"Alteration Methods"}),"\n",(0,n.jsx)(t.p,{children:"Coming soon."})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var n=o(6540);const r={},s=n.createContext(r);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a673d53.2766e28e.js b/assets/js/3a673d53.a733cb64.js similarity index 98% rename from assets/js/3a673d53.2766e28e.js rename to assets/js/3a673d53.a733cb64.js index 5e9043434..bb4e32adf 100644 --- a/assets/js/3a673d53.2766e28e.js +++ b/assets/js/3a673d53.a733cb64.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[831],{3202:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var n=o(4848),r=o(8453);const i={},a="Roadmap",s={id:"introduction/roadmap",title:"Roadmap",description:"The following is only a selection of some of the major features we plan to implement soon. To get a complete overview of planned features and current work, see the issue trackers for the various repositories, for example, the Routr server.",source:"@site/versioned_docs/version-1.x.x/introduction/roadmap.md",sourceDirName:"introduction",slug:"/introduction/roadmap",permalink:"/docs/1.x.x/introduction/roadmap",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/introduction/roadmap.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Community",permalink:"/docs/1.x.x/introduction/community"},next:{title:"FAQ",permalink:"/docs/1.x.x/introduction/faq"}},c={},u=[{value:"Accounting, Authentication, and Authorization",id:"accounting-authentication-and-authorization",level:2},{value:"IM and Presence",id:"im-and-presence",level:2},{value:"Per-domain Certificate",id:"per-domain-certificate",level:2},{value:"Support the Ecosystem",id:"support-the-ecosystem",level:2}];function d(e){const t={a:"a",h1:"h1",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"roadmap",children:"Roadmap"}),"\n",(0,n.jsxs)(t.p,{children:["The following is only a selection of some of the major features we plan to implement soon. To get a complete overview of planned features and current work, see the issue trackers for the various repositories, for example, the ",(0,n.jsx)(t.a,{href:"https://github.com/fonoster/routr/issues",children:"Routr server"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"accounting-authentication-and-authorization",children:"Accounting, Authentication, and Authorization"}),"\n",(0,n.jsx)(t.p,{children:"Routr does not currently provide any mechanism for aid the accounting. Our current priority is to implement a module to support pushing accounting, authentication, and authorization events."}),"\n",(0,n.jsx)(t.h2,{id:"im-and-presence",children:"IM and Presence"}),"\n",(0,n.jsx)(t.p,{children:"We understand that instant-messaging and presence are an essential piece of any VoIP network. We are currently looking into the SIMPLE and XCAP protocols to provide IM and Presence in Routr."}),"\n",(0,n.jsx)(t.h2,{id:"per-domain-certificate",children:"Per-domain Certificate"}),"\n",(0,n.jsx)(t.p,{children:"Routr, currently its only possible to install a single certificate with multiple-domains. In the future, we want to ease the certificate installation/updating process by allowing a per-domain certificate."}),"\n",(0,n.jsx)(t.h2,{id:"support-the-ecosystem",children:"Support the Ecosystem"}),"\n",(0,n.jsxs)(t.p,{children:["We want to release a stable version of the ",(0,n.jsx)(t.a,{href:"https://github.com/fonoster/routr-ui",children:"web UI"})," soon. The web UI is one of our primary strategy to facilitate the deployment of VoIP networks with Routr."]})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>s});var n=o(6540);const r={},i=n.createContext(r);function a(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[831],{8719:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var n=o(4848),r=o(8453);const i={},a="Roadmap",s={id:"introduction/roadmap",title:"Roadmap",description:"The following is only a selection of some of the major features we plan to implement soon. To get a complete overview of planned features and current work, see the issue trackers for the various repositories, for example, the Routr server.",source:"@site/versioned_docs/version-1.x.x/introduction/roadmap.md",sourceDirName:"introduction",slug:"/introduction/roadmap",permalink:"/docs/1.x.x/introduction/roadmap",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/introduction/roadmap.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Community",permalink:"/docs/1.x.x/introduction/community"},next:{title:"FAQ",permalink:"/docs/1.x.x/introduction/faq"}},c={},u=[{value:"Accounting, Authentication, and Authorization",id:"accounting-authentication-and-authorization",level:2},{value:"IM and Presence",id:"im-and-presence",level:2},{value:"Per-domain Certificate",id:"per-domain-certificate",level:2},{value:"Support the Ecosystem",id:"support-the-ecosystem",level:2}];function d(e){const t={a:"a",h1:"h1",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"roadmap",children:"Roadmap"}),"\n",(0,n.jsxs)(t.p,{children:["The following is only a selection of some of the major features we plan to implement soon. To get a complete overview of planned features and current work, see the issue trackers for the various repositories, for example, the ",(0,n.jsx)(t.a,{href:"https://github.com/fonoster/routr/issues",children:"Routr server"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"accounting-authentication-and-authorization",children:"Accounting, Authentication, and Authorization"}),"\n",(0,n.jsx)(t.p,{children:"Routr does not currently provide any mechanism for aid the accounting. Our current priority is to implement a module to support pushing accounting, authentication, and authorization events."}),"\n",(0,n.jsx)(t.h2,{id:"im-and-presence",children:"IM and Presence"}),"\n",(0,n.jsx)(t.p,{children:"We understand that instant-messaging and presence are an essential piece of any VoIP network. We are currently looking into the SIMPLE and XCAP protocols to provide IM and Presence in Routr."}),"\n",(0,n.jsx)(t.h2,{id:"per-domain-certificate",children:"Per-domain Certificate"}),"\n",(0,n.jsx)(t.p,{children:"Routr, currently its only possible to install a single certificate with multiple-domains. In the future, we want to ease the certificate installation/updating process by allowing a per-domain certificate."}),"\n",(0,n.jsx)(t.h2,{id:"support-the-ecosystem",children:"Support the Ecosystem"}),"\n",(0,n.jsxs)(t.p,{children:["We want to release a stable version of the ",(0,n.jsx)(t.a,{href:"https://github.com/fonoster/routr-ui",children:"web UI"})," soon. The web UI is one of our primary strategy to facilitate the deployment of VoIP networks with Routr."]})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>s});var n=o(6540);const r={},i=n.createContext(r);function a(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3c0cfdd0.c1beae7e.js b/assets/js/3c0cfdd0.c1beae7e.js deleted file mode 100644 index 75b05f4e4..000000000 --- a/assets/js/3c0cfdd0.c1beae7e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[4480],{6456:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var s=t(4848),o=t(8453);const r={sidebar_position:2},c="Installing in Kubernetes",i={id:"connect/quick-start/kubernetes",title:"Installing in Kubernetes",description:"Routr can be installed in Kubernetes using Helm. The following instructions assume that you have a Kubernetes cluster up and running.",source:"@site/docs/connect/quick-start/kubernetes.md",sourceDirName:"connect/quick-start",slug:"/connect/quick-start/kubernetes",permalink:"/docs/2.0.0/connect/quick-start/kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/connect/quick-start/kubernetes.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Docker installation",permalink:"/docs/2.0.0/connect/quick-start/docker"},next:{title:"Overview",permalink:"/docs/2.0.0/connect/command-line/overview"}},a={},l=[];function u(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"installing-in-kubernetes",children:"Installing in Kubernetes"}),"\n",(0,s.jsx)(n.p,{children:"Routr can be installed in Kubernetes using Helm. The following instructions assume that you have a Kubernetes cluster up and running."}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsx)(n.p,{children:"You can use Minikube or Docker Desktop to create a local Kubernetes cluster."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"First, add the Helm repository:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm repo add routr https://routr.io/charts\nhelm repo update\n"})}),"\n",(0,s.jsx)(n.p,{children:"Then, create a namespace for Routr:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl create namespace sipnet\n"})}),"\n",(0,s.jsx)(n.p,{children:"Next, install Routr with the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install sipnet routr/routr-connect --namespace sipnet\n"})}),"\n",(0,s.jsx)(n.p,{children:"Finally, wait a few minutes for the pods to start. You can check the status of the pods with the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl get pods -n sipnet\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see a list of pods and their status. If the status is Running, then you are ready to go."}),"\n",(0,s.jsxs)(n.p,{children:["For more details, please refer to the chart's ",(0,s.jsx)(n.a,{href:"https://github.com/fonoster/routr/blob/main/ops/charts/connect/README.md",children:"README"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Please see the ",(0,s.jsx)(n.a,{href:"/docs/2.0.0/connect/command-line/overview",children:"Command-Line Tools"})," section for detauls on how to interact with Routr Connect via the CLI."]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},r=s.createContext(o);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3c0cfdd0.cb1b021a.js b/assets/js/3c0cfdd0.cb1b021a.js new file mode 100644 index 000000000..ac908f40d --- /dev/null +++ b/assets/js/3c0cfdd0.cb1b021a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[4480],{6597:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var s=t(4848),o=t(8453);const r={sidebar_position:2},c="Installing in Kubernetes",i={id:"connect/quick-start/kubernetes",title:"Installing in Kubernetes",description:"Routr can be installed in Kubernetes using Helm. The following instructions assume that you have a Kubernetes cluster up and running.",source:"@site/docs/connect/quick-start/kubernetes.md",sourceDirName:"connect/quick-start",slug:"/connect/quick-start/kubernetes",permalink:"/docs/2.11.5/connect/quick-start/kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/connect/quick-start/kubernetes.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Docker installation",permalink:"/docs/2.11.5/connect/quick-start/docker"},next:{title:"Overview",permalink:"/docs/2.11.5/connect/command-line/overview"}},a={},l=[];function u(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"installing-in-kubernetes",children:"Installing in Kubernetes"}),"\n",(0,s.jsx)(n.p,{children:"Routr can be installed in Kubernetes using Helm. The following instructions assume that you have a Kubernetes cluster up and running."}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsx)(n.p,{children:"You can use Minikube or Docker Desktop to create a local Kubernetes cluster."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"First, add the Helm repository:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm repo add routr https://routr.io/charts\nhelm repo update\n"})}),"\n",(0,s.jsx)(n.p,{children:"Then, create a namespace for Routr:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl create namespace sipnet\n"})}),"\n",(0,s.jsx)(n.p,{children:"Next, install Routr with the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install sipnet routr/routr-connect --namespace sipnet\n"})}),"\n",(0,s.jsx)(n.p,{children:"Finally, wait a few minutes for the pods to start. You can check the status of the pods with the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl get pods -n sipnet\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see a list of pods and their status. If the status is Running, then you are ready to go."}),"\n",(0,s.jsxs)(n.p,{children:["For more details, please refer to the chart's ",(0,s.jsx)(n.a,{href:"https://github.com/fonoster/routr/blob/main/ops/charts/connect/README.md",children:"README"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Please see the ",(0,s.jsx)(n.a,{href:"/docs/2.11.5/connect/command-line/overview",children:"Command-Line Tools"})," section for detauls on how to interact with Routr Connect via the CLI."]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},r=s.createContext(o);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3d1fe28c.ba1f32b6.js b/assets/js/3d1fe28c.ba1f32b6.js new file mode 100644 index 000000000..b367604ee --- /dev/null +++ b/assets/js/3d1fe28c.ba1f32b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2918],{5448:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var i=n(4848),r=n(8453);const o={},d="Building a Middleware",s={id:"development/building-a-middleware",title:"Building a Middleware",description:"Building a Middleware is the same as building a Processor. Both share the same protobuf definition. Please refer to the Concepts Overview for more information on the differences between a Processor and a Middleware.",source:"@site/versioned_docs/version-2.0.0/development/building-a-middleware.md",sourceDirName:"development",slug:"/development/building-a-middleware",permalink:"/docs/2.0.0/development/building-a-middleware",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-2.0.0/development/building-a-middleware.md",tags:[],version:"2.0.0",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Building a Processor",permalink:"/docs/2.0.0/development/building-a-processor"},next:{title:"Custom data with the APIServer",permalink:"/docs/2.0.0/development/custom-data-with-the-apiserver"}},a={},l=[];function c(e){const t={a:"a",h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"building-a-middleware",children:"Building a Middleware"}),"\n",(0,i.jsxs)(t.p,{children:["Building a Middleware is the same as ",(0,i.jsx)(t.a,{href:"/docs/2.0.0/development/building-a-processor",children:"building a Processor"}),". Both share the same protobuf definition. Please refer to the ",(0,i.jsx)(t.a,{href:"/docs/2.0.0/overview/concepts",children:"Concepts Overview"})," for more information on the differences between a Processor and a Middleware."]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>s});var i=n(6540);const r={},o=i.createContext(r);function d(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3e7ceef0.c6e6babd.js b/assets/js/3e7ceef0.81e4d69c.js similarity index 99% rename from assets/js/3e7ceef0.c6e6babd.js rename to assets/js/3e7ceef0.81e4d69c.js index 2f0611182..bf0ef9f4f 100644 --- a/assets/js/3e7ceef0.c6e6babd.js +++ b/assets/js/3e7ceef0.81e4d69c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[5613],{7156:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>n,metadata:()=>c,toc:()=>o});var t=s(4848),d=s(8453);const n={},i="General",c={id:"configuration/general",title:"General",description:"The general configuration affects your entire Routr instance. The general configuration",source:"@site/versioned_docs/version-1.x.x/configuration/general.md",sourceDirName:"configuration",slug:"/configuration/general",permalink:"/docs/1.x.x/configuration/general",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/configuration/general.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Gateways",permalink:"/docs/1.x.x/configuration/gateways"},next:{title:"Numbers",permalink:"/docs/1.x.x/configuration/numbers"}},l={},o=[{value:"General Configuration Parameters",id:"general-configuration-parameters",level:2},{value:"Transport Configuration",id:"transport-configuration",level:2},{value:"Datasource Providers",id:"datasource-providers",level:2},{value:"Redis Data Provider",id:"redis-data-provider",level:3},{value:"Files Data Provider",id:"files-data-provider",level:3},{value:"Configuring the server behind a NAT",id:"configuring-the-server-behind-a-nat",level:2},{value:"Access Control List",id:"access-control-list",level:2},{value:"Basic Example",id:"basic-example",level:2}];function a(e){const r={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"general",children:"General"}),"\n",(0,t.jsxs)(r.p,{children:["The general configuration affects your entire Routr instance. The general configuration\ncan be provided using the file ",(0,t.jsx)(r.code,{children:"config/config.yml"})," located at the root of your Routr installation."]}),"\n",(0,t.jsx)(r.h2,{id:"general-configuration-parameters",children:"General Configuration Parameters"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Property"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Required"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"apiVersion"}),(0,t.jsx)(r.td,{children:"Indicates the version of the resource (Not yet implemented)"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"metadata.userAgent"}),(0,t.jsxs)(r.td,{children:["Sets sip header ",(0,t.jsx)(r.code,{children:"User-Agent"})," to the desired value"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.dataSource.provider"}),(0,t.jsxs)(r.td,{children:["Defines data provider. Defaults to ",(0,t.jsx)(r.code,{children:"files_data_provider"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.dataSource.parameters"}),(0,t.jsx)(r.td,{children:"Data Source Parameters. Ex.: 'host=localhost,port=6379'"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.bindAddr"}),(0,t.jsx)(r.td,{children:"Default stack IP address"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.externAddr"}),(0,t.jsx)(r.td,{children:"IP address to advertise"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.localnets"}),(0,t.jsx)(r.td,{children:"Local networks. Use in combination with spec.externAddr"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.recordRoute"}),(0,t.jsx)(r.td,{children:"Stay within the signaling path"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.transport.[*].bindAddr"}),(0,t.jsxs)(r.td,{children:["Overwrites ",(0,t.jsx)(r.code,{children:"spec.bindAddr"})," for transport entry"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.transport.[*].port"}),(0,t.jsx)(r.td,{children:"Transport port"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.transport.[*].protocol"}),(0,t.jsxs)(r.td,{children:["Valid values are: ",(0,t.jsx)(r.code,{children:"tcp"}),", ",(0,t.jsx)(r.code,{children:"udp"}),", ",(0,t.jsx)(r.code,{children:"tls"}),", ",(0,t.jsx)(r.code,{children:"sctp"}),", ",(0,t.jsx)(r.code,{children:"ws"}),", ",(0,t.jsx)(r.code,{children:"wss"})]}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.registrarIntf"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)(r.code,{children:"Internal"}),' causes the server to use the IP and port it "sees"(received & rport) from a device attempting to register. Defaults to ',(0,t.jsx)(r.code,{children:"External"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.accessControlList.deny.[*]"}),(0,t.jsx)(r.td,{children:"Deny incoming traffic from network list"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.accessControlList.allow.[*]"}),(0,t.jsx)(r.td,{children:"Allow incoming traffic from network list"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.bindAddr"}),(0,t.jsx)(r.td,{children:"Restful service listening address"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.port"}),(0,t.jsx)(r.td,{children:"Restful service port. Defaults to 4567"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.minThreads"}),(0,t.jsx)(r.td,{children:"Minimum thread allocation. Defaults to 8"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.maxThreads"}),(0,t.jsx)(r.td,{children:"Maximum thread allocation. Defaults to 200"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.timeOutMillis"}),(0,t.jsx)(r.td,{children:"Will reject requests that last more than this value. Defaults to 5000(5 seconds)"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.unsecured"}),(0,t.jsxs)(r.td,{children:["Disabled https for restful calls. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.keyStore"}),(0,t.jsx)(r.td,{children:"Path to keyStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.trueStore"}),(0,t.jsx)(r.td,{children:"Path to trueStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.keyStorePassword"}),(0,t.jsx)(r.td,{children:"Password for keyStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.trueStorePassword"}),(0,t.jsx)(r.td,{children:"Password for trueStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.keyStore"}),(0,t.jsx)(r.td,{children:"Path to keyStore"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.trustStore"}),(0,t.jsx)(r.td,{children:"Path to trueStore"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.keyStorePassword"}),(0,t.jsx)(r.td,{children:"Password for keyStore"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.keyStoreType"}),(0,t.jsx)(r.td,{children:"KeyStore type"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.client.authType"}),(0,t.jsxs)(r.td,{children:["Type of client authentication. Defaults to ",(0,t.jsx)(r.code,{children:"DisabledAll"}),". See ",(0,t.jsx)(r.a,{href:"https://goo.gl/1vKbXW",children:"https://goo.gl/1vKbXW"})," for more options"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.client.protocols.[*]"}),(0,t.jsxs)(r.td,{children:["Accepted TLS protocols. Defaults to [",(0,t.jsx)(r.code,{children:"TLSv1.2"}),"]"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.debugging"}),(0,t.jsxs)(r.td,{children:["Turns ON or OFF ssl debugging. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.enabled"}),(0,t.jsxs)(r.td,{children:["If enabled, it will send all media thru the RTPEngine. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.proto"}),(0,t.jsxs)(r.td,{children:["Reserved to allow for NG commands via ",(0,t.jsx)(r.code,{children:"http"}),", ",(0,t.jsx)(r.code,{children:"https"}),", and ",(0,t.jsx)(r.code,{children:"udp"}),". Currently only ",(0,t.jsx)(r.code,{children:"http"})," is supported"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.host"}),(0,t.jsx)(r.td,{children:"Address for RTPEngine"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.port"}),(0,t.jsx)(r.td,{children:"Port for RTPEngine"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_convertTelToE164"}),(0,t.jsxs)(r.td,{children:["If enabled, it will convert the number on ingress calls to ",(0,t.jsx)(r.code,{children:"E164"})," format before routing the call. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_uniqueGatewayPerHostPort"}),(0,t.jsxs)(r.td,{children:["If enabled, it will yield an error if a Gateway with the same host and port combination already exists. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]})]})]}),"\n",(0,t.jsxs)(r.blockquote,{children:["\n",(0,t.jsxs)(r.p,{children:["Variables prefixed with ",(0,t.jsx)(r.code,{children:"ex_"})," are experimental features and may be removed or renamed in the future."]}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"transport-configuration",children:"Transport Configuration"}),"\n",(0,t.jsxs)(r.p,{children:["Routr supports ",(0,t.jsx)(r.code,{children:"tcp"}),", ",(0,t.jsx)(r.code,{children:"udp"}),", ",(0,t.jsx)(r.code,{children:"tls"}),", ",(0,t.jsx)(r.code,{children:"sctp"}),", ",(0,t.jsx)(r.code,{children:"ws"}),", and ",(0,t.jsx)(r.code,{children:"wss"})," as transport protocols."]}),"\n",(0,t.jsxs)(r.p,{children:["The server requires at least one transport protocol.\nTo bind a transport protocol to a specific IP address, you can use the ",(0,t.jsx)(r.code,{children:"spec.transport.bindAddr"})," or more generally ",(0,t.jsx)(r.code,{children:"spec.bindAddr"}),"."]}),"\n",(0,t.jsx)(r.h2,{id:"datasource-providers",children:"Datasource Providers"}),"\n",(0,t.jsxs)(r.p,{children:["Routr currently implements two data providers: ",(0,t.jsx)(r.code,{children:"redis_data_provider"})," and ",(0,t.jsx)(r.code,{children:"files_data_provider"}),". The default data provider is the ",(0,t.jsx)(r.code,{children:"files_data_provider"}),"."]}),"\n",(0,t.jsxs)(r.blockquote,{children:["\n",(0,t.jsxs)(r.p,{children:["The docker distribution of the server uses ",(0,t.jsx)(r.code,{children:"redis_data_provider"})," by default"]}),"\n"]}),"\n",(0,t.jsx)(r.h3,{id:"redis-data-provider",children:"Redis Data Provider"}),"\n",(0,t.jsxs)(r.p,{children:["The parameters for ",(0,t.jsx)(r.code,{children:"redis_data_provider"})," are:"]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Parameter"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Required"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"host"}),(0,t.jsx)(r.td,{children:"Redis host. Defaults to 'localhost'"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"port"}),(0,t.jsx)(r.td,{children:"Redis port. The default port is 6379"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"secret"}),(0,t.jsx)(r.td,{children:"Password to access database"}),(0,t.jsx)(r.td,{children:"No"})]})]})]}),"\n",(0,t.jsx)(r.h3,{id:"files-data-provider",children:"Files Data Provider"}),"\n",(0,t.jsxs)(r.p,{children:["The parameters for ",(0,t.jsx)(r.code,{children:"files_data_provider"})," are:"]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Parameter"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Required"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"path"}),(0,t.jsxs)(r.td,{children:["Path to configuration files. Defaults to the ",(0,t.jsx)(r.code,{children:"config"})," folder"]}),(0,t.jsx)(r.td,{children:"No"})]})})]}),"\n",(0,t.jsx)(r.p,{children:"This implementation has the limitation that writes operations have to be performed manually on the files."}),"\n",(0,t.jsx)(r.h2,{id:"configuring-the-server-behind-a-nat",children:"Configuring the server behind a NAT"}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"spec.externAddr"})," and ",(0,t.jsx)(r.code,{children:"spec.localnets"})," parameters help Routr identify the\ncorrect path for any given traffic. The ",(0,t.jsx)(r.code,{children:"spec.externAddr"})," is typically the Internet\nfacing IP address. The ",(0,t.jsx)(r.code,{children:"spec.localnets"})," is an array with valid CIDR, IP/Mask, or single IP values.\nHere is quick example:"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-yaml",children:"spec:\n externAddr: 172.220.231.23\n localnets: [172.17.0.2/16]\n"})}),"\n",(0,t.jsx)(r.h2,{id:"access-control-list",children:"Access Control List"}),"\n",(0,t.jsxs)(r.p,{children:["The Access Control List(ACL) provides with a security mechanism to disable network\naccess from unwanted sources. ACL rules exist at general or Domain level. Here is an example,\nblocking all traffic except from IP address ",(0,t.jsx)(r.code,{children:"192.168.0.1"}),"."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-yaml",children:"spec:\n accessControlList:\n deny: [0.0.0.0/1] # Deny all\n allow: [192.168.0.1/31]\n"})}),"\n",(0,t.jsx)(r.h2,{id:"basic-example",children:"Basic Example"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-yaml",children:"apiVersion: v1beta1\nspec:\n transport:\n - protocol: tcp\n port: 5060\n - protocol: udp\n port: 5060\n"})})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>i,x:()=>c});var t=s(6540);const d={},n=t.createContext(d);function i(e){const r=t.useContext(n);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),t.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[5613],{3507:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>n,metadata:()=>c,toc:()=>o});var t=s(4848),d=s(8453);const n={},i="General",c={id:"configuration/general",title:"General",description:"The general configuration affects your entire Routr instance. The general configuration",source:"@site/versioned_docs/version-1.x.x/configuration/general.md",sourceDirName:"configuration",slug:"/configuration/general",permalink:"/docs/1.x.x/configuration/general",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/configuration/general.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Gateways",permalink:"/docs/1.x.x/configuration/gateways"},next:{title:"Numbers",permalink:"/docs/1.x.x/configuration/numbers"}},l={},o=[{value:"General Configuration Parameters",id:"general-configuration-parameters",level:2},{value:"Transport Configuration",id:"transport-configuration",level:2},{value:"Datasource Providers",id:"datasource-providers",level:2},{value:"Redis Data Provider",id:"redis-data-provider",level:3},{value:"Files Data Provider",id:"files-data-provider",level:3},{value:"Configuring the server behind a NAT",id:"configuring-the-server-behind-a-nat",level:2},{value:"Access Control List",id:"access-control-list",level:2},{value:"Basic Example",id:"basic-example",level:2}];function a(e){const r={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"general",children:"General"}),"\n",(0,t.jsxs)(r.p,{children:["The general configuration affects your entire Routr instance. The general configuration\ncan be provided using the file ",(0,t.jsx)(r.code,{children:"config/config.yml"})," located at the root of your Routr installation."]}),"\n",(0,t.jsx)(r.h2,{id:"general-configuration-parameters",children:"General Configuration Parameters"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Property"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Required"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"apiVersion"}),(0,t.jsx)(r.td,{children:"Indicates the version of the resource (Not yet implemented)"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"metadata.userAgent"}),(0,t.jsxs)(r.td,{children:["Sets sip header ",(0,t.jsx)(r.code,{children:"User-Agent"})," to the desired value"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.dataSource.provider"}),(0,t.jsxs)(r.td,{children:["Defines data provider. Defaults to ",(0,t.jsx)(r.code,{children:"files_data_provider"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.dataSource.parameters"}),(0,t.jsx)(r.td,{children:"Data Source Parameters. Ex.: 'host=localhost,port=6379'"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.bindAddr"}),(0,t.jsx)(r.td,{children:"Default stack IP address"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.externAddr"}),(0,t.jsx)(r.td,{children:"IP address to advertise"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.localnets"}),(0,t.jsx)(r.td,{children:"Local networks. Use in combination with spec.externAddr"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.recordRoute"}),(0,t.jsx)(r.td,{children:"Stay within the signaling path"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.transport.[*].bindAddr"}),(0,t.jsxs)(r.td,{children:["Overwrites ",(0,t.jsx)(r.code,{children:"spec.bindAddr"})," for transport entry"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.transport.[*].port"}),(0,t.jsx)(r.td,{children:"Transport port"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.transport.[*].protocol"}),(0,t.jsxs)(r.td,{children:["Valid values are: ",(0,t.jsx)(r.code,{children:"tcp"}),", ",(0,t.jsx)(r.code,{children:"udp"}),", ",(0,t.jsx)(r.code,{children:"tls"}),", ",(0,t.jsx)(r.code,{children:"sctp"}),", ",(0,t.jsx)(r.code,{children:"ws"}),", ",(0,t.jsx)(r.code,{children:"wss"})]}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.registrarIntf"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)(r.code,{children:"Internal"}),' causes the server to use the IP and port it "sees"(received & rport) from a device attempting to register. Defaults to ',(0,t.jsx)(r.code,{children:"External"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.accessControlList.deny.[*]"}),(0,t.jsx)(r.td,{children:"Deny incoming traffic from network list"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.accessControlList.allow.[*]"}),(0,t.jsx)(r.td,{children:"Allow incoming traffic from network list"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.bindAddr"}),(0,t.jsx)(r.td,{children:"Restful service listening address"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.port"}),(0,t.jsx)(r.td,{children:"Restful service port. Defaults to 4567"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.minThreads"}),(0,t.jsx)(r.td,{children:"Minimum thread allocation. Defaults to 8"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.maxThreads"}),(0,t.jsx)(r.td,{children:"Maximum thread allocation. Defaults to 200"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.timeOutMillis"}),(0,t.jsx)(r.td,{children:"Will reject requests that last more than this value. Defaults to 5000(5 seconds)"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.unsecured"}),(0,t.jsxs)(r.td,{children:["Disabled https for restful calls. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.keyStore"}),(0,t.jsx)(r.td,{children:"Path to keyStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.trueStore"}),(0,t.jsx)(r.td,{children:"Path to trueStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.keyStorePassword"}),(0,t.jsx)(r.td,{children:"Password for keyStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.restService.trueStorePassword"}),(0,t.jsx)(r.td,{children:"Password for trueStore"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.keyStore"}),(0,t.jsx)(r.td,{children:"Path to keyStore"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.trustStore"}),(0,t.jsx)(r.td,{children:"Path to trueStore"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.keyStorePassword"}),(0,t.jsx)(r.td,{children:"Password for keyStore"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.keyStoreType"}),(0,t.jsx)(r.td,{children:"KeyStore type"}),(0,t.jsx)(r.td,{children:"Yes"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.client.authType"}),(0,t.jsxs)(r.td,{children:["Type of client authentication. Defaults to ",(0,t.jsx)(r.code,{children:"DisabledAll"}),". See ",(0,t.jsx)(r.a,{href:"https://goo.gl/1vKbXW",children:"https://goo.gl/1vKbXW"})," for more options"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.client.protocols.[*]"}),(0,t.jsxs)(r.td,{children:["Accepted TLS protocols. Defaults to [",(0,t.jsx)(r.code,{children:"TLSv1.2"}),"]"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.securityContext.debugging"}),(0,t.jsxs)(r.td,{children:["Turns ON or OFF ssl debugging. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.enabled"}),(0,t.jsxs)(r.td,{children:["If enabled, it will send all media thru the RTPEngine. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.proto"}),(0,t.jsxs)(r.td,{children:["Reserved to allow for NG commands via ",(0,t.jsx)(r.code,{children:"http"}),", ",(0,t.jsx)(r.code,{children:"https"}),", and ",(0,t.jsx)(r.code,{children:"udp"}),". Currently only ",(0,t.jsx)(r.code,{children:"http"})," is supported"]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.host"}),(0,t.jsx)(r.td,{children:"Address for RTPEngine"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_rtpEngine.port"}),(0,t.jsx)(r.td,{children:"Port for RTPEngine"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_convertTelToE164"}),(0,t.jsxs)(r.td,{children:["If enabled, it will convert the number on ingress calls to ",(0,t.jsx)(r.code,{children:"E164"})," format before routing the call. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"spec.ex_uniqueGatewayPerHostPort"}),(0,t.jsxs)(r.td,{children:["If enabled, it will yield an error if a Gateway with the same host and port combination already exists. Defaults to ",(0,t.jsx)(r.code,{children:"false"})]}),(0,t.jsx)(r.td,{children:"No"})]})]})]}),"\n",(0,t.jsxs)(r.blockquote,{children:["\n",(0,t.jsxs)(r.p,{children:["Variables prefixed with ",(0,t.jsx)(r.code,{children:"ex_"})," are experimental features and may be removed or renamed in the future."]}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"transport-configuration",children:"Transport Configuration"}),"\n",(0,t.jsxs)(r.p,{children:["Routr supports ",(0,t.jsx)(r.code,{children:"tcp"}),", ",(0,t.jsx)(r.code,{children:"udp"}),", ",(0,t.jsx)(r.code,{children:"tls"}),", ",(0,t.jsx)(r.code,{children:"sctp"}),", ",(0,t.jsx)(r.code,{children:"ws"}),", and ",(0,t.jsx)(r.code,{children:"wss"})," as transport protocols."]}),"\n",(0,t.jsxs)(r.p,{children:["The server requires at least one transport protocol.\nTo bind a transport protocol to a specific IP address, you can use the ",(0,t.jsx)(r.code,{children:"spec.transport.bindAddr"})," or more generally ",(0,t.jsx)(r.code,{children:"spec.bindAddr"}),"."]}),"\n",(0,t.jsx)(r.h2,{id:"datasource-providers",children:"Datasource Providers"}),"\n",(0,t.jsxs)(r.p,{children:["Routr currently implements two data providers: ",(0,t.jsx)(r.code,{children:"redis_data_provider"})," and ",(0,t.jsx)(r.code,{children:"files_data_provider"}),". The default data provider is the ",(0,t.jsx)(r.code,{children:"files_data_provider"}),"."]}),"\n",(0,t.jsxs)(r.blockquote,{children:["\n",(0,t.jsxs)(r.p,{children:["The docker distribution of the server uses ",(0,t.jsx)(r.code,{children:"redis_data_provider"})," by default"]}),"\n"]}),"\n",(0,t.jsx)(r.h3,{id:"redis-data-provider",children:"Redis Data Provider"}),"\n",(0,t.jsxs)(r.p,{children:["The parameters for ",(0,t.jsx)(r.code,{children:"redis_data_provider"})," are:"]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Parameter"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Required"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"host"}),(0,t.jsx)(r.td,{children:"Redis host. Defaults to 'localhost'"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"port"}),(0,t.jsx)(r.td,{children:"Redis port. The default port is 6379"}),(0,t.jsx)(r.td,{children:"No"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"secret"}),(0,t.jsx)(r.td,{children:"Password to access database"}),(0,t.jsx)(r.td,{children:"No"})]})]})]}),"\n",(0,t.jsx)(r.h3,{id:"files-data-provider",children:"Files Data Provider"}),"\n",(0,t.jsxs)(r.p,{children:["The parameters for ",(0,t.jsx)(r.code,{children:"files_data_provider"})," are:"]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Parameter"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Required"})]})}),(0,t.jsx)(r.tbody,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"path"}),(0,t.jsxs)(r.td,{children:["Path to configuration files. Defaults to the ",(0,t.jsx)(r.code,{children:"config"})," folder"]}),(0,t.jsx)(r.td,{children:"No"})]})})]}),"\n",(0,t.jsx)(r.p,{children:"This implementation has the limitation that writes operations have to be performed manually on the files."}),"\n",(0,t.jsx)(r.h2,{id:"configuring-the-server-behind-a-nat",children:"Configuring the server behind a NAT"}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.code,{children:"spec.externAddr"})," and ",(0,t.jsx)(r.code,{children:"spec.localnets"})," parameters help Routr identify the\ncorrect path for any given traffic. The ",(0,t.jsx)(r.code,{children:"spec.externAddr"})," is typically the Internet\nfacing IP address. The ",(0,t.jsx)(r.code,{children:"spec.localnets"})," is an array with valid CIDR, IP/Mask, or single IP values.\nHere is quick example:"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-yaml",children:"spec:\n externAddr: 172.220.231.23\n localnets: [172.17.0.2/16]\n"})}),"\n",(0,t.jsx)(r.h2,{id:"access-control-list",children:"Access Control List"}),"\n",(0,t.jsxs)(r.p,{children:["The Access Control List(ACL) provides with a security mechanism to disable network\naccess from unwanted sources. ACL rules exist at general or Domain level. Here is an example,\nblocking all traffic except from IP address ",(0,t.jsx)(r.code,{children:"192.168.0.1"}),"."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-yaml",children:"spec:\n accessControlList:\n deny: [0.0.0.0/1] # Deny all\n allow: [192.168.0.1/31]\n"})}),"\n",(0,t.jsx)(r.h2,{id:"basic-example",children:"Basic Example"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-yaml",children:"apiVersion: v1beta1\nspec:\n transport:\n - protocol: tcp\n port: 5060\n - protocol: udp\n port: 5060\n"})})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,r,s)=>{s.d(r,{R:()=>i,x:()=>c});var t=s(6540);const d={},n=t.createContext(d);function i(e){const r=t.useContext(n);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),t.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3f9d54d1.8784b614.js b/assets/js/3f9d54d1.8784b614.js new file mode 100644 index 000000000..4a99861b4 --- /dev/null +++ b/assets/js/3f9d54d1.8784b614.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2333],{1282:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var n=o(4848),r=o(8453);const a={},s="Custom data with the APIServer",d={id:"development/custom-data-with-the-apiserver",title:"Custom data with the APIServer",description:"Whether you run the Routr Connect distribution or build a custom Processor, you can store custom data with the APIServer.",source:"@site/docs/development/custom-data-with-the-apiserver.md",sourceDirName:"development",slug:"/development/custom-data-with-the-apiserver",permalink:"/docs/2.11.5/development/custom-data-with-the-apiserver",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/custom-data-with-the-apiserver.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Building a Middleware",permalink:"/docs/2.11.5/development/building-a-middleware"},next:{title:"Extending the Command-Line Tool",permalink:"/docs/2.11.5/development/extending-the-ctl"}},i={},c=[{value:"When to store custom data",id:"when-to-store-custom-data",level:2},{value:"How to store custom data",id:"how-to-store-custom-data",level:2},{value:"How to retrieve custom data",id:"how-to-retrieve-custom-data",level:2}];function u(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"custom-data-with-the-apiserver",children:"Custom data with the APIServer"}),"\n",(0,n.jsx)(t.p,{children:"Whether you run the Routr Connect distribution or build a custom Processor, you can store custom data with the APIServer."}),"\n",(0,n.jsxs)(t.p,{children:["The APIServer, typically used for Routr Connect, consists of objects with an ",(0,n.jsx)(t.code,{children:"extended"})," property to store custom data. This ",(0,n.jsx)(t.code,{children:"extended"})," property is a JSON object you can use to store any data you want."]}),"\n",(0,n.jsx)(t.h2,{id:"when-to-store-custom-data",children:"When to store custom data"}),"\n",(0,n.jsx)(t.p,{children:"Store custom data when you need information not part of the standard object. For instance, you might need to store an external identifier for an object, such as keeping the external identifier of a user in your external system."}),"\n",(0,n.jsxs)(t.p,{children:["You might also need to store information a Processor requires, like the ",(0,n.jsx)(t.code,{children:"User-Agent"})," of a device an Agent uses, and use that information to adjust the signaling process."]}),"\n",(0,n.jsx)(t.h2,{id:"how-to-store-custom-data",children:"How to store custom data"}),"\n",(0,n.jsxs)(t.p,{children:["To store custom data, add a property to the ",(0,n.jsx)(t.code,{children:"extended"})," object. For instance, to add the external identifier of an Agent in your external system, do the following:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-javascript",children:'const request = {\n name: "John Doe",\n username: "jdoe",\n privacy: Privacy.PRIVATE,\n domainRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n enabled: true,\n extended: {\n "externalId": "123456789"\n }\n};\n\nagents.createAgent(request)\n .then(console.log)\n .catch(console.error); // an error occurred\n'})}),"\n",(0,n.jsxs)(t.p,{children:["For additional examples of how to store custom data, see the ",(0,n.jsx)(t.a,{href:"/docs/2.11.5/connect/nodesdk/overview",children:"Node SDK"}),' and search for "extended."']}),"\n",(0,n.jsx)(t.h2,{id:"how-to-retrieve-custom-data",children:"How to retrieve custom data"}),"\n",(0,n.jsxs)(t.p,{children:["To retrieve custom data, read the ",(0,n.jsx)(t.code,{children:"extended"})," property. For instance, to retrieve the external identifier of a user in your external system, do the following:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-javascript",children:'agents.getAgent("8571371b-6f5d-78b1-aabe-93c5c75317a3")\n .then(agent => {\n console.log(agent.extended.externalId);\n })\n .catch(console.error); // an error occurred\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>d});var n=o(6540);const r={},a=n.createContext(r);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3f9d54d1.c4d5fa12.js b/assets/js/3f9d54d1.c4d5fa12.js deleted file mode 100644 index 7a0287650..000000000 --- a/assets/js/3f9d54d1.c4d5fa12.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[2333],{3451:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var n=o(4848),r=o(8453);const a={},s="Custom data with the APIServer",d={id:"development/custom-data-with-the-apiserver",title:"Custom data with the APIServer",description:"Whether you run the Routr Connect distribution or build a custom Processor, you can store custom data with the APIServer.",source:"@site/docs/development/custom-data-with-the-apiserver.md",sourceDirName:"development",slug:"/development/custom-data-with-the-apiserver",permalink:"/docs/2.0.0/development/custom-data-with-the-apiserver",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/development/custom-data-with-the-apiserver.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Building a Middleware",permalink:"/docs/2.0.0/development/building-a-middleware"},next:{title:"Extending the Command-Line Tool",permalink:"/docs/2.0.0/development/extending-the-ctl"}},i={},c=[{value:"When to store custom data",id:"when-to-store-custom-data",level:2},{value:"How to store custom data",id:"how-to-store-custom-data",level:2},{value:"How to retrieve custom data",id:"how-to-retrieve-custom-data",level:2}];function u(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"custom-data-with-the-apiserver",children:"Custom data with the APIServer"}),"\n",(0,n.jsx)(t.p,{children:"Whether you run the Routr Connect distribution or build a custom Processor, you can store custom data with the APIServer."}),"\n",(0,n.jsxs)(t.p,{children:["The APIServer, typically used for Routr Connect, consists of objects with an ",(0,n.jsx)(t.code,{children:"extended"})," property to store custom data. This ",(0,n.jsx)(t.code,{children:"extended"})," property is a JSON object you can use to store any data you want."]}),"\n",(0,n.jsx)(t.h2,{id:"when-to-store-custom-data",children:"When to store custom data"}),"\n",(0,n.jsx)(t.p,{children:"Store custom data when you need information not part of the standard object. For instance, you might need to store an external identifier for an object, such as keeping the external identifier of a user in your external system."}),"\n",(0,n.jsxs)(t.p,{children:["You might also need to store information a Processor requires, like the ",(0,n.jsx)(t.code,{children:"User-Agent"})," of a device an Agent uses, and use that information to adjust the signaling process."]}),"\n",(0,n.jsx)(t.h2,{id:"how-to-store-custom-data",children:"How to store custom data"}),"\n",(0,n.jsxs)(t.p,{children:["To store custom data, add a property to the ",(0,n.jsx)(t.code,{children:"extended"})," object. For instance, to add the external identifier of an Agent in your external system, do the following:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-javascript",children:'const request = {\n name: "John Doe",\n username: "jdoe",\n privacy: Privacy.PRIVATE,\n domainRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n enabled: true,\n extended: {\n "externalId": "123456789"\n }\n};\n\nagents.createAgent(request)\n .then(console.log)\n .catch(console.error); // an error occurred\n'})}),"\n",(0,n.jsxs)(t.p,{children:["For additional examples of how to store custom data, see the ",(0,n.jsx)(t.a,{href:"/docs/2.0.0/connect/nodesdk/overview",children:"Node SDK"}),' and search for "extended."']}),"\n",(0,n.jsx)(t.h2,{id:"how-to-retrieve-custom-data",children:"How to retrieve custom data"}),"\n",(0,n.jsxs)(t.p,{children:["To retrieve custom data, read the ",(0,n.jsx)(t.code,{children:"extended"})," property. For instance, to retrieve the external identifier of a user in your external system, do the following:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-javascript",children:'agents.getAgent("8571371b-6f5d-78b1-aabe-93c5c75317a3")\n .then(agent => {\n console.log(agent.extended.externalId);\n })\n .catch(console.error); // an error occurred\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>d});var n=o(6540);const r={},a=n.createContext(r);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/40f2a0b4.bcebf01b.js b/assets/js/40f2a0b4.7e3f3239.js similarity index 98% rename from assets/js/40f2a0b4.bcebf01b.js rename to assets/js/40f2a0b4.7e3f3239.js index 0a7e7e6c0..61873b7b4 100644 --- a/assets/js/40f2a0b4.bcebf01b.js +++ b/assets/js/40f2a0b4.7e3f3239.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6926],{125:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var n=s(4848),r=s(8453);const a={},i="deleteGateway",o={id:"api/gateways/delete",title:"deleteGateway",description:"Removes a Gateway resource from a persistent database. Before removing",source:"@site/versioned_docs/version-1.x.x/api/gateways/delete.md",sourceDirName:"api/gateways",slug:"/api/gateways/delete",permalink:"/docs/1.x.x/api/gateways/delete",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/gateways/delete.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"createGateway",permalink:"/docs/1.x.x/api/gateways/create"},next:{title:"getGateway",permalink:"/docs/1.x.x/api/gateways/get"}},d={},l=[];function c(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"deletegateway",children:"deleteGateway"}),"\n",(0,n.jsxs)(t.p,{children:["Removes a Gateway resource from a persistent database. Before removing\na Gateway, ensure you have remove all of it child Numbers. Otherwise,\nthis method returns a ",(0,n.jsx)(t.code,{children:"FOUND_DEPENDENT_OBJECTS_RESPONSE"})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"URL"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"/gateways/{ref}"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Method"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"DELETE"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter Name"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Value"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"ref"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"path"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"string"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"Resource reference"})]})})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Request body"})}),"\n",(0,n.jsx)(t.p,{children:"Do not supply a request body with this method."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Response"})}),"\n",(0,n.jsx)(t.p,{children:"If successful this method removes a Gateway resource."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Sample Call"})}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'DELETE /api/v1beta1/gateways/gw5c77t2\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>o});var n=s(6540);const r={},a=n.createContext(r);function i(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[6926],{598:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var n=s(4848),r=s(8453);const a={},i="deleteGateway",o={id:"api/gateways/delete",title:"deleteGateway",description:"Removes a Gateway resource from a persistent database. Before removing",source:"@site/versioned_docs/version-1.x.x/api/gateways/delete.md",sourceDirName:"api/gateways",slug:"/api/gateways/delete",permalink:"/docs/1.x.x/api/gateways/delete",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/gateways/delete.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"createGateway",permalink:"/docs/1.x.x/api/gateways/create"},next:{title:"getGateway",permalink:"/docs/1.x.x/api/gateways/get"}},d={},l=[];function c(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"deletegateway",children:"deleteGateway"}),"\n",(0,n.jsxs)(t.p,{children:["Removes a Gateway resource from a persistent database. Before removing\na Gateway, ensure you have remove all of it child Numbers. Otherwise,\nthis method returns a ",(0,n.jsx)(t.code,{children:"FOUND_DEPENDENT_OBJECTS_RESPONSE"})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"URL"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"/gateways/{ref}"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Method"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"DELETE"})}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter Name"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Value"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"ref"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"path"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"string"}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:"Resource reference"})]})})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Request body"})}),"\n",(0,n.jsx)(t.p,{children:"Do not supply a request body with this method."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Response"})}),"\n",(0,n.jsx)(t.p,{children:"If successful this method removes a Gateway resource."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Sample Call"})}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-json",children:'DELETE /api/v1beta1/gateways/gw5c77t2\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>o});var n=s(6540);const r={},a=n.createContext(r);function i(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/40f2f3c6.6108f911.js b/assets/js/40f2f3c6.94b90663.js similarity index 98% rename from assets/js/40f2f3c6.6108f911.js rename to assets/js/40f2f3c6.94b90663.js index 463de0d22..0b5102e4c 100644 --- a/assets/js/40f2f3c6.6108f911.js +++ b/assets/js/40f2f3c6.94b90663.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8353],{4765:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>a});var s=n(4848),r=n(8453);const i={},o="deleteDomain",d={id:"api/domains/delete",title:"deleteDomain",description:"Removes a Domain resource from a persistent database. Before removing",source:"@site/versioned_docs/version-1.x.x/api/domains/delete.md",sourceDirName:"api/domains",slug:"/api/domains/delete",permalink:"/docs/1.x.x/api/domains/delete",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/domains/delete.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"createDomain",permalink:"/docs/1.x.x/api/domains/create"},next:{title:"getDomain",permalink:"/docs/1.x.x/api/domains/get"}},l={},a=[];function c(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"deletedomain",children:"deleteDomain"}),"\n",(0,s.jsxs)(t.p,{children:["Removes a Domain resource from a persistent database. Before removing\na Domain, ensure you have remove all of it child Agents. Otherwise,\nthis method returns a ",(0,s.jsx)(t.code,{children:"FOUND_DEPENDENT_OBJECTS_RESPONSE"})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"URL"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"/domains/{ref}"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Method"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"DELETE"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"ref"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"string"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Resource reference"})]})})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Request body"})}),"\n",(0,s.jsx)(t.p,{children:"Do not supply a request body with this method."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Response"})}),"\n",(0,s.jsx)(t.p,{children:"If successful this method removes a Domain resource."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Sample Call"})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'DELETE /api/v1beta1/domains/dm6c87r2\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>d});var s=n(6540);const r={},i=s.createContext(r);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8353],{3688:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>a});var s=n(4848),r=n(8453);const i={},o="deleteDomain",d={id:"api/domains/delete",title:"deleteDomain",description:"Removes a Domain resource from a persistent database. Before removing",source:"@site/versioned_docs/version-1.x.x/api/domains/delete.md",sourceDirName:"api/domains",slug:"/api/domains/delete",permalink:"/docs/1.x.x/api/domains/delete",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/domains/delete.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"createDomain",permalink:"/docs/1.x.x/api/domains/create"},next:{title:"getDomain",permalink:"/docs/1.x.x/api/domains/get"}},l={},a=[];function c(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"deletedomain",children:"deleteDomain"}),"\n",(0,s.jsxs)(t.p,{children:["Removes a Domain resource from a persistent database. Before removing\na Domain, ensure you have remove all of it child Agents. Otherwise,\nthis method returns a ",(0,s.jsx)(t.code,{children:"FOUND_DEPENDENT_OBJECTS_RESPONSE"})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"URL"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"/domains/{ref}"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Method"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"DELETE"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Parameters"})}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter Name"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Value"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsx)(t.tbody,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"ref"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"path"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"string"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"Resource reference"})]})})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Request body"})}),"\n",(0,s.jsx)(t.p,{children:"Do not supply a request body with this method."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Response"})}),"\n",(0,s.jsx)(t.p,{children:"If successful this method removes a Domain resource."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Sample Call"})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'DELETE /api/v1beta1/domains/dm6c87r2\n{\n\n}\n\nHTTP/1.1 200 OK\n{\n "status": "200",\n "message": "Successful request"\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>d});var s=n(6540);const r={},i=s.createContext(r);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/411db075.9b5d818d.js b/assets/js/411db075.36e4e24e.js similarity index 97% rename from assets/js/411db075.9b5d818d.js rename to assets/js/411db075.36e4e24e.js index 52fe02550..e992f8f29 100644 --- a/assets/js/411db075.9b5d818d.js +++ b/assets/js/411db075.36e4e24e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8535],{7134:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>l,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var t=r(4848),s=r(8453);const c={},o="createPeer",i={id:"api/peers/create",title:"createPeer",description:"Creates a new Peer resource.",source:"@site/versioned_docs/version-1.x.x/api/peers/create.md",sourceDirName:"api/peers",slug:"/api/peers/create",permalink:"/docs/1.x.x/api/peers/create",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/peers/create.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"updateNumber",permalink:"/docs/1.x.x/api/numbers/update"},next:{title:"deletePeer",permalink:"/docs/1.x.x/api/peers/delete"}},a={},d=[];function p(e){const n={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"createpeer",children:"createPeer"}),"\n",(0,t.jsx)(n.p,{children:"Creates a new Peer resource."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"URL"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"/peers"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Method"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"POST"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,t.jsx)(n.p,{children:"This method does not receive any parameters."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Request body"})}),"\n",(0,t.jsxs)(n.p,{children:["A file containing a ",(0,t.jsx)(n.a,{href:"/docs/1.x.x/configuration/peers",children:"Peer"})," resource in ",(0,t.jsx)(n.code,{children:"json"})," format."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Response"})}),"\n",(0,t.jsx)(n.p,{children:"If successful this method creates a Peer resource."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Sample Call"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'POST /api/{apiversion}/peers\n{\n\t"apiVersion": "v1beta1",\n\t"kind": "Peer",\n\t"metadata": {\n\t\t"name": "Asterisk PBX"\n\t},\n\t"spec": {\n\t\t"credentials": {\n\t\t\t"username": "ast",\n\t\t\t"secret": "1234"\n\t\t}\n\t}\n}\n\nHTTP/1.1 201 Created\n{\n\t"status": "201",\n\t"message": "Created",\n\t"data": "pr2c77f4"\n}\n'})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>i});var t=r(6540);const s={},c=t.createContext(s);function o(e){const n=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[8535],{6651:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>l,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var t=r(4848),s=r(8453);const c={},o="createPeer",i={id:"api/peers/create",title:"createPeer",description:"Creates a new Peer resource.",source:"@site/versioned_docs/version-1.x.x/api/peers/create.md",sourceDirName:"api/peers",slug:"/api/peers/create",permalink:"/docs/1.x.x/api/peers/create",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/versioned_docs/version-1.x.x/api/peers/create.md",tags:[],version:"1.x.x",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"updateNumber",permalink:"/docs/1.x.x/api/numbers/update"},next:{title:"deletePeer",permalink:"/docs/1.x.x/api/peers/delete"}},a={},d=[];function p(e){const n={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"createpeer",children:"createPeer"}),"\n",(0,t.jsx)(n.p,{children:"Creates a new Peer resource."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"URL"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"/peers"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Method"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"POST"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Parameters"})}),"\n",(0,t.jsx)(n.p,{children:"This method does not receive any parameters."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Request body"})}),"\n",(0,t.jsxs)(n.p,{children:["A file containing a ",(0,t.jsx)(n.a,{href:"/docs/1.x.x/configuration/peers",children:"Peer"})," resource in ",(0,t.jsx)(n.code,{children:"json"})," format."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Response"})}),"\n",(0,t.jsx)(n.p,{children:"If successful this method creates a Peer resource."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Sample Call"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'POST /api/{apiversion}/peers\n{\n\t"apiVersion": "v1beta1",\n\t"kind": "Peer",\n\t"metadata": {\n\t\t"name": "Asterisk PBX"\n\t},\n\t"spec": {\n\t\t"credentials": {\n\t\t\t"username": "ast",\n\t\t\t"secret": "1234"\n\t\t}\n\t}\n}\n\nHTTP/1.1 201 Created\n{\n\t"status": "201",\n\t"message": "Created",\n\t"data": "pr2c77f4"\n}\n'})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>i});var t=r(6540);const s={},c=t.createContext(s);function o(e){const n=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43d3d555.cbd810c1.js b/assets/js/43d3d555.cbd810c1.js new file mode 100644 index 000000000..3a41c0b81 --- /dev/null +++ b/assets/js/43d3d555.cbd810c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkroutr_docs=self.webpackChunkroutr_docs||[]).push([[3624],{6671:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>a,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var r=s(4848),d=s(8453);const t={},i="SDK",c={id:"connect/nodesdk/sdk",title:"SDK",description:"* Installation",source:"@site/docs/connect/nodesdk/sdk.md",sourceDirName:"connect/nodesdk",slug:"/connect/nodesdk/sdk",permalink:"/docs/2.11.5/connect/nodesdk/sdk",draft:!1,unlisted:!1,editUrl:"https://github.com/fonoster/routr-website/edit/main/docs/connect/nodesdk/sdk.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Overview",permalink:"/docs/2.11.5/connect/nodesdk/overview"},next:{title:"Home or Office Setup",permalink:"/docs/2.11.5/connect/home-or-office-setup"}},l={},o=[{value:"ACL \u21d0 APIClient
",id:"acl--apiclient",level:2},{value:"new ACL(options)",id:"new-acloptions",level:3},{value:"acL.createACL(request) \u21d2Promise.<CreateACLResponse>
",id:"aclcreateaclrequest--promisecreateaclresponse",level:3},{value:"acL.updateACL(request) \u21d2Promise.<UpdateACLResponse>
",id:"aclupdateaclrequest--promiseupdateaclresponse",level:3},{value:"acL.getACL(ref) \u21d2Promise.<GetACLResponse>
",id:"aclgetaclref--promisegetaclresponse",level:3},{value:"acL.deleteACL(ref) \u21d2Promise.<void>
",id:"acldeleteaclref--promisevoid",level:3},{value:"acL.listACLs(request) \u21d2Promise.<ListACLResponse>
",id:"acllistaclsrequest--promiselistaclresponse",level:3},{value:"Agents \u21d0APIClient
",id:"agents--apiclient",level:2},{value:"new Agents(options)",id:"new-agentsoptions",level:3},{value:"agents.createAgent(request) \u21d2Promise.<CreateAgentResponse>
",id:"agentscreateagentrequest--promisecreateagentresponse",level:3},{value:"agents.updateAgent(request) \u21d2Promise.<UpdateAgentResponse>
",id:"agentsupdateagentrequest--promiseupdateagentresponse",level:3},{value:"agents.getAgent(ref) \u21d2Promise.<GetAgentResponse>
",id:"agentsgetagentref--promisegetagentresponse",level:3},{value:"agents.deleteAgent(ref) \u21d2Promise.<void>
",id:"agentsdeleteagentref--promisevoid",level:3},{value:"agents.listAgents(request) \u21d2Promise.<ListAgentResponse>
",id:"agentslistagentsrequest--promiselistagentresponse",level:3},{value:"Credentials \u21d0APIClient
",id:"credentials--apiclient",level:2},{value:"new Credentials(options)",id:"new-credentialsoptions",level:3},{value:"credentials.createCredentials(request) \u21d2Promise.<CreateCredentialsResponse>
",id:"credentialscreatecredentialsrequest--promisecreatecredentialsresponse",level:3},{value:"credentials.updateCredentials(request) \u21d2Promise.<UpdateCredentialsResponse>
",id:"credentialsupdatecredentialsrequest--promiseupdatecredentialsresponse",level:3},{value:"credentials.getCredentials(ref) \u21d2Promise.<GetCredentialsResponse>
",id:"credentialsgetcredentialsref--promisegetcredentialsresponse",level:3},{value:"credentials.deleteCredentials(ref) \u21d2Promise.<void>
",id:"credentialsdeletecredentialsref--promisevoid",level:3},{value:"credentials.listCredentials(request) \u21d2Promise.<ListCredentialsResponse>
",id:"credentialslistcredentialsrequest--promiselistcredentialsresponse",level:3},{value:"Domains \u21d0APIClient
",id:"domains--apiclient",level:2},{value:"new Domains(options)",id:"new-domainsoptions",level:3},{value:"domains.createDomain(request) \u21d2Promise.<CreateDomainResponse>
",id:"domainscreatedomainrequest--promisecreatedomainresponse",level:3},{value:"domains.updateDomain(request) \u21d2Promise.<UpdateDomainResponse>
",id:"domainsupdatedomainrequest--promiseupdatedomainresponse",level:3},{value:"domains.getDomain(ref) \u21d2Promise.<GetDomainResponse>
",id:"domainsgetdomainref--promisegetdomainresponse",level:3},{value:"domains.deleteDomain(ref) \u21d2Promise.<void>
",id:"domainsdeletedomainref--promisevoid",level:3},{value:"domains.listDomains(request) \u21d2Promise.<ListDomainResponse>
",id:"domainslistdomainsrequest--promiselistdomainresponse",level:3},{value:"Numbers \u21d0APIClient
",id:"numbers--apiclient",level:2},{value:"new Numbers(options)",id:"new-numbersoptions",level:3},{value:"numbers.createNumber(request) \u21d2Promise.<CreateNumberResponse>
",id:"numberscreatenumberrequest--promisecreatenumberresponse",level:3},{value:"numbers.updateNumber(request) \u21d2Promise.<UpdateNumberResponse>
",id:"numbersupdatenumberrequest--promiseupdatenumberresponse",level:3},{value:"numbers.getNumber(ref) \u21d2Promise.<GetNumberResponse>
",id:"numbersgetnumberref--promisegetnumberresponse",level:3},{value:"numbers.deleteNumber(ref) \u21d2Promise.<void>
",id:"numbersdeletenumberref--promisevoid",level:3},{value:"numbers.listNumbers(request) \u21d2Promise.<ListNumberResponse>
",id:"numberslistnumbersrequest--promiselistnumberresponse",level:3},{value:"Peers \u21d0APIClient
",id:"peers--apiclient",level:2},{value:"new Peers(options)",id:"new-peersoptions",level:3},{value:"peers.createPeer(request) \u21d2Promise.<CreatePeerResponse>
",id:"peerscreatepeerrequest--promisecreatepeerresponse",level:3},{value:"peers.updatePeer(request) \u21d2Promise.<UpdatePeerResponse>
",id:"peersupdatepeerrequest--promiseupdatepeerresponse",level:3},{value:"peers.getPeer(ref) \u21d2Promise.<GetPeerResponse>
",id:"peersgetpeerref--promisegetpeerresponse",level:3},{value:"peers.deletePeer(ref) \u21d2Promise.<void>
",id:"peersdeletepeerref--promisevoid",level:3},{value:"peers.listPeers(request) \u21d2Promise.<ListPeerResponse>
",id:"peerslistpeersrequest--promiselistpeerresponse",level:3},{value:"Trunks \u21d0APIClient
",id:"trunks--apiclient",level:2},{value:"new Trunks(options)",id:"new-trunksoptions",level:3},{value:"trunks.createTrunk(request) \u21d2Promise.<CreateTrunkResponse>
",id:"trunkscreatetrunkrequest--promisecreatetrunkresponse",level:3},{value:"trunks.updateTrunk(request) \u21d2Promise.<UpdateTrunkResponse>
",id:"trunksupdatetrunkrequest--promiseupdatetrunkresponse",level:3},{value:"trunks.getTrunk(ref) \u21d2Promise.<GetTrunkResponse>
",id:"trunksgettrunkref--promisegettrunkresponse",level:3},{value:"trunks.deleteTrunk(ref) \u21d2Promise.<void>
",id:"trunksdeletetrunkref--promisevoid",level:3},{value:"trunks.listTrunks(request) \u21d2Promise.<ListTrunkResponse>
",id:"trunkslisttrunksrequest--promiselisttrunkresponse",level:3}];function h(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"sdk",children:"SDK"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/2.11.5/connect/nodesdk/sdk#installation",children:"Installation"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#apis",children:"APIs"})}),"\n"]}),"\n",(0,r.jsx)(n.h1,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh-session",children:"$ npm install --save @routr/sdk\n"})}),"\n",(0,r.jsx)(n.h1,{id:"apis",children:"APIs"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#ACL",children:(0,r.jsx)(n.code,{children:"Access Control List"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#Agents",children:(0,r.jsx)(n.code,{children:"Agents"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#Credentials",children:(0,r.jsx)(n.code,{children:"Credentials"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#Domains",children:(0,r.jsx)(n.code,{children:"Domains"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#Numbers",children:(0,r.jsx)(n.code,{children:"Numbers"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#Peers",children:(0,r.jsx)(n.code,{children:"Peers"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#Trunks",children:(0,r.jsx)(n.code,{children:"Trunks"})})}),"\n"]}),"\n",(0,r.jsx)("a",{name:"ACL"}),"\n",(0,r.jsxs)(n.h2,{id:"acl--apiclient",children:["ACL \u21d0 ",(0,r.jsx)("code",{children:"APIClient"})]}),"\n",(0,r.jsx)(n.p,{children:"Use Routr ACL, a capability of Routr SIP Proxy, to create, update, get\nand delete Access Control Lists. The ACL API requires of a running Routr deployment."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": global class",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Extends"}),": ",(0,r.jsx)("code",{children:"APIClient"}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"See"}),": module:core",":APIClient"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#ACL",children:"ACL"})," \u21d0 ",(0,r.jsx)("code",{children:"APIClient"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#new_ACL_new",children:"new ACL(options)"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#ACL+createACL",children:".createACL(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise."})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#ACL+updateACL",children:".updateACL(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#ACL+getACL",children:".getACL(ref)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#ACL+deleteACL",children:".deleteACL(ref)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#ACL+listACLs",children:".listACLs(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)("a",{name:"new_ACL_new"}),"\n",(0,r.jsx)(n.h3,{id:"new-acloptions",children:"new ACL(options)"}),"\n",(0,r.jsx)(n.p,{children:"Constructs a new ACL API object."}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"options"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"ClientOptions"})}),(0,r.jsx)(n.td,{children:"Options to indicate the objects endpoint"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const SDK = require("@routr/sdk")\nconst acl = new SDK.ACL()\n\nconst request = {\n name: "Peer network",\n allow: "27.116.56.0/22",\n deny: "0.0.0.0/0"\n}\n\nacl.createACL(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"ACL+createACL"}),"\n",(0,r.jsxs)(n.h3,{id:"aclcreateaclrequest--promisecreateaclresponse",children:["acL.createACL(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Creates a new AccessControlList on Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#ACL",children:(0,r.jsx)("code",{children:"ACL"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The newly created AccessControlList",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Throws"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"if request is null"}),"\n"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"CreateACLRequest"})}),(0,r.jsx)(n.td,{children:"The request to create an ACL"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.name"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Name of the ACL"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.allow"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Array. "})}),(0,r.jsx)(n.td,{children:"List of IP addresses or CIDR blocks to allow"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.deny"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Array. "})}),(0,r.jsx)(n.td,{children:"List of IP addresses or CIDR blocks to deny"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.extended"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Object"})}),(0,r.jsx)(n.td,{children:"Optional extended attributes"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const request = {\n name: "Peer network",\n allow: "27.116.56.0/22",\n deny: "0.0.0.0/0"\n}\n\nacl.createACL(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"ACL+updateACL"}),"\n",(0,r.jsxs)(n.h3,{id:"aclupdateaclrequest--promiseupdateaclresponse",children:["acL.updateACL(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Updates an already existing AccessControlList on Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#ACL",children:(0,r.jsx)("code",{children:"ACL"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The AccessControlList"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"UpdateACLRequest"})}),(0,r.jsx)(n.td,{children:"Partial with the fields to update"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.name"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Name of the ACL"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.allow"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Array. "})}),(0,r.jsx)(n.td,{children:"List of IP addresses or CIDR blocks to allow"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.deny"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Array. "})}),(0,r.jsx)(n.td,{children:"List of IP addresses or CIDR blocks to deny"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.extended"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Object"})}),(0,r.jsx)(n.td,{children:"Optional extended attributes"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const request = {\n ref: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n name: "Peer network updated",\n}\n\nacl.updateACL(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"ACL+getACL"}),"\n",(0,r.jsxs)(n.h3,{id:"aclgetaclref--promisegetaclresponse",children:["acL.getACL(ref) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Gets an AccessControlList from Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#ACL",children:(0,r.jsx)("code",{children:"ACL"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The AccessControlList"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ref"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The ACL reference"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const ref = "4671371b-ff5d-48b1-aabe-d3c5ca5317a3"\n\nacl.getACL(ref)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"ACL+deleteACL"}),"\n",(0,r.jsxs)(n.h3,{id:"acldeleteaclref--promisevoid",children:["acL.deleteACL(ref) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Deletes an AccessControlList from Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#ACL",children:(0,r.jsx)("code",{children:"ACL"})})]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ref"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The ACL reference"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const ref = "4671371b-ff5d-48b1-aabe-d3c5ca5317a3"\n\nacl.deleteACL(ref)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"ACL+listACLs"}),"\n",(0,r.jsxs)(n.h3,{id:"acllistaclsrequest--promiselistaclresponse",children:["acL.listACLs(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Lists all AccessControlLists from Routr with pagination."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#ACL",children:(0,r.jsx)("code",{children:"ACL"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The list of AccessControlLists"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"ListACLRequest"})}),(0,r.jsx)(n.td,{children:"The request to list ACLs"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.pageSize"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"number"})}),(0,r.jsx)(n.td,{children:"The number of ACLs to return"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.pageToken"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The page token to use for pagination"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:"const request = {\n pageSize: 10\n}\n\nacl.listACLs(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n"})}),"\n",(0,r.jsx)("a",{name:"Agents"}),"\n",(0,r.jsxs)(n.h2,{id:"agents--apiclient",children:["Agents \u21d0 ",(0,r.jsx)("code",{children:"APIClient"})]}),"\n",(0,r.jsx)(n.p,{children:"Use Routr Agents, a capability of Routr SIP Proxy, to create, update, get\nand delete Agents. The Agents API requires of a running Routr deployment."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": global class",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Extends"}),": ",(0,r.jsx)("code",{children:"APIClient"}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"See"}),": module:core",":APIClient"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Agents",children:"Agents"})," \u21d0 ",(0,r.jsx)("code",{children:"APIClient"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#new_Agents_new",children:"new Agents(options)"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Agents+createAgent",children:".createAgent(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Agents+updateAgent",children:".updateAgent(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Agents+getAgent",children:".getAgent(ref)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Agents+deleteAgent",children:".deleteAgent(ref)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Agents+listAgents",children:".listAgents(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)("a",{name:"new_Agents_new"}),"\n",(0,r.jsx)(n.h3,{id:"new-agentsoptions",children:"new Agents(options)"}),"\n",(0,r.jsx)(n.p,{children:"Constructs a new Agent API object."}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"options"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"ClientOptions"})}),(0,r.jsx)(n.td,{children:"Options to indicate the objects endpoint"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const SDK = require("@routr/sdk")\nconst agents = new SDK.Agents()\n\nconst request = {\n name: "Jonh Doe",\n username: "jdoe",\n privacy: Privacy.PRIVATE,\n domainRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n enabled: true,\n extended: {\n "key": "value"\n }\n}\n\nagents.createAgent(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Agents+createAgent"}),"\n",(0,r.jsxs)(n.h3,{id:"agentscreateagentrequest--promisecreateagentresponse",children:["agents.createAgent(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Creates a new Agent on Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Agents",children:(0,r.jsx)("code",{children:"Agents"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The newly created Agent",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Throws"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"if request is null"}),"\n"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"CreateAgentRequest"})}),(0,r.jsx)(n.td,{children:"The request to create an Agent"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.name"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Name of the Agent"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.username"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Username of the Agent"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.privacy"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Privacy"})}),(0,r.jsx)(n.td,{children:"Privacy of the Agent (e.g., Privacy.PRIVATE)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.domainRef"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Domain reference of the Domain the Agent belongs to"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.credentialsRef"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Credentials reference of the Credentials for the Agent"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.enabled"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"boolean"})}),(0,r.jsx)(n.td,{children:"Whether the Agent is enabled or not (for future use)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.extended"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Object"})}),(0,r.jsx)(n.td,{children:"Optional extended attributes"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const request = {\n name: "Jonh Doe",\n username: "jdoe",\n privacy: Privacy.PRIVATE,\n domainRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n credentialsRef: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n enabled: true,\n extended: {\n "key": "value"\n }\n}\n\nagents.createAgent(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Agents+updateAgent"}),"\n",(0,r.jsxs)(n.h3,{id:"agentsupdateagentrequest--promiseupdateagentresponse",children:["agents.updateAgent(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Updates an already existing Agent on Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Agents",children:(0,r.jsx)("code",{children:"Agents"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The updated Agent"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"UpdateAgentRequest"})}),(0,r.jsx)(n.td,{children:"Partial with the fields to update"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.name"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Name of the Agent"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.privacy"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Privacy"})}),(0,r.jsx)(n.td,{children:"Privacy of the Agent (e.g., Privacy.PRIVATE)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.domainRef"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Domain reference of the Domain the Agent belongs to"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.credentialsRef"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Credentials reference of the Credentials for the Agent"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.enabled"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"boolean"})}),(0,r.jsx)(n.td,{children:"Whether the Agent is enabled or not (for future use)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.extended"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Object"})}),(0,r.jsx)(n.td,{children:"Optional extended attributes"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const request = {\n ref: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n name: "John D Doe",\n enabled: false\n}\n\nagents.updateAgent(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Agents+getAgent"}),"\n",(0,r.jsxs)(n.h3,{id:"agentsgetagentref--promisegetagentresponse",children:["agents.getAgent(ref) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Gets an Agent from Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Agents",children:(0,r.jsx)("code",{children:"Agents"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The Agent"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ref"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The Agent's reference"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const ref = "4671371b-ff5d-48b1-aabe-d3c5ca5317a3"\n\nagents.getAgent(ref)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Agents+deleteAgent"}),"\n",(0,r.jsxs)(n.h3,{id:"agentsdeleteagentref--promisevoid",children:["agents.deleteAgent(ref) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Deletes an Agent from Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Agents",children:(0,r.jsx)("code",{children:"Agents"})})]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ref"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The Agent's reference"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const ref = "4671371b-ff5d-48b1-aabe-d3c5ca5317a3"\n\nagents.deleteAgent(ref)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Agents+listAgents"}),"\n",(0,r.jsxs)(n.h3,{id:"agentslistagentsrequest--promiselistagentresponse",children:["agents.listAgents(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Lists all Agents from Routr with pagination."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Agents",children:(0,r.jsx)("code",{children:"Agents"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The list of Agents in the current page"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"ListAgentRequest"})}),(0,r.jsx)(n.td,{children:"The request to list Agents"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.pageSize"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"number"})}),(0,r.jsx)(n.td,{children:"The number of Agents to return"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.pageToken"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The page token to use for pagination"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:"const request = {\n pageSize: 10\n}\n\nagents.listAgents(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n"})}),"\n",(0,r.jsx)("a",{name:"Credentials"}),"\n",(0,r.jsxs)(n.h2,{id:"credentials--apiclient",children:["Credentials \u21d0 ",(0,r.jsx)("code",{children:"APIClient"})]}),"\n",(0,r.jsx)(n.p,{children:"Use Routr Credentials, a capability of Routr SIP Proxy, to create, update, get\nand delete Credentials. The Credentials API requires of a running Routr deployment."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": global class",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Extends"}),": ",(0,r.jsx)("code",{children:"APIClient"}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"See"}),": module:core",":APIClient"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Credentials",children:"Credentials"})," \u21d0 ",(0,r.jsx)("code",{children:"APIClient"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#new_Credentials_new",children:"new Credentials(options)"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Credentials+createCredentials",children:".createCredentials(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Credentials+updateCredentials",children:".updateCredentials(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Credentials+getCredentials",children:".getCredentials(ref)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Credentials+deleteCredentials",children:".deleteCredentials(ref)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"#Credentials+listCredentials",children:".listCredentials(request)"})," \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)("a",{name:"new_Credentials_new"}),"\n",(0,r.jsx)(n.h3,{id:"new-credentialsoptions",children:"new Credentials(options)"}),"\n",(0,r.jsx)(n.p,{children:"Constructs a new Credentials API object."}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"options"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"ClientOptions"})}),(0,r.jsx)(n.td,{children:"Options to indicate the objects endpoint"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const SDK = require("@routr/sdk")\nconst credentials = new SDK.Credentials()\n\nconst request = {\n name: "Credentials for John Doe",\n username: "jdoe",\n password: "123456",\n extended: {\n "key": "value"\n }\n}\n\ncredentials.createCredentials(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Credentials+createCredentials"}),"\n",(0,r.jsxs)(n.h3,{id:"credentialscreatecredentialsrequest--promisecreatecredentialsresponse",children:["credentials.createCredentials(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Creates a new Credentials on Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Credentials",children:(0,r.jsx)("code",{children:"Credentials"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The newly created Credentials",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Throws"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"if request is null"}),"\n"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"CreateCredentialsRequest"})}),(0,r.jsx)(n.td,{children:"The request to create an Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.name"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The friendly name of the Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.username"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Username of the Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.password"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Password of the Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.extended"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Object"})}),(0,r.jsx)(n.td,{children:"Optional extended attributes"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const request = {\n name: "Credentials for John Doe",\n username: "jdoe",\n password: "123456",\n extended: {\n "key": "value"\n }\n}\n\ncredentials.createCredentials(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Credentials+updateCredentials"}),"\n",(0,r.jsxs)(n.h3,{id:"credentialsupdatecredentialsrequest--promiseupdatecredentialsresponse",children:["credentials.updateCredentials(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Updates an already existing Credentials on Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Credentials",children:(0,r.jsx)("code",{children:"Credentials"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The updated Credentials"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"UpdateCredentialsRequest"})}),(0,r.jsx)(n.td,{children:"Partial with the fields to update"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.name"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The friendly name of the Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.username"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Username of the Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.password"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"Password of the Credentials"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request.extended"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"Object"})}),(0,r.jsx)(n.td,{children:"Optional extended attributes"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const request = {\n ref: "4671371b-ff5d-48b1-aabe-d3c5ca5317a3",\n name: "John Doe\'s Credentials"\n}\n\ncredentials.updateCredentials(request)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Credentials+getCredentials"}),"\n",(0,r.jsxs)(n.h3,{id:"credentialsgetcredentialsref--promisegetcredentialsresponse",children:["credentials.getCredentials(ref) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Gets an Credentials from Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Credentials",children:(0,r.jsx)("code",{children:"Credentials"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise. "})," - The Credentials"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ref"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The Credentials's reference"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const ref = "4671371b-ff5d-48b1-aabe-d3c5ca5317a3"\n\ncredentials.getCredentials(ref)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Credentials+deleteCredentials"}),"\n",(0,r.jsxs)(n.h3,{id:"credentialsdeletecredentialsref--promisevoid",children:["credentials.deleteCredentials(ref) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Deletes an Credentials from Routr."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Credentials",children:(0,r.jsx)("code",{children:"Credentials"})})]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Param"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ref"}),(0,r.jsx)(n.td,{children:(0,r.jsx)("code",{children:"string"})}),(0,r.jsx)(n.td,{children:"The Credentials's reference"})]})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Example"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'const ref = "4671371b-ff5d-48b1-aabe-d3c5ca5317a3"\n\ncredentials.deleteCredentials(ref)\n .then(console.log)\n .catch(console.error) // an error occurred\n'})}),"\n",(0,r.jsx)("a",{name:"Credentials+listCredentials"}),"\n",(0,r.jsxs)(n.h3,{id:"credentialslistcredentialsrequest--promiselistcredentialsresponse",children:["credentials.listCredentials(request) \u21d2 ",(0,r.jsx)("code",{children:"Promise. "})]}),"\n",(0,r.jsx)(n.p,{children:"Lists all Credentials from Routr with pagination."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Kind"}),": instance method of ",(0,r.jsx)(n.a,{href:"#Credentials",children:(0,r.jsx)("code",{children:"Credentials"})}),(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:"Returns"}),": ",(0,r.jsx)("code",{children:"Promise.