redoc 2.5.2 → 3.0.0-rc.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.
Files changed (178) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +22 -14
  3. package/bundle/redoc.d.ts +683 -0
  4. package/bundle/redoc.js +2224 -0
  5. package/bundle/redoc.standalone.js +2264 -0
  6. package/package.json +115 -180
  7. package/CHANGELOG.md +0 -2354
  8. package/bundles/cfb294d7f6536ffa8d42.worker.js.LICENSE.txt +0 -68
  9. package/bundles/cfb294d7f6536ffa8d42.worker.js.map +0 -1
  10. package/bundles/redoc.browser.lib.js +0 -1832
  11. package/bundles/redoc.browser.lib.js.LICENSE.txt +0 -6
  12. package/bundles/redoc.browser.lib.js.map +0 -1
  13. package/bundles/redoc.lib.js +0 -1832
  14. package/bundles/redoc.lib.js.LICENSE.txt +0 -6
  15. package/bundles/redoc.lib.js.map +0 -1
  16. package/bundles/redoc.standalone.js +0 -1832
  17. package/bundles/redoc.standalone.js.LICENSE.txt +0 -102
  18. package/bundles/redoc.standalone.js.map +0 -1
  19. package/typings/common-elements/CopyButtonWrapper.d.ts +0 -10
  20. package/typings/common-elements/Dropdown/Dropdown.d.ts +0 -3
  21. package/typings/common-elements/Dropdown/index.d.ts +0 -2
  22. package/typings/common-elements/Dropdown/styled.d.ts +0 -7
  23. package/typings/common-elements/Dropdown/types.d.ts +0 -23
  24. package/typings/common-elements/PrismDiv.d.ts +0 -1
  25. package/typings/common-elements/Tooltip.d.ts +0 -8
  26. package/typings/common-elements/fields-layout.d.ts +0 -14
  27. package/typings/common-elements/fields.d.ts +0 -20
  28. package/typings/common-elements/headers.d.ts +0 -6
  29. package/typings/common-elements/index.d.ts +0 -11
  30. package/typings/common-elements/linkify.d.ts +0 -10
  31. package/typings/common-elements/mixins.d.ts +0 -1
  32. package/typings/common-elements/panels.d.ts +0 -11
  33. package/typings/common-elements/perfect-scrollbar.d.ts +0 -19
  34. package/typings/common-elements/samples.d.ts +0 -5
  35. package/typings/common-elements/schema.d.ts +0 -8
  36. package/typings/common-elements/shelfs.d.ts +0 -13
  37. package/typings/common-elements/tabs.d.ts +0 -3
  38. package/typings/components/ApiInfo/ApiInfo.d.ts +0 -8
  39. package/typings/components/ApiInfo/index.d.ts +0 -1
  40. package/typings/components/ApiInfo/styled.elements.d.ts +0 -8
  41. package/typings/components/ApiLogo/ApiLogo.d.ts +0 -7
  42. package/typings/components/ApiLogo/styled.elements.d.ts +0 -4
  43. package/typings/components/CallbackSamples/CallbackReqSamples.d.ts +0 -11
  44. package/typings/components/CallbackSamples/CallbackSamples.d.ts +0 -13
  45. package/typings/components/Callbacks/CallbackDetails.d.ts +0 -8
  46. package/typings/components/Callbacks/CallbackOperation.d.ts +0 -8
  47. package/typings/components/Callbacks/CallbackTitle.d.ts +0 -10
  48. package/typings/components/Callbacks/CallbacksList.d.ts +0 -8
  49. package/typings/components/Callbacks/index.d.ts +0 -3
  50. package/typings/components/Callbacks/styled.elements.d.ts +0 -2
  51. package/typings/components/ContentItems/ContentItems.d.ts +0 -22
  52. package/typings/components/DropdownOrLabel/DropdownOrLabel.d.ts +0 -10
  53. package/typings/components/Endpoint/Endpoint.d.ts +0 -16
  54. package/typings/components/Endpoint/styled.elements.d.ts +0 -17
  55. package/typings/components/ErrorBoundary.d.ts +0 -8
  56. package/typings/components/ExternalDocumentation/ExternalDocumentation.d.ts +0 -8
  57. package/typings/components/Fields/ArrayItemDetails.d.ts +0 -5
  58. package/typings/components/Fields/EnumValues.d.ts +0 -17
  59. package/typings/components/Fields/Examples.d.ts +0 -5
  60. package/typings/components/Fields/Extensions.d.ts +0 -9
  61. package/typings/components/Fields/Field.d.ts +0 -20
  62. package/typings/components/Fields/FieldConstraints.d.ts +0 -7
  63. package/typings/components/Fields/FieldDetail.d.ts +0 -7
  64. package/typings/components/Fields/FieldDetails.d.ts +0 -4
  65. package/typings/components/Fields/Pattern.d.ts +0 -5
  66. package/typings/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +0 -22
  67. package/typings/components/JsonViewer/JsonViewer.d.ts +0 -6
  68. package/typings/components/JsonViewer/index.d.ts +0 -1
  69. package/typings/components/JsonViewer/style.d.ts +0 -1
  70. package/typings/components/Loading/Loading.d.ts +0 -7
  71. package/typings/components/Loading/Spinner.svg.d.ts +0 -5
  72. package/typings/components/Markdown/AdvancedMarkdown.d.ts +0 -11
  73. package/typings/components/Markdown/Markdown.d.ts +0 -17
  74. package/typings/components/Markdown/SanitizedMdBlock.d.ts +0 -7
  75. package/typings/components/Markdown/styled.elements.d.ts +0 -7
  76. package/typings/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +0 -17
  77. package/typings/components/Operation/Operation.d.ts +0 -5
  78. package/typings/components/OptionsProvider.d.ts +0 -5
  79. package/typings/components/Parameters/Parameters.d.ts +0 -16
  80. package/typings/components/Parameters/ParametersGroup.d.ts +0 -9
  81. package/typings/components/PayloadSamples/Example.d.ts +0 -8
  82. package/typings/components/PayloadSamples/ExampleValue.d.ts +0 -6
  83. package/typings/components/PayloadSamples/MediaTypeSamples.d.ts +0 -18
  84. package/typings/components/PayloadSamples/PayloadSamples.d.ts +0 -9
  85. package/typings/components/PayloadSamples/exernalExampleHook.d.ts +0 -2
  86. package/typings/components/PayloadSamples/styled.elements.d.ts +0 -7
  87. package/typings/components/Redoc/Redoc.d.ts +0 -14
  88. package/typings/components/Redoc/styled.elements.d.ts +0 -3
  89. package/typings/components/RedocStandalone.d.ts +0 -9
  90. package/typings/components/RequestSamples/RequestSamples.d.ts +0 -11
  91. package/typings/components/ResponseSamples/ResponseSamples.d.ts +0 -9
  92. package/typings/components/Responses/Response.d.ts +0 -6
  93. package/typings/components/Responses/ResponseDetails.d.ts +0 -8
  94. package/typings/components/Responses/ResponseHeaders.d.ts +0 -8
  95. package/typings/components/Responses/ResponseTitle.d.ts +0 -11
  96. package/typings/components/Responses/ResponsesList.d.ts +0 -9
  97. package/typings/components/Responses/styled.elements.d.ts +0 -6
  98. package/typings/components/Schema/ArraySchema.d.ts +0 -5
  99. package/typings/components/Schema/DiscriminatorDropdown.d.ts +0 -11
  100. package/typings/components/Schema/ObjectSchema.d.ts +0 -11
  101. package/typings/components/Schema/OneOfSchema.d.ts +0 -15
  102. package/typings/components/Schema/RecursiveSchema.d.ts +0 -3
  103. package/typings/components/Schema/Schema.d.ts +0 -15
  104. package/typings/components/Schema/index.d.ts +0 -5
  105. package/typings/components/SchemaDefinition/SchemaDefinition.d.ts +0 -18
  106. package/typings/components/SearchBox/SearchBox.d.ts +0 -32
  107. package/typings/components/SearchBox/styled.elements.d.ts +0 -12
  108. package/typings/components/SecurityRequirement/OAuthFlow.d.ts +0 -9
  109. package/typings/components/SecurityRequirement/RequiredScopesRow.d.ts +0 -3
  110. package/typings/components/SecurityRequirement/SecurityDetails.d.ts +0 -8
  111. package/typings/components/SecurityRequirement/SecurityHeader.d.ts +0 -8
  112. package/typings/components/SecurityRequirement/SecurityRequirement.d.ts +0 -6
  113. package/typings/components/SecurityRequirement/styled.elements.d.ts +0 -17
  114. package/typings/components/SecuritySchemes/SecuritySchemes.d.ts +0 -14
  115. package/typings/components/SeeMore/SeeMore.d.ts +0 -7
  116. package/typings/components/SelectOnClick/SelectOnClick.d.ts +0 -6
  117. package/typings/components/SideMenu/Logo.d.ts +0 -1
  118. package/typings/components/SideMenu/MenuItem.d.ts +0 -22
  119. package/typings/components/SideMenu/MenuItems.d.ts +0 -13
  120. package/typings/components/SideMenu/SideMenu.d.ts +0 -15
  121. package/typings/components/SideMenu/index.d.ts +0 -4
  122. package/typings/components/SideMenu/styled.elements.d.ts +0 -30
  123. package/typings/components/SourceCode/SourceCode.d.ts +0 -7
  124. package/typings/components/StickySidebar/ChevronSvg.d.ts +0 -4
  125. package/typings/components/StickySidebar/StickyResponsiveSidebar.d.ts +0 -23
  126. package/typings/components/StoreBuilder.d.ts +0 -26
  127. package/typings/components/index.d.ts +0 -34
  128. package/typings/index.d.ts +0 -8
  129. package/typings/services/AppStore.d.ts +0 -33
  130. package/typings/services/ClipboardService.d.ts +0 -8
  131. package/typings/services/HistoryService.d.ts +0 -12
  132. package/typings/services/Labels.d.ts +0 -3
  133. package/typings/services/MarkdownRenderer.d.ts +0 -26
  134. package/typings/services/MarkerService.d.ts +0 -11
  135. package/typings/services/MenuBuilder.d.ts +0 -50
  136. package/typings/services/MenuStore.d.ts +0 -89
  137. package/typings/services/OpenAPIParser.d.ts +0 -50
  138. package/typings/services/RedocNormalizedOptions.d.ts +0 -123
  139. package/typings/services/ScrollService.d.ts +0 -17
  140. package/typings/services/SearchStore.d.ts +0 -16
  141. package/typings/services/SearchWorker.worker.d.ts +0 -20
  142. package/typings/services/SpecStore.d.ts +0 -20
  143. package/typings/services/index.d.ts +0 -14
  144. package/typings/services/models/ApiInfo.d.ts +0 -23
  145. package/typings/services/models/Callback.d.ts +0 -11
  146. package/typings/services/models/Example.d.ts +0 -13
  147. package/typings/services/models/Field.d.ts +0 -32
  148. package/typings/services/models/Group.model.d.ts +0 -25
  149. package/typings/services/models/MediaContent.d.ts +0 -24
  150. package/typings/services/models/MediaType.d.ts +0 -20
  151. package/typings/services/models/Operation.d.ts +0 -72
  152. package/typings/services/models/RequestBody.d.ts +0 -17
  153. package/typings/services/models/Response.d.ts +0 -26
  154. package/typings/services/models/Schema.d.ts +0 -62
  155. package/typings/services/models/SecurityRequirement.d.ts +0 -12
  156. package/typings/services/models/SecuritySchemes.d.ts +0 -26
  157. package/typings/services/models/Webhook.d.ts +0 -9
  158. package/typings/services/models/index.d.ts +0 -13
  159. package/typings/services/types.d.ts +0 -106
  160. package/typings/styled-components.d.ts +0 -12
  161. package/typings/styled-patch.d.ts +0 -22
  162. package/typings/theme.d.ts +0 -163
  163. package/typings/types/index.d.ts +0 -2
  164. package/typings/types/index.ts +0 -3
  165. package/typings/types/open-api.d.ts +0 -314
  166. package/typings/types/open-api.ts +0 -304
  167. package/typings/utils/JsonPointer.d.ts +0 -51
  168. package/typings/utils/debug.d.ts +0 -2
  169. package/typings/utils/decorators.d.ts +0 -1
  170. package/typings/utils/dom.d.ts +0 -9
  171. package/typings/utils/helpers.d.ts +0 -43
  172. package/typings/utils/highlight.d.ts +0 -34
  173. package/typings/utils/index.d.ts +0 -10
  174. package/typings/utils/jsonToHtml.d.ts +0 -1
  175. package/typings/utils/loadAndBundleSpec.d.ts +0 -3
  176. package/typings/utils/memoize.d.ts +0 -1
  177. package/typings/utils/openapi.d.ts +0 -43
  178. package/typings/utils/sort.d.ts +0 -6
@@ -1,25 +0,0 @@
1
- import type { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
2
- import type { ContentItemModel, IMenuItem, MarkdownHeading, MenuItemGroupType } from '../types';
3
- /**
4
- * Operations Group model ready to be used by components
5
- */
6
- export declare class GroupModel implements IMenuItem {
7
- id: string;
8
- absoluteIdx?: number;
9
- name: string;
10
- sidebarLabel: string;
11
- description?: string;
12
- type: MenuItemGroupType;
13
- items: ContentItemModel[];
14
- parent?: GroupModel;
15
- externalDocs?: OpenAPIExternalDocumentation;
16
- active: boolean;
17
- expanded: boolean;
18
- depth: number;
19
- level: number;
20
- constructor(type: MenuItemGroupType, tagOrGroup: OpenAPITag | MarkdownHeading, parent?: GroupModel);
21
- activate(): void;
22
- expand(): void;
23
- collapse(): void;
24
- deactivate(): void;
25
- }
@@ -1,24 +0,0 @@
1
- import type { OpenAPIMediaType } from '../../types';
2
- import { MediaTypeModel } from './MediaType';
3
- import type { OpenAPIParser } from '../OpenAPIParser';
4
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
5
- /**
6
- * MediaContent model ready to be sued by React components
7
- * Contains multiple MediaTypes and keeps track of the currently active one
8
- */
9
- export declare class MediaContentModel {
10
- isRequestType: boolean;
11
- mediaTypes: MediaTypeModel[];
12
- activeMimeIdx: number;
13
- /**
14
- * @param isRequestType needed to know if skipe RO/RW fields in objects
15
- */
16
- constructor(parser: OpenAPIParser, info: Record<string, OpenAPIMediaType>, isRequestType: boolean, options: RedocNormalizedOptions);
17
- /**
18
- * Set active media type by index
19
- * @param idx media type index
20
- */
21
- activate(idx: number): void;
22
- get active(): MediaTypeModel;
23
- get hasSample(): boolean;
24
- }
@@ -1,20 +0,0 @@
1
- import type { OpenAPIMediaType } from '../../types';
2
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
3
- import { SchemaModel } from './Schema';
4
- import type { OpenAPIParser } from '../OpenAPIParser';
5
- import { ExampleModel } from './Example';
6
- export declare class MediaTypeModel {
7
- examples?: {
8
- [name: string]: ExampleModel;
9
- };
10
- schema?: SchemaModel;
11
- name: string;
12
- isRequestType: boolean;
13
- onlyRequiredInSamples: boolean;
14
- generatedSamplesMaxDepth: number;
15
- /**
16
- * @param isRequestType needed to know if skipe RO/RW fields in objects
17
- */
18
- constructor(parser: OpenAPIParser, name: string, isRequestType: boolean, info: OpenAPIMediaType, options: RedocNormalizedOptions);
19
- generateExample(parser: OpenAPIParser, info: OpenAPIMediaType): void;
20
- }
@@ -1,72 +0,0 @@
1
- import { GroupModel } from './Group.model';
2
- import { SecurityRequirementModel } from './SecurityRequirement';
3
- import { CallbackModel } from './Callback';
4
- import { FieldModel } from './Field';
5
- import { RequestBodyModel } from './RequestBody';
6
- import { ResponseModel } from './Response';
7
- import type { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXBadges, OpenAPIXCodeSample } from '../../types';
8
- import type { OpenAPIParser } from '../OpenAPIParser';
9
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
10
- import type { MediaContentModel } from './MediaContent';
11
- import type { ContentItemModel, ExtendedOpenAPIOperation, IMenuItem } from '../types';
12
- export interface XPayloadSample {
13
- lang: 'payload';
14
- label: string;
15
- requestBodyContent: MediaContentModel;
16
- source: string;
17
- }
18
- export declare function isPayloadSample(sample: XPayloadSample | OpenAPIXCodeSample): sample is XPayloadSample;
19
- /**
20
- * Operation model ready to be used by components
21
- */
22
- export declare class OperationModel implements IMenuItem {
23
- private parser;
24
- private operationSpec;
25
- private options;
26
- id: string;
27
- absoluteIdx?: number;
28
- name: string;
29
- sidebarLabel: string;
30
- description?: string;
31
- type: "operation";
32
- parent?: GroupModel;
33
- externalDocs?: OpenAPIExternalDocumentation;
34
- items: ContentItemModel[];
35
- depth: number;
36
- ready?: boolean;
37
- active: boolean;
38
- expanded: boolean;
39
- pointer: string;
40
- operationId?: string;
41
- operationHash?: string;
42
- httpVerb: string;
43
- badges: OpenAPIXBadges[];
44
- deprecated: boolean;
45
- path: string;
46
- servers: OpenAPIServer[];
47
- security: SecurityRequirementModel[];
48
- extensions: Record<string, any>;
49
- isCallback: boolean;
50
- isWebhook: boolean;
51
- isEvent: boolean;
52
- constructor(parser: OpenAPIParser, operationSpec: ExtendedOpenAPIOperation, parent: GroupModel | undefined, options: RedocNormalizedOptions, isCallback?: boolean);
53
- /**
54
- * set operation as active (used by side menu)
55
- */
56
- activate(): void;
57
- /**
58
- * set operation as inactive (used by side menu)
59
- */
60
- deactivate(): void;
61
- /**
62
- * Toggle expansion in middle panel (for callbacks, which are operations)
63
- */
64
- toggle(): void;
65
- expand(): void;
66
- collapse(): void;
67
- get requestBody(): RequestBodyModel | undefined;
68
- get codeSamples(): (OpenAPIXCodeSample | XPayloadSample)[];
69
- get parameters(): FieldModel[];
70
- get responses(): ResponseModel[];
71
- get callbacks(): CallbackModel[];
72
- }
@@ -1,17 +0,0 @@
1
- import type { OpenAPIRequestBody, Referenced } from '../../types';
2
- import type { OpenAPIParser } from '../OpenAPIParser';
3
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
4
- import { MediaContentModel } from './MediaContent';
5
- type RequestBodyProps = {
6
- parser: OpenAPIParser;
7
- infoOrRef: Referenced<OpenAPIRequestBody>;
8
- options: RedocNormalizedOptions;
9
- isEvent: boolean;
10
- };
11
- export declare class RequestBodyModel {
12
- description: string;
13
- required?: boolean;
14
- content?: MediaContentModel;
15
- constructor({ parser, infoOrRef, options, isEvent }: RequestBodyProps);
16
- }
17
- export {};
@@ -1,26 +0,0 @@
1
- import type { OpenAPIResponse, Referenced } from '../../types';
2
- import type { OpenAPIParser } from '../OpenAPIParser';
3
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
4
- import { FieldModel } from './Field';
5
- import { MediaContentModel } from './MediaContent';
6
- type ResponseProps = {
7
- parser: OpenAPIParser;
8
- code: string;
9
- defaultAsError: boolean;
10
- infoOrRef: Referenced<OpenAPIResponse>;
11
- options: RedocNormalizedOptions;
12
- isEvent: boolean;
13
- };
14
- export declare class ResponseModel {
15
- expanded: boolean;
16
- content?: MediaContentModel;
17
- code: string;
18
- summary: string;
19
- description: string;
20
- type: string;
21
- headers: FieldModel[];
22
- extensions: Record<string, any>;
23
- constructor({ parser, code, defaultAsError, infoOrRef, options, isEvent: isRequest, }: ResponseProps);
24
- toggle(): void;
25
- }
26
- export {};
@@ -1,62 +0,0 @@
1
- import type { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
2
- import type { OpenAPIParser } from '../OpenAPIParser';
3
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
4
- import { FieldModel } from './Field';
5
- import { MergedOpenAPISchema } from '../types';
6
- export declare class SchemaModel {
7
- private options;
8
- private refsStack;
9
- pointer: string;
10
- type: string | string[];
11
- displayType: string;
12
- typePrefix: string;
13
- title: string;
14
- description: string;
15
- externalDocs?: OpenAPIExternalDocumentation;
16
- isPrimitive: boolean;
17
- isCircular: boolean;
18
- format?: string;
19
- displayFormat?: string;
20
- nullable: boolean;
21
- deprecated: boolean;
22
- pattern?: string;
23
- example?: any;
24
- examples?: any[];
25
- enum: any[];
26
- default?: any;
27
- readOnly: boolean;
28
- writeOnly: boolean;
29
- constraints: string[];
30
- fields?: FieldModel[];
31
- items?: SchemaModel;
32
- oneOf?: SchemaModel[];
33
- oneOfType: string;
34
- discriminatorProp: string;
35
- activeOneOf: number;
36
- rawSchema: OpenAPISchema;
37
- schema: MergedOpenAPISchema;
38
- extensions?: Record<string, any>;
39
- 'x-enumDescriptions': {
40
- [name: string]: string;
41
- };
42
- const: any;
43
- contentEncoding?: string;
44
- contentMediaType?: string;
45
- minItems?: number;
46
- maxItems?: number;
47
- /**
48
- * @param isChild if schema discriminator Child
49
- * When true forces dereferencing in allOfs even if circular
50
- */
51
- constructor(parser: OpenAPIParser, schemaOrRef: Referenced<OpenAPISchema>, pointer: string, options: RedocNormalizedOptions, isChild?: boolean, refsStack?: string[]);
52
- /**
53
- * Set specified alternative schema as active
54
- * @param idx oneOf index
55
- */
56
- activateOneOf(idx: number): void;
57
- hasType(type: string): boolean;
58
- init(parser: OpenAPIParser, isChild: boolean): void;
59
- private initOneOf;
60
- private initDiscriminator;
61
- private initConditionalOperators;
62
- }
@@ -1,12 +0,0 @@
1
- import type { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
2
- import type { OpenAPIParser } from '../OpenAPIParser';
3
- export interface SecurityScheme extends OpenAPISecurityScheme {
4
- id: string;
5
- sectionId: string;
6
- displayName: string;
7
- scopes: string[];
8
- }
9
- export declare class SecurityRequirementModel {
10
- schemes: SecurityScheme[];
11
- constructor(requirement: OpenAPISecurityRequirement, parser: OpenAPIParser);
12
- }
@@ -1,26 +0,0 @@
1
- import type { OpenAPISecurityScheme, Referenced } from '../../types';
2
- import type { OpenAPIParser } from '../OpenAPIParser';
3
- export declare class SecuritySchemeModel {
4
- id: string;
5
- sectionId: string;
6
- type: OpenAPISecurityScheme['type'];
7
- description: string;
8
- displayName: string;
9
- apiKey?: {
10
- name: string;
11
- in: OpenAPISecurityScheme['in'];
12
- };
13
- http?: {
14
- scheme: string;
15
- bearerFormat?: string;
16
- };
17
- flows: OpenAPISecurityScheme['flows'];
18
- openId?: {
19
- connectUrl: string;
20
- };
21
- constructor(parser: OpenAPIParser, id: string, scheme: Referenced<OpenAPISecurityScheme>);
22
- }
23
- export declare class SecuritySchemesModel {
24
- schemes: SecuritySchemeModel[];
25
- constructor(parser: OpenAPIParser);
26
- }
@@ -1,9 +0,0 @@
1
- import type { OpenAPIPath, Referenced } from '../../types';
2
- import type { OpenAPIParser } from '../OpenAPIParser';
3
- import { OperationModel } from './Operation';
4
- import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
5
- export declare class WebhookModel {
6
- operations: OperationModel[];
7
- constructor(parser: OpenAPIParser, options: RedocNormalizedOptions, infoOrRef?: Referenced<OpenAPIPath>);
8
- initWebhooks(parser: OpenAPIParser, webhooks: OpenAPIPath, options: RedocNormalizedOptions): void;
9
- }
@@ -1,13 +0,0 @@
1
- export * from '../SpecStore';
2
- export * from './Group.model';
3
- export * from './Operation';
4
- export * from './RequestBody';
5
- export * from './Example';
6
- export * from './MediaContent';
7
- export * from './MediaType';
8
- export * from './Response';
9
- export * from './Schema';
10
- export * from './Field';
11
- export * from './ApiInfo';
12
- export * from './SecuritySchemes';
13
- export * from './Callback';
@@ -1,106 +0,0 @@
1
- import { OpenAPIOperation, OpenAPIParameter, OpenAPISchema, OpenAPIServer, OpenAPITag, Referenced } from '../types';
2
- import { AppStore } from './AppStore';
3
- import { GroupModel } from './models';
4
- import { OperationModel } from './models/Operation';
5
- import { RedocRawOptions } from './RedocNormalizedOptions';
6
- export interface StoreState {
7
- menu: {
8
- activeItemIdx: number;
9
- };
10
- spec: {
11
- url?: string;
12
- data: any;
13
- };
14
- searchIndex: any;
15
- options: RedocRawOptions;
16
- }
17
- export interface LabelsConfig {
18
- enum: string;
19
- enumSingleValue: string;
20
- enumArray: string;
21
- default: string;
22
- deprecated: string;
23
- example: string;
24
- examples: string;
25
- recursive: string;
26
- arrayOf: string;
27
- webhook: string;
28
- const: string;
29
- noResultsFound: string;
30
- download: string;
31
- downloadSpecification: string;
32
- responses: string;
33
- callbackResponses: string;
34
- requestSamples: string;
35
- responseSamples: string;
36
- }
37
- export type LabelsConfigRaw = Partial<LabelsConfig>;
38
- export interface MDXComponentMeta {
39
- component: React.ComponentType;
40
- propsSelector: (store?: AppStore) => any;
41
- props?: object;
42
- }
43
- export interface MarkdownHeading {
44
- id: string;
45
- name: string;
46
- level: number;
47
- items?: MarkdownHeading[];
48
- description?: string;
49
- }
50
- export type ContentItemModel = GroupModel | OperationModel;
51
- export type TagInfo = OpenAPITag & {
52
- operations: ExtendedOpenAPIOperation[];
53
- used?: boolean;
54
- };
55
- export type ExtendedOpenAPIOperation = {
56
- pointer: string;
57
- pathName: string;
58
- httpVerb: string;
59
- pathParameters: Array<Referenced<OpenAPIParameter>>;
60
- pathServers: Array<OpenAPIServer> | undefined;
61
- isWebhook: boolean;
62
- } & OpenAPIOperation;
63
- export type TagsInfoMap = Record<string, TagInfo>;
64
- export interface TagGroup {
65
- name: string;
66
- tags: string[];
67
- }
68
- export type MenuItemGroupType = 'group' | 'tag' | 'section' | 'schema';
69
- export type MenuItemType = MenuItemGroupType | 'operation';
70
- export interface IMenuItem {
71
- id: string;
72
- absoluteIdx?: number;
73
- name: string;
74
- sidebarLabel: string;
75
- description?: string;
76
- depth: number;
77
- active: boolean;
78
- expanded: boolean;
79
- items: IMenuItem[];
80
- parent?: IMenuItem;
81
- deprecated?: boolean;
82
- type: MenuItemType;
83
- deactivate(): void;
84
- activate(): void;
85
- collapse(): void;
86
- expand(): void;
87
- }
88
- export interface SearchDocument {
89
- title: string;
90
- description: string;
91
- id: string;
92
- }
93
- export interface SearchResult<T = string> {
94
- meta: T;
95
- score: number;
96
- }
97
- export declare enum SideNavStyleEnum {
98
- SummaryOnly = "summary-only",
99
- PathOnly = "path-only",
100
- IdOnly = "id-only"
101
- }
102
- export type MergedOpenAPISchema = OpenAPISchema & {
103
- 'x-refsStack'?: string[];
104
- 'x-parentRefs'?: string[];
105
- 'x-circular-ref'?: boolean;
106
- };
@@ -1,12 +0,0 @@
1
- import * as styledComponents from 'styled-components';
2
- import type { ResolvedThemeInterface } from './theme';
3
- export type { ResolvedThemeInterface };
4
- declare const styled: styledComponents.ThemedStyledInterface<ResolvedThemeInterface>, css: styledComponents.ThemedCssFunction<ResolvedThemeInterface>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ResolvedThemeInterface>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ResolvedThemeInterface>>[]) => styledComponents.GlobalStyleComponent<P, ResolvedThemeInterface>, keyframes: (strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]) => styledComponents.Keyframes, ThemeProvider: styledComponents.BaseThemeProviderComponent<ResolvedThemeInterface, ResolvedThemeInterface>;
5
- export declare const media: {
6
- lessThan(breakpoint: any, print?: boolean, extra?: string): (...args: any[]) => styledComponents.FlattenInterpolation<styledComponents.ThemedStyledProps<object, ResolvedThemeInterface>>;
7
- greaterThan(breakpoint: any): (...args: any[]) => styledComponents.FlattenInterpolation<styledComponents.ThemedStyledProps<object, ResolvedThemeInterface>>;
8
- between(firstBreakpoint: any, secondBreakpoint: any): (...args: any[]) => styledComponents.FlattenInterpolation<styledComponents.ThemedStyledProps<object, ResolvedThemeInterface>>;
9
- };
10
- export { css, createGlobalStyle, keyframes, ThemeProvider };
11
- export default styled;
12
- export declare function extensionsHook(styledName: string): (props: any) => any;
@@ -1,22 +0,0 @@
1
- import * as styledComponents from 'styled-components';
2
-
3
- // FIXME
4
- declare module 'styled-components' {
5
- interface ThemedStyledComponentsModule<T> {
6
- keyframes(
7
- strings: TemplateStringsArray | string[],
8
- ...interpolations: SimpleInterpolation[]
9
- ): Keyframes;
10
- }
11
-
12
- export interface BaseThemedCssFunction<T extends object> {
13
- <P extends object>(
14
- first:
15
- | TemplateStringsArray
16
- | CSSObject
17
- | InterpolationFunction<ThemedStyledProps<P, T>>
18
- | string[],
19
- ...interpolations: Array<Interpolation<ThemedStyledProps<P, T>>>
20
- ): FlattenInterpolation<ThemedStyledProps<P, T>>;
21
- }
22
- }
@@ -1,163 +0,0 @@
1
- declare const defaultTheme: ThemeInterface;
2
- export default defaultTheme;
3
- export declare function resolveTheme(theme: ThemeInterface): ResolvedThemeInterface;
4
- export interface ColorSetting {
5
- main: string;
6
- light: string;
7
- dark: string;
8
- contrastText: string;
9
- }
10
- export interface HTTPResponseColos {
11
- color: string;
12
- backgroundColor: string;
13
- tabTextColor: string;
14
- }
15
- export interface FontSettings {
16
- fontSize: string;
17
- fontWeight: string;
18
- fontFamily: string;
19
- lineHeight: string;
20
- color: string;
21
- }
22
- export interface Servers {
23
- overlay: {
24
- backgroundColor: string;
25
- textColor: string;
26
- };
27
- url: {
28
- backgroundColor: string;
29
- };
30
- }
31
- export interface ResolvedThemeInterface {
32
- spacing: {
33
- unit: number;
34
- sectionHorizontal: number;
35
- sectionVertical: number;
36
- };
37
- breakpoints: {
38
- small: string;
39
- medium: string;
40
- large: string;
41
- };
42
- colors: {
43
- tonalOffset: number;
44
- primary: ColorSetting;
45
- success: ColorSetting;
46
- warning: ColorSetting;
47
- error: ColorSetting;
48
- gray: {
49
- 50: string;
50
- 100: string;
51
- };
52
- border: {
53
- light: string;
54
- dark: string;
55
- };
56
- text: {
57
- primary: string;
58
- secondary: string;
59
- };
60
- responses: {
61
- success: HTTPResponseColos;
62
- error: HTTPResponseColos;
63
- redirect: HTTPResponseColos;
64
- info: HTTPResponseColos;
65
- };
66
- http: {
67
- get: string;
68
- post: string;
69
- put: string;
70
- options: string;
71
- patch: string;
72
- delete: string;
73
- basic: string;
74
- link: string;
75
- head: string;
76
- };
77
- };
78
- schema: {
79
- linesColor: string;
80
- defaultDetailsWidth: string;
81
- typeNameColor: string;
82
- typeTitleColor: string;
83
- requireLabelColor: string;
84
- labelsTextSize: string;
85
- nestingSpacing: string;
86
- nestedBackground: string;
87
- arrow: {
88
- size: string;
89
- color: string;
90
- };
91
- };
92
- typography: {
93
- fontSize: string;
94
- lineHeight: string;
95
- fontWeightLight: string;
96
- fontWeightRegular: string;
97
- fontWeightBold: string;
98
- fontFamily: string;
99
- smoothing: string;
100
- optimizeSpeed: boolean;
101
- code: FontSettings & {
102
- backgroundColor: string;
103
- wrap: boolean;
104
- };
105
- headings: {
106
- fontFamily: string;
107
- fontWeight: string;
108
- lineHeight: string;
109
- };
110
- links: {
111
- color: string;
112
- visited: string;
113
- hover: string;
114
- textDecoration: string;
115
- hoverTextDecoration: string;
116
- };
117
- };
118
- sidebar: {
119
- width: string;
120
- backgroundColor: string;
121
- textColor: string;
122
- activeTextColor: string;
123
- groupItems: {
124
- activeBackgroundColor: string;
125
- activeTextColor: string;
126
- textTransform: string;
127
- };
128
- level1Items: {
129
- activeBackgroundColor: string;
130
- activeTextColor: string;
131
- textTransform: string;
132
- };
133
- arrow: {
134
- size: string;
135
- color: string;
136
- };
137
- };
138
- logo: {
139
- maxHeight: string;
140
- maxWidth: string;
141
- gutter: string;
142
- };
143
- rightPanel: {
144
- backgroundColor: string;
145
- textColor: string;
146
- width: string;
147
- servers: Servers;
148
- };
149
- codeBlock: {
150
- backgroundColor: string;
151
- };
152
- fab: {
153
- backgroundColor: string;
154
- color: string;
155
- };
156
- extensionsHook?: (name: string, props: any) => string;
157
- }
158
- export type primitive = string | number | boolean | undefined | null;
159
- export type AdvancedThemeDeep<T> = T extends primitive ? T | ((theme: ResolvedThemeInterface) => T) : AdvancedThemeObject<T>;
160
- export type AdvancedThemeObject<T> = {
161
- [P in keyof T]?: AdvancedThemeDeep<T[P]>;
162
- };
163
- export type ThemeInterface = AdvancedThemeObject<ResolvedThemeInterface>;
@@ -1,2 +0,0 @@
1
- export * from './open-api';
2
- export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
@@ -1,3 +0,0 @@
1
- export * from './open-api';
2
-
3
- export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;