@redocly/asyncapi-docs 1.5.0-next.8 → 1.5.0
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.
- package/lib/RedoclyAsyncAPIDocs.d.ts +3 -4
- package/lib/RedoclyAsyncAPIDocs.js +1 -1
- package/lib/components/ApiInfo.js +1 -1
- package/lib/components/AppRouter.d.ts +1 -2
- package/lib/components/AppRouter.js +1 -1
- package/lib/components/AsyncApiDocs.d.ts +1 -1
- package/lib/components/AsyncApiDocs.js +1 -1
- package/lib/components/Breadcrumbs.d.ts +1 -2
- package/lib/components/Breadcrumbs.js +2 -2
- package/lib/components/ChannelBinding.d.ts +1 -1
- package/lib/components/ChannelBinding.js +1 -1
- package/lib/components/ChannelLinkItem.d.ts +1 -1
- package/lib/components/ChannelLinkItem.js +3 -3
- package/lib/components/ChannelParameters.d.ts +1 -1
- package/lib/components/ChannelParameters.js +3 -3
- package/lib/components/ChannelSection.d.ts +2 -3
- package/lib/components/ChannelSection.js +7 -7
- package/lib/components/DownloadSpecification.js +4 -4
- package/lib/components/ItemsNavigation.d.ts +1 -1
- package/lib/components/ItemsNavigation.js +6 -6
- package/lib/components/JsonSchema.js +2 -2
- package/lib/components/MarkdownSection.d.ts +1 -1
- package/lib/components/MarkdownSection.js +2 -2
- package/lib/components/Message.d.ts +1 -1
- package/lib/components/Message.js +4 -4
- package/lib/components/MessageAMQPReferences.d.ts +1 -2
- package/lib/components/MessageAMQPReferences.js +6 -6
- package/lib/components/MessageBinding.d.ts +1 -1
- package/lib/components/MessageBinding.js +1 -1
- package/lib/components/MessageReferences.js +1 -1
- package/lib/components/MessageSection.d.ts +2 -3
- package/lib/components/MessageSection.js +7 -7
- package/lib/components/Operation.d.ts +4 -4
- package/lib/components/Operation.js +12 -12
- package/lib/components/OperationBinding.d.ts +1 -1
- package/lib/components/OperationBinding.js +1 -1
- package/lib/components/OperationSection.d.ts +2 -3
- package/lib/components/OperationSection.js +5 -5
- package/lib/components/RightPanel.d.ts +2 -3
- package/lib/components/RightPanel.js +1 -1
- package/lib/components/SamplesPanel.d.ts +1 -1
- package/lib/components/SamplesPanel.js +5 -5
- package/lib/components/Server.d.ts +1 -1
- package/lib/components/Server.js +7 -7
- package/lib/components/ServerBindingsSection.d.ts +1 -1
- package/lib/components/ServerBindingsSection.js +1 -1
- package/lib/components/ServerModal.d.ts +1 -1
- package/lib/components/ServerModal.js +7 -7
- package/lib/components/ServerOverviewSection.d.ts +1 -1
- package/lib/components/ServerOverviewSection.js +7 -7
- package/lib/components/ServersListPanel.d.ts +2 -3
- package/lib/components/ServersListPanel.js +3 -3
- package/lib/components/TagBlock.d.ts +2 -3
- package/lib/components/TagBlock.js +9 -9
- package/lib/components/common/BindingPanel.d.ts +1 -1
- package/lib/components/common/BindingPanel.js +6 -6
- package/lib/components/common/Information.js +2 -2
- package/lib/components/common/Link.js +9 -9
- package/lib/components/common/ListIcon.d.ts +1 -1
- package/lib/components/common/ListIcon.js +6 -6
- package/lib/components/common/MoreDetailsButton.js +2 -2
- package/lib/components/common/SectionWrapper.js +1 -1
- package/lib/components/common/TagWithIcon.js +6 -6
- package/lib/components/common/index.d.ts +7 -7
- package/lib/components/common/index.js +1 -1
- package/lib/components/common/styles.d.ts +1 -1
- package/lib/components/common/styles.js +18 -18
- package/lib/hooks/index.d.ts +5 -5
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/use-auto-scroll.js +1 -1
- package/lib/hooks/use-performance-metrics.js +1 -1
- package/lib/hooks/use-protocol-labels.js +1 -1
- package/lib/hooks/use-telemetry.d.ts +1 -1
- package/lib/hooks/use-telemetry.js +1 -1
- package/lib/hooks/use-translate.d.ts +1 -1
- package/lib/hooks/use-translate.js +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +1 -1
- package/lib/jotai-store/Provider.d.ts +3 -3
- package/lib/jotai-store/Provider.js +1 -1
- package/lib/jotai-store/app.d.ts +3 -3
- package/lib/jotai-store/app.js +1 -1
- package/lib/types/apiItem.js +0 -1
- package/lib/types/async-api.d.ts +1 -1
- package/lib/types/async-api.js +0 -1
- package/lib/types/index.d.ts +3 -3
- package/lib/types/index.js +1 -1
- package/lib/types/protocol.js +1 -1
- package/lib/utils/avro-to-json-schema.js +1 -1
- package/lib/utils/build-menu-items.d.ts +2 -2
- package/lib/utils/build-menu-items.js +1 -1
- package/lib/utils/find-first-binding.d.ts +1 -1
- package/lib/utils/find-first-binding.js +1 -1
- package/lib/utils/generate-ast.js +1 -1
- package/lib/utils/generate-channel-link.d.ts +1 -1
- package/lib/utils/generate-channel-link.js +1 -1
- package/lib/utils/generate-message-references-header.d.ts +1 -1
- package/lib/utils/generate-message-references-header.js +1 -1
- package/lib/utils/get-schema.js +1 -1
- package/lib/utils/index.d.ts +12 -12
- package/lib/utils/index.js +1 -1
- package/lib/utils/is-equal.js +1 -1
- package/lib/utils/map-channel-to-operations.d.ts +1 -1
- package/lib/utils/map-channel-to-operations.js +1 -1
- package/lib/utils/modify-payload.d.ts +1 -1
- package/lib/utils/modify-payload.js +1 -1
- package/lib/utils/nav-to-api-items.d.ts +1 -1
- package/lib/utils/nav-to-api-items.js +1 -1
- package/lib/utils/try-decode-url-component.js +1 -1
- package/package.json +20 -20
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type { AsyncApiDefinition, ApiItem, ProtocolVariant, DownloadUrls } from './types';
|
|
1
|
+
import type { LayoutVariant } from '@redocly/config';
|
|
2
|
+
import type { AsyncApiDefinition, ApiItem, ProtocolVariant, DownloadUrls } from './types/index.js';
|
|
4
3
|
type RedoclyAsyncAPIDocsProps = {
|
|
5
4
|
pageProps: {
|
|
6
5
|
apiOptions: {
|
|
@@ -14,5 +13,5 @@ type RedoclyAsyncAPIDocsProps = {
|
|
|
14
13
|
downloadUrls: DownloadUrls[];
|
|
15
14
|
markdocOptions: any;
|
|
16
15
|
};
|
|
17
|
-
export declare const RedoclyAsyncAPIDocs:
|
|
16
|
+
export declare const RedoclyAsyncAPIDocs: import("react").MemoExoticComponent<({ pageProps, document, apiItems, routingBasePath, protocol, downloadUrls, markdocOptions, }: RedoclyAsyncAPIDocsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as e,jsxs as f}from"react/jsx-runtime";import{useMemo as M,memo as b}from"react";import{IS_BROWSER as x}from"@redocly/theme/core/utils";import{useMount as D}from"@redocly/theme/core/hooks";import{AppProvider as l}from"./jotai-store/Provider.js";import{AsyncApiDocs as y}from"./components/AsyncApiDocs.js";import{Breadcrumbs as u}from"./components/Breadcrumbs.js";import{AppRouter as O}from"./components/AppRouter.js";import{useTelemetry as R,usePerformanceMetrics as I}from"./hooks/index.js";const C=b(({pageProps:t,document:o,apiItems:r,routingBasePath:i,protocol:m,downloadUrls:c,markdocOptions:p})=>{const n=R(),a=M(()=>({layout:t.apiOptions.layout,protocol:m,routingBasePath:i,downloadUrls:c,definition:o,markdocOptions:p}),[t.apiOptions.layout,m,i,c,o,p]);return I({sendTelemetry:A=>{const s=Object.fromEntries(Object.entries(A).map(([d,j])=>[d.toLowerCase(),j]));n.sendAsyncapiDocsPerformanceMetricsMessage({cls:s.cls,lcp:s.lcp,fcp:s.fcp,ttfb:s.ttfb})}}),D(()=>{n.sendAsyncapiDocsViewedMessage({layout:t.apiOptions.layout})}),x?e(l,{store:a,children:f(O,{children:[e(u,{}),e(y,{apiItems:r})]})}):f(l,{store:a,children:[e(u,{}),e(y,{apiItems:r})]})});export{C as RedoclyAsyncAPIDocs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useAtomValue as e}from"jotai";import{ExternalDocumentation as m,Markdown as c,getValueFromMdParsedExtension as d,saveTextBeforeHeading as f,Section as p,Metadata as l}from"@redocly/openapi-docs";import{PageActions as x}from"@redocly/theme/components/PageActions/PageActions";import{ApiHeader as u,ExternalDocumentationWrapper as g}from"./common/index.js";import{definitionAtom as A,routingBasePathAtom as h,markdocOptionsAtom as D}from"../jotai-store/app.js";import{useTranslate as j}from"../hooks/index.js";const H=()=>{const o=e(A),n=e(h),i=e(D),s=j(),a=f(d(o.info,"description")||"");return r(p,{sectionId:n,children:[r(u,{children:[o.info.title," ",o.info.version,t(x,{pageSlug:n})]}),a&&t(c,{source:a,markdocOptions:i}),o.info.externalDocs&&t(g,{children:t(m,{externalDocs:o.info.externalDocs})}),o.info["x-metadata"]&&t(l,{metadata:o.info["x-metadata"],translate:s})]})};export{H as ApiInfo};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface AppRouterProps {
|
|
3
2
|
children: React.ReactNode;
|
|
4
3
|
}
|
|
5
|
-
export declare const AppRouter:
|
|
4
|
+
export declare const AppRouter: import("react").MemoExoticComponent<({ children }: AppRouterProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as o,Fragment as r}from"react/jsx-runtime";import{BrowserRouter as e,useInRouterContext as n}from"react-router-dom";import{memo as m}from"react";const x=m(({children:t})=>n()?o(r,{children:t}):o(e,{children:t}));export{x as AppRouter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useAtomValue as t}from"jotai";import{useCallback as p,memo as c}from"react";import{ThreePanelLayout as f}from"@redocly/theme/layouts/ThreePanelLayout";import{RightPanel as u}from"./RightPanel.js";import{TagBlock as d}from"./TagBlock.js";import{ApiInfo as h}from"./ApiInfo.js";import{ChannelSection as A}from"./ChannelSection.js";import{MarkdownSection as g}from"./MarkdownSection.js";import{SectionWrapper as y}from"./common/index.js";import{layoutAtom as k,routingBasePathAtom as v,definitionAtom as x}from"../jotai-store/app.js";import{useAutoScroll as P}from"../hooks/index.js";const N=c(({apiItems:n})=>{const a=t(v),i=t(x);P(a);const l=t(k),m=p(o=>o?.type==="tag"?r(d,{tag:o},o.link):o?.type==="channel"?r(A,{item:o},o.link):null,[]);return e(f,{className:"api-content",id:"api-content",layout:l,collapsedSidebar:!0,children:[e(y,{rightPanel:r(u,{info:i.info,servers:i.servers}),children:[r(h,{}),n.filter(({type:o})=>o==="markdown").map((o,s)=>r(g,{item:o},s))]}),n.map(m)]})});export{N as AsyncApiDocs};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Breadcrumbs: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
1
|
+
export declare const Breadcrumbs: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import a from"styled-components";import{memo as e}from"react";import{Breadcrumbs as t}from"@redocly/theme/components/Breadcrumbs/Breadcrumbs";const n=e(()=>r(o,{children:r(t,{})})),o=a.div`
|
|
2
2
|
padding-top: var(--panel-gap-vertical);
|
|
3
3
|
padding-bottom: var(--panel-gap-vertical);
|
|
4
4
|
padding-left: calc(var(--panel-gap-horizontal) * 2);
|
|
5
5
|
padding-right: var(--panel-gap-horizontal);
|
|
6
6
|
height: var(--navbar-height);
|
|
7
|
-
`;
|
|
7
|
+
`;export{n as Breadcrumbs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var g=function(o,c){var s={};for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&c.indexOf(i)<0&&(s[i]=o[i]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(o);a<i.length;a++)c.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(o,i[a])&&(s[i[a]]=o[i[a]]);return s};import{jsx as n,jsxs as t,Fragment as u}from"react/jsx-runtime";import{useState as m}from"react";import{JsonViewer as b}from"@redocly/theme/components/JsonViewer/JsonViewer";import{BindingPanel as y,HeaderWrapper as l,TagStyled as d,TopicConfiguration as r,TopicConfigurationWrapper as C,MoreDetailsButton as j}from"./common/index.js";import{useProtocolLabels as x}from"../hooks/index.js";const B=({binding:o})=>{const[c,s]=m(!1),{getProtocolLabel:i}=x({amqp:Object.assign({},o.value||{})}),a=()=>{s(!c)},p=({key:h,value:e})=>{const{bindingVersion:O}=e,f=g(e,["bindingVersion"]);switch(h){case"kafka":return t(u,{children:[e.topic&&t(l,{children:[n("span",{"data-testid":"topic-label",children:"Topic"}),n("span",{children:n(d,{borderless:!0,"data-testid":"topic-value",children:e.topic})})]}),e.partitions&&t(l,{children:[n("span",{"data-testid":"partitions-label",children:"Partitions"}),n("span",{children:n(d,{borderless:!0,color:"blue","data-testid":"partitions-value",children:e.partitions})})]}),e.replicas&&t(l,{children:[n("span",{"data-testid":"replicas-label",children:"Replicas"}),n("span",{children:n(d,{borderless:!0,color:"green","data-testid":"replicas-value",children:e.replicas})})]}),e.topicConfiguration&&t("div",{children:[n(l,{expandable:!0,onClick:a,children:n(j,{expanded:c})}),c&&t(C,{children:[e.topicConfiguration["cleanup.policy"]&&t(r,{children:[n("span",{children:"\u0421leanup policy"}),n("span",{children:e.topicConfiguration["cleanup.policy"].join(", ")})]}),e.topicConfiguration["retention.ms"]&&t(r,{children:[n("span",{children:"Retention, ms"}),n("span",{children:e.topicConfiguration["retention.ms"]})]}),e.topicConfiguration["retention.bytes"]&&t(r,{children:[n("span",{children:"Retention, bytes"}),n("span",{children:e.topicConfiguration["retention.bytes"]})]}),e.topicConfiguration["delete.retention.ms"]&&t(r,{children:[n("span",{children:"Delete retention, ms"}),n("span",{children:e.topicConfiguration["delete.retention.ms"]})]}),e.topicConfiguration["max.message.bytes"]&&t(r,{children:[n("span",{children:"Max message bytes"}),n("span",{children:e.topicConfiguration["max.message.bytes"]})]}),e.topicConfiguration["confluent.key.schema.validation"]&&t(r,{children:[n("span",{children:"Confluent key schema validation"}),n("span",{children:String(e.topicConfiguration["confluent.key.schema.validation"])})]}),e.topicConfiguration["confluent.key.subject.name.strategy"]&&t(r,{children:[n("span",{children:"Confluent key subject name strategy"}),n("span",{children:e.topicConfiguration["confluent.key.subject.name.strategy"]})]}),e.topicConfiguration["confluent.value.schema.validation"]&&t(r,{children:[n("span",{children:"Confluent value schema validation"}),n("span",{children:String(e.topicConfiguration["confluent.value.schema.validation"])})]}),e.topicConfiguration["confluent.value.subject.name.strategy"]&&t(r,{children:[n("span",{children:"Confluent value subject name strategy"}),n("span",{children:e.topicConfiguration["confluent.value.subject.name.strategy"]})]})]})]})]});default:return n(b,{data:f,expandLevel:3,controls:!1})}};return n(y,{header:i("channelBinding"),children:p(o)})};export{B as ChannelBinding};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as o,jsxs as n}from"react/jsx-runtime";import{useMemo as a}from"react";import{Link as s}from"react-router-dom";import i from"styled-components";import{generateChannelLink as l}from"../utils/index.js";import{ListIcon as c}from"./common/ListIcon.js";const h=({channel:r,isActive:e})=>{const t=a(()=>l(r),[r]);return n(d,{children:[o(c,{size:"22px",color:e?"var(--color-info-border)":"var(--border-color-primary)",style:{marginRight:"var(--spacing-xs)",flexShrink:0}}),o(m,{to:t,children:r.title||r.address||r.key})]})},d=i.div`
|
|
2
2
|
padding: var(--spacing-xxs) var(--spacing-md);
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
font-size: var(--font-size-md);
|
|
6
6
|
cursor: pointer;
|
|
7
|
-
`,
|
|
7
|
+
`,m=i(s)`
|
|
8
8
|
text-decoration: var(--link-decoration);
|
|
9
9
|
color: var(--link-color-primary);
|
|
10
10
|
font-weight: var(--link-font-weight);
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
color: var(--link-color-primary-hover);
|
|
20
20
|
text-decoration: var(--link-decoration-hover);
|
|
21
21
|
}
|
|
22
|
-
`;
|
|
22
|
+
`;export{h as ChannelLinkItem};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"
|
|
1
|
+
import{jsx as m,jsxs as s,Fragment as c}from"react/jsx-runtime";import l from"styled-components";import{useAtomValue as f}from"jotai";import{makeDeepLink as i}from"@redocly/openapi-docs";import{H4 as g}from"@redocly/theme/components/Typography/H4";import{LinkIcon as h}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{combineUrls as a}from"@redocly/theme/core/openapi";import{JsonSchema as j}from"./JsonSchema.js";import{routingBasePathAtom as b}from"../jotai-store/app.js";import{LinkToField as u}from"./common/index.js";const B=({parameters:n,id:r})=>{const t=f(b);return s(c,{children:[s(d,{children:[m(u,{to:a(t,i(r,"parameters"))}),"Parameters"]}),Object.entries(n).map(([e,o])=>{const p={type:"object",properties:{[e]:Object.assign(Object.assign({},o),{type:o.location||""})}};return m(j,{schema:p,slug:a(t,i(r,"parameters"))},e)})]})},d=l(g)`
|
|
2
2
|
margin: var(--spacing-md) 0 0 0;
|
|
3
3
|
position: relative;
|
|
4
4
|
:hover {
|
|
5
|
-
${
|
|
5
|
+
${h} {
|
|
6
6
|
opacity: 1;
|
|
7
7
|
visibility: visible;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
`;
|
|
10
|
+
`;export{B as ChannelParameters};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ApiItem } from '../types';
|
|
1
|
+
import type { ApiItem } from '../types/index.js';
|
|
3
2
|
type ChannelSectionProps = {
|
|
4
3
|
item: ApiItem;
|
|
5
4
|
};
|
|
6
|
-
export declare const ChannelSection:
|
|
5
|
+
export declare const ChannelSection: import("react").MemoExoticComponent<({ item }: ChannelSectionProps) => import("react/jsx-runtime").JSX.Element | null>;
|
|
7
6
|
export {};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as i,jsxs as s}from"react/jsx-runtime";import{useMemo as a,memo as A}from"react";import l from"styled-components";import{useAtomValue as h}from"jotai";import{Row as f,SamplesMiddlePanel as b,OperationSamplesPanel as C,Section as L,CustomBadges as _}from"@redocly/openapi-docs";import{LayoutVariant as I}from"@redocly/config";import{H2 as w}from"@redocly/theme/components/Typography/H2";import{LinkIcon as B}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{CurveAutoColonIcon as D}from"@redocly/theme/icons/CurveAutoColonIcon/CurveAutoColonIcon";import{combineUrls as H}from"@redocly/theme/core/openapi";import{PageActions as M}from"@redocly/theme/components/PageActions/PageActions";import{layoutAtom as N,routingBasePathAtom as T,definitionAtom as W}from"../jotai-store/app.js";import{TagWithIcon as V,Information as $,ActionTag as z,ShareLink as E}from"./common/index.js";import{ChannelParameters as K}from"./ChannelParameters.js";import{ServersListPanel as R}from"./ServersListPanel.js";import{ChannelBinding as U}from"./ChannelBinding.js";import{MessageSection as q}from"./MessageSection.js";import{OperationSection as k}from"./OperationSection.js";import{useProtocolLabels as F}from"../hooks/index.js";const be=A(({item:r})=>{var p;const d=h(N),j=h(T),t=h(W),c=d===I.STACKED,e=(p=t.channels)===null||p===void 0?void 0:p[r.id],{getProtocolLabel:x}=F(e?.bindings),m=a(()=>Object.entries(t.servers||{}).map(([n,o])=>({key:n,value:o})).filter(({value:n})=>{var o;return(o=e?.servers)===null||o===void 0?void 0:o.some(P=>P.host===n.host)}),[e?.servers,t.servers]),S=a(()=>Object.entries(e?.bindings||{}).map(([n,o])=>({key:n,value:o})),[e?.bindings]),y=a(()=>Object.entries(e?.messages||{}).map(([n,o])=>({key:n,value:o})),[e?.messages]),v=a(()=>r.items.filter(n=>{var o;return n.action==="send"&&((o=t.operations)===null||o===void 0?void 0:o[n.id])}),[t.operations,r.items]),u=a(()=>r.items.filter(n=>{var o;return n.action==="receive"&&((o=t.operations)===null||o===void 0?void 0:o[n.id])}),[t.operations,r.items]),O=a(()=>{var n;return(n=e?.["x-badges"])===null||n===void 0?void 0:n.map(o=>Object.assign(Object.assign({},o),{position:o.position||"after"}))},[e]);if(!e)return null;const g=H(j,r.dataSectionId);return s(G,{children:[s(J,{sectionId:g,children:[i(f,{layout:d,children:i(b,{compact:!0,className:"api-info",isStacked:c,children:i(z,{color:x("channel").toLowerCase(),children:x("channel")})})}),s(f,{layout:d,children:[s(b,{compact:!0,className:"api-info",isStacked:c,children:[s(X,{children:[s(Q,{children:[i(_,{badges:O,children:e?.title||e?.address||r.id}),i(E,{to:g,"aria-label":`link to ${r.label}`})]}),i(M,{pageSlug:g})]}),e.address&&s(V,{icon:i(D,{size:"14px"}),children:["name: ",i("span",{children:e.address})]}),i($,{summary:e.summary,description:e.description,externalDocs:e.externalDocs}),e.parameters&&i(K,{parameters:e.parameters,id:r.link})]}),s(C,{isStacked:c,className:"panel-container-response-samples",children:[!!m?.length&&i(R,{servers:m,hideHeader:!0}),!!S.length&&i(U,{binding:S[0]})]})]}),y.length>0?i(q,{messages:y,id:r.link}):null]}),v.length>0?i(k,{operations:v,type:"send",id:r.link}):null,u.length>0&&v.length>0?i(f,{layout:d,children:i(b,{isStacked:c,children:i(Y,{})})}):null,u.length>0?i(k,{operations:u,type:"receive",id:r.link}):null]})}),G=l.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
|
|
4
4
|
&:not(:last-child) {
|
|
5
5
|
border-bottom: 1px solid var(--border-color-primary);
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,J=l(L)`
|
|
8
8
|
padding: var(--spacing-xxl) 0 var(--spacing-base);
|
|
9
9
|
scroll-margin-top: calc(var(--navbar-height) - var(--spacing-base)) !important;
|
|
10
|
-
`,
|
|
10
|
+
`,Q=l(w)`
|
|
11
11
|
margin: 0 0 var(--spacing-xs) 0;
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
gap: var(--spacing-xs);
|
|
15
15
|
flex-wrap: wrap;
|
|
16
16
|
:hover {
|
|
17
|
-
${
|
|
17
|
+
${B} {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
visibility: visible;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,X=l.div`
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: flex-start;
|
|
25
|
-
`,
|
|
25
|
+
`,Y=l.div`
|
|
26
26
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
27
|
-
`;
|
|
27
|
+
`;export{be as ChannelSection};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as o,Fragment as d,jsxs as a}from"react/jsx-runtime";import{memo as m,useCallback as p}from"react";import r from"styled-components";import{useDownloadInfo as f}from"@redocly/openapi-docs";import{useAtomValue as w}from"jotai";import{DocumentIcon as x}from"@redocly/theme/icons/DocumentIcon/DocumentIcon";import{JsonIcon as u}from"@redocly/theme/icons/JsonIcon/JsonIcon";import{FileIcon as b}from"@redocly/theme/icons/FileIcon/FileIcon";import{Button as g}from"@redocly/theme/components/Button/Button";import{DownloadIcon as h}from"@redocly/theme/icons/DownloadIcon/DownloadIcon";import{downloadUrlsAtom as y}from"../jotai-store/app.js";import{useTelemetry as v}from"../hooks/index.js";function j(){const i=v(),s=w(y),t=f({downloadUrls:s}),l=p(e=>{switch(e){case"yaml":return o(x,{});case"json":return o(u,{});default:return o(b,{})}},[]);return t?o(I,{children:(t||[]).map(({title:e,url:n,iconType:c})=>a(k,{onClick:()=>i.sendAsyncapiDocsDownloadDefinitionClickedMessage(),children:[a(D,{children:[l(c),o("a",{href:n,target:"_blank",download:!0,rel:"noreferrer",children:e})]}),o("a",{href:n,target:"_blank",download:!0,rel:"noreferrer",children:o(g,{variant:"text",size:"small",icon:o(h,{})})})]},e))}):o(d,{})}const T=m(j),k=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
padding-bottom: 0px;
|
|
11
11
|
border-bottom: none;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,D=r.span`
|
|
14
14
|
display: flex;
|
|
15
15
|
width: calc(100% - 25px);
|
|
16
16
|
gap: var(--spacing-xs);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
white-space: nowrap;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,I=r.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
align-self: flex-start;
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
flex-direction: column;
|
|
37
37
|
gap: var(--spacing-sm);
|
|
38
38
|
font-size: var(--font-size-base);
|
|
39
|
-
`;
|
|
39
|
+
`;export{T as DownloadSpecification};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as r,jsxs as d}from"react/jsx-runtime";import o from"styled-components";import{useNavigate as S}from"react-router-dom";import{SamplesPanel as A}from"@redocly/openapi-docs";import{LayoutVariant as I}from"@redocly/config";import{useAtomValue as f}from"jotai/index";import{useMemo as z,useState as j}from"react";import{Button as C}from"@redocly/theme/components/Button/Button";import{layoutAtom as P,definitionAtom as E}from"../jotai-store/app.js";import{ActionTag as L}from"./common/index.js";import{useProtocolLabels as _}from"../hooks/index.js";const p=8,J=({items:t,firstChannelBinding:u})=>{const[n,v]=j(!1),{getProtocolLabel:i}=_(u),x=S(),b=f(P),h=f(E),y=b===I.STACKED,{displayItems:w,count:m}=z(()=>{const e=t?.filter(a=>{var c;return a.type==="channel"&&((c=h.channels)===null||c===void 0?void 0:c[a.id])})||[],s=n?e:e.slice(0,p),l=!n&&e.length>p?e.length-p:0;return{displayItems:s,count:l}},[t,n,h.channels]),k=e=>{x(e)};return d(B,{isStacked:y,children:[r(M,{children:i("channels")}),w.map(({id:e,type:s,label:l,link:a})=>s==="channel"?r(N,{variant:"outlined",size:"large",onClick:()=>k(a),children:d("span",{children:[r(L,{color:i("channel").toLowerCase(),children:i("channel")}),r(T,{children:l})]})},e):null),!n&&!!m&&d(g,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>v(!0),children:["Show ",m," more..."]})]})},B=o(A)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
5
5
|
padding-top: var(--spacing-xxl);
|
|
6
|
-
`,
|
|
6
|
+
`,g=o(C)`
|
|
7
7
|
& + & {
|
|
8
8
|
margin-left: 0;
|
|
9
9
|
}
|
|
10
|
-
`,N=
|
|
10
|
+
`,N=o(g)`
|
|
11
11
|
border-radius: var(--border-radius);
|
|
12
12
|
background: var(--bg-color);
|
|
13
13
|
justify-content: space-between;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
content: '→';
|
|
28
28
|
line-height: var(--line-height-base);
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`,T=o.span`
|
|
31
31
|
font-family: var(--font-family-base);
|
|
32
32
|
font-size: var(--font-size-base);
|
|
33
33
|
line-height: var(--line-height-base);
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
white-space: nowrap;
|
|
37
37
|
text-overflow: ellipsis;
|
|
38
38
|
overflow-x: hidden;
|
|
39
|
-
`,
|
|
39
|
+
`,M=o.span`
|
|
40
40
|
font-size: var(--font-size-base);
|
|
41
41
|
line-height: var(--line-height-base);
|
|
42
42
|
font-weight: var(--font-weight-bold);
|
|
43
43
|
color: var(--text-color-primary);
|
|
44
44
|
margin: var(--spacing-sm) 0 var(--spacing-xxs) 0;
|
|
45
|
-
`;
|
|
45
|
+
`;export{J as ItemsNavigation};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{RedocSchema as c,StoreProvider as f}from"@redocly/openapi-docs";import u from"styled-components";function _({options:p,schemaResolved:o,schema:d,slug:e,onOneOfChange:s}){var i,n,t;if(!d&&!o)return null;const l={openapi:"3.0.0",info:{version:"1",description:"test",title:"test"},paths:{},"x-root":((n=(i=o?.components)===null||i===void 0?void 0:i.schemas)===null||n===void 0?void 0:n.__root)||d,components:{schemas:Object.assign({},(t=o?.components)===null||t===void 0?void 0:t.schemas)}};return r(v,{children:r(f,{options:p,definition:l,children:r(c,{pointer:"#/x-root",slug:e,onOneOfChange:s})})})}const v=u.div`
|
|
2
2
|
& > div > div {
|
|
3
3
|
padding-left: 0;
|
|
4
4
|
padding-right: 0;
|
|
5
5
|
}
|
|
6
|
-
`;
|
|
6
|
+
`;export{_ as JsonSchema};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as t,Fragment as l,jsxs as f}from"react/jsx-runtime";import{useAtomValue as s}from"jotai";import g from"styled-components";import{Markdown as i,Section as h}from"@redocly/openapi-docs";import{combineUrls as c}from"@redocly/theme/core/openapi";import{generateAst as m}from"../utils/index.js";import{markdocOptionsAtom as k,routingBasePathAtom as S}from"../jotai-store/app.js";const w=({item:o})=>{const a=s(k),n=s(S),d=m(o.ast);return f(l,{children:[t(e,{sectionId:c(n,o.dataSectionId),children:t(i,{ast:d,markdocOptions:a})}),o.items.map(r=>{const p=m(r.ast);return t(e,{sectionId:c(n,r.dataSectionId),children:t(i,{ast:p,markdocOptions:a})},r.link)})]})},e=g(h)`
|
|
2
2
|
scroll-margin-top: calc(var(--navbar-height)) !important;
|
|
3
|
-
`;
|
|
3
|
+
`;export{w as MarkdownSection};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as r,jsxs as t,Fragment as p}from"react/jsx-runtime";import{memo as A,useMemo as L}from"react";import d from"styled-components";import{useAtomValue as f}from"jotai";import{makeDeepLink as a}from"@redocly/openapi-docs";import{combineUrls as m}from"@redocly/theme/core/openapi";import{H4 as P}from"@redocly/theme/components/Typography/H4";import{LinkIcon as T}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Information as _,LinkToField as v}from"./common/index.js";import{JsonSchema as u}from"./JsonSchema.js";import{getSchema as g}from"../utils/index.js";import{useProtocolLabels as $}from"../hooks/index.js";import{definitionAtom as j,routingBasePathAtom as k}from"../jotai-store/app.js";const q=A(({message:o,sectionId:n,id:i,onOneOfChange:x})=>{var l;const s=f(k),e=f(j),{getProtocolLabel:b}=$(),h=L(()=>{var c;if(!((c=e?.components)===null||c===void 0)&&c.schemas)return{openapi:"3.0.0",info:{version:"1",title:"AsyncAPI",description:""},paths:{},components:{schemas:e.components.schemas}}},[(l=e?.components)===null||l===void 0?void 0:l.schemas]);return t(p,{children:[r(_,{summary:o.summary,description:o.description,externalDocs:o.externalDocs}),o.headers&&t(p,{children:[t(y,{children:[r(v,{to:m(s,a(n,`messages&m=${i}/headers`))}),"Headers"]}),r(u,{schema:g(o.headers),schemaResolved:h,slug:m(s,a(n,`messages&m=${i}&t=headers`))})]}),o.payload&&t(p,{children:[t(y,{children:[r(v,{to:m(s,a(n,`messages&m=${i}/payload`))}),b("payload"),o.contentType&&r(z,{children:o.contentType})]}),r(u,{onOneOfChange:x,schema:g(o.payload),schemaResolved:h,slug:m(s,a(n,`messages&m=${i}&t=payload`))})]})]})}),y=d(P)`
|
|
2
2
|
margin: var(--spacing-md) 0 0 0;
|
|
3
3
|
font-size: 18px;
|
|
4
4
|
position: relative;
|
|
5
5
|
:hover {
|
|
6
|
-
${
|
|
6
|
+
${T} {
|
|
7
7
|
opacity: 1;
|
|
8
8
|
visibility: visible;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`,z=d.span`
|
|
12
12
|
margin: 0px var(--spacing-xs);
|
|
13
13
|
color: var(--text-color-primary);
|
|
14
14
|
line-height: var(--line-height-lg);
|
|
15
15
|
font-family: var(--font-family-base);
|
|
16
16
|
font-weight: var(--font-weight-regular);
|
|
17
17
|
font-size: var(--font-size-lg);
|
|
18
|
-
`;
|
|
18
|
+
`;export{q as Message};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
type MessageAMQPReferencesProps = {
|
|
3
2
|
messageKey: string;
|
|
4
3
|
};
|
|
5
|
-
export declare const MessageAMQPReferences:
|
|
4
|
+
export declare const MessageAMQPReferences: import("react").MemoExoticComponent<({ messageKey }: MessageAMQPReferencesProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
5
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as n,Fragment as d,jsxs as r}from"react/jsx-runtime";import{useMemo as p,memo as M}from"react";import{useLocation as b}from"react-router-dom";import{useAtomValue as j}from"jotai";import f from"styled-components";import{SamplesMiddlePanel as k}from"@redocly/openapi-docs";import{useActiveSectionId as A}from"@redocly/theme/core/openapi";import{Typography as P}from"@redocly/theme/components/Typography/Typography";import{Panel as q}from"@redocly/theme/components/Panel/Panel";import{PanelBody as _}from"@redocly/theme/components/Panel/PanelBody";import{PanelHeader as g}from"@redocly/theme/components/Panel/PanelHeader";import{generateMessageReferencesHeader as Q}from"../utils/index.js";import{ChannelLinkItem as h}from"./ChannelLinkItem.js";import{definitionAtom as R}from"./../jotai-store/app.js";const K=M(({messageKey:c})=>{const i=j(R),x=b(),m=A(x,!0),s=p(()=>{var e,a;const o={exchanges:[],queues:[]};if(!i.channels)return o;for(const[y,t]of Object.entries(i.channels))if(t.messages&&t.messages[c]){const l=Object.assign(Object.assign({},t),{key:y});((a=(e=t.bindings)===null||e===void 0?void 0:e.amqp)===null||a===void 0?void 0:a.is)==="routingKey"?o.exchanges.push(l):o.queues.push(l)}return o},[c,i]),v=p(()=>Q(s),[s]);return r(S,{className:"panel-messages-samples",header:()=>n(g,{isExpandable:!1,children:v}),"data-component-name":"MessageAMQPReferences/MessageAMQPReferences",children:[!!s.exchanges.length&&r(d,{children:[n(u,{children:"Exchanges"}),s.exchanges.map(e=>n(h,{channel:e,isActive:m.endsWith(e.key)},e.key))]}),!!s.queues.length&&r(d,{children:[n(u,{children:"Queues"}),s.queues.map(e=>n(h,{channel:e,isActive:m.endsWith(e.key)},e.key))]})]})}),u=f(P)`
|
|
2
2
|
font-weight: var(--font-weight-semibold);
|
|
3
3
|
font-size: var(--font-size-sm);
|
|
4
4
|
padding: var(--spacing-xxs) var(--spacing-md);
|
|
5
|
-
`,
|
|
6
|
-
${
|
|
5
|
+
`,S=f(q)`
|
|
6
|
+
${_} {
|
|
7
7
|
background-color: var(--layer-color-ontonal);
|
|
8
8
|
padding: 0;
|
|
9
9
|
display: flex;
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
overflow-y: scroll;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
${
|
|
15
|
+
${g} {
|
|
16
16
|
display: flex;
|
|
17
17
|
justify-content: start;
|
|
18
18
|
align-items: center;
|
|
19
19
|
gap: var(--spacing-xs);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${k} {
|
|
23
23
|
padding: 0 var(--spacing-md);
|
|
24
24
|
}
|
|
25
|
-
`;
|
|
25
|
+
`;export{K as MessageAMQPReferences};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var h=function(a,n){var o={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&n.indexOf(t)<0&&(o[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(a);e<t.length;e++)n.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(a,t[e])&&(o[t[e]]=a[t[e]]);return o};import{jsx as r,jsxs as d,Fragment as p}from"react/jsx-runtime";import{JsonViewer as m}from"@redocly/theme/components/JsonViewer/JsonViewer";import{BindingPanel as g,HeaderWrapper as i,TagStyled as s}from"./common/index.js";import{JsonSchema as y}from"./JsonSchema.js";import{getSchema as f}from"../utils/index.js";const x=({binding:a,slug:n})=>r(g,{header:"Message configuration",children:(({key:t,value:e})=>{const{bindingVersion:b}=e,c=h(e,["bindingVersion"]);switch(t){case"kafka":const l={type:"object",properties:{key:f(e.key)}};return d(p,{children:[e.key&&r(y,{schema:l,slug:n}),e.schemaIdLocation&&d(i,{children:[r("span",{"data-testid":"schema-id-location-label",children:"Schema ID Location"}),r("span",{children:r(s,{borderless:!0,"data-testid":"schema-id-location-value",children:e.schemaIdLocation})})]}),e.schemaIdPayloadEncoding&&d(i,{children:[r("span",{"data-testid":"schema-id-payload-encoding-label",children:"Schema ID payload encoding"}),r("span",{children:r(s,{borderless:!0,"data-testid":"schema-id-payload-encoding-value",children:e.schemaIdPayloadEncoding})})]}),e.schemaLookupStrategy&&d(i,{children:[r("span",{"data-testid":"schema-lookup-strategy-label",children:"Schema lookup strategy"}),r("span",{children:r(s,{borderless:!0,"data-testid":"schema-lookup-strategy-value",children:e.schemaLookupStrategy})})]})]});default:return r(m,{data:c,expandLevel:3,controls:!1})}})(a)});export{x as MessageBinding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useAtomValue as r}from"jotai";import{MessageAMQPReferences as s}from"./MessageAMQPReferences.js";import{protocolAtom as t}from"./../jotai-store/app.js";const l=({messageKey:e})=>{switch(r(t)){case"amqp":return o(s,{messageKey:e});default:return null}};export{l as MessageReferences};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { AsyncApiMessage } from '../types';
|
|
1
|
+
import type { AsyncApiMessage } from '../types/index.js';
|
|
3
2
|
type MessageSectionProps = {
|
|
4
3
|
messages: {
|
|
5
4
|
key: string;
|
|
@@ -7,5 +6,5 @@ type MessageSectionProps = {
|
|
|
7
6
|
}[];
|
|
8
7
|
id: string;
|
|
9
8
|
};
|
|
10
|
-
export declare const MessageSection:
|
|
9
|
+
export declare const MessageSection: import("react").MemoExoticComponent<({ messages, id }: MessageSectionProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
10
|
export {};
|