@redocly/config 0.20.3 → 0.22.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.
@@ -844,6 +844,13 @@ export declare const themeConfigSchema: {
844
844
  readonly type: "boolean";
845
845
  readonly default: false;
846
846
  };
847
+ readonly suggestions: {
848
+ readonly default: readonly [];
849
+ readonly type: "array";
850
+ readonly items: {
851
+ readonly type: "string";
852
+ };
853
+ };
847
854
  readonly prompt: {
848
855
  readonly type: "string";
849
856
  };
@@ -4840,6 +4847,13 @@ export declare const closedThemeConfigSchema: {
4840
4847
  readonly type: "boolean";
4841
4848
  readonly default: false;
4842
4849
  };
4850
+ readonly suggestions: {
4851
+ readonly default: readonly [];
4852
+ readonly type: "array";
4853
+ readonly items: {
4854
+ readonly type: "string";
4855
+ };
4856
+ };
4843
4857
  readonly prompt: {
4844
4858
  readonly type: "string";
4845
4859
  };
@@ -194,6 +194,13 @@ export declare const aiSearchConfigSchema: {
194
194
  readonly type: "boolean";
195
195
  readonly default: false;
196
196
  };
197
+ readonly suggestions: {
198
+ readonly default: readonly [];
199
+ readonly type: "array";
200
+ readonly items: {
201
+ readonly type: "string";
202
+ };
203
+ };
197
204
  readonly prompt: {
198
205
  readonly type: "string";
199
206
  };
@@ -847,6 +854,13 @@ export declare const searchConfigSchema: {
847
854
  readonly type: "boolean";
848
855
  readonly default: false;
849
856
  };
857
+ readonly suggestions: {
858
+ readonly default: readonly [];
859
+ readonly type: "array";
860
+ readonly items: {
861
+ readonly type: "string";
862
+ };
863
+ };
850
864
  readonly prompt: {
851
865
  readonly type: "string";
852
866
  };
@@ -87,6 +87,13 @@ exports.aiSearchConfigSchema = {
87
87
  type: 'boolean',
88
88
  default: false,
89
89
  },
90
+ suggestions: {
91
+ default: [],
92
+ type: 'array',
93
+ items: {
94
+ type: 'string',
95
+ },
96
+ },
90
97
  prompt: {
91
98
  type: 'string',
92
99
  },
@@ -433,6 +433,13 @@ export declare const productThemeOverrideSchema: {
433
433
  readonly type: "boolean";
434
434
  readonly default: false;
435
435
  };
436
+ readonly suggestions: {
437
+ readonly default: readonly [];
438
+ readonly type: "array";
439
+ readonly items: {
440
+ readonly type: "string";
441
+ };
442
+ };
436
443
  readonly prompt: {
437
444
  readonly type: "string";
438
445
  };
@@ -7621,6 +7628,13 @@ export declare const productConfigOverrideSchema: {
7621
7628
  readonly type: "boolean";
7622
7629
  readonly default: false;
7623
7630
  };
7631
+ readonly suggestions: {
7632
+ readonly default: readonly [];
7633
+ readonly type: "array";
7634
+ readonly items: {
7635
+ readonly type: "string";
7636
+ };
7637
+ };
7624
7638
  readonly prompt: {
7625
7639
  readonly type: "string";
7626
7640
  };
@@ -10296,6 +10310,13 @@ export declare const productConfigOverrideSchema: {
10296
10310
  readonly type: "boolean";
10297
10311
  readonly default: false;
10298
10312
  };
10313
+ readonly suggestions: {
10314
+ readonly default: readonly [];
10315
+ readonly type: "array";
10316
+ readonly items: {
10317
+ readonly type: "string";
10318
+ };
10319
+ };
10299
10320
  readonly prompt: {
10300
10321
  readonly type: "string";
10301
10322
  };
@@ -29,7 +29,7 @@ export declare const reuniteConfigSchema: {
29
29
  };
30
30
  readonly agent: {
31
31
  readonly type: "string";
32
- readonly enum: readonly ["spot"];
32
+ readonly enum: readonly ["respect"];
33
33
  };
34
34
  readonly trigger: {
35
35
  readonly type: "object";
@@ -66,7 +66,7 @@ exports.reuniteConfigSchema = {
66
66
  },
67
67
  agent: {
68
68
  type: 'string',
69
- enum: ['spot'],
69
+ enum: ['respect'],
70
70
  },
71
71
  trigger: jobTriggerSchema,
72
72
  inputs: jobInputsSchema,
@@ -5039,6 +5039,18 @@ export declare const seoConfigSchema: {
5039
5039
  };
5040
5040
  readonly additionalProperties: false;
5041
5041
  };
5042
+ export declare const apiFunctionsConfigSchema: {
5043
+ readonly type: "object";
5044
+ readonly properties: {
5045
+ readonly folders: {
5046
+ readonly type: "array";
5047
+ readonly items: {
5048
+ readonly type: "string";
5049
+ };
5050
+ };
5051
+ };
5052
+ readonly additionalProperties: false;
5053
+ };
5042
5054
  export declare const rbacScopeItemsSchema: {
5043
5055
  readonly type: "object";
5044
5056
  readonly additionalProperties: {
@@ -5737,6 +5749,18 @@ export declare const redoclyConfigSchema: {
5737
5749
  };
5738
5750
  };
5739
5751
  };
5752
+ readonly apiFunctions: {
5753
+ readonly type: "object";
5754
+ readonly properties: {
5755
+ readonly folders: {
5756
+ readonly type: "array";
5757
+ readonly items: {
5758
+ readonly type: "string";
5759
+ };
5760
+ };
5761
+ };
5762
+ readonly additionalProperties: false;
5763
+ };
5740
5764
  readonly requiresLogin: {
5741
5765
  readonly type: "boolean";
5742
5766
  };
@@ -11591,6 +11615,13 @@ export declare const redoclyConfigSchema: {
11591
11615
  readonly type: "boolean";
11592
11616
  readonly default: false;
11593
11617
  };
11618
+ readonly suggestions: {
11619
+ readonly default: readonly [];
11620
+ readonly type: "array";
11621
+ readonly items: {
11622
+ readonly type: "string";
11623
+ };
11624
+ };
11594
11625
  readonly prompt: {
11595
11626
  readonly type: "string";
11596
11627
  };
@@ -14771,7 +14802,7 @@ export declare const redoclyConfigSchema: {
14771
14802
  };
14772
14803
  readonly agent: {
14773
14804
  readonly type: "string";
14774
- readonly enum: readonly ["spot"];
14805
+ readonly enum: readonly ["respect"];
14775
14806
  };
14776
14807
  readonly trigger: {
14777
14808
  readonly type: "object";
@@ -15668,6 +15699,13 @@ export declare const redoclyConfigSchema: {
15668
15699
  readonly type: "boolean";
15669
15700
  readonly default: false;
15670
15701
  };
15702
+ readonly suggestions: {
15703
+ readonly default: readonly [];
15704
+ readonly type: "array";
15705
+ readonly items: {
15706
+ readonly type: "string";
15707
+ };
15708
+ };
15671
15709
  readonly prompt: {
15672
15710
  readonly type: "string";
15673
15711
  };
@@ -19519,6 +19557,12 @@ export declare const rootRedoclyConfigSchema: {
19519
19557
  hide: {
19520
19558
  type: "boolean";
19521
19559
  };
19560
+ suggestions: {
19561
+ items: {
19562
+ type: "string";
19563
+ };
19564
+ type: "array";
19565
+ };
19522
19566
  prompt: {
19523
19567
  type: "string";
19524
19568
  };
@@ -22424,6 +22468,18 @@ export declare const rootRedoclyConfigSchema: {
22424
22468
  };
22425
22469
  type: "object";
22426
22470
  };
22471
+ apiFunctions: {
22472
+ properties: {
22473
+ folders: {
22474
+ items: {
22475
+ type: "string";
22476
+ };
22477
+ type: "array";
22478
+ };
22479
+ };
22480
+ additionalProperties: false;
22481
+ type: "object";
22482
+ };
22427
22483
  requiresLogin: {
22428
22484
  type: "boolean";
22429
22485
  };
@@ -26460,7 +26516,7 @@ export declare const rootRedoclyConfigSchema: {
26460
26516
  required: "event"[];
26461
26517
  };
26462
26518
  agent: {
26463
- enum: "spot"[];
26519
+ enum: "respect"[];
26464
26520
  type: "string";
26465
26521
  };
26466
26522
  inputs: {
@@ -26986,6 +27042,12 @@ export declare const rootRedoclyConfigSchema: {
26986
27042
  hide: {
26987
27043
  type: "boolean";
26988
27044
  };
27045
+ suggestions: {
27046
+ items: {
27047
+ type: "string";
27048
+ };
27049
+ type: "array";
27050
+ };
26989
27051
  prompt: {
26990
27052
  type: "string";
26991
27053
  };
@@ -29682,6 +29744,18 @@ export declare const rootRedoclyConfigSchema: {
29682
29744
  };
29683
29745
  };
29684
29746
  };
29747
+ readonly apiFunctions: {
29748
+ readonly type: "object";
29749
+ readonly properties: {
29750
+ readonly folders: {
29751
+ readonly type: "array";
29752
+ readonly items: {
29753
+ readonly type: "string";
29754
+ };
29755
+ };
29756
+ };
29757
+ readonly additionalProperties: false;
29758
+ };
29685
29759
  readonly requiresLogin: {
29686
29760
  readonly type: "boolean";
29687
29761
  };
@@ -35536,6 +35610,13 @@ export declare const rootRedoclyConfigSchema: {
35536
35610
  readonly type: "boolean";
35537
35611
  readonly default: false;
35538
35612
  };
35613
+ readonly suggestions: {
35614
+ readonly default: readonly [];
35615
+ readonly type: "array";
35616
+ readonly items: {
35617
+ readonly type: "string";
35618
+ };
35619
+ };
35539
35620
  readonly prompt: {
35540
35621
  readonly type: "string";
35541
35622
  };
@@ -38716,7 +38797,7 @@ export declare const rootRedoclyConfigSchema: {
38716
38797
  };
38717
38798
  readonly agent: {
38718
38799
  readonly type: "string";
38719
- readonly enum: readonly ["spot"];
38800
+ readonly enum: readonly ["respect"];
38720
38801
  };
38721
38802
  readonly trigger: {
38722
38803
  readonly type: "object";
@@ -39613,6 +39694,13 @@ export declare const rootRedoclyConfigSchema: {
39613
39694
  readonly type: "boolean";
39614
39695
  readonly default: false;
39615
39696
  };
39697
+ readonly suggestions: {
39698
+ readonly default: readonly [];
39699
+ readonly type: "array";
39700
+ readonly items: {
39701
+ readonly type: "string";
39702
+ };
39703
+ };
39616
39704
  readonly prompt: {
39617
39705
  readonly type: "string";
39618
39706
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.l10nConfigSchema = exports.devOnboardingAdapterConfigSchema = exports.apigeeEdgeAdapterConfigSchema = exports.apigeeXAdapterConfigSchema = exports.apigeeAdapterAuthServiceAccountSchema = exports.apigeeAdapterAuthOauth2Schema = exports.graviteeAdapterConfigSchema = exports.graviteeAdapterAuthIdpSchema = exports.graviteeAdapterAuthStaticSchema = exports.rbacConfigSchema = exports.rbacScopeItemsSchema = exports.seoConfigSchema = exports.apiConfigSchema = exports.redirectsConfigSchema = exports.redirectConfigSchema = exports.ssoConfigSchema = exports.ssoDirectConfigSchema = exports.authProviderConfigSchema = exports.saml2ProviderConfigSchema = exports.oidcProviderConfigSchema = exports.oidcIssuerMetadataSchema = void 0;
3
+ exports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.l10nConfigSchema = exports.devOnboardingAdapterConfigSchema = exports.apigeeEdgeAdapterConfigSchema = exports.apigeeXAdapterConfigSchema = exports.apigeeAdapterAuthServiceAccountSchema = exports.apigeeAdapterAuthOauth2Schema = exports.graviteeAdapterConfigSchema = exports.graviteeAdapterAuthIdpSchema = exports.graviteeAdapterAuthStaticSchema = exports.rbacConfigSchema = exports.rbacScopeItemsSchema = exports.apiFunctionsConfigSchema = exports.seoConfigSchema = exports.apiConfigSchema = exports.redirectsConfigSchema = exports.redirectConfigSchema = exports.ssoConfigSchema = exports.ssoDirectConfigSchema = exports.authProviderConfigSchema = exports.saml2ProviderConfigSchema = exports.oidcProviderConfigSchema = exports.oidcIssuerMetadataSchema = void 0;
4
4
  const constants_1 = require("./constants");
5
5
  const default_theme_config_schema_1 = require("./default-theme-config-schema");
6
6
  const feedback_config_schema_1 = require("./feedback-config-schema");
@@ -166,6 +166,13 @@ exports.seoConfigSchema = {
166
166
  },
167
167
  additionalProperties: false,
168
168
  };
169
+ exports.apiFunctionsConfigSchema = {
170
+ type: 'object',
171
+ properties: {
172
+ folders: { type: 'array', items: { type: 'string' } },
173
+ },
174
+ additionalProperties: false,
175
+ };
169
176
  exports.rbacScopeItemsSchema = {
170
177
  type: 'object',
171
178
  additionalProperties: { type: 'string' },
@@ -326,6 +333,7 @@ exports.redoclyConfigSchema = {
326
333
  redirects: exports.redirectsConfigSchema,
327
334
  seo: exports.seoConfigSchema,
328
335
  rbac: exports.rbacConfigSchema,
336
+ apiFunctions: exports.apiFunctionsConfigSchema,
329
337
  requiresLogin: { type: 'boolean' },
330
338
  responseHeaders: {
331
339
  type: 'object',
@@ -0,0 +1,41 @@
1
+ import type { RedoclyConfig } from './config-types';
2
+ export type ApiFunctionsRequest = {
3
+ raw: Request;
4
+ headers: Record<string, any>;
5
+ params: Record<string, any>;
6
+ query: Record<string, any>;
7
+ cookies: Record<string, any>;
8
+ body: ReadableStream<Uint8Array> | null;
9
+ };
10
+ export type ApiFunctionsResponse = {
11
+ raw: Response;
12
+ status: (code: number) => ApiFunctionsResponse;
13
+ json: (data: object) => Response;
14
+ text: (data: string, code?: number) => Response;
15
+ send: (data: string | Buffer | object) => Response;
16
+ redirect: (url: string, code?: number) => Response;
17
+ cookie: (name: string, value: string, options?: CookieOptions) => ApiFunctionsResponse;
18
+ clearCookie: (name: string) => ApiFunctionsResponse;
19
+ };
20
+ export type ApiFunctionsContext = {
21
+ user: {
22
+ teams: string[];
23
+ claims: Record<string, any>;
24
+ email: string | undefined;
25
+ idpAccessToken: string | undefined;
26
+ idpId: string | undefined;
27
+ };
28
+ config: RedoclyConfig;
29
+ };
30
+ export interface CookieOptions {
31
+ domain?: string;
32
+ expires?: Date;
33
+ httpOnly?: boolean;
34
+ maxAge?: number;
35
+ path?: string;
36
+ secure?: boolean;
37
+ signed?: boolean;
38
+ sameSite?: 'Strict' | 'Lax' | 'None';
39
+ }
40
+ export type ServerPropsContext = ApiFunctionsContext;
41
+ export type ServerPropsRequest = ApiFunctionsRequest;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=api-functions-types.js.map
@@ -1,2 +1,3 @@
1
+ export * from './api-functions-types';
1
2
  export * from './config-types';
2
3
  export * from './portal-shared-types';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api-functions-types"), exports);
17
18
  __exportStar(require("./config-types"), exports);
18
19
  __exportStar(require("./portal-shared-types"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -844,6 +844,13 @@ export declare const themeConfigSchema: {
844
844
  readonly type: "boolean";
845
845
  readonly default: false;
846
846
  };
847
+ readonly suggestions: {
848
+ readonly default: readonly [];
849
+ readonly type: "array";
850
+ readonly items: {
851
+ readonly type: "string";
852
+ };
853
+ };
847
854
  readonly prompt: {
848
855
  readonly type: "string";
849
856
  };
@@ -4840,6 +4847,13 @@ export declare const closedThemeConfigSchema: {
4840
4847
  readonly type: "boolean";
4841
4848
  readonly default: false;
4842
4849
  };
4850
+ readonly suggestions: {
4851
+ readonly default: readonly [];
4852
+ readonly type: "array";
4853
+ readonly items: {
4854
+ readonly type: "string";
4855
+ };
4856
+ };
4843
4857
  readonly prompt: {
4844
4858
  readonly type: "string";
4845
4859
  };
@@ -194,6 +194,13 @@ export declare const aiSearchConfigSchema: {
194
194
  readonly type: "boolean";
195
195
  readonly default: false;
196
196
  };
197
+ readonly suggestions: {
198
+ readonly default: readonly [];
199
+ readonly type: "array";
200
+ readonly items: {
201
+ readonly type: "string";
202
+ };
203
+ };
197
204
  readonly prompt: {
198
205
  readonly type: "string";
199
206
  };
@@ -847,6 +854,13 @@ export declare const searchConfigSchema: {
847
854
  readonly type: "boolean";
848
855
  readonly default: false;
849
856
  };
857
+ readonly suggestions: {
858
+ readonly default: readonly [];
859
+ readonly type: "array";
860
+ readonly items: {
861
+ readonly type: "string";
862
+ };
863
+ };
850
864
  readonly prompt: {
851
865
  readonly type: "string";
852
866
  };
@@ -84,6 +84,13 @@ export const aiSearchConfigSchema = {
84
84
  type: 'boolean',
85
85
  default: false,
86
86
  },
87
+ suggestions: {
88
+ default: [],
89
+ type: 'array',
90
+ items: {
91
+ type: 'string',
92
+ },
93
+ },
87
94
  prompt: {
88
95
  type: 'string',
89
96
  },
@@ -433,6 +433,13 @@ export declare const productThemeOverrideSchema: {
433
433
  readonly type: "boolean";
434
434
  readonly default: false;
435
435
  };
436
+ readonly suggestions: {
437
+ readonly default: readonly [];
438
+ readonly type: "array";
439
+ readonly items: {
440
+ readonly type: "string";
441
+ };
442
+ };
436
443
  readonly prompt: {
437
444
  readonly type: "string";
438
445
  };
@@ -7621,6 +7628,13 @@ export declare const productConfigOverrideSchema: {
7621
7628
  readonly type: "boolean";
7622
7629
  readonly default: false;
7623
7630
  };
7631
+ readonly suggestions: {
7632
+ readonly default: readonly [];
7633
+ readonly type: "array";
7634
+ readonly items: {
7635
+ readonly type: "string";
7636
+ };
7637
+ };
7624
7638
  readonly prompt: {
7625
7639
  readonly type: "string";
7626
7640
  };
@@ -10296,6 +10310,13 @@ export declare const productConfigOverrideSchema: {
10296
10310
  readonly type: "boolean";
10297
10311
  readonly default: false;
10298
10312
  };
10313
+ readonly suggestions: {
10314
+ readonly default: readonly [];
10315
+ readonly type: "array";
10316
+ readonly items: {
10317
+ readonly type: "string";
10318
+ };
10319
+ };
10299
10320
  readonly prompt: {
10300
10321
  readonly type: "string";
10301
10322
  };
@@ -29,7 +29,7 @@ export declare const reuniteConfigSchema: {
29
29
  };
30
30
  readonly agent: {
31
31
  readonly type: "string";
32
- readonly enum: readonly ["spot"];
32
+ readonly enum: readonly ["respect"];
33
33
  };
34
34
  readonly trigger: {
35
35
  readonly type: "object";
@@ -63,7 +63,7 @@ export const reuniteConfigSchema = {
63
63
  },
64
64
  agent: {
65
65
  type: 'string',
66
- enum: ['spot'],
66
+ enum: ['respect'],
67
67
  },
68
68
  trigger: jobTriggerSchema,
69
69
  inputs: jobInputsSchema,
@@ -5039,6 +5039,18 @@ export declare const seoConfigSchema: {
5039
5039
  };
5040
5040
  readonly additionalProperties: false;
5041
5041
  };
5042
+ export declare const apiFunctionsConfigSchema: {
5043
+ readonly type: "object";
5044
+ readonly properties: {
5045
+ readonly folders: {
5046
+ readonly type: "array";
5047
+ readonly items: {
5048
+ readonly type: "string";
5049
+ };
5050
+ };
5051
+ };
5052
+ readonly additionalProperties: false;
5053
+ };
5042
5054
  export declare const rbacScopeItemsSchema: {
5043
5055
  readonly type: "object";
5044
5056
  readonly additionalProperties: {
@@ -5737,6 +5749,18 @@ export declare const redoclyConfigSchema: {
5737
5749
  };
5738
5750
  };
5739
5751
  };
5752
+ readonly apiFunctions: {
5753
+ readonly type: "object";
5754
+ readonly properties: {
5755
+ readonly folders: {
5756
+ readonly type: "array";
5757
+ readonly items: {
5758
+ readonly type: "string";
5759
+ };
5760
+ };
5761
+ };
5762
+ readonly additionalProperties: false;
5763
+ };
5740
5764
  readonly requiresLogin: {
5741
5765
  readonly type: "boolean";
5742
5766
  };
@@ -11591,6 +11615,13 @@ export declare const redoclyConfigSchema: {
11591
11615
  readonly type: "boolean";
11592
11616
  readonly default: false;
11593
11617
  };
11618
+ readonly suggestions: {
11619
+ readonly default: readonly [];
11620
+ readonly type: "array";
11621
+ readonly items: {
11622
+ readonly type: "string";
11623
+ };
11624
+ };
11594
11625
  readonly prompt: {
11595
11626
  readonly type: "string";
11596
11627
  };
@@ -14771,7 +14802,7 @@ export declare const redoclyConfigSchema: {
14771
14802
  };
14772
14803
  readonly agent: {
14773
14804
  readonly type: "string";
14774
- readonly enum: readonly ["spot"];
14805
+ readonly enum: readonly ["respect"];
14775
14806
  };
14776
14807
  readonly trigger: {
14777
14808
  readonly type: "object";
@@ -15668,6 +15699,13 @@ export declare const redoclyConfigSchema: {
15668
15699
  readonly type: "boolean";
15669
15700
  readonly default: false;
15670
15701
  };
15702
+ readonly suggestions: {
15703
+ readonly default: readonly [];
15704
+ readonly type: "array";
15705
+ readonly items: {
15706
+ readonly type: "string";
15707
+ };
15708
+ };
15671
15709
  readonly prompt: {
15672
15710
  readonly type: "string";
15673
15711
  };
@@ -19519,6 +19557,12 @@ export declare const rootRedoclyConfigSchema: {
19519
19557
  hide: {
19520
19558
  type: "boolean";
19521
19559
  };
19560
+ suggestions: {
19561
+ items: {
19562
+ type: "string";
19563
+ };
19564
+ type: "array";
19565
+ };
19522
19566
  prompt: {
19523
19567
  type: "string";
19524
19568
  };
@@ -22424,6 +22468,18 @@ export declare const rootRedoclyConfigSchema: {
22424
22468
  };
22425
22469
  type: "object";
22426
22470
  };
22471
+ apiFunctions: {
22472
+ properties: {
22473
+ folders: {
22474
+ items: {
22475
+ type: "string";
22476
+ };
22477
+ type: "array";
22478
+ };
22479
+ };
22480
+ additionalProperties: false;
22481
+ type: "object";
22482
+ };
22427
22483
  requiresLogin: {
22428
22484
  type: "boolean";
22429
22485
  };
@@ -26460,7 +26516,7 @@ export declare const rootRedoclyConfigSchema: {
26460
26516
  required: "event"[];
26461
26517
  };
26462
26518
  agent: {
26463
- enum: "spot"[];
26519
+ enum: "respect"[];
26464
26520
  type: "string";
26465
26521
  };
26466
26522
  inputs: {
@@ -26986,6 +27042,12 @@ export declare const rootRedoclyConfigSchema: {
26986
27042
  hide: {
26987
27043
  type: "boolean";
26988
27044
  };
27045
+ suggestions: {
27046
+ items: {
27047
+ type: "string";
27048
+ };
27049
+ type: "array";
27050
+ };
26989
27051
  prompt: {
26990
27052
  type: "string";
26991
27053
  };
@@ -29682,6 +29744,18 @@ export declare const rootRedoclyConfigSchema: {
29682
29744
  };
29683
29745
  };
29684
29746
  };
29747
+ readonly apiFunctions: {
29748
+ readonly type: "object";
29749
+ readonly properties: {
29750
+ readonly folders: {
29751
+ readonly type: "array";
29752
+ readonly items: {
29753
+ readonly type: "string";
29754
+ };
29755
+ };
29756
+ };
29757
+ readonly additionalProperties: false;
29758
+ };
29685
29759
  readonly requiresLogin: {
29686
29760
  readonly type: "boolean";
29687
29761
  };
@@ -35536,6 +35610,13 @@ export declare const rootRedoclyConfigSchema: {
35536
35610
  readonly type: "boolean";
35537
35611
  readonly default: false;
35538
35612
  };
35613
+ readonly suggestions: {
35614
+ readonly default: readonly [];
35615
+ readonly type: "array";
35616
+ readonly items: {
35617
+ readonly type: "string";
35618
+ };
35619
+ };
35539
35620
  readonly prompt: {
35540
35621
  readonly type: "string";
35541
35622
  };
@@ -38716,7 +38797,7 @@ export declare const rootRedoclyConfigSchema: {
38716
38797
  };
38717
38798
  readonly agent: {
38718
38799
  readonly type: "string";
38719
- readonly enum: readonly ["spot"];
38800
+ readonly enum: readonly ["respect"];
38720
38801
  };
38721
38802
  readonly trigger: {
38722
38803
  readonly type: "object";
@@ -39613,6 +39694,13 @@ export declare const rootRedoclyConfigSchema: {
39613
39694
  readonly type: "boolean";
39614
39695
  readonly default: false;
39615
39696
  };
39697
+ readonly suggestions: {
39698
+ readonly default: readonly [];
39699
+ readonly type: "array";
39700
+ readonly items: {
39701
+ readonly type: "string";
39702
+ };
39703
+ };
39616
39704
  readonly prompt: {
39617
39705
  readonly type: "string";
39618
39706
  };
@@ -163,6 +163,13 @@ export const seoConfigSchema = {
163
163
  },
164
164
  additionalProperties: false,
165
165
  };
166
+ export const apiFunctionsConfigSchema = {
167
+ type: 'object',
168
+ properties: {
169
+ folders: { type: 'array', items: { type: 'string' } },
170
+ },
171
+ additionalProperties: false,
172
+ };
166
173
  export const rbacScopeItemsSchema = {
167
174
  type: 'object',
168
175
  additionalProperties: { type: 'string' },
@@ -323,6 +330,7 @@ export const redoclyConfigSchema = {
323
330
  redirects: redirectsConfigSchema,
324
331
  seo: seoConfigSchema,
325
332
  rbac: rbacConfigSchema,
333
+ apiFunctions: apiFunctionsConfigSchema,
326
334
  requiresLogin: { type: 'boolean' },
327
335
  responseHeaders: {
328
336
  type: 'object',
@@ -0,0 +1,41 @@
1
+ import type { RedoclyConfig } from './config-types';
2
+ export type ApiFunctionsRequest = {
3
+ raw: Request;
4
+ headers: Record<string, any>;
5
+ params: Record<string, any>;
6
+ query: Record<string, any>;
7
+ cookies: Record<string, any>;
8
+ body: ReadableStream<Uint8Array> | null;
9
+ };
10
+ export type ApiFunctionsResponse = {
11
+ raw: Response;
12
+ status: (code: number) => ApiFunctionsResponse;
13
+ json: (data: object) => Response;
14
+ text: (data: string, code?: number) => Response;
15
+ send: (data: string | Buffer | object) => Response;
16
+ redirect: (url: string, code?: number) => Response;
17
+ cookie: (name: string, value: string, options?: CookieOptions) => ApiFunctionsResponse;
18
+ clearCookie: (name: string) => ApiFunctionsResponse;
19
+ };
20
+ export type ApiFunctionsContext = {
21
+ user: {
22
+ teams: string[];
23
+ claims: Record<string, any>;
24
+ email: string | undefined;
25
+ idpAccessToken: string | undefined;
26
+ idpId: string | undefined;
27
+ };
28
+ config: RedoclyConfig;
29
+ };
30
+ export interface CookieOptions {
31
+ domain?: string;
32
+ expires?: Date;
33
+ httpOnly?: boolean;
34
+ maxAge?: number;
35
+ path?: string;
36
+ secure?: boolean;
37
+ signed?: boolean;
38
+ sameSite?: 'Strict' | 'Lax' | 'None';
39
+ }
40
+ export type ServerPropsContext = ApiFunctionsContext;
41
+ export type ServerPropsRequest = ApiFunctionsRequest;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=api-functions-types.js.map
@@ -1,2 +1,3 @@
1
+ export * from './api-functions-types';
1
2
  export * from './config-types';
2
3
  export * from './portal-shared-types';
@@ -1,3 +1,4 @@
1
+ export * from './api-functions-types';
1
2
  export * from './config-types';
2
3
  export * from './portal-shared-types';
3
4
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@redocly/config",
3
- "version": "0.20.3",
3
+ "version": "0.22.0",
4
4
  "license": "MIT",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
7
7
  "types": "./lib/index.d.ts",
8
8
  "devDependencies": {
9
9
  "@markdoc/markdoc": "0.4.0",
10
+ "@types/node": "^22.10.7",
10
11
  "@types/react": "18.3.9",
11
- "react-router-dom": "6.21.1",
12
12
  "json-schema-to-ts": "2.7.2",
13
+ "react-router-dom": "6.21.1",
13
14
  "rimraf": "5.0.7",
14
15
  "typescript": "5.6.2"
15
16
  },