@emeryld/rrroutes-openapi 2.6.3 → 2.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/public/assets/docs.js +240 -87
  2. package/dist/web/v2/components/flows/FlowCanvas.d.ts +2 -2
  3. package/dist/web/v2/components/flows/FlowRunProgress.d.ts +2 -2
  4. package/dist/web/v2/components/flows/FlowToolbar.d.ts +22 -0
  5. package/dist/web/v2/components/flows/FlowVariablePanel.d.ts +2 -2
  6. package/dist/web/v2/components/flows/RecordingReviewDialog.d.ts +9 -0
  7. package/dist/web/v2/components/flows/nodes/ConditionNode.d.ts +2 -2
  8. package/dist/web/v2/components/flows/nodes/DelayNode.d.ts +2 -2
  9. package/dist/web/v2/components/flows/nodes/ExtractNode.d.ts +2 -2
  10. package/dist/web/v2/components/flows/nodes/RequestNode.d.ts +4 -7
  11. package/dist/web/v2/hooks/useFlowKeyboardShortcuts.d.ts +17 -0
  12. package/dist/web/v2/hooks/useFlowRecording.d.ts +13 -0
  13. package/dist/web/v2/hooks/useLeafEndpoint.d.ts +2 -2
  14. package/dist/web/v2/stores/flowStore.d.ts +4 -0
  15. package/dist/web/v2/types/types.cacheLog.d.ts +49 -135
  16. package/dist/web/v2/types/types.endpoint.d.ts +139 -194
  17. package/dist/web/v2/types/types.log.d.ts +19 -48
  18. package/dist/web/v2/types/types.preset.d.ts +84 -168
  19. package/dist/web/v2/types/types.requestLog.d.ts +90 -135
  20. package/dist/web/v2/types/types.scheduling.d.ts +37 -87
  21. package/dist/web/v2/types/types.socket.d.ts +33 -69
  22. package/dist/web/v2/utils/flowHelpers.d.ts +33 -0
  23. package/dist/web/v2/utils/flowPresets.d.ts +11 -0
  24. package/dist/web/v2/utils/flowRecorder.d.ts +5 -0
  25. package/package.json +11 -11
  26. package/dist/public/assets/Add.js +0 -1
  27. package/dist/public/assets/Autocomplete.js +0 -1
  28. package/dist/public/assets/BaseFilterBar.js +0 -1
  29. package/dist/public/assets/BentoGrid.js +0 -1
  30. package/dist/public/assets/CacheLogsPage.js +0 -1
  31. package/dist/public/assets/DeleteOutline.js +0 -1
  32. package/dist/public/assets/DiffPage.js +0 -7
  33. package/dist/public/assets/Download.js +0 -1
  34. package/dist/public/assets/EndpointDetailPage.js +0 -1
  35. package/dist/public/assets/EndpointDetailPanel.js +0 -1
  36. package/dist/public/assets/EndpointPlaygroundPage.js +0 -1
  37. package/dist/public/assets/ExpandLess.js +0 -1
  38. package/dist/public/assets/ExportButton.js +0 -2
  39. package/dist/public/assets/FlowBuilderPage.js +0 -20
  40. package/dist/public/assets/HistoryPage.js +0 -1
  41. package/dist/public/assets/LogsPage.js +0 -1
  42. package/dist/public/assets/PageContainer.js +0 -3
  43. package/dist/public/assets/PlayArrow.js +0 -1
  44. package/dist/public/assets/PresetsPage.js +0 -4
  45. package/dist/public/assets/RoutesPage.js +0 -1
  46. package/dist/public/assets/SchedulingPage.js +0 -1
  47. package/dist/public/assets/SchemaTreeView.js +0 -1
  48. package/dist/public/assets/SettingsPage.js +0 -1
  49. package/dist/public/assets/SocketsPage.js +0 -1
  50. package/dist/public/assets/filterTypes.js +0 -1
  51. package/dist/public/assets/getValidReactChildren.js +0 -1
  52. package/dist/public/assets/kvRowAdapters.js +0 -1
  53. package/dist/public/assets/schemaDefaults.js +0 -1
  54. package/dist/public/assets/useEndpointOptions.js +0 -1
  55. package/dist/public/assets/useQueryState.js +0 -1
  56. package/dist/public/assets/vendor-recharts.js +0 -99
  57. package/dist/public/assets/vendor-xyflow.js +0 -15
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-xyflow.js";import{b as q,e as Q,x as U,f as $,d as K,S as d,T as E,j as A,C as W,v as V,aX as X,G as I,a3 as Y,_ as D,$ as J,aY as Z}from"./docs.js";import{T as y,P as ee}from"./PageContainer.js";import{u as te}from"./useQueryState.js";import{D as se}from"./filterTypes.js";import{B as oe}from"./BaseFilterBar.js";import{A as T}from"./Autocomplete.js";import{P as ne}from"./PlayArrow.js";import{h as u}from"./vendor-recharts.js";function re(o){const n=q("GET /__rrroutes/sockets",{cursorQueryKey:"cursor",getNextPageCursor(S){return S.meta.nextCursor},splitPageSizeParam:"pageSize",splitPageSize:o.pageSize}),{data:c,isLoading:l,error:m,refetch:p,isFetching:j,fetchNextPage:x,hasNextPage:v,isFetchingNextPage:f}=n.useEndpoint({query:o});return{events:Q(c,{reverse:!1}),data:c,isLoading:l,error:m,refetch:p,isFetching:j,fetchNextPage:x,hasNextPage:v,isFetchingNextPage:f}}function ae(){const o=q("POST /__rrroutes/sockets");return{emit:c=>o.fetch(c).then(l=>l.out)}}const le={...se,eventName:"",roomsInclude:[],roomsExclude:[]};function ie(){const[o,n]=te("socketEventsFilters",le),{openSocketEventDetail:c}=U(),l=re(o),{events:m,isLoading:p,error:j,refetch:x,isFetching:v}=l,f=$(m,t=>t.name),g=$(m,t=>{var s;return(s=t.rooms)==null?void 0:s.filter(Boolean)}),S=K(j,{messageFallback:"Failed to load socket events.",refetch:x});return e.jsx(e.Fragment,{children:e.jsxs(d,{spacing:3,sx:{mt:2},children:[e.jsx(oe,{value:o,onChange:t=>n(s=>({...s,...t})),onRefresh:()=>x(),refreshing:v,children:()=>e.jsxs(d,{spacing:2,children:[e.jsxs(d,{spacing:1,children:[e.jsx(E,{variant:"overline",color:"text.secondary",children:"Event name"}),e.jsx(T,{freeSolo:!0,options:f,value:o.eventName??"",onChange:(t,s)=>n(i=>({...i,eventName:s??""})),onInputChange:(t,s)=>n(i=>({...i,eventName:s??""})),renderInput:t=>e.jsx(y,{...t,label:"Event name",placeholder:"Exact event name",size:"small"})})]}),e.jsxs(d,{spacing:1,children:[e.jsx(E,{variant:"overline",color:"text.secondary",children:"Rooms include / exclude"}),e.jsxs(d,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:{xs:"stretch",sm:"flex-start"},children:[e.jsx(T,{multiple:!0,freeSolo:!0,options:g,value:o.roomsInclude??[],onChange:(t,s)=>n(i=>({...i,roomsInclude:s.map(a=>a.trim()).filter(a=>a.length>0)})),renderTags:(t,s)=>t.map((i,a)=>e.jsx(A,{size:"small",variant:"outlined",label:i,...s({index:a})})),renderInput:t=>e.jsx(y,{...t,label:"Rooms include",placeholder:"Rooms to include",size:"small"}),sx:{flex:1}}),e.jsx(T,{multiple:!0,freeSolo:!0,options:g,value:o.roomsExclude??[],onChange:(t,s)=>n(i=>({...i,roomsExclude:s.map(a=>a.trim()).filter(a=>a.length>0)})),renderTags:(t,s)=>t.map((i,a)=>e.jsx(A,{size:"small",variant:"outlined",label:i,...s({index:a})})),renderInput:t=>e.jsx(y,{...t,label:"Rooms exclude",placeholder:"Rooms to exclude",size:"small"}),sx:{flex:1}})]})]})]})}),e.jsx(W,{title:"Socket events",children:e.jsx(V,{items:m,endpoint:l,columns:X,query:o,setQuery:n,onRowClick:t=>c(t),stateHandler:{loading:{variant:"full"},emptyFallback:{title:"No socket events",description:"Emit some events from the palyground or adjust the filters."},isLoading:p,error:S}})})]})})}function ce({left:o,right:n,leftWidth:c=35}){const l=Math.min(Math.max(c,10),70);return e.jsxs(I,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:3,width:"100%"},children:[e.jsx(I,{sx:{width:{xs:"100%",md:`${l}%`},flexShrink:0},children:o}),e.jsx(I,{sx:{width:{xs:"100%",md:`${100-l}%`},flexGrow:1},children:n})]})}function ue(){const{emit:o}=ae(),[n,c]=u.useState(""),[l,m]=u.useState(""),[p,j]=u.useState(""),[x,v]=u.useState(null),[f,g]=u.useState(null),[S,t]=u.useState(!1),[s,i]=u.useState(null),[a,C]=u.useState(null),[F,P]=u.useState(null),[R,L]=u.useState(null),[_,w]=u.useState(null),G=async h=>{h.preventDefault(),i(null),C(null),v(null),g(null);const B=n.trim();if(!B){v("Event name is required");return}const H=de(l);let O;if(p.trim())try{O=JSON.parse(p)}catch{g("Invalid JSON message");return}const N={eventName:B,message:O,toRoomId:H};t(!0);try{const r=await o(N);P(N),L(r),w(200),C(r!=null&&r.success?`Event emitted successfully${r.eventId?` (eventId: ${r.eventId})`:""}.`:"Event emitted but server reported unsuccessful status.")}catch(r){let b=null,k="Failed to emit event.",z=null;if(r instanceof Z){if(b=r.status,z=r.body,r.body&&typeof r.body=="object"&&"message"in r.body){const M=r.body.message;typeof M=="string"&&(k=M)}}else r instanceof Error&&(k=r.message);P(N),L(z??r),w(b),i(b?`${k} (status ${b})`:k)}finally{t(!1)}};return e.jsxs(d,{spacing:3,component:"form",onSubmit:G,children:[e.jsxs(E,{variant:"body1",color:"text.secondary",children:["Use this playground to emit socket events via the POST"," ",e.jsx("code",{children:"/__rrroutes/sockets"})," endpoint. Provide an event name, an optional list of target rooms, and a JSON message payload."]}),e.jsxs(d,{spacing:2,children:[e.jsx(y,{label:"Event name",value:n,onChange:h=>c(h.target.value),required:!0,fullWidth:!0,error:!!x,helperText:x||"Required. Example: chat.message"}),e.jsx(y,{label:"Target rooms",value:l,onChange:h=>m(h.target.value),fullWidth:!0,helperText:"Comma-separated room IDs. Leave empty for broadcast (toRoomId = null)."}),e.jsx(y,{label:"Message (JSON)",value:p,onChange:h=>j(h.target.value),multiline:!0,minRows:8,fullWidth:!0,placeholder:'{"text": "Hello from socket playground"}',error:!!f,helperText:f||"Optional JSON payload for the event."})]}),e.jsx(I,{sx:{display:"flex",justifyContent:"flex-end"},children:e.jsx(Y,{type:"submit",variant:"contained",startIcon:e.jsx(ne,{}),disabled:S,children:S?"Emitting...":"Emit event"})}),s&&e.jsx(D,{severity:"error",variant:"outlined",children:s}),a&&e.jsx(D,{severity:"success",variant:"outlined",children:a}),!s&&!a&&e.jsx(E,{variant:"body2",color:"text.secondary",children:"Emit an event to see the last payload and server response here."}),!!(F||R)&&e.jsx(ce,{left:e.jsx(J,{title:"Last emitted payload",value:F??{info:"No payload emitted yet."},collapsedLines:16}),right:e.jsxs(d,{spacing:1,children:[e.jsxs(E,{variant:"subtitle2",color:"text.secondary",children:["Server response",_!==null?` (status ${_})`:""]}),e.jsx(J,{title:"Response body",value:R??{info:"No response recorded yet."},collapsedLines:16})]}),leftWidth:50})]})}function de(o){const n=o.trim();if(!n)return null;const c=n.split(",").map(l=>l.trim()).filter(Boolean);return c.length?c:null}function je(){return e.jsx(ee,{title:"Sockets",subtitle:"Emit socket events and browse logged socket activity.",children:e.jsxs(d,{spacing:3,children:[e.jsx(W,{title:"Socket playground",children:e.jsx(ue,{})}),e.jsx(ie,{})]})})}export{je as default};
@@ -1 +0,0 @@
1
- const i={orderBy:"timestamp",orderDirection:"desc",tagsInclude:[],tagsExclude:[],groupsInclude:[],groupsExclude:[],pageSize:500};function s(t){const r={};return Object.entries(t).forEach(([n,e])=>{e!=null&&(typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0||(r[n]=e))}),Object.keys(r).length===0?null:encodeURIComponent(JSON.stringify(r))}function o(t,r){try{const n=JSON.parse(decodeURIComponent(t));return{...r,...n}}catch{return r}}export{i as D,o as d,s};
@@ -1 +0,0 @@
1
- import{h as r}from"./vendor-recharts.js";function a(t){return r.Children.toArray(t).filter(e=>r.isValidElement(e))}export{a as g};
@@ -1 +0,0 @@
1
- import{h as c,m as p}from"./vendor-recharts.js";import{I as D,J as y,U as u,N as g,O as m,ao as x,ap as C,T as R}from"./docs.js";import{j as d}from"./vendor-xyflow.js";function S(s){return D("MuiDialogActions",s)}y("MuiDialogActions",["root","spacing"]);const T=s=>{const{classes:t,disableSpacing:o}=s;return g({root:["root",!o&&"spacing"]},S,t)},v=m("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(s,t)=>{const{ownerState:o}=s;return[t.root,!o.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:s})=>!s.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),b=c.forwardRef(function(t,o){const e=u({props:t,name:"MuiDialogActions"}),{className:n,disableSpacing:i=!1,...r}=e,a={...e,disableSpacing:i},l=T(a);return d.jsx(v,{className:p(l.root,n),ownerState:a,ref:o,...r})}),A=s=>{const{classes:t}=s;return g({root:["root"]},C,t)},h=m(R,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),j=c.forwardRef(function(t,o){const e=u({props:t,name:"MuiDialogTitle"}),{className:n,id:i,...r}=e,a=e,l=A(a),{titleId:f=i}=c.useContext(x);return d.jsx(h,{component:"h2",className:p(l.root,n),ownerState:a,ref:o,variant:"h6",id:i??f,...r})});function I(s){return s.reduce((t,o)=>(o.enabled&&o.key.trim()&&(t[o.key.trim()]=o.value),t),{})}function J(s){const t=s.trim();if(!t)return{};try{return{value:JSON.parse(t)}}catch{return{error:"Invalid JSON"}}}export{j as D,b as a,J as p,I as r};
@@ -1 +0,0 @@
1
- import{b9 as d,a4 as y}from"./docs.js";function s(n){if(!n)return;const r=g(n),e=n.nullable?" | null":"",t=n.optional?" (optional)":"";return`${r}${e}${t}`.trim()}function g(n){var r,e;switch(n.kind){case"array":return`array<${s(n.element)??"unknown"}>`;case"enum":return(r=n.enumValues)!=null&&r.length?`enum(${n.enumValues.join(" | ")})`:"enum";case"literal":return`literal(${JSON.stringify(n.literal)})`;case"union":return((e=n.union)==null?void 0:e.map(t=>s(t)??"unknown").join(" | "))||"union";case"record":return`record<string, ${s(n.element)??"unknown"}>`;case"tuple":return"tuple";default:return n.kind}}function a(n){var r,e;if(!n)return{};if(n.example!==void 0)return n.example;switch(n.kind){case"object":{const t=n.properties??{},o={};return Object.entries(t).forEach(([i,u])=>{if(!u)return;const l=a(u);o[i]=l??null}),o}case"array":{if(!n.element)return[];const t=a(n.element);return t===void 0?[]:[t]}case"string":return"";case"number":case"bigint":return 0;case"boolean":return!1;case"date":return d();case"enum":return((r=n.enumValues)==null?void 0:r[0])??"";case"literal":return n.literal??null;case"union":return(e=n.union)!=null&&e.length?a(n.union[0]):null;case"tuple":return n.union?n.union.map(t=>a(t)):[];case"record":return{};default:return null}}function c(n){var r;if(!n)return"";if(n.example!==void 0)return typeof n.example=="string"?n.example:JSON.stringify(n.example);switch(n.kind){case"string":return"example";case"number":case"bigint":return"0";case"boolean":return"true";case"enum":return((r=n.enumValues)==null?void 0:r[0])??"option";default:{const e=a(n);if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return""}}}}function j(n,r){if(!r||r.kind!=="object"||!r.properties)return n;const e=r.properties,t=new Set(n.map(i=>i.key)),o=n.map(i=>{const u=e[i.key];if(!u||i.value&&i.value.trim().length>0)return i;const l=c(u);return l?{...i,value:l,enabled:i.enabled||!(u!=null&&u.optional)}:i});return Object.entries(e).forEach(([i,u])=>{!u||t.has(i)||(t.add(i),o.push(y({key:i,value:c(u),enabled:!u.optional,typeHint:s(u),description:u.description})))}),o}function V(n,r){if(!r)return n;const e=a(r);return p(n,e)}function p(n,r){if(n==null)return r;if(r==null)return n;if(Array.isArray(r)){if(!Array.isArray(n)||n.length===0)return r;const e=r[0];return n.map(t=>e===void 0?t:p(t,e))}if(f(r)){if(!f(n))return r;const e={...n};return Object.entries(r).forEach(([t,o])=>{b(e[t])?e[t]=o:(f(o)||Array.isArray(o))&&(e[t]=p(e[t],o))}),e}return b(n)?r:n}function b(n){return n==null||typeof n=="string"&&n.trim().length===0}function f(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}export{V as a,c as b,s as d,j as f,a as s};
@@ -1 +0,0 @@
1
- import{h as a}from"./vendor-recharts.js";import{c,ac as p,r as E}from"./docs.js";function m(e){const{client:i}=c(),[u,n]=a.useState({isLoading:!1}),d=a.useMemo(()=>p(e),[e]);return a.useEffect(()=>{let o=!1;if(!e||!d){n({data:void 0,isLoading:!1,error:void 0});return}return n(t=>({...t,isLoading:!0,error:void 0})),i.fetch({method:"GET",path:"/__rrroutes/endpoints/:endpointId",params:{endpointId:d}}).then(t=>{var r;o||n({isLoading:!1,data:(r=t.data)==null?void 0:r.out,error:void 0})}).catch(t=>{o||n({isLoading:!1,data:void 0,error:t instanceof Error?t:new Error(String(t))})}),()=>{o=!0}},[i,e,d]),u}function L(e){const{client:i}=c(),[u,n]=a.useState([]),[d,o]=a.useState(!1);return a.useEffect(()=>{let t=!1;return o(!0),n([]),i.fetch({method:"GET",path:"/__rrroutes/endpoints",query:{...e?{searchQuery:e}:{},pageSize:"50"}}).then(r=>{if(t)return;const s=r.data,f=Array.isArray(s==null?void 0:s.out)?s.out:Array.isArray(s)?s:[];n(f.map(l=>E(l)))}).catch(r=>{t||(console.error("Failed to load endpoints",r),n([]))}).finally(()=>{t||o(!1)}),()=>{t=!0}},[i,e]),{options:u,isLoading:d}}export{m as a,L as u};
@@ -1 +0,0 @@
1
- import{j as R}from"./vendor-xyflow.js";import{R as f,a as v}from"./docs.js";import{h as z}from"./vendor-recharts.js";import{d as l,s as d}from"./filterTypes.js";const P=f(R.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}));function C(s,e){const[m,o]=v(),c=m.get(s),p=c===null?e:l(c,e),u=z.useCallback(r=>{o(n=>{const t=new URLSearchParams(n),i=n.get(s),h=i===null?e:l(i,e),S=typeof r=="function"?r(h):r,a=d(S);return a==null?t.delete(s):t.set(s,a),t},{replace:!0})},[e,s,o]);return[p,u]}export{P as R,C as u};