redoc 3.0.0-rc.1 → 3.0.0-rc.3

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 (166) hide show
  1. package/README.md +1 -5
  2. package/bundles/redoc.d.ts +71 -104
  3. package/bundles/redoc.js +1807 -1690
  4. package/bundles/redoc.standalone.d.ts +57 -92
  5. package/bundles/redoc.standalone.js +1804 -1687
  6. package/package.json +9 -12
  7. package/typings/.tsbuildinfo +1 -1
  8. package/typings/RedocStandalone.d.ts +9 -2
  9. package/typings/RedoclyApiDocs.d.ts +0 -1
  10. package/typings/adapters/asyncapi/panels/brokers.d.ts +5 -2
  11. package/typings/adapters/asyncapi/store.d.ts +2 -1
  12. package/typings/adapters/asyncapi/utils/resolve-server-variables.d.ts +3 -0
  13. package/typings/adapters/asyncapi/utils/resolveInDoc.d.ts +2 -2
  14. package/typings/adapters/asyncapi/utils/security.d.ts +12 -0
  15. package/typings/adapters/build.d.ts +0 -16
  16. package/typings/adapters/graphql/index.d.ts +0 -1
  17. package/typings/adapters/graphql/serializeType.d.ts +2 -3
  18. package/typings/adapters/graphql/utils/constants.d.ts +2 -1
  19. package/typings/adapters/helpers.d.ts +7 -3
  20. package/typings/adapters/openapi/index.d.ts +0 -2
  21. package/typings/adapters/openapi/items/operation/content.d.ts +3 -3
  22. package/typings/adapters/openapi/utils/JsonPointer.d.ts +0 -1
  23. package/typings/adapters/openapi/utils/helpers.d.ts +0 -2
  24. package/typings/adapters/openapi/utils/operation.d.ts +3 -2
  25. package/typings/adapters/utils/markdoc.d.ts +3 -4
  26. package/typings/ajv-stub.d.ts +4 -0
  27. package/typings/components/ItemContent/hooks.d.ts +2 -1
  28. package/typings/components/Mapper.d.ts +1 -4
  29. package/typings/components/Schema/SchemaView.d.ts +1 -1
  30. package/typings/components/Schema/hooks/useVariantIndexFromHash.d.ts +1 -1
  31. package/typings/components/Schema/utils.d.ts +0 -11
  32. package/typings/components/Schema/views/ArrayRenderer.d.ts +1 -2
  33. package/typings/components/Schema/views/CollapsibleNestedFields.d.ts +0 -1
  34. package/typings/components/Schema/views/ObjectRenderer.d.ts +1 -2
  35. package/typings/components/Schema/views/PropertyFieldRow.d.ts +1 -2
  36. package/typings/components/Schema/views/PropertyRenderer.d.ts +1 -2
  37. package/typings/components/Schema/views/SchemaEnumDescriptions.d.ts +1 -1
  38. package/typings/components/Schema/views/SwitcherRenderer.d.ts +1 -2
  39. package/typings/components/Search/index.d.ts +1 -3
  40. package/typings/components/SideMenu/useMenuItems.d.ts +2 -2
  41. package/typings/components/common/Badge.d.ts +2 -2
  42. package/typings/components/common/Breadcrumbs.d.ts +1 -1
  43. package/typings/components/common/ContentWrapper.d.ts +0 -11
  44. package/typings/components/common/DeepLinkAnchor.d.ts +1 -1
  45. package/typings/components/common/PanelItem.d.ts +0 -38
  46. package/typings/components/common/ViewNested.d.ts +0 -3
  47. package/typings/components/graphql/styled.d.ts +25 -32
  48. package/typings/components/markdoc/buildMarkdocOptions.d.ts +1 -1
  49. package/typings/components/markdoc/defaultMarkdocConfig.d.ts +1 -11
  50. package/typings/components/markdoc/html/process-html-tokens.d.ts +1 -0
  51. package/typings/components/markdoc/markdocAdapter.d.ts +5 -4
  52. package/typings/components/panels/ExampleItem/hooks.d.ts +6 -3
  53. package/typings/components/panels/ExampleItem/selectors.d.ts +5 -2
  54. package/typings/components/panels/ExampleItem/styled.d.ts +0 -3
  55. package/typings/components/panels/ExampleItem/types.d.ts +0 -3
  56. package/typings/components/panels/ExampleItem/useCodeSampleLanguages.d.ts +0 -1
  57. package/typings/components/panels/LanguageItem/styled.d.ts +13 -26
  58. package/typings/components/panels/shared-panel-styles.d.ts +0 -3
  59. package/typings/components/panels/styled.d.ts +0 -6
  60. package/typings/constants/openapi.d.ts +0 -5
  61. package/typings/contexts/markdownAdapter.d.ts +1 -1
  62. package/typings/events/types.d.ts +0 -1
  63. package/typings/hooks/code-highlight-languages.d.ts +6 -0
  64. package/typings/hooks/useCodeHighlight.d.ts +15 -28
  65. package/typings/hooks/useDeepLinkSection.d.ts +2 -9
  66. package/typings/hooks/useRouterHashBridge.d.ts +1 -2
  67. package/typings/hooks/useScrollSpyUrlSync.d.ts +1 -1
  68. package/typings/hooks/useSessionSummaryTelemetry.d.ts +1 -1
  69. package/typings/hooks/useTranslate.d.ts +2 -2
  70. package/typings/icons/CSharpIcon/CSharpIcon.d.ts +0 -1
  71. package/typings/icons/CurlIcon/CurlIcon.d.ts +11 -4
  72. package/typings/icons/DefaultMappingIcon/DefaultMappingIcon.d.ts +11 -4
  73. package/typings/icons/GOIcon/GOIcon.d.ts +0 -1
  74. package/typings/icons/JavaIcon/JavaIcon.d.ts +0 -1
  75. package/typings/icons/JavaScriptIcon/JavaScriptIcon.d.ts +0 -1
  76. package/typings/icons/ListIcon/ListIcon.d.ts +0 -1
  77. package/typings/icons/NodeJSIcon/NodeJSIcon.d.ts +0 -1
  78. package/typings/icons/PHPIcon/PHPIcon.d.ts +0 -1
  79. package/typings/icons/PayloadIcon/PayloadIcon.d.ts +0 -1
  80. package/typings/icons/PythonIcon/PythonIcon.d.ts +0 -1
  81. package/typings/icons/RIcon/RIcon.d.ts +0 -1
  82. package/typings/icons/RubyIcon/RubyIcon.d.ts +0 -1
  83. package/typings/index.d.ts +1 -1
  84. package/typings/jotai/app.d.ts +0 -9
  85. package/typings/jotai/itemStore.d.ts +9 -0
  86. package/typings/options/editionOverrides.d.ts +1 -1
  87. package/typings/options/helpers.d.ts +2 -8
  88. package/typings/services/agent-tools/index.d.ts +2 -3
  89. package/typings/services/agent-tools/types.d.ts +2 -1
  90. package/typings/services/code-samples/discriminator.d.ts +10 -11
  91. package/typings/services/code-samples/example-key.d.ts +1 -13
  92. package/typings/services/code-samples/server-variables.d.ts +0 -2
  93. package/typings/services/code-samples/source.d.ts +4 -27
  94. package/typings/services/schema/propertyBuilder.d.ts +0 -1
  95. package/typings/services/search/indexer/extractors/index.d.ts +0 -1
  96. package/typings/services/search/indexer/extractors/named-rows.d.ts +1 -8
  97. package/typings/services/search/indexer/extractors/panels.d.ts +1 -1
  98. package/typings/services/search/indexer/places.d.ts +0 -6
  99. package/typings/services/search/types.d.ts +0 -1
  100. package/typings/services/spec-convert/asyncapi.d.ts +11 -0
  101. package/typings/services/spec-convert/index.d.ts +5 -0
  102. package/typings/services/spec-convert/swagger/parameters.d.ts +6 -0
  103. package/typings/services/spec-convert/swagger/refs.d.ts +34 -0
  104. package/typings/services/spec-convert/swagger/responses.d.ts +2 -0
  105. package/typings/services/spec-convert/swagger/schema.d.ts +1 -0
  106. package/typings/services/spec-convert/swagger.d.ts +7 -0
  107. package/typings/standaloneThemeConfig.d.ts +1 -1
  108. package/typings/telemetry/events.d.ts +0 -1
  109. package/typings/telemetry/initialPayload.d.ts +1 -1
  110. package/typings/telemetry/security.d.ts +0 -1
  111. package/typings/types/asyncapi.d.ts +37 -71
  112. package/typings/types/common.d.ts +16 -15
  113. package/typings/types/content.d.ts +11 -35
  114. package/typings/types/events.d.ts +2 -18
  115. package/typings/types/graphql-store.d.ts +1 -1
  116. package/typings/types/graphql.d.ts +0 -1
  117. package/typings/types/openapi.d.ts +6 -47
  118. package/typings/types/options.d.ts +1 -43
  119. package/typings/types/schema.d.ts +6 -0
  120. package/typings/types/store.d.ts +6 -22
  121. package/typings/utils/compose.d.ts +0 -1
  122. package/typings/utils/deep-link.d.ts +5 -13
  123. package/typings/utils/form-urlencoded.d.ts +3 -0
  124. package/typings/utils/graphql-samples.d.ts +5 -1
  125. package/typings/utils/logo.d.ts +3 -3
  126. package/typings/utils/media-type.d.ts +1 -3
  127. package/typings/utils/resolveSpec.d.ts +20 -0
  128. package/typings/utils/routing.d.ts +0 -2
  129. package/typings/utils/string.d.ts +0 -4
  130. package/typings/utils/url.d.ts +1 -1
  131. package/typings/utils/yaml.d.ts +2 -0
  132. package/typings/adapters/asyncapi/utils/get-server-host.d.ts +0 -3
  133. package/typings/adapters/openapi/configure/apply-request-values.d.ts +0 -3
  134. package/typings/adapters/openapi/configure/index.d.ts +0 -3
  135. package/typings/adapters/openapi/configure/merge-utils.d.ts +0 -30
  136. package/typings/adapters/openapi/configure/resolve-request-values.d.ts +0 -15
  137. package/typings/adapters/openapi/utils/merge-mock-server.d.ts +0 -8
  138. package/typings/adapters/utils/convertSwagger2OpenAPI.d.ts +0 -2
  139. package/typings/adapters/utils/seo.d.ts +0 -3
  140. package/typings/components/panels/ExampleItem/useActiveServer.d.ts +0 -17
  141. package/typings/components/panels/LanguageItem/LanguageListSkeleton.d.ts +0 -4
  142. package/typings/components/panels/LanguageItem/constants.d.ts +0 -2
  143. package/typings/events/index.d.ts +0 -6
  144. package/typings/events/panelToggle.d.ts +0 -2
  145. package/typings/icons/CSharpIcon/index.d.ts +0 -1
  146. package/typings/icons/CurlIcon/index.d.ts +0 -1
  147. package/typings/icons/DefaultMappingIcon/index.d.ts +0 -1
  148. package/typings/icons/GOIcon/index.d.ts +0 -1
  149. package/typings/icons/JavaIcon/index.d.ts +0 -1
  150. package/typings/icons/JavaScriptIcon/index.d.ts +0 -1
  151. package/typings/icons/NodeJSIcon/index.d.ts +0 -1
  152. package/typings/icons/PHPIcon/index.d.ts +0 -1
  153. package/typings/icons/PayloadIcon/index.d.ts +0 -1
  154. package/typings/icons/PythonIcon/index.d.ts +0 -1
  155. package/typings/icons/RIcon/index.d.ts +0 -1
  156. package/typings/icons/RubyIcon/index.d.ts +0 -1
  157. package/typings/services/code-samples/apply-env-variables.d.ts +0 -8
  158. package/typings/services/search/index.d.ts +0 -4
  159. package/typings/types/index.d.ts +0 -10
  160. package/typings/types/pluggable.d.ts +0 -4
  161. package/typings/url-compat.d.ts +0 -22
  162. package/typings/utils/multipart.d.ts +0 -7
  163. package/typings/utils/overview-partial-sections.d.ts +0 -7
  164. package/typings/utils/serialize-querystring.d.ts +0 -6
  165. package/typings/utils/telemetry.d.ts +0 -1
  166. package/typings/yaml-compat.d.ts +0 -7
package/README.md CHANGED
@@ -29,11 +29,7 @@ By default Redoc offers a three-panel, responsive layout:
29
29
  - The central panel contains the documentation.
30
30
  - The right panel contains request and response examples.
31
31
 
32
- <picture>
33
- <source media="(prefers-color-scheme: dark)" srcset="./images/demo-dark.png">
34
- <source media="(prefers-color-scheme: light)" srcset="./images/demo-light.png">
35
- <img alt="Redoc demo" src="./images/demo-light.png">
36
- </picture>
32
+ <img alt="Redoc demo" src="./images/redoc-layouts.gif">
37
33
 
38
34
  ## Live demo
39
35
 
@@ -1,7 +1,5 @@
1
1
  import type { AdmonitionProps } from '@redocly/theme/components/Admonition/Admonition';
2
2
  import type { AsyncApiConfig } from '@redocly/config';
3
- import type { ConfigureRequestValues } from '@redocly/theme/ext/configure';
4
- import type { ConfigureServerRequestValues } from '@redocly/theme/ext/configure';
5
3
  import type { EventType } from '@redocly/redoc-opentelemetry';
6
4
  import { FC } from 'react';
7
5
  import type { GraphQLConfig } from '@redocly/config';
@@ -25,14 +23,14 @@ declare type AdmonitionNode = {
25
23
  declare type AnalyticsEvent = {
26
24
  eventType: AnalyticsEventType;
27
25
  resource: 'Redocly_CodeSample' | 'Redocly_Operation';
28
- action: 'LanguageSwitched' | 'PanelToggled' | 'CodeSampleCopied' | 'TargetServerSwitched';
26
+ action: 'LanguageSwitched' | 'CodeSampleCopied' | 'TargetServerSwitched';
29
27
  operationId?: string;
30
28
  operationPath: string;
31
29
  operationHttpVerb: string;
32
30
  operationSummary?: string | Record<string, unknown>;
33
31
  };
34
32
 
35
- declare type AnalyticsEventType = 'CodeSampleLanguageSwitched' | 'CodeSampleCopied' | 'OperationServerExpanded' | 'PanelToggle' | 'TargetServerSwitched';
33
+ declare type AnalyticsEventType = 'CodeSampleLanguageSwitched' | 'CodeSampleCopied' | 'OperationServerExpanded' | 'TargetServerSwitched';
36
34
 
37
35
  declare type ApiDocsMetadata = {
38
36
  title?: string;
@@ -61,7 +59,6 @@ declare type ApiDocsOptions = {
61
59
  codeSamples?: CodeSamplesConfig;
62
60
  events: Events;
63
61
  hidePropertiesPrefix: boolean;
64
- dynamicRequestValues?: ConfigureRequestValues | ConfigureServerRequestValues;
65
62
  protocol?: ProtocolVariant;
66
63
  scrollYOffset: () => number;
67
64
  hideLoading: boolean;
@@ -84,7 +81,6 @@ declare type ApiItem = ResolvedNavItem & {
84
81
 
85
82
  declare type ApiItemContent = {
86
83
  contentType: ContentType;
87
- seo?: SeoData;
88
84
  itemVariant?: ItemVariant;
89
85
  meta?: ItemMeta;
90
86
  children: ContentNode[];
@@ -102,7 +98,7 @@ declare const apiSpecType: {
102
98
  declare type ApiStore = {
103
99
  schemaStore: Record<string, SchemaEntry>;
104
100
  exampleStore: Record<string, ExampleEntry>;
105
- securitySchemeStore: Record<string, SecuritySchemeEntry_2>;
101
+ securitySchemeStore: Record<string, SecuritySchemeEntry>;
106
102
  graphqlMeta?: GraphqlStoreMeta;
107
103
  servers?: ServerData[];
108
104
  mcp?: McpData;
@@ -118,6 +114,24 @@ declare type AsyncApiExternalDocs = {
118
114
 
119
115
  declare type AsyncAPISchema = JSONSchema7 | MultiFormatSchemaObject;
120
116
 
117
+ declare type AsyncApiSecuritySchemeType = ObjectValues<typeof asyncApiSecuritySchemeType>;
118
+
119
+ declare const asyncApiSecuritySchemeType: {
120
+ readonly USER_PASSWORD: 'userPassword';
121
+ readonly API_KEY: 'apiKey';
122
+ readonly X509: 'X509';
123
+ readonly SYMMETRIC_ENCRYPTION: 'symmetricEncryption';
124
+ readonly ASYMMETRIC_ENCRYPTION: 'asymmetricEncryption';
125
+ readonly HTTP_API_KEY: 'httpApiKey';
126
+ readonly HTTP: 'http';
127
+ readonly OAUTH2: 'oauth2';
128
+ readonly OPEN_ID_CONNECT: 'openIdConnect';
129
+ readonly PLAIN: 'plain';
130
+ readonly SCRAM_SHA256: 'scramSha256';
131
+ readonly SCRAM_SHA512: 'scramSha512';
132
+ readonly GSSAPI: 'gssapi';
133
+ };
134
+
121
135
  declare type AsyncApiServerBinding = {
122
136
  kafka?: AsyncApiServerKafkaBinding;
123
137
  };
@@ -191,7 +205,7 @@ declare type BreadcrumbItem = {
191
205
  };
192
206
 
193
207
  declare type BrokerData = {
194
- /** Server host (3.x `host`, 2.x `url`); absent only for invalid documents. */
208
+ /** Server host; absent only for invalid documents. */
195
209
  url?: string;
196
210
  description?: string | Node_2[] | Node_2;
197
211
  name?: string;
@@ -209,6 +223,7 @@ declare type BrokerData = {
209
223
  tags?: AsyncApiTag[];
210
224
  externalDocs?: AsyncApiExternalDocs;
211
225
  bindings?: AsyncApiServerBinding;
226
+ security?: SecurityRequirementDetail[];
212
227
  };
213
228
 
214
229
  declare type BrokersNode = SingleChildPanelBase<typeof panelKind.BROKERS>;
@@ -236,8 +251,6 @@ declare type CallbackPayloadPanelItem = BaseExamplePanelItem & {
236
251
  variables?: Record<string, {
237
252
  default?: string;
238
253
  }>;
239
- /** Set on entries injected by `mergeInMockServer` (never present in specs). */
240
- isMockServer?: boolean;
241
254
  }[];
242
255
  definitionSamples?: DefinitionCodeSample_2[];
243
256
  mediaTypes?: string[];
@@ -270,22 +283,12 @@ declare type CodeSamplePanelItem = BaseExamplePanelItem & {
270
283
  variables?: Record<string, {
271
284
  default?: string;
272
285
  }>;
273
- /** Set on entries injected by `mergeInMockServer` (never present in specs). */
274
- isMockServer?: boolean;
275
286
  }[];
276
287
  exampleIds?: string[];
277
288
  mediaTypes?: string[];
278
289
  mediaTypeSchemas?: Record<string, MediaTypeContent>;
279
290
  };
280
291
 
281
- declare type CodeSampleRequestValues = {
282
- security?: Record<string, unknown>;
283
- envVariables?: Record<string, string>;
284
- serverEnvVariables?: Record<string, Record<string, string>>;
285
- body?: unknown;
286
- serverBody?: Record<string, unknown>;
287
- };
288
-
289
292
  /**
290
293
  * Community edition: generated code samples are not included. The language
291
294
  * list survives only to drive the payload tab and `x-codeSamples` matching.
@@ -333,8 +336,6 @@ declare type CodeSampleSource = {
333
336
  definitionSamples?: DefinitionCodeSample[];
334
337
  /** Response status codes (for generators that include expected status) */
335
338
  responseCodes?: string[];
336
- /** Configure request values (security credentials, env vars, per-server env vars) */
337
- requestValues?: CodeSampleRequestValues;
338
339
  /** Raw pointer into the spec (for deep linking) */
339
340
  pointer?: string;
340
341
  /** Docs route slug of the operation page, relative to the routing base path
@@ -377,7 +378,8 @@ declare const contentType: {
377
378
  readonly ITEM: 'item';
378
379
  };
379
380
 
380
- export declare function convertSwagger2OpenAPI(spec: GenericObject): Promise<OpenAPIDefinition>;
381
+ /** Promise form of `convertSwaggerToOpenApi`; rejects with the error it throws. */
382
+ export declare const convertSwagger2OpenAPI: (document: Record<string, unknown>) => Promise<OpenAPIDefinition>;
381
383
 
382
384
  declare type DefinitionCodeSample = {
383
385
  lang: string;
@@ -434,7 +436,6 @@ declare type EnterpriseOnlyOptionKey = 'licenseKey' | 'hideReplay' | 'mockServer
434
436
  declare type Events = {
435
437
  codeSamplesLanguageSwitch?: (event: CodeSamplesLanguageSwitchedEvent) => void;
436
438
  codeSamplesCopy?: (event: CodeSamplesCopiedEvent) => void;
437
- panelToggle?: (event: PanelToggleEvent) => void;
438
439
  targetServerSwitch?: (event: TargetServerSwitchedEvent) => void;
439
440
  };
440
441
 
@@ -446,6 +447,8 @@ declare type ExampleEntry = {
446
447
  description?: string | Node_2 | Node_2[];
447
448
  mediaType?: string;
448
449
  externalValue?: string;
450
+ /** Header values of an AsyncAPI message example. */
451
+ headers?: Record<string, unknown>;
449
452
  };
450
453
 
451
454
  declare type ExamplePanelItem = PayloadExamplesPanelItem | CodeSamplePanelItem | ResponseExamplesPanelItem | CallbackPayloadPanelItem | GraphQLQueryPanelItem | GraphQLResponsePanelItem | GraphQLVariablesPanelItem | GraphQLTypeSamplePanelItem;
@@ -480,6 +483,13 @@ declare type ExternalLinkPanelItem = {
480
483
  copyContent?: string;
481
484
  };
482
485
 
486
+ declare type FormFieldEncoding = {
487
+ contentType?: string;
488
+ style?: string;
489
+ explode?: boolean;
490
+ allowReserved?: boolean;
491
+ };
492
+
483
493
  declare type GraphQLContact = {
484
494
  name?: string;
485
495
  url?: string;
@@ -684,6 +694,10 @@ declare type ItemContentNode = {
684
694
  url: string;
685
695
  description?: string | Node_2[] | Node_2;
686
696
  };
697
+ correlationId?: {
698
+ location: string;
699
+ description?: string | Node_2[] | Node_2;
700
+ };
687
701
  }>;
688
702
  values?: Array<{
689
703
  name: string;
@@ -694,7 +708,6 @@ declare type ItemContentNode = {
694
708
  };
695
709
 
696
710
  declare type ItemMeta = {
697
- sourceId?: string;
698
711
  name?: string;
699
712
  deprecated?: boolean;
700
713
  isWebhook?: boolean;
@@ -797,7 +810,7 @@ declare type MarkdownParser = (markdown: string, sanitizeOptions?: {
797
810
  * - `render` turns the parsed value into React.
798
811
  *
799
812
  * The standalone build supplies a Markdoc-based adapter (`createMarkdocAdapter`). Embedders that
800
- * pre-parse upstream (e.g. realm) supply a `parse` no-op plus their own `render`, so the Markdoc
813
+ * pre-parse upstream supply a `parse` no-op plus their own `render`, so the Markdoc
801
814
  * parser never enters their client bundle.
802
815
  */
803
816
  declare type MarkdownRenderer = (parsed: unknown) => ReactNode;
@@ -873,6 +886,7 @@ declare type McpTool = {
873
886
  declare type MediaTypeContent = {
874
887
  schemaId?: string;
875
888
  exampleIds?: string[];
889
+ encoding?: Record<string, FormFieldEncoding>;
876
890
  };
877
891
 
878
892
  declare type MediaTypeEntry = {
@@ -981,7 +995,6 @@ declare type OAuthFlowsData = {
981
995
  tokenUrl: string;
982
996
  refreshUrl?: string;
983
997
  scopes: Record<string, string>;
984
- 'x-defaultClientId'?: string;
985
998
  };
986
999
  };
987
1000
 
@@ -1019,6 +1032,9 @@ declare type OpenAPIComponents = {
1019
1032
  callbacks?: {
1020
1033
  [name: string]: Referenced<OpenAPICallback>;
1021
1034
  };
1035
+ mediaTypes?: {
1036
+ [name: string]: Referenced<OpenAPIMediaType>;
1037
+ };
1022
1038
  };
1023
1039
 
1024
1040
  declare type OpenAPIContact = {
@@ -1044,7 +1060,6 @@ declare type OpenAPIDefinition = {
1044
1060
  tags: Array<string>;
1045
1061
  }>;
1046
1062
  'x-keywords'?: unknown;
1047
- 'x-root'?: OpenAPISchema;
1048
1063
  };
1049
1064
 
1050
1065
  declare type OpenAPIDiscriminator = {
@@ -1160,7 +1175,7 @@ declare type OpenAPIParameter = {
1160
1175
  [media: string]: Referenced<OpenAPIExample>;
1161
1176
  };
1162
1177
  content?: {
1163
- [media: string]: OpenAPIMediaType;
1178
+ [media: string]: Referenced<OpenAPIMediaType>;
1164
1179
  };
1165
1180
  encoding?: Record<string, OpenAPIEncoding>;
1166
1181
  const?: unknown;
@@ -1204,7 +1219,7 @@ declare type OpenAPIRequestBody = {
1204
1219
  description?: string | Node_2[] | Node_2;
1205
1220
  required?: boolean;
1206
1221
  content?: {
1207
- [mime: string]: OpenAPIMediaType;
1222
+ [mime: string]: Referenced<OpenAPIMediaType>;
1208
1223
  };
1209
1224
  'x-examples'?: {
1210
1225
  [mime: string]: {
@@ -1222,7 +1237,7 @@ declare type OpenAPIResponse = {
1222
1237
  [name: string]: Referenced<OpenAPIHeader>;
1223
1238
  };
1224
1239
  content?: {
1225
- [mime: string]: OpenAPIMediaType;
1240
+ [mime: string]: Referenced<OpenAPIMediaType>;
1226
1241
  };
1227
1242
  links?: {
1228
1243
  [name: string]: Referenced<OpenAPILink>;
@@ -1308,7 +1323,6 @@ declare type OpenAPISecurityScheme = {
1308
1323
  in?: SecuritySchemeIn;
1309
1324
  scheme?: string;
1310
1325
  bearerFormat: string;
1311
- 'x-defaultClientId'?: string;
1312
1326
  deprecated?: boolean;
1313
1327
  oauth2MetadataUrl?: string;
1314
1328
  flows: {
@@ -1316,33 +1330,28 @@ declare type OpenAPISecurityScheme = {
1316
1330
  refreshUrl?: string;
1317
1331
  scopes: Record<string, string>;
1318
1332
  authorizationUrl: string;
1319
- 'x-defaultClientId'?: string;
1320
1333
  };
1321
1334
  deviceAuthorization?: {
1322
1335
  deviceAuthorizationUrl: string;
1323
1336
  scopes: Record<string, string>;
1324
1337
  tokenUrl: string;
1325
1338
  refreshUrl?: string;
1326
- 'x-defaultClientId'?: string;
1327
1339
  };
1328
1340
  password?: {
1329
1341
  refreshUrl?: string;
1330
1342
  scopes: Record<string, string>;
1331
1343
  tokenUrl: string;
1332
- 'x-defaultClientId'?: string;
1333
1344
  };
1334
1345
  clientCredentials?: {
1335
1346
  refreshUrl?: string;
1336
1347
  scopes: Record<string, string>;
1337
1348
  tokenUrl: string;
1338
- 'x-defaultClientId'?: string;
1339
1349
  };
1340
1350
  authorizationCode?: {
1341
1351
  refreshUrl?: string;
1342
1352
  scopes: Record<string, string>;
1343
1353
  authorizationUrl: string;
1344
1354
  tokenUrl: string;
1345
- 'x-defaultClientId'?: string;
1346
1355
  };
1347
1356
  };
1348
1357
  openIdConnectUrl?: string;
@@ -1353,8 +1362,6 @@ declare type OpenAPIServer = {
1353
1362
  description?: string | Node_2 | Node_2[];
1354
1363
  name?: string;
1355
1364
  variables?: OpenAPIServerVariables;
1356
- /** Set on entries injected by `mergeInMockServer` (never present in specs). */
1357
- isMockServer?: boolean;
1358
1365
  };
1359
1366
 
1360
1367
  declare type OpenAPIServerVariable = {
@@ -1452,17 +1459,6 @@ declare type PanelTag = {
1452
1459
  icon?: string;
1453
1460
  };
1454
1461
 
1455
- declare type PanelToggleEvent = AnalyticsEvent & {
1456
- panelType: PanelType;
1457
- state: 'expanded' | 'collapsed';
1458
- operationId: string;
1459
- operationPath: string;
1460
- operationHttpVerb: string;
1461
- operationSummary?: string | Record<string, unknown>;
1462
- };
1463
-
1464
- declare type PanelType = 'request' | 'responses' | 'request-samples' | 'response-samples';
1465
-
1466
1462
  declare type ParameterData = {
1467
1463
  name: string;
1468
1464
  in?: string;
@@ -1487,10 +1483,6 @@ declare type ParameterEntry = {
1487
1483
  style?: string;
1488
1484
  explode?: boolean;
1489
1485
  allowReserved?: boolean;
1490
- /** Per-server example overrides: serverUrl → example value */
1491
- serverValues?: Record<string, {
1492
- example?: unknown;
1493
- }>;
1494
1486
  };
1495
1487
 
1496
1488
  declare const parameterLocation: {
@@ -1513,7 +1505,14 @@ declare type PayloadExamplesPanelItem = BaseExamplePanelItem & {
1513
1505
  }>;
1514
1506
  };
1515
1507
 
1516
- export declare function prepareApiDocs({ spec, specUrl, options, basePath }: Pick<RedocStandaloneProps, 'spec' | 'specUrl' | 'options' | 'basePath'>): Promise<PreparedApiDocs>;
1508
+ /**
1509
+ * Resolves the spec and builds the item model. `convertedDownload: false` keeps the default
1510
+ * download on `specUrl` for an AsyncAPI 2.x source instead of a `blob:` URL of the converted
1511
+ * document, which a server pass cannot create; the caller revokes any `blob:` download URL.
1512
+ */
1513
+ export declare function prepareApiDocs({ spec, specUrl, options, basePath, convertedDownload }: Pick<RedocStandaloneProps, 'spec' | 'specUrl' | 'options' | 'basePath'> & {
1514
+ convertedDownload?: boolean;
1515
+ }): Promise<PreparedApiDocs>;
1517
1516
 
1518
1517
  declare type PreparedApiDocs = {
1519
1518
  items: ApiItem[];
@@ -1535,7 +1534,6 @@ declare type RawApiDocsOptions = EditionRedocConfig & EditionAsyncApiConfig & Ed
1535
1534
  disableTelemetry?: boolean;
1536
1535
  requiredPropsFirst?: boolean;
1537
1536
  protocol?: ProtocolVariant;
1538
- dynamicRequestValues?: ConfigureRequestValues | ConfigureServerRequestValues;
1539
1537
  layout?: EditionRedocConfig['layout'] | EditionAsyncApiConfig['layout'] | EditionGraphQLConfig['layout'];
1540
1538
  };
1541
1539
 
@@ -1582,7 +1580,7 @@ export declare type RedocProps = RedoclyApiDocsInnerProps & {
1582
1580
  export declare const RedocStandalone: ({ spec, specUrl, options, basePath, logo, markdownAdapter, onLoaded, children, }: RedocStandaloneProps) => ReactElement | null;
1583
1581
 
1584
1582
  export declare type RedocStandaloneProps = {
1585
- /** Parsed API description object, or a GraphQL SDL string. */
1583
+ /** Parsed API description object, its JSON or YAML text, or a GraphQL SDL string. */
1586
1584
  spec?: Record<string, unknown> | string;
1587
1585
  /** URL of the API description. Ignored when `spec` is provided. */
1588
1586
  specUrl?: string;
@@ -1634,7 +1632,6 @@ declare type ResponseExamplesPanelItem = BaseExamplePanelItem & {
1634
1632
  /** Webhook response: the client sends it, so samples drop readOnly like a request. */
1635
1633
  isEvent?: boolean;
1636
1634
  hideHeaderTitle?: boolean;
1637
- exampleKey?: string;
1638
1635
  };
1639
1636
 
1640
1637
  declare type Sample = {
@@ -1658,25 +1655,18 @@ declare const schemaKind: {
1658
1655
 
1659
1656
  declare type SecurityNode = {
1660
1657
  nodeType: typeof nodeTypes.SECURITY;
1661
- requirements: Array<{
1662
- schemes: SecuritySchemeDetail[];
1663
- }>;
1658
+ requirements: SecurityRequirementDetail[];
1664
1659
  };
1665
1660
 
1666
1661
  /** One AND-group: all schemes in the array must be satisfied together */
1667
1662
  declare type SecurityRequirement = {
1668
- schemes: SecuritySchemeEntry[];
1663
+ schemes: SecuritySchemeEntry_2[];
1669
1664
  scopes: string[];
1670
1665
  };
1671
1666
 
1672
- declare type SecuritySchemeCredentials = {
1673
- 'x-defaultAccessToken'?: string;
1674
- 'x-defaultTokenType'?: string;
1675
- 'x-defaultClientId'?: string;
1676
- 'x-defaultClientSecret'?: string;
1677
- 'x-defaultUsername'?: string;
1678
- 'x-defaultPassword'?: string;
1679
- scopes?: string[];
1667
+ /** Schemes required together; separate requirements are alternatives. */
1668
+ declare type SecurityRequirementDetail = {
1669
+ schemes: SecuritySchemeDetail[];
1680
1670
  };
1681
1671
 
1682
1672
  declare type SecuritySchemeDetail = {
@@ -1690,47 +1680,33 @@ declare type SecuritySchemeDetail = {
1690
1680
  description?: string | Node_2[] | Node_2;
1691
1681
  openIdConnectUrl?: string;
1692
1682
  oauth2MetadataUrl?: string;
1693
- flows?: SecuritySchemeEntry_2['flows'];
1683
+ flows?: SecuritySchemeEntry['flows'];
1694
1684
  deprecated?: boolean;
1695
1685
  };
1696
1686
 
1697
1687
  declare type SecuritySchemeEntry = {
1698
1688
  id: string;
1699
- type: Exclude<SecuritySchemeType, typeof securitySchemeType.MUTUAL_TLS>;
1700
- name?: string;
1701
- in?: SecuritySchemeIn;
1689
+ type: SecuritySchemeType | AsyncApiSecuritySchemeType;
1702
1690
  scheme?: string;
1703
1691
  bearerFormat?: string;
1692
+ description?: string | Node_2[] | Node_2;
1693
+ in?: SecuritySchemeIn | 'user' | 'password';
1694
+ paramName?: string;
1695
+ scopes?: string[];
1704
1696
  openIdConnectUrl?: string;
1697
+ deprecated?: boolean;
1698
+ oauth2MetadataUrl?: string;
1705
1699
  flows?: OAuthFlowsData;
1706
- 'x-defaultAccessToken'?: string;
1707
- 'x-defaultTokenType'?: string;
1708
- 'x-defaultClientId'?: string;
1709
- 'x-defaultClientSecret'?: string;
1710
- 'x-defaultUsername'?: string;
1711
- 'x-defaultPassword'?: string;
1712
- /** Per-server auth overrides */
1713
- serverValues?: Record<string, SecuritySchemeCredentials>;
1714
1700
  };
1715
1701
 
1716
1702
  declare type SecuritySchemeEntry_2 = {
1717
1703
  id: string;
1718
- type: SecuritySchemeType;
1704
+ type: Exclude<SecuritySchemeType, typeof securitySchemeType.MUTUAL_TLS>;
1705
+ name?: string;
1706
+ in?: SecuritySchemeIn;
1719
1707
  scheme?: string;
1720
1708
  bearerFormat?: string;
1721
- description?: string | Node_2[] | Node_2;
1722
- in?: SecuritySchemeIn;
1723
- paramName?: string;
1724
1709
  openIdConnectUrl?: string;
1725
- deprecated?: boolean;
1726
- oauth2MetadataUrl?: string;
1727
- 'x-defaultClientId'?: string;
1728
- 'x-defaultAccessToken'?: string;
1729
- 'x-defaultTokenType'?: string;
1730
- 'x-defaultClientSecret'?: string;
1731
- 'x-defaultUsername'?: string;
1732
- 'x-defaultPassword'?: string;
1733
- serverValues?: Record<string, SecuritySchemeCredentials>;
1734
1710
  flows?: OAuthFlowsData;
1735
1711
  };
1736
1712
 
@@ -1753,13 +1729,6 @@ declare const securitySchemeType: {
1753
1729
  readonly MUTUAL_TLS: 'mutualTLS';
1754
1730
  };
1755
1731
 
1756
- declare type SeoData = {
1757
- title?: string;
1758
- description?: string;
1759
- keywords?: string;
1760
- image?: string;
1761
- };
1762
-
1763
1732
  declare type ServerData = {
1764
1733
  url: string;
1765
1734
  name?: string;
@@ -1777,8 +1746,6 @@ declare type ServerEntry = {
1777
1746
  name?: string;
1778
1747
  description?: string;
1779
1748
  variables?: Record<string, ServerVariable>;
1780
- /** Set on entries injected by `mergeInMockServer` (never present in specs). */
1781
- isMockServer?: boolean;
1782
1749
  };
1783
1750
 
1784
1751
  declare type ServersNode = SingleChildPanelBase<typeof panelKind.SERVERS>;