@c-rex/constants 0.3.0-build.26 → 0.3.0-build.27710
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/dist/index.d.mts +144 -3
- package/dist/index.d.ts +144 -3
- package/dist/index.js +172 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +129 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -3
package/dist/index.d.mts
CHANGED
|
@@ -1370,6 +1370,12 @@ declare const API: {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
};
|
|
1372
1372
|
declare const SDK_CONFIG_KEY = "crex-sdk-config";
|
|
1373
|
+
/** Cookie name for the persisted search-settings store (language, wildcard, operator, like). */
|
|
1374
|
+
declare const SEARCH_SETTINGS_COOKIE_NAME = "c-rex-search-settings";
|
|
1375
|
+
/** Cookie name for the persisted UI-preferences store (theme, font scale, exclude properties). */
|
|
1376
|
+
declare const UI_PREFERENCES_COOKIE_NAME = "c-rex-ui-preferences";
|
|
1377
|
+
/** Cookie name for the persisted content-language store (list of available content languages). */
|
|
1378
|
+
declare const CONTENT_LANGUAGES_COOKIE_NAME = "c-rex-content-languages";
|
|
1373
1379
|
declare const UI_LANG_KEY = "UI_LANG_KEY";
|
|
1374
1380
|
declare const CONTENT_LANG_KEY = "CONTENT_LANG_KEY";
|
|
1375
1381
|
declare const FLAGS_BY_LANG: {
|
|
@@ -1379,6 +1385,10 @@ declare const FLAGS_BY_LANG: {
|
|
|
1379
1385
|
declare const DEFAULT_LANG = "en-US";
|
|
1380
1386
|
declare const EN_LANG = "en";
|
|
1381
1387
|
declare const UI_LANG_OPTIONS: string[];
|
|
1388
|
+
/** Env var name: single IDS Restrict selector appended to every request. */
|
|
1389
|
+
declare const CREX_GLOBAL_RESTRICTION_ENV = "CREX_GLOBAL_RESTRICTION";
|
|
1390
|
+
/** Env var name: default content language override. */
|
|
1391
|
+
declare const CREX_DEFAULT_LANGUAGE_ENV = "CREX_DEFAULT_LANGUAGE";
|
|
1382
1392
|
declare const TOPICS_TYPE_AND_LINK = "topics";
|
|
1383
1393
|
declare const BLOG_TYPE_AND_LINK = "blog";
|
|
1384
1394
|
declare const DOCUMENTS_TYPE_AND_LINK = "documents";
|
|
@@ -1396,12 +1406,143 @@ declare const FILES_EXTENSIONS: {
|
|
|
1396
1406
|
readonly PDF: "application/pdf";
|
|
1397
1407
|
readonly HTML: "text/html";
|
|
1398
1408
|
};
|
|
1399
|
-
|
|
1409
|
+
/** Default cookie lifetime: 30 days, in SECONDS (the unit of `maxAge`). */
|
|
1410
|
+
declare const DEFAULT_COOKIE_MAX_AGE_SECONDS: number;
|
|
1400
1411
|
declare const ICONS_BY_FILE_EXTENSION: {
|
|
1401
1412
|
readonly "application/pdf": "FaFilePdf";
|
|
1402
1413
|
};
|
|
1403
1414
|
declare const DEFAULT_ICON = "file";
|
|
1404
|
-
|
|
1415
|
+
/** Link rel values exposed on rendition resource links by the IDS API. */
|
|
1416
|
+
declare const RENDITION_LINK_RELS: {
|
|
1417
|
+
readonly VIEW: "view";
|
|
1418
|
+
readonly DOWNLOAD: "download";
|
|
1419
|
+
};
|
|
1420
|
+
/** Scopes that must both be present in the selected Bearer to use ChatMCP. */
|
|
1421
|
+
declare const CHAT_MCP_REQUIRED_SCOPES: readonly ["crex.ids.chat.use", "crex.ids.mcp.use"];
|
|
1422
|
+
declare const POST_LOGOUT_RETURN_TO_KEY = "crex-post-logout-return-to";
|
|
1423
|
+
/** Env var name: secret that encrypts the session cookie (server-only). */
|
|
1424
|
+
declare const CREX_SESSION_SECRET_ENV = "CREX_SESSION_SECRET";
|
|
1425
|
+
/**
|
|
1426
|
+
* Encrypted session cookie. The value is split in chunks
|
|
1427
|
+
* (`crex-session.0`, `crex-session.1`, …) because Keycloak tokens exceed the
|
|
1428
|
+
* 4 KB single-cookie limit.
|
|
1429
|
+
*/
|
|
1430
|
+
declare const SESSION_COOKIE_NAME = "crex-session";
|
|
1431
|
+
/** Max characters of the encrypted session per cookie chunk (name/attrs excluded). */
|
|
1432
|
+
declare const SESSION_COOKIE_CHUNK_SIZE = 3400;
|
|
1433
|
+
/**
|
|
1434
|
+
* Hard cap on the session cookie (3 x 3400 = 10.2 KB). Node and HTTP.sys both
|
|
1435
|
+
* limit the WHOLE request header block to ~16 KB, so a bigger session would
|
|
1436
|
+
* lock the user out with "431 Request Header Fields Too Large" until it
|
|
1437
|
+
* expires. Over budget the session drops its `id_token`, then is refused.
|
|
1438
|
+
*/
|
|
1439
|
+
declare const SESSION_COOKIE_MAX_CHUNKS = 3;
|
|
1440
|
+
declare const SESSION_PAYLOAD_VERSION = 1;
|
|
1441
|
+
/** Counts consecutive rejected refreshes; see `evaluateSession`. */
|
|
1442
|
+
declare const REFRESH_FAIL_COOKIE_NAME = "crex-refresh-fail";
|
|
1443
|
+
/** Consecutive refresh rejections after which the session is destroyed. */
|
|
1444
|
+
declare const REFRESH_FAIL_LIMIT = 2;
|
|
1445
|
+
/** Short-lived login transaction (PKCE verifier, state, nonce, returnTo). */
|
|
1446
|
+
declare const AUTH_TRANSACTION_COOKIE_NAME = "crex-auth-tx";
|
|
1447
|
+
declare const AUTH_TRANSACTION_MAX_AGE_SECONDS: number;
|
|
1448
|
+
/** The middleware refreshes when the access token expires within this window. */
|
|
1449
|
+
declare const SESSION_REFRESH_SKEW_SECONDS = 60;
|
|
1450
|
+
/** Read-only consumers reject an access token expiring within this window. */
|
|
1451
|
+
declare const ACCESS_TOKEN_MIN_TTL_SECONDS = 5;
|
|
1452
|
+
/**
|
|
1453
|
+
* Refresh-token lifetime assumed when the IdP does not report one
|
|
1454
|
+
* (`refresh_expires_in` absent or 0 = no expiry). A rejected refresh still ends
|
|
1455
|
+
* the session earlier.
|
|
1456
|
+
*/
|
|
1457
|
+
declare const REFRESH_LIFETIME_FALLBACK_SECONDS: number;
|
|
1458
|
+
/** Upper bound for a single token-endpoint call made from the middleware. */
|
|
1459
|
+
declare const TOKEN_ENDPOINT_TIMEOUT_MS = 5000;
|
|
1460
|
+
/**
|
|
1461
|
+
* Timeout for `openid-client` calls (discovery, code exchange, userinfo). Its
|
|
1462
|
+
* 3.5 s default fails cold starts, where the event loop is still busy compiling.
|
|
1463
|
+
*/
|
|
1464
|
+
declare const OIDC_HTTP_TIMEOUT_MS = 10000;
|
|
1465
|
+
/**
|
|
1466
|
+
* Auth route paths. `CALLBACK` keeps NextAuth's path on purpose: it is the
|
|
1467
|
+
* redirect URI already registered on the Keycloak clients.
|
|
1468
|
+
*/
|
|
1469
|
+
declare const AUTH_ROUTES: {
|
|
1470
|
+
readonly LOGIN: "/api/auth/login";
|
|
1471
|
+
readonly CALLBACK: "/api/auth/callback/crex";
|
|
1472
|
+
readonly LOGOUT: "/api/auth/logout";
|
|
1473
|
+
readonly SESSION: "/api/auth/session";
|
|
1474
|
+
readonly BACKCHANNEL_LOGOUT: "/api/auth/backchannel-logout";
|
|
1475
|
+
readonly ERROR_PAGE: "/auth/error";
|
|
1476
|
+
};
|
|
1477
|
+
declare const AUTH_QUERY_PARAMS: {
|
|
1478
|
+
readonly RETURN_TO: "returnTo";
|
|
1479
|
+
readonly PROMPT: "prompt";
|
|
1480
|
+
readonly ERROR: "error";
|
|
1481
|
+
};
|
|
1482
|
+
/** OIDC `prompt` values the app uses. */
|
|
1483
|
+
declare const OIDC_PROMPTS: {
|
|
1484
|
+
readonly LOGIN: "login";
|
|
1485
|
+
readonly NONE: "none";
|
|
1486
|
+
};
|
|
1487
|
+
/** Header the logout POST must carry so a cross-site form cannot trigger it. */
|
|
1488
|
+
declare const LOGOUT_REQUEST_HEADER = "x-crex-logout";
|
|
1489
|
+
/** `error` codes on the auth error page. Same names NextAuth used (i18n keys stay valid). */
|
|
1490
|
+
declare const AUTH_ERROR_CODES: {
|
|
1491
|
+
readonly CONFIGURATION: "Configuration";
|
|
1492
|
+
readonly ACCESS_DENIED: "AccessDenied";
|
|
1493
|
+
readonly OAUTH_SIGNIN: "OAuthSignin";
|
|
1494
|
+
readonly OAUTH_CALLBACK: "OAuthCallback";
|
|
1495
|
+
readonly CALLBACK: "Callback";
|
|
1496
|
+
readonly DEFAULT: "Default";
|
|
1497
|
+
};
|
|
1498
|
+
/** `error` value on the session projection when the SSO no longer accepts the refresh. */
|
|
1499
|
+
declare const SESSION_REFRESH_ERROR = "RefreshAccessTokenError";
|
|
1500
|
+
/**
|
|
1501
|
+
* Per-tab guard: a silent (prompt=none) re-auth is attempted at most once per
|
|
1502
|
+
* tab until the session is observed healthy again.
|
|
1503
|
+
*/
|
|
1504
|
+
declare const SILENT_REAUTH_ATTEMPTED_KEY = "crex-silent-reauth-attempted";
|
|
1505
|
+
/**
|
|
1506
|
+
* One-shot marker set right before navigating to the silent re-auth so
|
|
1507
|
+
* `/auth/error` can tell "our silent attempt failed" from a real login failure.
|
|
1508
|
+
*/
|
|
1509
|
+
declare const SILENT_REAUTH_INFLIGHT_KEY = "crex-silent-reauth-inflight";
|
|
1510
|
+
/**
|
|
1511
|
+
* Cookies written by the previous NextAuth-based implementation. They are
|
|
1512
|
+
* large (JWT + bridged access token) and now useless, so the middleware
|
|
1513
|
+
* expires them instead of letting them ride along on every request.
|
|
1514
|
+
*/
|
|
1515
|
+
declare const LEGACY_AUTH_COOKIE_PREFIXES: readonly ["next-auth.", "__Secure-next-auth.", "__Host-next-auth."];
|
|
1516
|
+
declare const LEGACY_TOKEN_COOKIE_NAME = "crex-token";
|
|
1517
|
+
/** Renderer key registered for GMP start-page tile collections (html-enrichment). */
|
|
1518
|
+
declare const GMP_TILES_RENDERER = "GMPTilesRenderer";
|
|
1519
|
+
/** Per-device, user-scoped conversation history used by the GMP ChatMCP client. */
|
|
1520
|
+
declare const GMP_CHAT_SESSION_STORAGE_KEY = "c-rex-gmp-chat-session-v2";
|
|
1521
|
+
declare const GMP_CHAT_SESSION_SNAPSHOT_VERSION = 2;
|
|
1522
|
+
/** Custom History API state key used by same-HTML TOC navigation. */
|
|
1523
|
+
declare const TOC_SCROLL_HISTORY_STATE_KEY = "__crexTocScroll";
|
|
1524
|
+
/** Valid values for CREX_TOKEN_SOURCE — where the Bearer used by CrexApi comes from. */
|
|
1525
|
+
declare const TOKEN_SOURCES: {
|
|
1526
|
+
readonly CLIENT_CREDENTIALS: "client-credentials";
|
|
1527
|
+
readonly USER_LOGIN: "user-login";
|
|
1528
|
+
};
|
|
1529
|
+
/** Valid values for PULSE_PERSONALIZATION_MODE — server-owned data source for Pulse features. */
|
|
1530
|
+
declare const PERSONALIZATION_MODES: {
|
|
1531
|
+
readonly PULSE_USER: "pulse-user";
|
|
1532
|
+
readonly LOCAL_SINGLE_USER: "local-single-user";
|
|
1533
|
+
readonly DISABLED: "disabled";
|
|
1534
|
+
};
|
|
1535
|
+
/** Valid values for Pulse notification/subscription delivery channel. */
|
|
1536
|
+
declare const PULSE_DELIVERY_CHANNELS: {
|
|
1537
|
+
readonly IN_APP: "inApp";
|
|
1538
|
+
readonly EMAIL: "email";
|
|
1539
|
+
};
|
|
1540
|
+
/** Query param name the contextual "ask the editorial team" link appends the page context under. */
|
|
1541
|
+
declare const CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM = "frage";
|
|
1542
|
+
/** Route each app mounts the render-article image proxy at (attaches the IDS Bearer server-side; the browser only sends its session cookie). */
|
|
1543
|
+
declare const IMAGE_PROXY_ROUTE = "/api/images";
|
|
1544
|
+
/** Query param carrying the absolute IDS image URL on `IMAGE_PROXY_ROUTE`. */
|
|
1545
|
+
declare const IMAGE_PROXY_SRC_PARAM = "src";
|
|
1405
1546
|
declare const WILD_CARD_OPTIONS: {
|
|
1406
1547
|
readonly BOTH: "BOTH";
|
|
1407
1548
|
readonly END: "END";
|
|
@@ -1430,4 +1571,4 @@ declare const BREAKPOINTS: {
|
|
|
1430
1571
|
};
|
|
1431
1572
|
declare const MARKER_COLORS: string[];
|
|
1432
1573
|
|
|
1433
|
-
export { ALL, API, ARTICLE_PAGE_LAYOUT, AdministrativeMetadataModelFields, AdministrativeMetadataModelFieldsAll, AuditStateModelFields, AuditStateModelFieldsAll, AuthStateModelFields, AuthStateModelFieldsAll, BLOG_TYPE_AND_LINK, BREAKPOINTS, CONTENT_LANG_KEY,
|
|
1574
|
+
export { ACCESS_TOKEN_MIN_TTL_SECONDS, ALL, API, ARTICLE_PAGE_LAYOUT, AUTH_ERROR_CODES, AUTH_QUERY_PARAMS, AUTH_ROUTES, AUTH_TRANSACTION_COOKIE_NAME, AUTH_TRANSACTION_MAX_AGE_SECONDS, AdministrativeMetadataModelFields, AdministrativeMetadataModelFieldsAll, AuditStateModelFields, AuditStateModelFieldsAll, AuthStateModelFields, AuthStateModelFieldsAll, BLOG_TYPE_AND_LINK, BREAKPOINTS, CHAT_MCP_REQUIRED_SCOPES, CONTENT_LANGUAGES_COOKIE_NAME, CONTENT_LANG_KEY, CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM, CREX_DEFAULT_LANGUAGE_ENV, CREX_GLOBAL_RESTRICTION_ENV, CREX_SESSION_SECRET_ENV, CategoryModelFields, CategoryModelFieldsAll, ComponentModelFields, ComponentModelFieldsAll, ContentLifeCycleStatusModelFields, ContentLifeCycleStatusModelFieldsAll, ContentLifeCycleStatusValueModelFields, ContentLifeCycleStatusValueModelFieldsAll, DEFAULT_COOKIE_MAX_AGE_SECONDS, DEFAULT_ICON, DEFAULT_LANG, DEVICE_OPTIONS, DOCUMENT, DOCUMENTS_TYPE_AND_LINK, DirectoryNodeModelFields, DirectoryNodeModelFieldsAll, DirectoryNodeTypeModelFields, DirectoryNodeTypeModelFieldsAll, DocumentModelFields, DocumentModelFieldsAll, DocumentTypeModelFields, DocumentTypeModelFieldsAll, DocumentationMetadataModelFields, DocumentationMetadataModelFieldsAll, DomainEntityModelFields, DomainEntityModelFieldsAll, EN_LANG, EventModelFields, EventModelFieldsAll, ExternalProductGraphicModelFields, ExternalProductGraphicModelFieldsAll, ExternalProductOntologyModelFields, ExternalProductOntologyModelFieldsAll, FILES_EXTENSIONS, FLAGS_BY_LANG, FRAGMENT, FragmentModelFields, FragmentModelFieldsAll, FunctionalMetadataModelFields, FunctionalMetadataModelFieldsAll, GMP_CHAT_SESSION_SNAPSHOT_VERSION, GMP_CHAT_SESSION_STORAGE_KEY, GMP_TILES_RENDERER, ICONS_BY_FILE_EXTENSION, IMAGE_PROXY_ROUTE, IMAGE_PROXY_SRC_PARAM, IdentityDomainModelFields, IdentityDomainModelFieldsAll, IdentityModelFields, IdentityModelFieldsAll, InformationObjectModelFields, InformationObjectModelFieldsAll, InformationSubjectCollectionModelFields, InformationSubjectCollectionModelFieldsAll, InformationSubjectConformityModelFields, InformationSubjectConformityModelFieldsAll, InformationSubjectFormalityModelFields, InformationSubjectFormalityModelFieldsAll, InformationSubjectFunctionalityModelFields, InformationSubjectFunctionalityModelFieldsAll, InformationSubjectModelFields, InformationSubjectModelFieldsAll, InformationSubjectProcessModelFields, InformationSubjectProcessModelFieldsAll, InformationSubjectSafetyModelFields, InformationSubjectSafetyModelFieldsAll, InformationSubjectSafetyWarningMessageModelFields, InformationSubjectSafetyWarningMessageModelFieldsAll, InformationSubjectTechnicalDataModelFields, InformationSubjectTechnicalDataModelFieldsAll, InformationSubjectTechnicalOverviewModelFields, InformationSubjectTechnicalOverviewModelFieldsAll, InformationTypeModelFields, InformationTypeModelFieldsAll, InformationUnitModelFields, InformationUnitModelFieldsAll, LEGACY_AUTH_COOKIE_PREFIXES, LEGACY_TOKEN_COOKIE_NAME, LOGOUT_REQUEST_HEADER, LOG_CATEGORIES, LOG_LEVELS, MARKER_COLORS, OIDC_HTTP_TIMEOUT_MS, OIDC_PROMPTS, OPERATOR_OPTIONS, OwlClassModelFields, OwlClassModelFieldsAll, PACKAGE, PERSONALIZATION_MODES, POST_LOGOUT_RETURN_TO_KEY, PULSE_DELIVERY_CHANNELS, PackageModelFields, PackageModelFieldsAll, PartyModelFields, PartyModelFieldsAll, PartyRoleModelFields, PartyRoleModelFieldsAll, PlanningDownTimeModelFields, PlanningDownTimeModelFieldsAll, PlanningMaintenanceIntervalModelFields, PlanningMaintenanceIntervalModelFieldsAll, PlanningSetupTimeModelFields, PlanningSetupTimeModelFieldsAll, PlanningTimeModelFields, PlanningTimeModelFieldsAll, PlanningWorkingTimeModelFields, PlanningWorkingTimeModelFieldsAll, ProductFeatureModelFields, ProductFeatureModelFieldsAll, ProductFunctionModelFields, ProductFunctionModelFieldsAll, ProductLcpAfterUseModelFields, ProductLcpAfterUseModelFieldsAll, ProductLcpDesignAndRealizationModelFields, ProductLcpDesignAndRealizationModelFieldsAll, ProductLcpPuttingToUseModelFields, ProductLcpPuttingToUseModelFieldsAll, ProductLcpUseModelFields, ProductLcpUseModelFieldsAll, ProductLifeCyclePhaseModelFields, ProductLifeCyclePhaseModelFieldsAll, ProductMetadataModelFields, ProductMetadataModelFieldsAll, ProductPropertyModelFields, ProductPropertyModelFieldsAll, ProductVariantModelFields, ProductVariantModelFieldsAll, QualificationModelFields, QualificationModelFieldsAll, QualificationRoleModelFields, QualificationRoleModelFieldsAll, QualificationSkillLevelModelFields, QualificationSkillLevelModelFieldsAll, REFRESH_FAIL_COOKIE_NAME, REFRESH_FAIL_LIMIT, REFRESH_LIFETIME_FALLBACK_SECONDS, RENDITION_LINK_RELS, RESULT_TYPES, RESULT_VIEW_STYLES, RenditionModelFields, RenditionModelFieldsAll, RenditionSelectorModelFields, RenditionSelectorModelFieldsAll, SDK_CONFIG_KEY, SEARCH_SETTINGS_COOKIE_NAME, SESSION_COOKIE_CHUNK_SIZE, SESSION_COOKIE_MAX_CHUNKS, SESSION_COOKIE_NAME, SESSION_PAYLOAD_VERSION, SESSION_REFRESH_ERROR, SESSION_REFRESH_SKEW_SECONDS, SILENT_REAUTH_ATTEMPTED_KEY, SILENT_REAUTH_INFLIGHT_KEY, SupplyConsumableModelFields, SupplyConsumableModelFieldsAll, SupplyHardwareToolModelFields, SupplyHardwareToolModelFieldsAll, SupplyLubricantModelFields, SupplyLubricantModelFieldsAll, SupplyModelFields, SupplyModelFieldsAll, SupplyOperatingModelFields, SupplyOperatingModelFieldsAll, SupplySparePartModelFields, SupplySparePartModelFieldsAll, TOC_SCROLL_HISTORY_STATE_KEY, TOKEN_ENDPOINT_TIMEOUT_MS, TOKEN_SOURCES, TOPIC, TOPICS_TYPE_AND_LINK, TopicModelFields, TopicModelFieldsAll, TopicTypeConceptModelFields, TopicTypeConceptModelFieldsAll, TopicTypeFormModelFields, TopicTypeFormModelFieldsAll, TopicTypeLearningModelFields, TopicTypeLearningModelFieldsAll, TopicTypeModelFields, TopicTypeModelFieldsAll, TopicTypeReferenceModelFields, TopicTypeReferenceModelFieldsAll, TopicTypeTaskModelFields, TopicTypeTaskModelFieldsAll, TopicTypeTroubleShootingModelFields, TopicTypeTroubleShootingModelFieldsAll, UI_LANG_KEY, UI_LANG_OPTIONS, UI_PREFERENCES_COOKIE_NAME, VCardCalendarModelFields, VCardCalendarModelFieldsAll, VCardGroupModelFields, VCardGroupModelFieldsAll, VCardImageModelFields, VCardImageModelFieldsAll, VCardIndividualModelFields, VCardIndividualModelFieldsAll, VCardInfoModelFields, VCardInfoModelFieldsAll, VCardLocationModelFields, VCardLocationModelFieldsAll, VCardModelFields, VCardModelFieldsAll, VCardOrganizationModelFields, VCardOrganizationModelFieldsAll, WILD_CARD_OPTIONS };
|
package/dist/index.d.ts
CHANGED
|
@@ -1370,6 +1370,12 @@ declare const API: {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
};
|
|
1372
1372
|
declare const SDK_CONFIG_KEY = "crex-sdk-config";
|
|
1373
|
+
/** Cookie name for the persisted search-settings store (language, wildcard, operator, like). */
|
|
1374
|
+
declare const SEARCH_SETTINGS_COOKIE_NAME = "c-rex-search-settings";
|
|
1375
|
+
/** Cookie name for the persisted UI-preferences store (theme, font scale, exclude properties). */
|
|
1376
|
+
declare const UI_PREFERENCES_COOKIE_NAME = "c-rex-ui-preferences";
|
|
1377
|
+
/** Cookie name for the persisted content-language store (list of available content languages). */
|
|
1378
|
+
declare const CONTENT_LANGUAGES_COOKIE_NAME = "c-rex-content-languages";
|
|
1373
1379
|
declare const UI_LANG_KEY = "UI_LANG_KEY";
|
|
1374
1380
|
declare const CONTENT_LANG_KEY = "CONTENT_LANG_KEY";
|
|
1375
1381
|
declare const FLAGS_BY_LANG: {
|
|
@@ -1379,6 +1385,10 @@ declare const FLAGS_BY_LANG: {
|
|
|
1379
1385
|
declare const DEFAULT_LANG = "en-US";
|
|
1380
1386
|
declare const EN_LANG = "en";
|
|
1381
1387
|
declare const UI_LANG_OPTIONS: string[];
|
|
1388
|
+
/** Env var name: single IDS Restrict selector appended to every request. */
|
|
1389
|
+
declare const CREX_GLOBAL_RESTRICTION_ENV = "CREX_GLOBAL_RESTRICTION";
|
|
1390
|
+
/** Env var name: default content language override. */
|
|
1391
|
+
declare const CREX_DEFAULT_LANGUAGE_ENV = "CREX_DEFAULT_LANGUAGE";
|
|
1382
1392
|
declare const TOPICS_TYPE_AND_LINK = "topics";
|
|
1383
1393
|
declare const BLOG_TYPE_AND_LINK = "blog";
|
|
1384
1394
|
declare const DOCUMENTS_TYPE_AND_LINK = "documents";
|
|
@@ -1396,12 +1406,143 @@ declare const FILES_EXTENSIONS: {
|
|
|
1396
1406
|
readonly PDF: "application/pdf";
|
|
1397
1407
|
readonly HTML: "text/html";
|
|
1398
1408
|
};
|
|
1399
|
-
|
|
1409
|
+
/** Default cookie lifetime: 30 days, in SECONDS (the unit of `maxAge`). */
|
|
1410
|
+
declare const DEFAULT_COOKIE_MAX_AGE_SECONDS: number;
|
|
1400
1411
|
declare const ICONS_BY_FILE_EXTENSION: {
|
|
1401
1412
|
readonly "application/pdf": "FaFilePdf";
|
|
1402
1413
|
};
|
|
1403
1414
|
declare const DEFAULT_ICON = "file";
|
|
1404
|
-
|
|
1415
|
+
/** Link rel values exposed on rendition resource links by the IDS API. */
|
|
1416
|
+
declare const RENDITION_LINK_RELS: {
|
|
1417
|
+
readonly VIEW: "view";
|
|
1418
|
+
readonly DOWNLOAD: "download";
|
|
1419
|
+
};
|
|
1420
|
+
/** Scopes that must both be present in the selected Bearer to use ChatMCP. */
|
|
1421
|
+
declare const CHAT_MCP_REQUIRED_SCOPES: readonly ["crex.ids.chat.use", "crex.ids.mcp.use"];
|
|
1422
|
+
declare const POST_LOGOUT_RETURN_TO_KEY = "crex-post-logout-return-to";
|
|
1423
|
+
/** Env var name: secret that encrypts the session cookie (server-only). */
|
|
1424
|
+
declare const CREX_SESSION_SECRET_ENV = "CREX_SESSION_SECRET";
|
|
1425
|
+
/**
|
|
1426
|
+
* Encrypted session cookie. The value is split in chunks
|
|
1427
|
+
* (`crex-session.0`, `crex-session.1`, …) because Keycloak tokens exceed the
|
|
1428
|
+
* 4 KB single-cookie limit.
|
|
1429
|
+
*/
|
|
1430
|
+
declare const SESSION_COOKIE_NAME = "crex-session";
|
|
1431
|
+
/** Max characters of the encrypted session per cookie chunk (name/attrs excluded). */
|
|
1432
|
+
declare const SESSION_COOKIE_CHUNK_SIZE = 3400;
|
|
1433
|
+
/**
|
|
1434
|
+
* Hard cap on the session cookie (3 x 3400 = 10.2 KB). Node and HTTP.sys both
|
|
1435
|
+
* limit the WHOLE request header block to ~16 KB, so a bigger session would
|
|
1436
|
+
* lock the user out with "431 Request Header Fields Too Large" until it
|
|
1437
|
+
* expires. Over budget the session drops its `id_token`, then is refused.
|
|
1438
|
+
*/
|
|
1439
|
+
declare const SESSION_COOKIE_MAX_CHUNKS = 3;
|
|
1440
|
+
declare const SESSION_PAYLOAD_VERSION = 1;
|
|
1441
|
+
/** Counts consecutive rejected refreshes; see `evaluateSession`. */
|
|
1442
|
+
declare const REFRESH_FAIL_COOKIE_NAME = "crex-refresh-fail";
|
|
1443
|
+
/** Consecutive refresh rejections after which the session is destroyed. */
|
|
1444
|
+
declare const REFRESH_FAIL_LIMIT = 2;
|
|
1445
|
+
/** Short-lived login transaction (PKCE verifier, state, nonce, returnTo). */
|
|
1446
|
+
declare const AUTH_TRANSACTION_COOKIE_NAME = "crex-auth-tx";
|
|
1447
|
+
declare const AUTH_TRANSACTION_MAX_AGE_SECONDS: number;
|
|
1448
|
+
/** The middleware refreshes when the access token expires within this window. */
|
|
1449
|
+
declare const SESSION_REFRESH_SKEW_SECONDS = 60;
|
|
1450
|
+
/** Read-only consumers reject an access token expiring within this window. */
|
|
1451
|
+
declare const ACCESS_TOKEN_MIN_TTL_SECONDS = 5;
|
|
1452
|
+
/**
|
|
1453
|
+
* Refresh-token lifetime assumed when the IdP does not report one
|
|
1454
|
+
* (`refresh_expires_in` absent or 0 = no expiry). A rejected refresh still ends
|
|
1455
|
+
* the session earlier.
|
|
1456
|
+
*/
|
|
1457
|
+
declare const REFRESH_LIFETIME_FALLBACK_SECONDS: number;
|
|
1458
|
+
/** Upper bound for a single token-endpoint call made from the middleware. */
|
|
1459
|
+
declare const TOKEN_ENDPOINT_TIMEOUT_MS = 5000;
|
|
1460
|
+
/**
|
|
1461
|
+
* Timeout for `openid-client` calls (discovery, code exchange, userinfo). Its
|
|
1462
|
+
* 3.5 s default fails cold starts, where the event loop is still busy compiling.
|
|
1463
|
+
*/
|
|
1464
|
+
declare const OIDC_HTTP_TIMEOUT_MS = 10000;
|
|
1465
|
+
/**
|
|
1466
|
+
* Auth route paths. `CALLBACK` keeps NextAuth's path on purpose: it is the
|
|
1467
|
+
* redirect URI already registered on the Keycloak clients.
|
|
1468
|
+
*/
|
|
1469
|
+
declare const AUTH_ROUTES: {
|
|
1470
|
+
readonly LOGIN: "/api/auth/login";
|
|
1471
|
+
readonly CALLBACK: "/api/auth/callback/crex";
|
|
1472
|
+
readonly LOGOUT: "/api/auth/logout";
|
|
1473
|
+
readonly SESSION: "/api/auth/session";
|
|
1474
|
+
readonly BACKCHANNEL_LOGOUT: "/api/auth/backchannel-logout";
|
|
1475
|
+
readonly ERROR_PAGE: "/auth/error";
|
|
1476
|
+
};
|
|
1477
|
+
declare const AUTH_QUERY_PARAMS: {
|
|
1478
|
+
readonly RETURN_TO: "returnTo";
|
|
1479
|
+
readonly PROMPT: "prompt";
|
|
1480
|
+
readonly ERROR: "error";
|
|
1481
|
+
};
|
|
1482
|
+
/** OIDC `prompt` values the app uses. */
|
|
1483
|
+
declare const OIDC_PROMPTS: {
|
|
1484
|
+
readonly LOGIN: "login";
|
|
1485
|
+
readonly NONE: "none";
|
|
1486
|
+
};
|
|
1487
|
+
/** Header the logout POST must carry so a cross-site form cannot trigger it. */
|
|
1488
|
+
declare const LOGOUT_REQUEST_HEADER = "x-crex-logout";
|
|
1489
|
+
/** `error` codes on the auth error page. Same names NextAuth used (i18n keys stay valid). */
|
|
1490
|
+
declare const AUTH_ERROR_CODES: {
|
|
1491
|
+
readonly CONFIGURATION: "Configuration";
|
|
1492
|
+
readonly ACCESS_DENIED: "AccessDenied";
|
|
1493
|
+
readonly OAUTH_SIGNIN: "OAuthSignin";
|
|
1494
|
+
readonly OAUTH_CALLBACK: "OAuthCallback";
|
|
1495
|
+
readonly CALLBACK: "Callback";
|
|
1496
|
+
readonly DEFAULT: "Default";
|
|
1497
|
+
};
|
|
1498
|
+
/** `error` value on the session projection when the SSO no longer accepts the refresh. */
|
|
1499
|
+
declare const SESSION_REFRESH_ERROR = "RefreshAccessTokenError";
|
|
1500
|
+
/**
|
|
1501
|
+
* Per-tab guard: a silent (prompt=none) re-auth is attempted at most once per
|
|
1502
|
+
* tab until the session is observed healthy again.
|
|
1503
|
+
*/
|
|
1504
|
+
declare const SILENT_REAUTH_ATTEMPTED_KEY = "crex-silent-reauth-attempted";
|
|
1505
|
+
/**
|
|
1506
|
+
* One-shot marker set right before navigating to the silent re-auth so
|
|
1507
|
+
* `/auth/error` can tell "our silent attempt failed" from a real login failure.
|
|
1508
|
+
*/
|
|
1509
|
+
declare const SILENT_REAUTH_INFLIGHT_KEY = "crex-silent-reauth-inflight";
|
|
1510
|
+
/**
|
|
1511
|
+
* Cookies written by the previous NextAuth-based implementation. They are
|
|
1512
|
+
* large (JWT + bridged access token) and now useless, so the middleware
|
|
1513
|
+
* expires them instead of letting them ride along on every request.
|
|
1514
|
+
*/
|
|
1515
|
+
declare const LEGACY_AUTH_COOKIE_PREFIXES: readonly ["next-auth.", "__Secure-next-auth.", "__Host-next-auth."];
|
|
1516
|
+
declare const LEGACY_TOKEN_COOKIE_NAME = "crex-token";
|
|
1517
|
+
/** Renderer key registered for GMP start-page tile collections (html-enrichment). */
|
|
1518
|
+
declare const GMP_TILES_RENDERER = "GMPTilesRenderer";
|
|
1519
|
+
/** Per-device, user-scoped conversation history used by the GMP ChatMCP client. */
|
|
1520
|
+
declare const GMP_CHAT_SESSION_STORAGE_KEY = "c-rex-gmp-chat-session-v2";
|
|
1521
|
+
declare const GMP_CHAT_SESSION_SNAPSHOT_VERSION = 2;
|
|
1522
|
+
/** Custom History API state key used by same-HTML TOC navigation. */
|
|
1523
|
+
declare const TOC_SCROLL_HISTORY_STATE_KEY = "__crexTocScroll";
|
|
1524
|
+
/** Valid values for CREX_TOKEN_SOURCE — where the Bearer used by CrexApi comes from. */
|
|
1525
|
+
declare const TOKEN_SOURCES: {
|
|
1526
|
+
readonly CLIENT_CREDENTIALS: "client-credentials";
|
|
1527
|
+
readonly USER_LOGIN: "user-login";
|
|
1528
|
+
};
|
|
1529
|
+
/** Valid values for PULSE_PERSONALIZATION_MODE — server-owned data source for Pulse features. */
|
|
1530
|
+
declare const PERSONALIZATION_MODES: {
|
|
1531
|
+
readonly PULSE_USER: "pulse-user";
|
|
1532
|
+
readonly LOCAL_SINGLE_USER: "local-single-user";
|
|
1533
|
+
readonly DISABLED: "disabled";
|
|
1534
|
+
};
|
|
1535
|
+
/** Valid values for Pulse notification/subscription delivery channel. */
|
|
1536
|
+
declare const PULSE_DELIVERY_CHANNELS: {
|
|
1537
|
+
readonly IN_APP: "inApp";
|
|
1538
|
+
readonly EMAIL: "email";
|
|
1539
|
+
};
|
|
1540
|
+
/** Query param name the contextual "ask the editorial team" link appends the page context under. */
|
|
1541
|
+
declare const CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM = "frage";
|
|
1542
|
+
/** Route each app mounts the render-article image proxy at (attaches the IDS Bearer server-side; the browser only sends its session cookie). */
|
|
1543
|
+
declare const IMAGE_PROXY_ROUTE = "/api/images";
|
|
1544
|
+
/** Query param carrying the absolute IDS image URL on `IMAGE_PROXY_ROUTE`. */
|
|
1545
|
+
declare const IMAGE_PROXY_SRC_PARAM = "src";
|
|
1405
1546
|
declare const WILD_CARD_OPTIONS: {
|
|
1406
1547
|
readonly BOTH: "BOTH";
|
|
1407
1548
|
readonly END: "END";
|
|
@@ -1430,4 +1571,4 @@ declare const BREAKPOINTS: {
|
|
|
1430
1571
|
};
|
|
1431
1572
|
declare const MARKER_COLORS: string[];
|
|
1432
1573
|
|
|
1433
|
-
export { ALL, API, ARTICLE_PAGE_LAYOUT, AdministrativeMetadataModelFields, AdministrativeMetadataModelFieldsAll, AuditStateModelFields, AuditStateModelFieldsAll, AuthStateModelFields, AuthStateModelFieldsAll, BLOG_TYPE_AND_LINK, BREAKPOINTS, CONTENT_LANG_KEY,
|
|
1574
|
+
export { ACCESS_TOKEN_MIN_TTL_SECONDS, ALL, API, ARTICLE_PAGE_LAYOUT, AUTH_ERROR_CODES, AUTH_QUERY_PARAMS, AUTH_ROUTES, AUTH_TRANSACTION_COOKIE_NAME, AUTH_TRANSACTION_MAX_AGE_SECONDS, AdministrativeMetadataModelFields, AdministrativeMetadataModelFieldsAll, AuditStateModelFields, AuditStateModelFieldsAll, AuthStateModelFields, AuthStateModelFieldsAll, BLOG_TYPE_AND_LINK, BREAKPOINTS, CHAT_MCP_REQUIRED_SCOPES, CONTENT_LANGUAGES_COOKIE_NAME, CONTENT_LANG_KEY, CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM, CREX_DEFAULT_LANGUAGE_ENV, CREX_GLOBAL_RESTRICTION_ENV, CREX_SESSION_SECRET_ENV, CategoryModelFields, CategoryModelFieldsAll, ComponentModelFields, ComponentModelFieldsAll, ContentLifeCycleStatusModelFields, ContentLifeCycleStatusModelFieldsAll, ContentLifeCycleStatusValueModelFields, ContentLifeCycleStatusValueModelFieldsAll, DEFAULT_COOKIE_MAX_AGE_SECONDS, DEFAULT_ICON, DEFAULT_LANG, DEVICE_OPTIONS, DOCUMENT, DOCUMENTS_TYPE_AND_LINK, DirectoryNodeModelFields, DirectoryNodeModelFieldsAll, DirectoryNodeTypeModelFields, DirectoryNodeTypeModelFieldsAll, DocumentModelFields, DocumentModelFieldsAll, DocumentTypeModelFields, DocumentTypeModelFieldsAll, DocumentationMetadataModelFields, DocumentationMetadataModelFieldsAll, DomainEntityModelFields, DomainEntityModelFieldsAll, EN_LANG, EventModelFields, EventModelFieldsAll, ExternalProductGraphicModelFields, ExternalProductGraphicModelFieldsAll, ExternalProductOntologyModelFields, ExternalProductOntologyModelFieldsAll, FILES_EXTENSIONS, FLAGS_BY_LANG, FRAGMENT, FragmentModelFields, FragmentModelFieldsAll, FunctionalMetadataModelFields, FunctionalMetadataModelFieldsAll, GMP_CHAT_SESSION_SNAPSHOT_VERSION, GMP_CHAT_SESSION_STORAGE_KEY, GMP_TILES_RENDERER, ICONS_BY_FILE_EXTENSION, IMAGE_PROXY_ROUTE, IMAGE_PROXY_SRC_PARAM, IdentityDomainModelFields, IdentityDomainModelFieldsAll, IdentityModelFields, IdentityModelFieldsAll, InformationObjectModelFields, InformationObjectModelFieldsAll, InformationSubjectCollectionModelFields, InformationSubjectCollectionModelFieldsAll, InformationSubjectConformityModelFields, InformationSubjectConformityModelFieldsAll, InformationSubjectFormalityModelFields, InformationSubjectFormalityModelFieldsAll, InformationSubjectFunctionalityModelFields, InformationSubjectFunctionalityModelFieldsAll, InformationSubjectModelFields, InformationSubjectModelFieldsAll, InformationSubjectProcessModelFields, InformationSubjectProcessModelFieldsAll, InformationSubjectSafetyModelFields, InformationSubjectSafetyModelFieldsAll, InformationSubjectSafetyWarningMessageModelFields, InformationSubjectSafetyWarningMessageModelFieldsAll, InformationSubjectTechnicalDataModelFields, InformationSubjectTechnicalDataModelFieldsAll, InformationSubjectTechnicalOverviewModelFields, InformationSubjectTechnicalOverviewModelFieldsAll, InformationTypeModelFields, InformationTypeModelFieldsAll, InformationUnitModelFields, InformationUnitModelFieldsAll, LEGACY_AUTH_COOKIE_PREFIXES, LEGACY_TOKEN_COOKIE_NAME, LOGOUT_REQUEST_HEADER, LOG_CATEGORIES, LOG_LEVELS, MARKER_COLORS, OIDC_HTTP_TIMEOUT_MS, OIDC_PROMPTS, OPERATOR_OPTIONS, OwlClassModelFields, OwlClassModelFieldsAll, PACKAGE, PERSONALIZATION_MODES, POST_LOGOUT_RETURN_TO_KEY, PULSE_DELIVERY_CHANNELS, PackageModelFields, PackageModelFieldsAll, PartyModelFields, PartyModelFieldsAll, PartyRoleModelFields, PartyRoleModelFieldsAll, PlanningDownTimeModelFields, PlanningDownTimeModelFieldsAll, PlanningMaintenanceIntervalModelFields, PlanningMaintenanceIntervalModelFieldsAll, PlanningSetupTimeModelFields, PlanningSetupTimeModelFieldsAll, PlanningTimeModelFields, PlanningTimeModelFieldsAll, PlanningWorkingTimeModelFields, PlanningWorkingTimeModelFieldsAll, ProductFeatureModelFields, ProductFeatureModelFieldsAll, ProductFunctionModelFields, ProductFunctionModelFieldsAll, ProductLcpAfterUseModelFields, ProductLcpAfterUseModelFieldsAll, ProductLcpDesignAndRealizationModelFields, ProductLcpDesignAndRealizationModelFieldsAll, ProductLcpPuttingToUseModelFields, ProductLcpPuttingToUseModelFieldsAll, ProductLcpUseModelFields, ProductLcpUseModelFieldsAll, ProductLifeCyclePhaseModelFields, ProductLifeCyclePhaseModelFieldsAll, ProductMetadataModelFields, ProductMetadataModelFieldsAll, ProductPropertyModelFields, ProductPropertyModelFieldsAll, ProductVariantModelFields, ProductVariantModelFieldsAll, QualificationModelFields, QualificationModelFieldsAll, QualificationRoleModelFields, QualificationRoleModelFieldsAll, QualificationSkillLevelModelFields, QualificationSkillLevelModelFieldsAll, REFRESH_FAIL_COOKIE_NAME, REFRESH_FAIL_LIMIT, REFRESH_LIFETIME_FALLBACK_SECONDS, RENDITION_LINK_RELS, RESULT_TYPES, RESULT_VIEW_STYLES, RenditionModelFields, RenditionModelFieldsAll, RenditionSelectorModelFields, RenditionSelectorModelFieldsAll, SDK_CONFIG_KEY, SEARCH_SETTINGS_COOKIE_NAME, SESSION_COOKIE_CHUNK_SIZE, SESSION_COOKIE_MAX_CHUNKS, SESSION_COOKIE_NAME, SESSION_PAYLOAD_VERSION, SESSION_REFRESH_ERROR, SESSION_REFRESH_SKEW_SECONDS, SILENT_REAUTH_ATTEMPTED_KEY, SILENT_REAUTH_INFLIGHT_KEY, SupplyConsumableModelFields, SupplyConsumableModelFieldsAll, SupplyHardwareToolModelFields, SupplyHardwareToolModelFieldsAll, SupplyLubricantModelFields, SupplyLubricantModelFieldsAll, SupplyModelFields, SupplyModelFieldsAll, SupplyOperatingModelFields, SupplyOperatingModelFieldsAll, SupplySparePartModelFields, SupplySparePartModelFieldsAll, TOC_SCROLL_HISTORY_STATE_KEY, TOKEN_ENDPOINT_TIMEOUT_MS, TOKEN_SOURCES, TOPIC, TOPICS_TYPE_AND_LINK, TopicModelFields, TopicModelFieldsAll, TopicTypeConceptModelFields, TopicTypeConceptModelFieldsAll, TopicTypeFormModelFields, TopicTypeFormModelFieldsAll, TopicTypeLearningModelFields, TopicTypeLearningModelFieldsAll, TopicTypeModelFields, TopicTypeModelFieldsAll, TopicTypeReferenceModelFields, TopicTypeReferenceModelFieldsAll, TopicTypeTaskModelFields, TopicTypeTaskModelFieldsAll, TopicTypeTroubleShootingModelFields, TopicTypeTroubleShootingModelFieldsAll, UI_LANG_KEY, UI_LANG_OPTIONS, UI_PREFERENCES_COOKIE_NAME, VCardCalendarModelFields, VCardCalendarModelFieldsAll, VCardGroupModelFields, VCardGroupModelFieldsAll, VCardImageModelFields, VCardImageModelFieldsAll, VCardIndividualModelFields, VCardIndividualModelFieldsAll, VCardInfoModelFields, VCardInfoModelFieldsAll, VCardLocationModelFields, VCardLocationModelFieldsAll, VCardModelFields, VCardModelFieldsAll, VCardOrganizationModelFields, VCardOrganizationModelFieldsAll, WILD_CARD_OPTIONS };
|