1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[775],{7301:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dev",function(){return c(3396)}])},5638:function(a,b,c){"use strict";c.d(b,{T:function(){return e}});var d=c(5893),e=function(){return(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsxs)("div",{className:"lds-ripple",children:[(0,d.jsx)("div",{className:"border-fuchsia-500"}),(0,d.jsx)("div",{className:"border-fuchsia-500"})]})})}},3396:function(a,b,c){"use strict";c.r(b);var d=c(5893),e=c(565),f=c(2320),g=c(7294),h=c(293),i=c(5638),j=function(){var a=(0,g.useState)(!1),b=a[0],c=a[1],j=(0,g.useState)(""),k=j[0],l=j[1],m=(0,h.h)(),n=m.getApiKey,o=m.generateApiKey,p=m.deleteApiKey;(0,g.useEffect)(function(){c(!0),n().then(function(a){l(a),c(!1)})},[]);var q=(0,g.useCallback)(function(){c(!0),o().then(function(a){l(a),c(!1)})},[o]),r=(0,g.useCallback)(function(){c(!0),p().then(function(a){l(""),c(!1)})},[o]);return(0,d.jsxs)("div",{children:[(0,d.jsx)(e.H,{}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-lg",children:[(0,d.jsxs)("h1",{className:"text-3xl font-bold mt-6 flex items-center",children:["Dev ",(0,d.jsx)("span",{className:"ml-2 uppercase bg-neutral text-neutral-content rounded-sm px-2 py-1 text-sm",children:"Beta"})]}),(0,d.jsx)("div",{className:"my-4 card bg-base-300",children:(0,d.jsxs)("div",{className:"card-body",children:[(0,d.jsx)("h2",{className:"card-title",children:"API key"}),(0,d.jsx)("p",{children:"You can generate an API key to give write access to your commands, allowing you to overwrite them programmatically in software that you build."}),(0,d.jsx)("p",{children:"If you don't plan on programmatically updating your commands, you don't need this and can safely delete it."}),b?(0,d.jsx)("div",{className:"my-4",children:(0,d.jsx)(i.T,{})}):null,k?(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"mt-3 w-full",children:(0,d.jsx)("input",{className:"input w-full",type:"text",readOnly:!0,value:k,onFocus:function(a){a.target.select()}})}),(0,d.jsxs)("div",{className:"mt-3",children:[(0,d.jsx)("p",{children:"You can have one API key at a time. Regenerate it to invalidate the old one and create a new one, or delete it."}),(0,d.jsxs)("div",{className:"flex gap-2 mt-4",children:[(0,d.jsx)("button",{onClick:q,className:"btn btn-warning",disabled:b,children:"Regenerate API Key"}),(0,d.jsx)("button",{onClick:r,className:"btn btn-error",disabled:b,children:"Delete API Key"})]})]})]}):(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsx)("button",{onClick:q,className:"btn btn-primary",disabled:b,children:"Generate API Key"})}),(0,d.jsx)("h3",{className:"mt-5 text-lg font-bold",children:"Documentation"}),(0,d.jsxs)("ul",{className:"menu bg-base-200 rounded-box",children:[(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"/openapi.json",target:"_blank",rel:"noreferrer",children:"OpenAPI spec (JSON)"})}),(0,d.jsx)("li",{children:(0,d.jsx)("a",{href:"https://command-showcaserrr.hashnode.space",target:"_blank",rel:"noreferrer",children:"Documentation: API Reference"})})]})]})})]})}),(0,d.jsx)(f.n,{})]})};b.default=j}},function(a){a.O(0,[799,875,774,888,179],function(){var b;return a(a.s=7301)}),_N_E=a.O()}])
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.