@redocly/config 0.54.0 → 0.55.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.
@@ -899,9 +899,6 @@ export declare const apiConfigSchema: {
899
899
  readonly hideLoading: {
900
900
  readonly type: 'boolean';
901
901
  };
902
- readonly hideSidebar: {
903
- readonly type: 'boolean';
904
- };
905
902
  readonly feedback: {
906
903
  readonly type: 'object';
907
904
  readonly properties: {
@@ -2814,14 +2811,6 @@ export declare const apiConfigSchema: {
2814
2811
  };
2815
2812
  readonly additionalProperties: false;
2816
2813
  };
2817
- readonly sidebar: {
2818
- readonly type: 'object';
2819
- readonly properties: {
2820
- readonly hide: {
2821
- readonly type: 'boolean';
2822
- };
2823
- };
2824
- };
2825
2814
  readonly downloadUrls: {
2826
2815
  readonly type: 'array';
2827
2816
  readonly items: {
@@ -3182,9 +3171,6 @@ export declare const apiConfigSchema: {
3182
3171
  readonly hideLoading: {
3183
3172
  readonly type: 'boolean';
3184
3173
  };
3185
- readonly hideSidebar: {
3186
- readonly type: 'boolean';
3187
- };
3188
3174
  readonly feedback: {
3189
3175
  readonly type: 'object';
3190
3176
  readonly properties: {
@@ -5097,14 +5083,6 @@ export declare const apiConfigSchema: {
5097
5083
  };
5098
5084
  readonly additionalProperties: false;
5099
5085
  };
5100
- readonly sidebar: {
5101
- readonly type: 'object';
5102
- readonly properties: {
5103
- readonly hide: {
5104
- readonly type: 'boolean';
5105
- };
5106
- };
5107
- };
5108
5086
  readonly downloadUrls: {
5109
5087
  readonly type: 'array';
5110
5088
  readonly items: {
@@ -7755,9 +7733,6 @@ export declare const redoclyConfigSchema: {
7755
7733
  readonly hideLoading: {
7756
7734
  readonly type: 'boolean';
7757
7735
  };
7758
- readonly hideSidebar: {
7759
- readonly type: 'boolean';
7760
- };
7761
7736
  readonly feedback: {
7762
7737
  readonly type: 'object';
7763
7738
  readonly properties: {
@@ -9670,14 +9645,6 @@ export declare const redoclyConfigSchema: {
9670
9645
  };
9671
9646
  readonly additionalProperties: false;
9672
9647
  };
9673
- readonly sidebar: {
9674
- readonly type: 'object';
9675
- readonly properties: {
9676
- readonly hide: {
9677
- readonly type: 'boolean';
9678
- };
9679
- };
9680
- };
9681
9648
  readonly downloadUrls: {
9682
9649
  readonly type: 'array';
9683
9650
  readonly items: {
@@ -10038,9 +10005,6 @@ export declare const redoclyConfigSchema: {
10038
10005
  readonly hideLoading: {
10039
10006
  readonly type: 'boolean';
10040
10007
  };
10041
- readonly hideSidebar: {
10042
- readonly type: 'boolean';
10043
- };
10044
10008
  readonly feedback: {
10045
10009
  readonly type: 'object';
10046
10010
  readonly properties: {
@@ -11953,14 +11917,6 @@ export declare const redoclyConfigSchema: {
11953
11917
  };
11954
11918
  readonly additionalProperties: false;
11955
11919
  };
11956
- readonly sidebar: {
11957
- readonly type: 'object';
11958
- readonly properties: {
11959
- readonly hide: {
11960
- readonly type: 'boolean';
11961
- };
11962
- };
11963
- };
11964
11920
  readonly downloadUrls: {
11965
11921
  readonly type: 'array';
11966
11922
  readonly items: {
@@ -14235,9 +14191,6 @@ export declare const redoclyConfigSchema: {
14235
14191
  readonly hideLoading: {
14236
14192
  readonly type: 'boolean';
14237
14193
  };
14238
- readonly hideSidebar: {
14239
- readonly type: 'boolean';
14240
- };
14241
14194
  readonly feedback: {
14242
14195
  readonly type: 'object';
14243
14196
  readonly properties: {
@@ -16427,14 +16380,6 @@ export declare const redoclyConfigSchema: {
16427
16380
  };
16428
16381
  readonly additionalProperties: false;
16429
16382
  };
16430
- readonly sidebar: {
16431
- readonly type: 'object';
16432
- readonly properties: {
16433
- readonly hide: {
16434
- readonly type: 'boolean';
16435
- };
16436
- };
16437
- };
16438
16383
  readonly downloadUrls: {
16439
16384
  readonly type: 'array';
16440
16385
  readonly items: {
@@ -21226,9 +21171,6 @@ export declare const redoclyConfigSchema: {
21226
21171
  readonly hideLoading: {
21227
21172
  readonly type: 'boolean';
21228
21173
  };
21229
- readonly hideSidebar: {
21230
- readonly type: 'boolean';
21231
- };
21232
21174
  readonly feedback: {
21233
21175
  readonly type: 'object';
21234
21176
  readonly properties: {
@@ -23141,14 +23083,6 @@ export declare const redoclyConfigSchema: {
23141
23083
  };
23142
23084
  readonly additionalProperties: false;
23143
23085
  };
23144
- readonly sidebar: {
23145
- readonly type: 'object';
23146
- readonly properties: {
23147
- readonly hide: {
23148
- readonly type: 'boolean';
23149
- };
23150
- };
23151
- };
23152
23086
  readonly downloadUrls: {
23153
23087
  readonly type: 'array';
23154
23088
  readonly items: {
@@ -27799,9 +27733,6 @@ export declare const rootRedoclyConfigSchema: {
27799
27733
  readonly hideLoading: {
27800
27734
  readonly type: 'boolean';
27801
27735
  };
27802
- readonly hideSidebar: {
27803
- readonly type: 'boolean';
27804
- };
27805
27736
  readonly feedback: {
27806
27737
  readonly type: 'object';
27807
27738
  readonly properties: {
@@ -29714,14 +29645,6 @@ export declare const rootRedoclyConfigSchema: {
29714
29645
  };
29715
29646
  readonly additionalProperties: false;
29716
29647
  };
29717
- readonly sidebar: {
29718
- readonly type: 'object';
29719
- readonly properties: {
29720
- readonly hide: {
29721
- readonly type: 'boolean';
29722
- };
29723
- };
29724
- };
29725
29648
  readonly downloadUrls: {
29726
29649
  readonly type: 'array';
29727
29650
  readonly items: {
@@ -30082,9 +30005,6 @@ export declare const rootRedoclyConfigSchema: {
30082
30005
  readonly hideLoading: {
30083
30006
  readonly type: 'boolean';
30084
30007
  };
30085
- readonly hideSidebar: {
30086
- readonly type: 'boolean';
30087
- };
30088
30008
  readonly feedback: {
30089
30009
  readonly type: 'object';
30090
30010
  readonly properties: {
@@ -31997,14 +31917,6 @@ export declare const rootRedoclyConfigSchema: {
31997
31917
  };
31998
31918
  readonly additionalProperties: false;
31999
31919
  };
32000
- readonly sidebar: {
32001
- readonly type: 'object';
32002
- readonly properties: {
32003
- readonly hide: {
32004
- readonly type: 'boolean';
32005
- };
32006
- };
32007
- };
32008
31920
  readonly downloadUrls: {
32009
31921
  readonly type: 'array';
32010
31922
  readonly items: {
@@ -34279,9 +34191,6 @@ export declare const rootRedoclyConfigSchema: {
34279
34191
  readonly hideLoading: {
34280
34192
  readonly type: 'boolean';
34281
34193
  };
34282
- readonly hideSidebar: {
34283
- readonly type: 'boolean';
34284
- };
34285
34194
  readonly feedback: {
34286
34195
  readonly type: 'object';
34287
34196
  readonly properties: {
@@ -36471,14 +36380,6 @@ export declare const rootRedoclyConfigSchema: {
36471
36380
  };
36472
36381
  readonly additionalProperties: false;
36473
36382
  };
36474
- readonly sidebar: {
36475
- readonly type: 'object';
36476
- readonly properties: {
36477
- readonly hide: {
36478
- readonly type: 'boolean';
36479
- };
36480
- };
36481
- };
36482
36383
  readonly downloadUrls: {
36483
36384
  readonly type: 'array';
36484
36385
  readonly items: {
@@ -41270,9 +41171,6 @@ export declare const rootRedoclyConfigSchema: {
41270
41171
  readonly hideLoading: {
41271
41172
  readonly type: 'boolean';
41272
41173
  };
41273
- readonly hideSidebar: {
41274
- readonly type: 'boolean';
41275
- };
41276
41174
  readonly feedback: {
41277
41175
  readonly type: 'object';
41278
41176
  readonly properties: {
@@ -43185,14 +43083,6 @@ export declare const rootRedoclyConfigSchema: {
43185
43083
  };
43186
43084
  readonly additionalProperties: false;
43187
43085
  };
43188
- readonly sidebar: {
43189
- readonly type: 'object';
43190
- readonly properties: {
43191
- readonly hide: {
43192
- readonly type: 'boolean';
43193
- };
43194
- };
43195
- };
43196
43086
  readonly downloadUrls: {
43197
43087
  readonly type: 'array';
43198
43088
  readonly items: {
@@ -47841,9 +47731,6 @@ export declare const rootRedoclyConfigSchema: {
47841
47731
  readonly hideLoading: {
47842
47732
  readonly type: 'boolean';
47843
47733
  };
47844
- readonly hideSidebar: {
47845
- readonly type: 'boolean';
47846
- };
47847
47734
  readonly feedback: {
47848
47735
  readonly type: 'object';
47849
47736
  readonly properties: {
@@ -49756,14 +49643,6 @@ export declare const rootRedoclyConfigSchema: {
49756
49643
  };
49757
49644
  readonly additionalProperties: false;
49758
49645
  };
49759
- readonly sidebar: {
49760
- readonly type: 'object';
49761
- readonly properties: {
49762
- readonly hide: {
49763
- readonly type: 'boolean';
49764
- };
49765
- };
49766
- };
49767
49646
  readonly downloadUrls: {
49768
49647
  readonly type: 'array';
49769
49648
  readonly items: {
@@ -50124,9 +50003,6 @@ export declare const rootRedoclyConfigSchema: {
50124
50003
  readonly hideLoading: {
50125
50004
  readonly type: 'boolean';
50126
50005
  };
50127
- readonly hideSidebar: {
50128
- readonly type: 'boolean';
50129
- };
50130
50006
  readonly feedback: {
50131
50007
  readonly type: 'object';
50132
50008
  readonly properties: {
@@ -52039,14 +51915,6 @@ export declare const rootRedoclyConfigSchema: {
52039
51915
  };
52040
51916
  readonly additionalProperties: false;
52041
51917
  };
52042
- readonly sidebar: {
52043
- readonly type: 'object';
52044
- readonly properties: {
52045
- readonly hide: {
52046
- readonly type: 'boolean';
52047
- };
52048
- };
52049
- };
52050
51918
  readonly downloadUrls: {
52051
51919
  readonly type: 'array';
52052
51920
  readonly items: {
@@ -54321,9 +54189,6 @@ export declare const rootRedoclyConfigSchema: {
54321
54189
  readonly hideLoading: {
54322
54190
  readonly type: 'boolean';
54323
54191
  };
54324
- readonly hideSidebar: {
54325
- readonly type: 'boolean';
54326
- };
54327
54192
  readonly feedback: {
54328
54193
  readonly type: 'object';
54329
54194
  readonly properties: {
@@ -56513,14 +56378,6 @@ export declare const rootRedoclyConfigSchema: {
56513
56378
  };
56514
56379
  readonly additionalProperties: false;
56515
56380
  };
56516
- readonly sidebar: {
56517
- readonly type: 'object';
56518
- readonly properties: {
56519
- readonly hide: {
56520
- readonly type: 'boolean';
56521
- };
56522
- };
56523
- };
56524
56381
  readonly downloadUrls: {
56525
56382
  readonly type: 'array';
56526
56383
  readonly items: {
@@ -61312,9 +61169,6 @@ export declare const rootRedoclyConfigSchema: {
61312
61169
  readonly hideLoading: {
61313
61170
  readonly type: 'boolean';
61314
61171
  };
61315
- readonly hideSidebar: {
61316
- readonly type: 'boolean';
61317
- };
61318
61172
  readonly feedback: {
61319
61173
  readonly type: 'object';
61320
61174
  readonly properties: {
@@ -63227,14 +63081,6 @@ export declare const rootRedoclyConfigSchema: {
63227
63081
  };
63228
63082
  readonly additionalProperties: false;
63229
63083
  };
63230
- readonly sidebar: {
63231
- readonly type: 'object';
63232
- readonly properties: {
63233
- readonly hide: {
63234
- readonly type: 'boolean';
63235
- };
63236
- };
63237
- };
63238
63084
  readonly downloadUrls: {
63239
63085
  readonly type: 'array';
63240
63086
  readonly items: {
@@ -1,4 +1,5 @@
1
1
  export * from './api-functions-types.js';
2
+ export * from './mcp-tools-types.js';
2
3
  export * from './config-types.js';
3
4
  export * from './portal-shared-types.js';
4
5
  export * from './catalog-entity-types.js';
@@ -0,0 +1,81 @@
1
+ import type { JSONSchema } from 'json-schema-to-ts';
2
+ import type { ApiFunctionsContext, ApiFunctionsContextMethods } from './api-functions-types.js';
3
+ /** A JSON Schema (draft-07) object, as accepted by MCP tool definitions. */
4
+ export type McpToolJsonSchema = Exclude<JSONSchema, boolean>;
5
+ export type McpToolJsonValue = string | number | boolean | null | McpToolJsonValue[] | {
6
+ [key: string]: McpToolJsonValue;
7
+ };
8
+ /** Structurally compatible with the MCP protocol `CallToolResult`. */
9
+ export type McpToolResult = {
10
+ content: Array<{
11
+ type: 'text' | 'image' | 'audio' | 'resource' | 'resource_link';
12
+ text?: string;
13
+ [key: string]: unknown;
14
+ }>;
15
+ structuredContent?: Record<string, unknown>;
16
+ isError?: boolean;
17
+ _meta?: Record<string, unknown>;
18
+ };
19
+ /** Behavior hints for MCP clients, as defined by the MCP specification. */
20
+ export type McpToolAnnotations = {
21
+ title?: string;
22
+ readOnlyHint?: boolean;
23
+ destructiveHint?: boolean;
24
+ idempotentHint?: boolean;
25
+ openWorldHint?: boolean;
26
+ };
27
+ export type McpToolFileSystem = {
28
+ /**
29
+ * Reads a text file from the built project output (which includes a Markdown
30
+ * twin of every page). A path that escapes the output directory is rejected.
31
+ */
32
+ readFile: (path: string) => Promise<string>;
33
+ };
34
+ /** Context passed to a custom MCP tool's `execute` and `isAvailable` functions. */
35
+ export type McpToolContext = Omit<ApiFunctionsContext, 'telemetry' | 'getKv' | keyof ApiFunctionsContextMethods> & {
36
+ /** Scoped file access to the built project output. */
37
+ fs: McpToolFileSystem;
38
+ /** Product names configured in the project. */
39
+ products?: string[];
40
+ /** Access token of the authenticated MCP connection. */
41
+ accessToken?: string;
42
+ /** Free-form caller metadata, parsed from the `X-Redocly-AI-Metadata` request header. */
43
+ metadata?: Record<string, unknown>;
44
+ };
45
+ /** MCP protocol metadata passed to a custom MCP tool's `execute` function. */
46
+ export type McpToolCallExtra = {
47
+ sessionId?: string;
48
+ requestId: string | number;
49
+ authInfo?: {
50
+ token: string;
51
+ clientId: string;
52
+ scopes: string[];
53
+ expiresAt?: number;
54
+ [key: string]: unknown;
55
+ };
56
+ requestInfo?: {
57
+ headers: Record<string, string | string[] | undefined>;
58
+ };
59
+ _meta?: Record<string, unknown>;
60
+ };
61
+ /**
62
+ * A custom MCP tool defined by a file in an `@mcp` folder.
63
+ * The file's default export must satisfy this type; the tool name is the file name without extension.
64
+ */
65
+ export type McpToolDefinition<TArgs extends Record<string, unknown> = Record<string, unknown>> = {
66
+ /** Human-readable description shown to MCP clients and AI models. */
67
+ description: string;
68
+ /** JSON Schema for the tool's input arguments. Defaults to an empty object schema. */
69
+ inputSchema?: McpToolJsonSchema & {
70
+ type?: 'object';
71
+ };
72
+ outputSchema?: McpToolJsonSchema;
73
+ annotations?: McpToolAnnotations;
74
+ /** Controls whether the tool is advertised to the current MCP connection. */
75
+ isAvailable?: (context: McpToolContext) => boolean | Promise<boolean>;
76
+ /**
77
+ * Runs the tool. A returned string or JSON value is wrapped into an MCP
78
+ * result automatically; throw an `Error` to report a failure.
79
+ */
80
+ execute: (args: TArgs, context: McpToolContext, extra: McpToolCallExtra) => McpToolResult | McpToolJsonValue | Promise<McpToolResult | McpToolJsonValue>;
81
+ };
@@ -1162,9 +1162,6 @@ export declare const themeConfigSchema: {
1162
1162
  readonly hideLoading: {
1163
1163
  readonly type: 'boolean';
1164
1164
  };
1165
- readonly hideSidebar: {
1166
- readonly type: 'boolean';
1167
- };
1168
1165
  readonly feedback: {
1169
1166
  readonly type: 'object';
1170
1167
  readonly properties: {
@@ -3354,14 +3351,6 @@ export declare const themeConfigSchema: {
3354
3351
  };
3355
3352
  readonly additionalProperties: false;
3356
3353
  };
3357
- readonly sidebar: {
3358
- readonly type: 'object';
3359
- readonly properties: {
3360
- readonly hide: {
3361
- readonly type: 'boolean';
3362
- };
3363
- };
3364
- };
3365
3354
  readonly downloadUrls: {
3366
3355
  readonly type: 'array';
3367
3356
  readonly items: {
@@ -1206,9 +1206,6 @@ export declare const openapiConfigSchema: {
1206
1206
  readonly hideLoading: {
1207
1207
  readonly type: 'boolean';
1208
1208
  };
1209
- readonly hideSidebar: {
1210
- readonly type: 'boolean';
1211
- };
1212
1209
  readonly feedback: {
1213
1210
  readonly type: 'object';
1214
1211
  readonly properties: {
@@ -2995,9 +2992,6 @@ export declare const asyncapiConfigSchema: {
2995
2992
  readonly hideLoading: {
2996
2993
  readonly type: 'boolean';
2997
2994
  };
2998
- readonly hideSidebar: {
2999
- readonly type: 'boolean';
3000
- };
3001
2995
  readonly feedback: {
3002
2996
  readonly type: 'object';
3003
2997
  readonly properties: {
@@ -134,14 +134,6 @@ export declare const graphqlConfigSchema: {
134
134
  };
135
135
  readonly additionalProperties: false;
136
136
  };
137
- readonly sidebar: {
138
- readonly type: 'object';
139
- readonly properties: {
140
- readonly hide: {
141
- readonly type: 'boolean';
142
- };
143
- };
144
- };
145
137
  readonly downloadUrls: {
146
138
  readonly type: 'array';
147
139
  readonly items: {