@redocly/realm 0.136.0-next.11 → 0.136.0-next.12
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.
- package/CHANGELOG.md +11 -0
- package/dist/constants/api.d.ts +1 -0
- package/dist/constants/api.js +1 -1
- package/dist/server/constants/common.d.ts +1 -0
- package/dist/server/constants/common.js +1 -1
- package/dist/server/web-server/routes/ask-ai.d.ts +6 -0
- package/dist/server/web-server/routes/ask-ai.js +1 -1
- package/dist/server/web-server/routes/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @redocly/realm
|
|
2
2
|
|
|
3
|
+
## 0.136.0-next.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 931df5a101b: Fixed an issue where API docs callbacks failed to render when expanded.
|
|
8
|
+
|
|
9
|
+
Fixed an issue where deep links to callbacks navigated users to the operation instead.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [931df5a101b]
|
|
12
|
+
- @redocly/api-docs@0.1.0-next.4
|
|
13
|
+
|
|
3
14
|
## 0.136.0-next.11
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/constants/api.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare const ServerRoutes: {
|
|
|
33
33
|
readonly OTEL_TRACES: '/_otel/v1/traces';
|
|
34
34
|
readonly HEALTH: '/_health';
|
|
35
35
|
readonly ASK_AI: '/_ask-ai';
|
|
36
|
+
readonly AI_ASSISTANT_ESCALATIONS: '/_ai-assistant-escalations';
|
|
36
37
|
readonly CATALOG_ENTITIES: "/catalog-entities/:entityId?";
|
|
37
38
|
readonly CATALOG_ENTITIES_RELATIONS: "/catalog-entities-relations/:entityRelationId?";
|
|
38
39
|
readonly BFF_CATALOG_ENTITIES: "/bff/catalog-entities/:entityKey?";
|
package/dist/constants/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _="_auth",e="entityKey",t="entityId",A="entityRelationId",T={CORS_PROXY:"/_api/cors",INFO:"/_info",EJECT_COMPONENT:"/eject-component/:componentName",SHARED_PAGE_DATA:"/page-data/shared/*",PAGE_DATA:"/page-data/*",APP_DATA:"/app-data.json",AUTHORIZATION:"/authorize",OIDC_CALLBACK:`/${_}/oidc`,SAML_CALLBACK:`/${_}/saml2`,REDOCLY_CALLBACK:`/${_}/redocly`,REPLAY_OAUTH2_CALLBACK:`/${_}/replay-oauth2`,REDOCLY_LOGIN_CALLBACK:`/${_}/redocly/redocly-login`,REDOCLY_TOKEN_LOGIN:`/${_}/redocly-token-login`,SEARCH:"/_search",SEARCH_FACETS:"/_search-facets",SEMANTIC_SEARCH:"/_semantic-search",LOGOUT:"/logout",POST_LOGOUT:"/post-logout",LOGIN:"/login",IDP_LOGIN:`/${_}/idp-login`,INVITE:"/invite/:code",RESOLVE_ROUTE_BY_PATH:"/resolve-route-by-path",RESOLVE_ROUTES_BY_PATHS:"/resolve-routes-by-paths",RESOLVE_ROUTE_BY_SLUG:"/resolve-route-by-slug",GET_ROUTES_BY_LINE:"/get-routes-by-line",FEEDBACK:"/feedback",TELEMETRY:"/_events",OTEL_TRACES:"/_otel/v1/traces",HEALTH:"/_health",ASK_AI:"/_ask-ai",AI_ASSISTANT_ESCALATIONS:"/_ai-assistant-escalations",CATALOG_ENTITIES:`/catalog-entities/:${t}?`,CATALOG_ENTITIES_RELATIONS:`/catalog-entities-relations/:${A}?`,BFF_CATALOG_ENTITIES:`/bff/catalog-entities/:${e}?`,BFF_CATALOG_RELATED_ENTITIES:`/bff/catalog-related-entities/:${e}`,BFF_CATALOG_REVISIONS:"/bff/catalog-revisions",MCP_OAUTH_AUTHORIZATION_SERVER:"/.well-known/oauth-authorization-server",MCP_OAUTH_PROTECTED_RESOURCE:"/.well-known/oauth-protected-resource",MCP_DYNAMIC_CLIENT_REGISTRATION:"/_mcp/register",MCP_AUTHORIZATION:"/_mcp/oauth2/auth",MCP_TOKEN_PORTAL:"/_mcp/oauth2/token-portal",MCP_CALLBACK:"/_mcp/oauth/callback",SCORECARDS:"/scorecards"};export{_ as AUTH_SEGMENT,t as CATALOG_ENTITY_ID,e as CATALOG_ENTITY_KEY,A as CATALOG_ENTITY_RELATION_ID,T as ServerRoutes};
|
|
@@ -31,6 +31,7 @@ export declare const BH_API_PROJECTS_URL_V2: string | undefined;
|
|
|
31
31
|
export declare const ENTITLEMENTS_JWKS_URL: string;
|
|
32
32
|
export declare const FEEDBACK_API_URL: string;
|
|
33
33
|
export declare const ASK_AI_API_URL: string;
|
|
34
|
+
export declare const AI_ASSISTANT_ESCALATIONS_API_URL: string;
|
|
34
35
|
export declare const SEMANTIC_SEARCH_API_URL: string;
|
|
35
36
|
export declare const CACHE_CONTROL_NO_STORE_HEADER_VALUE = "no-store";
|
|
36
37
|
export declare const DEFAULT_IMMUTABLE_CACHE_MAX_AGE: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ServerRoutes as I}from"../../constants/api.js";import{USER_THEME_ALIAS as
|
|
1
|
+
import{ServerRoutes as I}from"../../constants/api.js";import{USER_THEME_ALIAS as L}from"../../constants/common.js";import{envConfig as _}from"../config/env-config.js";const N="runtime",x="/assets",U="/_spec",a="/_bundle",M="static",P="redocly:::linkOriginal",l="@",i="default",m=new RegExp("((?!@i18n\\/|@l10n\\/)\\/?@.*?(?=\\/))","g"),F="@redocly/theme/plugin.js",H="styles.css",u=["@theme/plugin.js","@theme/plugin.cjs","@theme/plugin.mjs"],d=_.JWT_SECRET_KEY||"test_secret_key",G=3600,K=1440*60,c="@i18n",S="@l10n",Y=[L,c,S],B="https://redocly.com/auth/aud",g="catalog.json",h="scorecard.json",J="page-count.json",W="sitemap.xml",f="llms.txt",o=_.PROJECT_ID,R=_.PROJECT_SLUG,e=_.ORGANIZATION_ID,n=_.ORG_SLUG,E=_.BH_API_URL,s=E&&n&&R?`${E}/orgs/${n}/projects/${R}`:void 0,t=E&&e&&o?`${E}/orgs/${e}/projects/${o}`:void 0,p=E?`${E}/entitlements/.well-known/jwks`:"https://app.cloud.redocly.com/api/entitlements/.well-known/jwks",j=_.ENTITLEMENTS_JWKS_CDN_URL||p,k=s?`${s}/feedback`:"",w=t?`${t}/ai-agentic-conversations`:"",$=t?`${t}/ai-assistant-escalations`:"",V=t?`${t}/semantic-search`:"",X="no-store",v=365*24*60*60,y="X-Redocly-Cache-Control",b="no-cache",Z="public, s-maxage=86400, max-age=10, must-revalidate",q=_.AUTH_URL,z="Developer Documentation",T=_.REDOCLY_SSR_RENDER_MODE==="worker"?"worker":"main",Q=T==="main"?0:_.REDOCLY_SSR_WORKERS_MIN!=null?Number(_.REDOCLY_SSR_WORKERS_MIN):2,__=T==="main"?1:_.REDOCLY_SSR_WORKERS_MAX!=null?Number(_.REDOCLY_SSR_WORKERS_MAX):5,E_="-----BEGIN CERTIFICATE-----",t_="-----END CERTIFICATE-----",o_=!_.isDevelopMode&&_.REDOCLY_TELEMETRY!=="off"||_.REDOCLY_TELEMETRY==="on",R_="http://localhost:4318/v1/traces",e_=[I.HEALTH],A=_.SERVER_EDITOR_APP_URL||"http://127.0.0.1:3000",n_=_.REDOCLY_CORS_ORIGINS?_.REDOCLY_CORS_ORIGINS.split(",").map(r=>r.trim()).filter(Boolean).concat(A):[A],s_="markdown/partials",T_="markdown/partials-deps";export{$ as AI_ASSISTANT_ESCALATIONS_API_URL,n_ as ALLOWED_CORS_ORIGINS,B as ALTERNATIVE_AUD_CLAIM_NAME,w as ASK_AI_API_URL,q as AUTH_URL,E_ as BEGIN_CERTIFICATE_DELIMITER,s as BH_API_PROJECTS_URL,t as BH_API_PROJECTS_URL_V2,X as CACHE_CONTROL_NO_STORE_HEADER_VALUE,b as CACHE_CONTROL_PUBLIC_HTML,g as CATALOG_OUTPUT_FILE_NAME,v as DEFAULT_IMMUTABLE_CACHE_MAX_AGE,u as DEFAULT_PROJECT_PLUGIN_PATHS,F as DEFAULT_THEME_PLUGIN_PATH,z as DEFAULT_TITLE,i as DEFAULT_VERSION_NAME,U as DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER,t_ as END_CERTIFICATE_DELIMITER,j as ENTITLEMENTS_JWKS_URL,k as FEEDBACK_API_URL,c as I18N_DIR_NAME,d as JWT_SECRET_KEY,S as L10N_DIR_NAME,P as LINK_ORIGINAL_ATTR_NAME,f as LLMS_TXT_FILE_NAME,s_ as MARKDOC_PARTIALS_DATA_KEY,T_ as MARKDOC_PARTIALS_DEPS_KEY,G as MCP_ACCESS_TOKEN_TTL_SEC,K as MCP_REFRESH_SESSION_LIFETIME_SEC,e as ORG_ID,n as ORG_SLUG,e_ as OTEL_EXCLUDED_ROUTES,R_ as OTEL_TRACES_DEV_URL,J as PAGE_COUNT_OUTPUT_FILE_NAME,o as PROJECT_ID,R as PROJECT_SLUG,a as PUBLIC_API_DEFINITIONS_FOLDER,x as PUBLIC_ASSETS_FOLDER,M as PUBLIC_STATIC_FOLDER,Y as RESERVED_DIR_NAMES,N as RUNTIME_RESOURCES_DIR,h as SCORECARD_OUTPUT_FILE_NAME,V as SEMANTIC_SEARCH_API_URL,A as SERVER_EDITOR_APP_URL,W as SITEMAP_FILE_NAME,T as SSR_RENDER_MODE,__ as SSR_WORKERS_MAX,Q as SSR_WORKERS_MIN,H as STYLES_FILE,o_ as TELEMETRY_ENABLED,m as VERSIONED_FOLDER_REGEXP_MATCH,l as VERSION_SEPARATOR,y as X_REDOCLY_CACHE_CONTROL_HEADER,Z as X_REDOCLY_CACHE_CONTROL_PUBLIC_HTML};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { Handler } from 'hono';
|
|
2
2
|
import type { Store } from '../../store';
|
|
3
3
|
export declare function askAiHandler(store: Store): Handler;
|
|
4
|
+
/**
|
|
5
|
+
* Ticket submissions from the embedded assistant. Proxied for the portal's own org/project so the
|
|
6
|
+
* embedding page never needs those ids, and gated exactly like `/_ask-ai`: escalation is reachable
|
|
7
|
+
* only by portal users who can use AI search.
|
|
8
|
+
*/
|
|
9
|
+
export declare function aiAssistantEscalationsHandler(store: Store): Handler;
|
|
4
10
|
//# sourceMappingURL=ask-ai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RbacFeatures as
|
|
1
|
+
import{RbacFeatures as a}from"../../../constants/common.js";import{ASK_AI_API_URL as c,AI_ASSISTANT_ESCALATIONS_API_URL as u}from"../../constants/common.js";import{fetchWithClient as p}from"../../utils/fetch-with-client.js";import{canAccessFeature as A}from"../../utils/rbac.js";import{handleUnauthorizedApiRequest as h}from"../utils.js";import{isAiSearchEnabled as f}from"../../plugins/search/utils.js";function l(e,t){const o=t.getConfig();return f(o)?A(a.AI_SEARCH,e.get("auth"),o.access?.rbac,o.access?.requiresLogin)?null:h(e):e.newResponse(null,403,{})}function d(e){const t=e.get("auth"),o={"Content-Type":"application/json"},n=[];t.claims?.authCookie&&n.push(`authorization=${t.claims.authCookie}`),t.idpAccessToken&&n.push(`accessToken=${t.idpAccessToken}`),n.length>0&&(o.Cookie=n.join("; "));const s=e.req.header("Authorization");return s&&(o.Authorization=s),o}function i({store:e,apiUrl:t,successContentType:o="application/json"}){return async n=>{if(!t)return n.newResponse(null,404);const s=l(n,e);if(s)return s;const r=await p(t,{method:"POST",body:JSON.stringify(await n.req.json()),headers:d(n)});return n.newResponse(r.body,r.status,{"Content-Type":r.ok?o:"application/json"})}}function y(e){return i({store:e,apiUrl:c,successContentType:"text/event-stream"})}function R(e){return i({store:e,apiUrl:u})}export{R as aiAssistantEscalationsHandler,y as askAiHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{serveStatic as
|
|
1
|
+
import{serveStatic as R}from"hono/serve-static";import{withPathPrefix as i,withoutPathPrefix as c}from"@redocly/theme/core/utils";import{ServerRoutes as l}from"../../../constants/api.js";import{PUBLIC_STATIC_FOLDER as H}from"../../constants/common.js";import{envConfig as L}from"../../config/env-config.js";import{authMiddleware as C}from"../middleware/authMiddleware.js";import{ensureSearchData as g}from"../middleware/ensureSearchData.js";import{dynamicMiddleware as I}from"../middleware/dynamic-middleware/dynamic-middleware.js";import{installRoutes as h}from"../../plugins/dev-onboarding/api/routes/index.js";import{installSkillsRoutes as D}from"./skills/skills-routes.js";import{authorizeHandler as P,oidcCallbackHandler as N,logoutHandler as s,postLogoutHandler as w,idpLoginHandler as M,redoclyLoginCallbackHandler as v,samlCallbackHandler as B,redoclyTokenLoginHandler as G,inviteHandler as F}from"./auth.js";import{appDataHandler as U}from"./app-data.js";import{searchFacetsHandler as y,searchHandler as Y}from"./search.js";import{dynamicRouteHandler as k}from"./dynamic-route.js";import{pageDataHandler as K,sharedPageDataHandler as b}from"./page-data.js";import{pathPrefixRedirectHandler as V}from"./path-prefix-redirect.js";import{getRoutesByLineHandler as f,resolvePathHandler as r,resolvePathsHandler as x,resolveSlugHandler as E}from"./resolve-route.js";import{feedbackHandler as q}from"./feedback.js";import{loggerMiddleware as X}from"../middleware/loggerMiddleware.js";import{responseHeadersMiddleware as $}from"../middleware/responseHeadersMiddleware.js";import{idleTimeoutMiddleware as j}from"../middleware/idleTimeoutMiddleware.js";import{otelTracesHandler as u}from"./otel/otel.js";import{healthCheckHandler as z}from"./health.js";import{askAiHandler as W,aiAssistantEscalationsHandler as Z}from"./ask-ai.js";import{semanticSearchHandler as J}from"./semantic-search.js";import{replayOauth2RedirectCallbackHandler as Q}from"./replay-oauth2-redirect.js";import{corsProxyHandler as O}from"./cors-proxy.js";import{corsMiddleware as m}from"../middleware/corsMiddleware.js";import{installApiRoutes as aa}from"./api-routes/api-routes.js";import{cookieMiddleware as ea}from"../middleware/cookieMiddleware.js";import{staticContentHandler as ia}from"../routes/static-content.js";import{infoHandler as _}from"./info.js";import{catalogHandler as la}from"./catalog/catalog.js";import{catalogRelationsHandler as ta}from"./catalog/catalog-relations.js";import{bffCatalogHandler as ma}from"./catalog/bff-catalog.js";import{bffCatalogRevisionsHandler as oa}from"./catalog/bff-catalog-revisions.js";import{bffCatalogRelatedEntitiesHandler as da}from"./catalog/bff-catalog-related-entities.js";import{catalogAuthMiddleware as t}from"../middleware/catalogAuthMiddleware.js";import{telemetryMiddleware as na}from"../middleware/telemetry-middleware.js";import{errorHandler as pa}from"./error.js";import{installMcpRoutes as Aa}from"./mcp-routes/mcp-routes.js";import{jsonValidatorMiddleware as T}from"../middleware/jsonValidatorMiddleware.js";import{searchFacetsRequestSchema as sa}from"../../../api-schemas/search-facets.js";import{searchRequestSchema as fa}from"../../../api-schemas/search.js";function te(a,e,o){const{resolveRouteData:n,readStaticAsset:p}=o;a.use("*",j()),a.use("*",ea()),a.use("*",I(e)),a.use("*",C(e)),a.use("*",X()),a.use("*",$(e)),a.use("*",na()),a.use(i("*"),R({root:`./${H}`,getContent:(d,S)=>ia(d,S,e,p),rewriteRequestPath:d=>c(d)})),a.use(i(l.FEEDBACK),m({allowMethods:["POST"]})),a.use(i(l.ASK_AI),m({allowMethods:["POST"]})),a.use(i(l.AI_ASSISTANT_ESCALATIONS),m({allowMethods:["POST"]})),a.use(i(l.SEMANTIC_SEARCH),m({allowMethods:["POST"]})),a.use("*",ra(e));const A=g(e);a.use(i(l.INFO),_()),L.NEW_CATALOG_ENABLED&&(a.use(i(l.CATALOG_ENTITIES),t({serverOutDir:e.serverOutDir}),la(e)),a.use(i(l.CATALOG_ENTITIES_RELATIONS),t({serverOutDir:e.serverOutDir}),ta(e)),a.get(i(l.BFF_CATALOG_ENTITIES),t({serverOutDir:e.serverOutDir,protectReadMethods:!1}),ma(e)),a.get(i(l.BFF_CATALOG_RELATED_ENTITIES),t({serverOutDir:e.serverOutDir,protectReadMethods:!1}),da(e)),a.get(i(l.BFF_CATALOG_REVISIONS),t({serverOutDir:e.serverOutDir,protectReadMethods:!1}),oa(e))),a.get(i(l.SHARED_PAGE_DATA),b(e)),a.get(i(l.PAGE_DATA),K(e,n)),a.get(i(l.APP_DATA),U(e)),a.post(i(l.SEARCH),A,T(fa),Y(e)),a.post(i(l.SEARCH_FACETS),A,T(sa),y(e)),a.post(i(l.AUTHORIZATION),P),a.post(i(l.LOGOUT),s(e)),a.get(i(l.LOGOUT),s(e)),a.get(i(l.POST_LOGOUT),w(e)),a.get(i(l.OIDC_CALLBACK),N(e)),a.get(i(l.REDOCLY_TOKEN_LOGIN),G(e)),a.get(i(l.REDOCLY_LOGIN_CALLBACK),v()),a.get(i(l.IDP_LOGIN),M(e)),a.post(i(l.SAML_CALLBACK),B(e)),a.get(i(l.INVITE),F(e)),a.get(i(l.HEALTH),z),Aa(a,e),h(a,e),D(a,e),a.all(i(l.CORS_PROXY),O(e)),a.all(i(`${l.CORS_PROXY}/*`),O(e)),aa(a,e),a.post(i(l.FEEDBACK),q(e)),a.post(i(l.RESOLVE_ROUTE_BY_PATH),r(e)),a.post(i(l.RESOLVE_ROUTES_BY_PATHS),x(e)),a.post(i(l.RESOLVE_ROUTE_BY_SLUG),E(e)),a.post(i(l.ASK_AI),W(e)),a.post(i(l.AI_ASSISTANT_ESCALATIONS),Z(e)),a.post(i(l.SEMANTIC_SEARCH),J(e)),a.get(i(l.GET_ROUTES_BY_LINE),f(e)),a.post(i(l.OTEL_TRACES),u),a.get(i(l.REPLAY_OAUTH2_CALLBACK),Q),a.all(i("/*"),k(e,n,p)),a.get("*",V),a.onError(pa)}function ra(a){return async(e,o)=>{await a.waitForPluginsLifecycle(),await o()}}function me(a,e){a.get(i(l.INFO),_()),a.post(i(l.RESOLVE_ROUTE_BY_PATH),r(e)),a.post(i(l.RESOLVE_ROUTE_BY_SLUG),E(e)),a.get(i(l.GET_ROUTES_BY_LINE),f(e))}export{me as installDevRoutes,te as installProdRoutes,ra as waitForPluginsLifecycle};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/realm",
|
|
3
|
-
"version": "0.136.0-next.
|
|
3
|
+
"version": "0.136.0-next.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"xpath": "0.0.34",
|
|
94
94
|
"yaml-ast-parser": "0.0.43",
|
|
95
95
|
"zod": "^3.25.76",
|
|
96
|
-
"@redocly/api-docs": "0.1.0-next.
|
|
96
|
+
"@redocly/api-docs": "0.1.0-next.4",
|
|
97
97
|
"@redocly/asyncapi-docs": "1.13.0-next.10",
|
|
98
98
|
"@redocly/config": "0.53.1",
|
|
99
99
|
"@redocly/graphql-docs": "1.13.0-next.10",
|