@redocly/config 0.38.0 → 0.39.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.
@@ -5534,6 +5534,17 @@ export declare const themeConfigSchema: {
5534
5534
  };
5535
5535
  };
5536
5536
  };
5537
+ readonly scorecards: {
5538
+ readonly type: "object";
5539
+ readonly additionalProperties: true;
5540
+ readonly required: readonly [];
5541
+ readonly properties: {
5542
+ readonly test: {
5543
+ readonly type: "boolean";
5544
+ readonly default: true;
5545
+ };
5546
+ };
5547
+ };
5537
5548
  };
5538
5549
  readonly additionalProperties: true;
5539
5550
  };
@@ -42,6 +42,7 @@ exports.themeConfigSchema = {
42
42
  entitiesCatalog: entities_catalog_config_schema_1.entitiesCatalogConfigSchema,
43
43
  catalogClassic: ex_theme_config_schemas_1.catalogsConfigSchema,
44
44
  scorecard: ex_theme_config_schemas_1.scorecardConfigSchema,
45
+ scorecards: ex_theme_config_schemas_1.scorecardsConfigSchema,
45
46
  },
46
47
  additionalProperties: true,
47
48
  };
@@ -4453,3 +4453,14 @@ export declare const scorecardConfigSchema: {
4453
4453
  };
4454
4454
  };
4455
4455
  };
4456
+ export declare const scorecardsConfigSchema: {
4457
+ readonly type: "object";
4458
+ readonly additionalProperties: true;
4459
+ readonly required: readonly [];
4460
+ readonly properties: {
4461
+ readonly test: {
4462
+ readonly type: "boolean";
4463
+ readonly default: true;
4464
+ };
4465
+ };
4466
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.colorModeConfigSchema = exports.aiAssistantSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0;
3
+ exports.scorecardsConfigSchema = exports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.colorModeConfigSchema = exports.aiAssistantSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0;
4
4
  const redoc_config_schema_1 = require("./redoc-config-schema");
5
5
  const reference_docs_config_schema_1 = require("./reference-docs-config-schema");
6
6
  const common_1 = require("./common");
@@ -658,4 +658,12 @@ exports.scorecardConfigSchema = {
658
658
  fromProjectUrl: { type: 'string', format: 'uri' },
659
659
  },
660
660
  };
661
+ exports.scorecardsConfigSchema = {
662
+ type: 'object',
663
+ additionalProperties: true,
664
+ required: [],
665
+ properties: {
666
+ test: { type: 'boolean', default: true },
667
+ },
668
+ };
661
669
  //# sourceMappingURL=ex-theme-config-schemas.js.map
@@ -11887,6 +11887,17 @@ export declare const redoclyConfigSchema: {
11887
11887
  };
11888
11888
  };
11889
11889
  };
11890
+ readonly scorecards: {
11891
+ readonly type: "object";
11892
+ readonly additionalProperties: true;
11893
+ readonly required: readonly [];
11894
+ readonly properties: {
11895
+ readonly test: {
11896
+ readonly type: "boolean";
11897
+ readonly default: true;
11898
+ };
11899
+ };
11900
+ };
11890
11901
  };
11891
11902
  readonly additionalProperties: true;
11892
11903
  };
@@ -17535,6 +17546,17 @@ export declare const redoclyConfigSchema: {
17535
17546
  };
17536
17547
  };
17537
17548
  };
17549
+ readonly scorecards: {
17550
+ readonly type: "object";
17551
+ readonly additionalProperties: true;
17552
+ readonly required: readonly [];
17553
+ readonly properties: {
17554
+ readonly test: {
17555
+ readonly type: "boolean";
17556
+ readonly default: true;
17557
+ };
17558
+ };
17559
+ };
17538
17560
  readonly mcp: {
17539
17561
  readonly type: "object";
17540
17562
  readonly properties: {
@@ -26675,6 +26697,16 @@ export declare const rootRedoclyConfigSchema: {
26675
26697
  type: "object";
26676
26698
  required: never[];
26677
26699
  };
26700
+ scorecards: {
26701
+ properties: {
26702
+ test: {
26703
+ type: "boolean";
26704
+ };
26705
+ };
26706
+ additionalProperties: true;
26707
+ type: "object";
26708
+ required: never[];
26709
+ };
26678
26710
  imports: {
26679
26711
  items: {
26680
26712
  type: "string";
@@ -32145,6 +32177,16 @@ export declare const rootRedoclyConfigSchema: {
32145
32177
  type: "object";
32146
32178
  required: never[];
32147
32179
  };
32180
+ scorecards: {
32181
+ properties: {
32182
+ test: {
32183
+ type: "boolean";
32184
+ };
32185
+ };
32186
+ additionalProperties: true;
32187
+ type: "object";
32188
+ required: never[];
32189
+ };
32148
32190
  mcp: {
32149
32191
  properties: {
32150
32192
  hide: {
@@ -40388,6 +40430,17 @@ export declare const rootRedoclyConfigSchema: {
40388
40430
  };
40389
40431
  };
40390
40432
  };
40433
+ readonly scorecards: {
40434
+ readonly type: "object";
40435
+ readonly additionalProperties: true;
40436
+ readonly required: readonly [];
40437
+ readonly properties: {
40438
+ readonly test: {
40439
+ readonly type: "boolean";
40440
+ readonly default: true;
40441
+ };
40442
+ };
40443
+ };
40391
40444
  };
40392
40445
  readonly additionalProperties: true;
40393
40446
  };
@@ -46036,6 +46089,17 @@ export declare const rootRedoclyConfigSchema: {
46036
46089
  };
46037
46090
  };
46038
46091
  };
46092
+ readonly scorecards: {
46093
+ readonly type: "object";
46094
+ readonly additionalProperties: true;
46095
+ readonly required: readonly [];
46096
+ readonly properties: {
46097
+ readonly test: {
46098
+ readonly type: "boolean";
46099
+ readonly default: true;
46100
+ };
46101
+ };
46102
+ };
46039
46103
  readonly mcp: {
46040
46104
  readonly type: "object";
46041
46105
  readonly properties: {
@@ -443,7 +443,7 @@ exports.redoclyConfigSchema = {
443
443
  /**
444
444
  * @deprecated Should use `catalogClassic` instead
445
445
  */
446
- catalog: ex_theme_config_schemas_1.catalogsConfigSchema, entitiesCatalog: entities_catalog_config_schema_1.entitiesCatalogConfigSchema, catalogClassic: ex_theme_config_schemas_1.catalogsConfigSchema, scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, mcp: mcpConfigSchema }),
446
+ catalog: ex_theme_config_schemas_1.catalogsConfigSchema, entitiesCatalog: entities_catalog_config_schema_1.entitiesCatalogConfigSchema, catalogClassic: ex_theme_config_schemas_1.catalogsConfigSchema, scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, scorecards: ex_theme_config_schemas_1.scorecardsConfigSchema, mcp: mcpConfigSchema }),
447
447
  default: { redirects: {}, seo: exports.seoConfigSchema.default },
448
448
  additionalProperties: true,
449
449
  };
@@ -30,6 +30,7 @@ export type ApiFunctionsContext = {
30
30
  params: Record<string, string | string[]>;
31
31
  query: Record<string, string | string[]>;
32
32
  cookies: Record<string, string>;
33
+ getStorage: () => Promise<KvService>;
33
34
  /**
34
35
  * @deprecated `telemetry` is deprecated.
35
36
  */
@@ -39,6 +40,53 @@ export type ApiFunctionsContext = {
39
40
  } & Record<string, string | number>) => void;
40
41
  };
41
42
  } & ApiFunctionsContextMethods;
43
+ export type KvService = {
44
+ get: <T extends KvValue = KvValue>(key: KvKey) => Promise<KvReadSchema<T> | null>;
45
+ getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(KvReadSchema<T> | null)[]>;
46
+ list: <T extends KvValue = KvValue>(selector: KvListSelector, options?: KvListOptions) => Promise<KvListResponse<T>>;
47
+ set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<string | null>;
48
+ delete: (key: KvKey) => Promise<boolean>;
49
+ clearExpired: () => Promise<void>;
50
+ transaction: <T>(operation: (tx: KvTransaction) => Promise<T>) => Promise<T>;
51
+ };
52
+ export type KvValue = Record<string, unknown> | unknown[] | unknown;
53
+ export type KvKeyPart = string | number | boolean;
54
+ export type KvKey = KvKeyPart[];
55
+ export type KvSetOptions = {
56
+ ttlInSeconds?: number;
57
+ };
58
+ export type KvReadSchema<T extends KvValue = KvValue> = {
59
+ key: KvKey;
60
+ value: T | null;
61
+ };
62
+ export type KvListSelector = {
63
+ prefix: KvKey;
64
+ } | {
65
+ prefix: KvKey;
66
+ start: KvKey;
67
+ } | {
68
+ prefix: KvKey;
69
+ end: KvKey;
70
+ } | {
71
+ start: KvKey;
72
+ end: KvKey;
73
+ };
74
+ export type KvListOptions = {
75
+ limit?: number;
76
+ reverse?: boolean;
77
+ cursor?: string;
78
+ };
79
+ export type KvListResponse<T extends KvValue = KvValue> = {
80
+ items: KvReadSchema<T>[];
81
+ total: number;
82
+ cursor: string | null;
83
+ };
84
+ export type KvTransaction = {
85
+ get: <T extends KvValue = KvValue>(key: KvKey) => Promise<KvReadSchema<T> | null>;
86
+ getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(KvReadSchema<T> | null)[]>;
87
+ set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<string | null>;
88
+ delete: (key: KvKey) => Promise<boolean>;
89
+ };
42
90
  export type ApiRoutesHandler = (request: Request, context: ApiFunctionsContext,
43
91
  /**
44
92
  * @deprecated `staticData` is deprecated.
@@ -54,4 +102,4 @@ export interface CookieOptions {
54
102
  signed?: boolean;
55
103
  sameSite?: 'Strict' | 'Lax' | 'None';
56
104
  }
57
- export type ServerPropsContext = ApiFunctionsContext;
105
+ export type ServerPropsContext = Omit<ApiFunctionsContext, 'getStorage'>;
@@ -4,7 +4,7 @@ import type { productConfigOverrideSchema } from '../product-override-schema';
4
4
  import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, l10nConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoDirectConfigSchema } from '../root-config-schema';
5
5
  import type { RedocConfigTypes } from './redoc-types';
6
6
  import type { GraphQLConfigTypes } from './graphql-types';
7
- import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, catalogFilterSchema, catalogSchema, searchFacetsConfigSchema } from '../ex-theme-config-schemas';
7
+ import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, scorecardsConfigSchema, catalogFilterSchema, catalogSchema, searchFacetsConfigSchema } from '../ex-theme-config-schemas';
8
8
  import type { reuniteConfigSchema } from '../reunite-config-schema';
9
9
  import type { optionalEmailSettings, reasonsSettings } from '../feedback-config-schema';
10
10
  /**
@@ -27,6 +27,7 @@ export type CatalogConfig = FromSchema<typeof catalogSchema>;
27
27
  export type CatalogFilterConfig = FromSchema<typeof catalogFilterSchema>;
28
28
  export type ReuniteConfig = FromSchema<typeof reuniteConfigSchema>;
29
29
  export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
30
+ export type ScorecardsConfig = FromSchema<typeof scorecardsConfigSchema>;
30
31
  export type SearchFacetsConfig = FromSchema<typeof searchFacetsConfigSchema>;
31
32
  export type RedoclyConfig = Omit<FromSchema<typeof rootRedoclyConfigSchema>, 'theme' | 'apis'> & {
32
33
  /**
@@ -3,7 +3,7 @@ import type { LayoutVariant, REDOCLY_ROUTE_RBAC, REDOCLY_TEAMS_RBAC } from '../c
3
3
  import type { ProductConfig, ProductGoogleAnalyticsConfig, RbacScopeItems, RedoclyConfig, SeoConfig } from './config-types';
4
4
  import type { CatalogEntityConfig } from './catalog-entity-types';
5
5
  export * from './code-walkthrough-types';
6
- export type UiAccessibleConfig = Pick<RedoclyConfig, 'logo' | 'navbar' | 'products' | 'footer' | 'sidebar' | 'scripts' | 'links' | 'feedback' | 'search' | 'aiAssistant' | 'colorMode' | 'navigation' | 'codeSnippet' | 'markdown' | 'openapi' | 'graphql' | 'analytics' | 'userMenu' | 'versionPicker' | 'breadcrumbs' | 'catalog' | 'scorecard' | 'entitiesCatalog' | 'mcp'> & {
6
+ export type UiAccessibleConfig = Pick<RedoclyConfig, 'logo' | 'navbar' | 'products' | 'footer' | 'sidebar' | 'scripts' | 'links' | 'feedback' | 'search' | 'aiAssistant' | 'colorMode' | 'navigation' | 'codeSnippet' | 'markdown' | 'openapi' | 'graphql' | 'analytics' | 'userMenu' | 'versionPicker' | 'breadcrumbs' | 'catalog' | 'scorecard' | 'scorecards' | 'entitiesCatalog' | 'mcp'> & {
7
7
  auth?: {
8
8
  idpsInfo?: {
9
9
  idpId: string;
@@ -44,6 +44,7 @@ export type ResolvedNavLinkItem = {
44
44
  routeSlug?: string;
45
45
  active?: boolean;
46
46
  deprecated?: boolean;
47
+ isAdditionalOperation?: boolean;
47
48
  icon?: string;
48
49
  srcSet?: string;
49
50
  [REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
@@ -0,0 +1,3 @@
1
+ export type ScorecardsConfig = {
2
+ test: boolean;
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=scorecards-types.js.map
@@ -5534,6 +5534,17 @@ export declare const themeConfigSchema: {
5534
5534
  };
5535
5535
  };
5536
5536
  };
5537
+ readonly scorecards: {
5538
+ readonly type: "object";
5539
+ readonly additionalProperties: true;
5540
+ readonly required: readonly [];
5541
+ readonly properties: {
5542
+ readonly test: {
5543
+ readonly type: "boolean";
5544
+ readonly default: true;
5545
+ };
5546
+ };
5547
+ };
5537
5548
  };
5538
5549
  readonly additionalProperties: true;
5539
5550
  };
@@ -1,6 +1,6 @@
1
1
  import { graphqlConfigSchema } from './graphql-config-schema';
2
2
  import { feedbackConfigSchema } from './feedback-config-schema';
3
- import { logoConfigSchema, analyticsConfigSchema, breadcrumbsConfigSchema, catalogsConfigSchema, codeSnippetConfigSchema, colorModeConfigSchema, footerConfigSchema, linksConfigSchema, markdownConfigSchema, navbarConfigSchema, navigationConfigSchema, openapiConfigSchema, productsConfigSchema, scorecardConfigSchema, scriptsConfigSchema, searchConfigSchema, aiAssistantSchema, sidebarConfigSchema, userMenuConfigSchema, versionPickerConfigSchema, } from './ex-theme-config-schemas';
3
+ import { logoConfigSchema, analyticsConfigSchema, breadcrumbsConfigSchema, catalogsConfigSchema, codeSnippetConfigSchema, colorModeConfigSchema, footerConfigSchema, linksConfigSchema, markdownConfigSchema, navbarConfigSchema, navigationConfigSchema, openapiConfigSchema, productsConfigSchema, scorecardConfigSchema, scriptsConfigSchema, searchConfigSchema, aiAssistantSchema, sidebarConfigSchema, userMenuConfigSchema, versionPickerConfigSchema, scorecardsConfigSchema, } from './ex-theme-config-schemas';
4
4
  import { entitiesCatalogConfigSchema } from './entities-catalog-config-schema';
5
5
  export const themeConfigSchema = {
6
6
  type: 'object',
@@ -39,6 +39,7 @@ export const themeConfigSchema = {
39
39
  entitiesCatalog: entitiesCatalogConfigSchema,
40
40
  catalogClassic: catalogsConfigSchema,
41
41
  scorecard: scorecardConfigSchema,
42
+ scorecards: scorecardsConfigSchema,
42
43
  },
43
44
  additionalProperties: true,
44
45
  };
@@ -4453,3 +4453,14 @@ export declare const scorecardConfigSchema: {
4453
4453
  };
4454
4454
  };
4455
4455
  };
4456
+ export declare const scorecardsConfigSchema: {
4457
+ readonly type: "object";
4458
+ readonly additionalProperties: true;
4459
+ readonly required: readonly [];
4460
+ readonly properties: {
4461
+ readonly test: {
4462
+ readonly type: "boolean";
4463
+ readonly default: true;
4464
+ };
4465
+ };
4466
+ };
@@ -655,4 +655,12 @@ export const scorecardConfigSchema = {
655
655
  fromProjectUrl: { type: 'string', format: 'uri' },
656
656
  },
657
657
  };
658
+ export const scorecardsConfigSchema = {
659
+ type: 'object',
660
+ additionalProperties: true,
661
+ required: [],
662
+ properties: {
663
+ test: { type: 'boolean', default: true },
664
+ },
665
+ };
658
666
  //# sourceMappingURL=ex-theme-config-schemas.js.map
@@ -11887,6 +11887,17 @@ export declare const redoclyConfigSchema: {
11887
11887
  };
11888
11888
  };
11889
11889
  };
11890
+ readonly scorecards: {
11891
+ readonly type: "object";
11892
+ readonly additionalProperties: true;
11893
+ readonly required: readonly [];
11894
+ readonly properties: {
11895
+ readonly test: {
11896
+ readonly type: "boolean";
11897
+ readonly default: true;
11898
+ };
11899
+ };
11900
+ };
11890
11901
  };
11891
11902
  readonly additionalProperties: true;
11892
11903
  };
@@ -17535,6 +17546,17 @@ export declare const redoclyConfigSchema: {
17535
17546
  };
17536
17547
  };
17537
17548
  };
17549
+ readonly scorecards: {
17550
+ readonly type: "object";
17551
+ readonly additionalProperties: true;
17552
+ readonly required: readonly [];
17553
+ readonly properties: {
17554
+ readonly test: {
17555
+ readonly type: "boolean";
17556
+ readonly default: true;
17557
+ };
17558
+ };
17559
+ };
17538
17560
  readonly mcp: {
17539
17561
  readonly type: "object";
17540
17562
  readonly properties: {
@@ -26675,6 +26697,16 @@ export declare const rootRedoclyConfigSchema: {
26675
26697
  type: "object";
26676
26698
  required: never[];
26677
26699
  };
26700
+ scorecards: {
26701
+ properties: {
26702
+ test: {
26703
+ type: "boolean";
26704
+ };
26705
+ };
26706
+ additionalProperties: true;
26707
+ type: "object";
26708
+ required: never[];
26709
+ };
26678
26710
  imports: {
26679
26711
  items: {
26680
26712
  type: "string";
@@ -32145,6 +32177,16 @@ export declare const rootRedoclyConfigSchema: {
32145
32177
  type: "object";
32146
32178
  required: never[];
32147
32179
  };
32180
+ scorecards: {
32181
+ properties: {
32182
+ test: {
32183
+ type: "boolean";
32184
+ };
32185
+ };
32186
+ additionalProperties: true;
32187
+ type: "object";
32188
+ required: never[];
32189
+ };
32148
32190
  mcp: {
32149
32191
  properties: {
32150
32192
  hide: {
@@ -40388,6 +40430,17 @@ export declare const rootRedoclyConfigSchema: {
40388
40430
  };
40389
40431
  };
40390
40432
  };
40433
+ readonly scorecards: {
40434
+ readonly type: "object";
40435
+ readonly additionalProperties: true;
40436
+ readonly required: readonly [];
40437
+ readonly properties: {
40438
+ readonly test: {
40439
+ readonly type: "boolean";
40440
+ readonly default: true;
40441
+ };
40442
+ };
40443
+ };
40391
40444
  };
40392
40445
  readonly additionalProperties: true;
40393
40446
  };
@@ -46036,6 +46089,17 @@ export declare const rootRedoclyConfigSchema: {
46036
46089
  };
46037
46090
  };
46038
46091
  };
46092
+ readonly scorecards: {
46093
+ readonly type: "object";
46094
+ readonly additionalProperties: true;
46095
+ readonly required: readonly [];
46096
+ readonly properties: {
46097
+ readonly test: {
46098
+ readonly type: "boolean";
46099
+ readonly default: true;
46100
+ };
46101
+ };
46102
+ };
46039
46103
  readonly mcp: {
46040
46104
  readonly type: "object";
46041
46105
  readonly properties: {
@@ -4,7 +4,7 @@ import { feedbackConfigSchema } from './feedback-config-schema';
4
4
  import { graphqlConfigSchema } from './graphql-config-schema';
5
5
  import { removePropertyRecursively } from './remove-property-recursively';
6
6
  import { reuniteConfigSchema } from './reunite-config-schema';
7
- import { analyticsConfigSchema, breadcrumbsConfigSchema, catalogsConfigSchema, codeSnippetConfigSchema, colorModeConfigSchema, footerConfigSchema, linksConfigSchema, logoConfigSchema, markdownConfigSchema, navbarConfigSchema, navigationConfigSchema, openapiConfigSchema, productsConfigSchema, scorecardConfigSchema, scriptsConfigSchema, searchConfigSchema, aiAssistantSchema, sidebarConfigSchema, userMenuConfigSchema, versionPickerConfigSchema, } from './ex-theme-config-schemas';
7
+ import { analyticsConfigSchema, breadcrumbsConfigSchema, catalogsConfigSchema, codeSnippetConfigSchema, colorModeConfigSchema, footerConfigSchema, linksConfigSchema, logoConfigSchema, markdownConfigSchema, navbarConfigSchema, navigationConfigSchema, openapiConfigSchema, productsConfigSchema, scorecardConfigSchema, scorecardsConfigSchema, scriptsConfigSchema, searchConfigSchema, aiAssistantSchema, sidebarConfigSchema, userMenuConfigSchema, versionPickerConfigSchema, } from './ex-theme-config-schemas';
8
8
  import { entitiesCatalogConfigSchema } from './entities-catalog-config-schema';
9
9
  import { ruleSchemas, preprocessorSchemas, decoratorsSchemas } from './common';
10
10
  export const oidcIssuerMetadataSchema = {
@@ -440,7 +440,7 @@ export const redoclyConfigSchema = {
440
440
  /**
441
441
  * @deprecated Should use `catalogClassic` instead
442
442
  */
443
- catalog: catalogsConfigSchema, entitiesCatalog: entitiesCatalogConfigSchema, catalogClassic: catalogsConfigSchema, scorecard: scorecardConfigSchema, mcp: mcpConfigSchema }),
443
+ catalog: catalogsConfigSchema, entitiesCatalog: entitiesCatalogConfigSchema, catalogClassic: catalogsConfigSchema, scorecard: scorecardConfigSchema, scorecards: scorecardsConfigSchema, mcp: mcpConfigSchema }),
444
444
  default: { redirects: {}, seo: seoConfigSchema.default },
445
445
  additionalProperties: true,
446
446
  };
@@ -30,6 +30,7 @@ export type ApiFunctionsContext = {
30
30
  params: Record<string, string | string[]>;
31
31
  query: Record<string, string | string[]>;
32
32
  cookies: Record<string, string>;
33
+ getStorage: () => Promise<KvService>;
33
34
  /**
34
35
  * @deprecated `telemetry` is deprecated.
35
36
  */
@@ -39,6 +40,53 @@ export type ApiFunctionsContext = {
39
40
  } & Record<string, string | number>) => void;
40
41
  };
41
42
  } & ApiFunctionsContextMethods;
43
+ export type KvService = {
44
+ get: <T extends KvValue = KvValue>(key: KvKey) => Promise<KvReadSchema<T> | null>;
45
+ getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(KvReadSchema<T> | null)[]>;
46
+ list: <T extends KvValue = KvValue>(selector: KvListSelector, options?: KvListOptions) => Promise<KvListResponse<T>>;
47
+ set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<string | null>;
48
+ delete: (key: KvKey) => Promise<boolean>;
49
+ clearExpired: () => Promise<void>;
50
+ transaction: <T>(operation: (tx: KvTransaction) => Promise<T>) => Promise<T>;
51
+ };
52
+ export type KvValue = Record<string, unknown> | unknown[] | unknown;
53
+ export type KvKeyPart = string | number | boolean;
54
+ export type KvKey = KvKeyPart[];
55
+ export type KvSetOptions = {
56
+ ttlInSeconds?: number;
57
+ };
58
+ export type KvReadSchema<T extends KvValue = KvValue> = {
59
+ key: KvKey;
60
+ value: T | null;
61
+ };
62
+ export type KvListSelector = {
63
+ prefix: KvKey;
64
+ } | {
65
+ prefix: KvKey;
66
+ start: KvKey;
67
+ } | {
68
+ prefix: KvKey;
69
+ end: KvKey;
70
+ } | {
71
+ start: KvKey;
72
+ end: KvKey;
73
+ };
74
+ export type KvListOptions = {
75
+ limit?: number;
76
+ reverse?: boolean;
77
+ cursor?: string;
78
+ };
79
+ export type KvListResponse<T extends KvValue = KvValue> = {
80
+ items: KvReadSchema<T>[];
81
+ total: number;
82
+ cursor: string | null;
83
+ };
84
+ export type KvTransaction = {
85
+ get: <T extends KvValue = KvValue>(key: KvKey) => Promise<KvReadSchema<T> | null>;
86
+ getMany: <T extends KvValue = KvValue>(keys: KvKey[]) => Promise<(KvReadSchema<T> | null)[]>;
87
+ set: <T extends KvValue = KvValue>(key: KvKey, value: T, options?: KvSetOptions) => Promise<string | null>;
88
+ delete: (key: KvKey) => Promise<boolean>;
89
+ };
42
90
  export type ApiRoutesHandler = (request: Request, context: ApiFunctionsContext,
43
91
  /**
44
92
  * @deprecated `staticData` is deprecated.
@@ -54,4 +102,4 @@ export interface CookieOptions {
54
102
  signed?: boolean;
55
103
  sameSite?: 'Strict' | 'Lax' | 'None';
56
104
  }
57
- export type ServerPropsContext = ApiFunctionsContext;
105
+ export type ServerPropsContext = Omit<ApiFunctionsContext, 'getStorage'>;
@@ -4,7 +4,7 @@ import type { productConfigOverrideSchema } from '../product-override-schema';
4
4
  import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, l10nConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoDirectConfigSchema } from '../root-config-schema';
5
5
  import type { RedocConfigTypes } from './redoc-types';
6
6
  import type { GraphQLConfigTypes } from './graphql-types';
7
- import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, catalogFilterSchema, catalogSchema, searchFacetsConfigSchema } from '../ex-theme-config-schemas';
7
+ import type { productConfigSchema, productGoogleAnalyticsConfigSchema, markdownConfigSchema, amplitudeAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, segmentAnalyticsConfigSchema, gtmAnalyticsConfigSchema, googleAnalyticsConfigSchema, scorecardConfigSchema, scorecardsConfigSchema, catalogFilterSchema, catalogSchema, searchFacetsConfigSchema } from '../ex-theme-config-schemas';
8
8
  import type { reuniteConfigSchema } from '../reunite-config-schema';
9
9
  import type { optionalEmailSettings, reasonsSettings } from '../feedback-config-schema';
10
10
  /**
@@ -27,6 +27,7 @@ export type CatalogConfig = FromSchema<typeof catalogSchema>;
27
27
  export type CatalogFilterConfig = FromSchema<typeof catalogFilterSchema>;
28
28
  export type ReuniteConfig = FromSchema<typeof reuniteConfigSchema>;
29
29
  export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
30
+ export type ScorecardsConfig = FromSchema<typeof scorecardsConfigSchema>;
30
31
  export type SearchFacetsConfig = FromSchema<typeof searchFacetsConfigSchema>;
31
32
  export type RedoclyConfig = Omit<FromSchema<typeof rootRedoclyConfigSchema>, 'theme' | 'apis'> & {
32
33
  /**
@@ -3,7 +3,7 @@ import type { LayoutVariant, REDOCLY_ROUTE_RBAC, REDOCLY_TEAMS_RBAC } from '../c
3
3
  import type { ProductConfig, ProductGoogleAnalyticsConfig, RbacScopeItems, RedoclyConfig, SeoConfig } from './config-types';
4
4
  import type { CatalogEntityConfig } from './catalog-entity-types';
5
5
  export * from './code-walkthrough-types';
6
- export type UiAccessibleConfig = Pick<RedoclyConfig, 'logo' | 'navbar' | 'products' | 'footer' | 'sidebar' | 'scripts' | 'links' | 'feedback' | 'search' | 'aiAssistant' | 'colorMode' | 'navigation' | 'codeSnippet' | 'markdown' | 'openapi' | 'graphql' | 'analytics' | 'userMenu' | 'versionPicker' | 'breadcrumbs' | 'catalog' | 'scorecard' | 'entitiesCatalog' | 'mcp'> & {
6
+ export type UiAccessibleConfig = Pick<RedoclyConfig, 'logo' | 'navbar' | 'products' | 'footer' | 'sidebar' | 'scripts' | 'links' | 'feedback' | 'search' | 'aiAssistant' | 'colorMode' | 'navigation' | 'codeSnippet' | 'markdown' | 'openapi' | 'graphql' | 'analytics' | 'userMenu' | 'versionPicker' | 'breadcrumbs' | 'catalog' | 'scorecard' | 'scorecards' | 'entitiesCatalog' | 'mcp'> & {
7
7
  auth?: {
8
8
  idpsInfo?: {
9
9
  idpId: string;
@@ -44,6 +44,7 @@ export type ResolvedNavLinkItem = {
44
44
  routeSlug?: string;
45
45
  active?: boolean;
46
46
  deprecated?: boolean;
47
+ isAdditionalOperation?: boolean;
47
48
  icon?: string;
48
49
  srcSet?: string;
49
50
  [REDOCLY_TEAMS_RBAC]?: RbacScopeItems;
@@ -0,0 +1,3 @@
1
+ export type ScorecardsConfig = {
2
+ test: boolean;
3
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scorecards-types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/config",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "license": "MIT",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",