PageSourceSearch

https://ionon.ai/assets/DevelopersPage-CIl0dSzL.js

js ionon.ai collected 2026-10-05 13:26:46 UTC 11,358 bytes, 6 lines download raw bytes

1import{d as g,u as m,r as c,j as e,B as h,C as v,ap as j}from"./index-CR4sjlC4.js";import{I as f,D as k,a as N}from"./DashboardErrorState-cTnx5k3D.js";import{u as y}from"./useDeveloperPortal-DWyEKHw0.js";import{D as w,a as S}from"./DeveloperRiskBanner-BHM5vDvA.js";import{K as C}from"./key-round-Bc_Hy-2w.js";import{C as E}from"./copy-DU6eHcYf.js";import{R as M}from"./refresh-cw-COctc8tC.js";import{T}from"./terminal-CZJfGNKW.js";import{P as $}from"./play-DVlS7e6G.js";import"./index-IxGsiBVd.js";import"./skeleton-C32qdZgF.js";import"./layout-dashboard-Dygn2JB3.js";import"./file-check-2-BuqHMG6w.js";import"./code-xml-8BuLP8dS.js";import"./shield-alert-ecrSCMi9.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const D=g("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);function R({keys:r,onRotateSandbox:n}){const{t:o}=m("ionpay"),[l,t]=c.useState(null),p=(s,x)=>{typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(x).catch(()=>{}),t(s),window.setTimeout(()=>t(a=>a===s?null:a),1400)};return e.jsxs("section",{className:"rounded-2xl border border-ionon-silver/10 bg-ionon-silver/[0.02] p-5",children:[e.jsxs("header",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{className:"h-3.5 w-3.5 text-ionon-silver/60"}),e.jsx("h2",{className:"text-sm uppercase tracking-[0.18em] text-ionon-silver/60",children:o("dashboard.developers.keys.title")})]}),e.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-ionon-silver/40",children:o("dashboard.developers.sandbox.badge")})]}),e.jsx("p",{className:"mb-4 text-[11px] leading-relaxed text-ionon-silver/55",children:o("dashboard.developers.keys.note")}),e.jsx("div",{className:"space-y-2",children:r.map(s=>e.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-ionon-silver/10 bg-black/40 p-3 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-ionon-silver/50",children:[e.jsx("span",{children:s.label}),e.jsx("span",{className:"rounded-full border border-ionon-silver/15 px-2 py-0.5 text-[9px]",children:o(`dashboard.developers.keys.status.${s.status}`)})]}),e.jsx("div",{className:"mt-1 truncate font-mono text-xs text-ionon-white",children:s.publicKeyMasked}),e.jsxs("div",{className:"mt-1 text-[10px] uppercase tracking-[0.15em] text-ionon-silver/40",children:[o("dashboard.developers.keys.lastUsed"),": ",s.lastUsedAt??"—"]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsxs(h,{size:"sm",variant:"ghost",className:"h-7 text-[11px]",onClick:()=>p(s.id,s.publicKeyMasked),children:[l===s.id?e.jsx(v,{className:"mr-1 h-3 w-3"}):e.jsx(E,{className:"mr-1 h-3 w-3"}),o(l===s.id?"dashboard.developers.keys.copied":"dashboard.developers.keys.copy")]}),e.jsxs(h,{size:"sm",variant:"ghost",className:"h-7 text-[11px]",disabled:!s.rotationEligible,title:o("dashboard.developers.keys.rotateDisabled"),onClick:()=>n(s.id),children:[e.jsx(M,{className:"mr-1 h-3 w-3"}),o("dashboard.developers.keys.rotateSandbox")]})]})]},s.id))}),e.jsx("p",{className:"mt-3 text-[10px] uppercase tracking-[0.18em] text-ionon-silver/40",children:o("dashboard.developers.keys.secretWarning")})]})}const I={GET:"text-emerald-300",POST:"text-sky-300",PATCH:"text-amber-300",DELETE:"text-rose-300"};function L({endpoints:r}){const{t:n}=m("ionpay"),[o,l]=c.useState("all"),t=c.useMemo(()=>{const s=new Set(r.map(x=>x.group));return["all",...Array.from(s)]},[r]),p=c.useMemo(()=>o==="all"?r:r.filter(s=>s.group===o),[r,o]);return e.jsxs("section",{className:"rounded-2xl border border-ionon-silver/10 bg-ionon-silver/[0.02] p-5",children:[e.jsxs("header",{className:"mb-4 flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[e.jsx("h2",{className:"text-sm uppercase tracking-[0.18em] text-ionon-silver/60",children:n("dashboard.developers.catalog.title")}),e.jsxs("div",{className:"flex items-center gap-2 overflow-x-auto",children:[e.jsx(D,{className:"h-3 w-3 text-ionon-silver/50"}),t.map(s=>e.jsx("button",{onClick:()=>l(s),className:`shrink-0 rounded-full border px-2.5 py-1 text-[10px] uppercase tracking-[0.15em] transition ${o===s?"border-ionon-white/40 text-ionon-white":"border-ionon-silver/15 text-ionon-silver/50 hover:text-ionon-white"}`,children:n(`dashboard.developers.catalog.group.${s}`)},s))]})]}),e.jsx("div",{className:"grid gap-2 md:grid-cols-2",children:p.map(s=>e.jsxs("div",{className:"rounded-xl border border-ionon-silver/10 bg-black/40 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:`font-mono text-[11px] ${I[s.method]??"text-ionon-silver"}`,children:s.method}),e.jsx("span",{className:"truncate font-mono text-xs text-ionon-white",children:s.path})]}),e.jsx("span",{className:"shrink-0 rounded-full border border-ionon-silver/15 px-2 py-0.5 text-[9px] uppercase tracking-[0.15em] text-ionon-silver/60",children:n(`dashboard.developers.catalog.statusMock.${s.statusMock}`)})]}),e.jsxs("div",{className:"mt-1 text-[10px] uppercase tracking-[0.15em] text-ionon-silver/40",children:[n(`dashboard.developers.catalog.group.${s.group}`)," · ",n(`dashboard.developers.catalog.auth.${s.auth}`)]})]},s.id))})]})}function P({endpoints:r,payloadExamples:n,onExecute:o}){var u;const{t:l}=m("ionpay"),[t,p]=c.useState(((u=r[0])==null?void 0:u.id)??""),[s,x]=c.useState(null),a=c.useMemo(()=>r.find(d=>d.id===t)??null,[r,t]),i=c.useMemo(()=>a?n[a.id]??(a.method==="GET"?null:{sandbox:!0}):null,[a,n]),b=()=>{if(!a)return;const d=o({endpointId:a.id,payload:i});x(d)};return e.jsxs("section",{className:"rounded-2xl border border-ionon-silver/10 bg-ionon-silver/[0.02] p-5",children:[e.jsxs("header",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{className:"h-3.5 w-3.5 text-ionon-silver/60"}),e.jsx("h2",{className:"text-sm uppercase tracking-[0.18em] text-ionon-silver/60",children:l("dashboard.developers.console.title")})]}),e.jsx("span",{className:"text-[10px] uppercase tracking-[0.18em] text-ionon-silver/40",children:l("dashboard.developers.sandbox.badge")})]}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-[10px] uppercase tracking-[0.18em] text-ionon-silver/50",children:l("dashboard.developers.console.endpoint")}),e.jsx("select",{value:t,onChange:d=>{p(d.target.value),x(null)},className:"w-full rounded-lg border border-ionon-silver/15 bg-black/60 px-3 py-2 text-xs text-ionon-white",children:r.map(d=>e.jsxs("option",{value:d.id,children:[d.method," ",d.path]},d.id))}),e.jsx("label",{className:"mt-3 block text-[10px] uppercase tracking-[0.18em] text-ionon-silver/50",children:l("dashboard.developers.console.payload")}),e.jsx("pre",{className:"max-h-48 overflow-auto rounded-lg border border-ionon-silver/10 bg-black/60 p-3 text-[11px] leading-relaxed text-ionon-silver/80",children:JSON.stringify(i,null,2)}),e.jsxs(h,{size:"sm",variant:"outline",className:"h-8 text-[11px]",onClick:b,disabled:!a,children:[e.jsx($,{className:"mr-1 h-3 w-3"}),l("dashboard.developers.console.executeSandbox")]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-[10px] uppercase tracking-[0.18em] text-ionon-silver/50",children:l("dashboard.developers.console.response")}),s?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] uppercase tracking-[0.15em] text-ionon-silver/50",children:[e.jsx("span",{className:"text-emerald-300",children:s.statusCodeMock}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.latencyMs," ms"]}),e.jsx("span",{children:"·"}),e.jsx("span",{className:"font-mono",children:s.requestId})]}),e.jsx("pre",{className:"max-h-64 overflow-auto rounded-lg border border-ionon-silver/10 bg-black/60 p-3 text-[11px] leading-relaxed text-ionon-silver/80",children:JSON.stringify(s.body,null,2)})]}):e.jsx("div",{className:"rounded-lg border border-dashed border-ionon-silver/15 bg-black/40 p-6 text-center text-[11px] text-ionon-silver/50",children:l("dashboard.developers.console.emptyResponse")})]})]})]})}function O({items:r,onToggle:n}){const{t:o}=m("ionpay"),l=r.filter(t=>t.done).length;return e.jsxs("section",{className:"rounded-2xl border border-ionon-silver/10 bg-ionon-silver/[0.02] p-5",children:[e.jsxs("header",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm uppercase tracking-[0.18em] text-ionon-silver/60",children:o("dashboard.developers.checklist.title")}),e.jsxs("span",{className:"text-[10px] uppercase tracking-[0.18em] text-ionon-silver/40",children:[l,"/",r.length]})]}),e.jsx("ol",{className:"space-y-2",children:r.map(t=>e.jsx("li",{children:e.jsxs("button",{onClick:()=>n(t.id),className:"flex w-full items-center gap-3 rounded-xl border border-ionon-silver/10 bg-black/40 p-3 text-left transition hover:border-ionon-silver/30",children:[t.done?e.jsx(v,{className:"h-4 w-4 text-emerald-300"}):e.jsx(j,{className:"h-4 w-4 text-ionon-silver/40"}),e.jsx("span",{className:`text-sm ${t.done?"text-ionon-silver/60 line-through":"text-ionon-white"}`,children:o(`dashboard.developers.checklist.items.${t.key}`)})]})},t.id))})]})}function Y(){const{t:r}=m("ionpay"),{status:n,error:o,retry:l,data:t,payloadExamples:p,dispatchSandbox:s,runConsole:x}=y(),a=c.useMemo(()=>t?{keys:t.keys.filter(i=>
6i.status==="sandbox_active").length,endpoints:t.webhookEndpoints.length,events:t.webhookEvents.length,adapters:9,failed:t.webhookEvents.filter(i=>i.status==="failed_mock").length,done:t.checklist.filter(i=>i.done).length,total:t.checklist.length}:{keys:0,endpoints:0,events:0,adapters:0,failed:0,done:0,total:0},[t]);return e.jsx(f,{children:e.jsxs("div",{className:"mx-auto w-full max-w-7xl px-4 md:px-8 py-6 md:py-8 space-y-6",children:[e.jsx(w,{}),n==="loading"&&e.jsx(k,{}),n==="error"&&e.jsx(N,{message:o,onRetry:l}),(n==="success"||n==="empty")&&t&&e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",children:[{k:"keys",v:a.keys.toLocaleString()},{k:"endpoints",v:a.endpoints.toLocaleString()},{k:"events",v:a.events.toLocaleString()},{k:"adapters",v:a.adapters.toLocaleString()},{k:"failed",v:a.failed.toLocaleString()},{k:"checklist",v:`${a.done}/${a.total}`}].map(i=>e.jsxs("div",{className:"rounded-2xl border border-ionon-silver/10 bg-ionon-silver/[0.02] p-4",children:[e.jsx("div",{className:"text-[10px] uppercase tracking-[0.18em] text-ionon-silver/50",children:r(`dashboard.developers.stats.${i.k}`)}),e.jsx("div",{className:"mt-2 text-lg tabular-nums text-ionon-white",children:i.v})]},i.k))}),e.jsx(S,{}),e.jsx(R,{keys:t.keys,onRotateSandbox:i=>s({kind:"rotate_key_sandbox",id:i})}),e.jsx(L,{endpoints:t.endpoints}),e.jsx(P,{endpoints:t.endpoints,payloadExamples:p,onExecute:x}),e.jsx(O,{items:t.checklist,onToggle:i=>s({kind:"toggle_checklist",id:i})})]})]})})}export{Y as default};

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.