@c-rex/constants 0.3.0-build.89 → 0.3.0-build.95
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 +101 -9
- package/dist/index.d.ts +101 -9
- package/dist/index.js +106 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +79 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1406,7 +1406,8 @@ declare const FILES_EXTENSIONS: {
|
|
|
1406
1406
|
readonly PDF: "application/pdf";
|
|
1407
1407
|
readonly HTML: "text/html";
|
|
1408
1408
|
};
|
|
1409
|
-
|
|
1409
|
+
/** Default cookie lifetime: 30 days, in SECONDS (the unit of `maxAge`). */
|
|
1410
|
+
declare const DEFAULT_COOKIE_MAX_AGE_SECONDS: number;
|
|
1410
1411
|
declare const ICONS_BY_FILE_EXTENSION: {
|
|
1411
1412
|
readonly "application/pdf": "FaFilePdf";
|
|
1412
1413
|
};
|
|
@@ -1416,16 +1417,103 @@ declare const RENDITION_LINK_RELS: {
|
|
|
1416
1417
|
readonly VIEW: "view";
|
|
1417
1418
|
readonly DOWNLOAD: "download";
|
|
1418
1419
|
};
|
|
1419
|
-
declare const CREX_TOKEN_HEADER_KEY = "crex-token";
|
|
1420
1420
|
/** Scopes that must both be present in the selected Bearer to use ChatMCP. */
|
|
1421
1421
|
declare const CHAT_MCP_REQUIRED_SCOPES: readonly ["crex.ids.chat.use", "crex.ids.mcp.use"];
|
|
1422
1422
|
declare const POST_LOGOUT_RETURN_TO_KEY = "crex-post-logout-return-to";
|
|
1423
|
-
/**
|
|
1424
|
-
declare const
|
|
1425
|
-
/**
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
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";
|
|
1429
1517
|
/** Renderer key registered for GMP start-page tile collections (html-enrichment). */
|
|
1430
1518
|
declare const GMP_TILES_RENDERER = "GMPTilesRenderer";
|
|
1431
1519
|
/** Per-tab, user-scoped storage used by the GMP ChatMCP client. */
|
|
@@ -1451,6 +1539,10 @@ declare const PULSE_DELIVERY_CHANNELS: {
|
|
|
1451
1539
|
};
|
|
1452
1540
|
/** Query param name the contextual "ask the editorial team" link appends the page context under. */
|
|
1453
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";
|
|
1454
1546
|
declare const WILD_CARD_OPTIONS: {
|
|
1455
1547
|
readonly BOTH: "BOTH";
|
|
1456
1548
|
readonly END: "END";
|
|
@@ -1479,4 +1571,4 @@ declare const BREAKPOINTS: {
|
|
|
1479
1571
|
};
|
|
1480
1572
|
declare const MARKER_COLORS: string[];
|
|
1481
1573
|
|
|
1482
|
-
export { ALL, API, ARTICLE_PAGE_LAYOUT, AdministrativeMetadataModelFields, AdministrativeMetadataModelFieldsAll, AuditStateModelFields, AuditStateModelFieldsAll, AuthStateModelFields, AuthStateModelFieldsAll,
|
|
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
|
@@ -1406,7 +1406,8 @@ declare const FILES_EXTENSIONS: {
|
|
|
1406
1406
|
readonly PDF: "application/pdf";
|
|
1407
1407
|
readonly HTML: "text/html";
|
|
1408
1408
|
};
|
|
1409
|
-
|
|
1409
|
+
/** Default cookie lifetime: 30 days, in SECONDS (the unit of `maxAge`). */
|
|
1410
|
+
declare const DEFAULT_COOKIE_MAX_AGE_SECONDS: number;
|
|
1410
1411
|
declare const ICONS_BY_FILE_EXTENSION: {
|
|
1411
1412
|
readonly "application/pdf": "FaFilePdf";
|
|
1412
1413
|
};
|
|
@@ -1416,16 +1417,103 @@ declare const RENDITION_LINK_RELS: {
|
|
|
1416
1417
|
readonly VIEW: "view";
|
|
1417
1418
|
readonly DOWNLOAD: "download";
|
|
1418
1419
|
};
|
|
1419
|
-
declare const CREX_TOKEN_HEADER_KEY = "crex-token";
|
|
1420
1420
|
/** Scopes that must both be present in the selected Bearer to use ChatMCP. */
|
|
1421
1421
|
declare const CHAT_MCP_REQUIRED_SCOPES: readonly ["crex.ids.chat.use", "crex.ids.mcp.use"];
|
|
1422
1422
|
declare const POST_LOGOUT_RETURN_TO_KEY = "crex-post-logout-return-to";
|
|
1423
|
-
/**
|
|
1424
|
-
declare const
|
|
1425
|
-
/**
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
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";
|
|
1429
1517
|
/** Renderer key registered for GMP start-page tile collections (html-enrichment). */
|
|
1430
1518
|
declare const GMP_TILES_RENDERER = "GMPTilesRenderer";
|
|
1431
1519
|
/** Per-tab, user-scoped storage used by the GMP ChatMCP client. */
|
|
@@ -1451,6 +1539,10 @@ declare const PULSE_DELIVERY_CHANNELS: {
|
|
|
1451
1539
|
};
|
|
1452
1540
|
/** Query param name the contextual "ask the editorial team" link appends the page context under. */
|
|
1453
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";
|
|
1454
1546
|
declare const WILD_CARD_OPTIONS: {
|
|
1455
1547
|
readonly BOTH: "BOTH";
|
|
1456
1548
|
readonly END: "END";
|
|
@@ -1479,4 +1571,4 @@ declare const BREAKPOINTS: {
|
|
|
1479
1571
|
};
|
|
1480
1572
|
declare const MARKER_COLORS: string[];
|
|
1481
1573
|
|
|
1482
|
-
export { ALL, API, ARTICLE_PAGE_LAYOUT, AdministrativeMetadataModelFields, AdministrativeMetadataModelFieldsAll, AuditStateModelFields, AuditStateModelFieldsAll, AuthStateModelFields, AuthStateModelFieldsAll,
|
|
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.js
CHANGED
|
@@ -20,16 +20,21 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
ACCESS_TOKEN_MIN_TTL_SECONDS: () => ACCESS_TOKEN_MIN_TTL_SECONDS,
|
|
23
24
|
ALL: () => ALL,
|
|
24
25
|
API: () => API,
|
|
25
26
|
ARTICLE_PAGE_LAYOUT: () => ARTICLE_PAGE_LAYOUT,
|
|
27
|
+
AUTH_ERROR_CODES: () => AUTH_ERROR_CODES,
|
|
28
|
+
AUTH_QUERY_PARAMS: () => AUTH_QUERY_PARAMS,
|
|
29
|
+
AUTH_ROUTES: () => AUTH_ROUTES,
|
|
30
|
+
AUTH_TRANSACTION_COOKIE_NAME: () => AUTH_TRANSACTION_COOKIE_NAME,
|
|
31
|
+
AUTH_TRANSACTION_MAX_AGE_SECONDS: () => AUTH_TRANSACTION_MAX_AGE_SECONDS,
|
|
26
32
|
AdministrativeMetadataModelFields: () => AdministrativeMetadataModelFields,
|
|
27
33
|
AdministrativeMetadataModelFieldsAll: () => AdministrativeMetadataModelFieldsAll,
|
|
28
34
|
AuditStateModelFields: () => AuditStateModelFields,
|
|
29
35
|
AuditStateModelFieldsAll: () => AuditStateModelFieldsAll,
|
|
30
36
|
AuthStateModelFields: () => AuthStateModelFields,
|
|
31
37
|
AuthStateModelFieldsAll: () => AuthStateModelFieldsAll,
|
|
32
|
-
BACKCHANNEL_LOGOUT_EVENT_URI: () => BACKCHANNEL_LOGOUT_EVENT_URI,
|
|
33
38
|
BLOG_TYPE_AND_LINK: () => BLOG_TYPE_AND_LINK,
|
|
34
39
|
BREAKPOINTS: () => BREAKPOINTS,
|
|
35
40
|
CHAT_MCP_REQUIRED_SCOPES: () => CHAT_MCP_REQUIRED_SCOPES,
|
|
@@ -38,7 +43,7 @@ __export(index_exports, {
|
|
|
38
43
|
CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM: () => CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM,
|
|
39
44
|
CREX_DEFAULT_LANGUAGE_ENV: () => CREX_DEFAULT_LANGUAGE_ENV,
|
|
40
45
|
CREX_GLOBAL_RESTRICTION_ENV: () => CREX_GLOBAL_RESTRICTION_ENV,
|
|
41
|
-
|
|
46
|
+
CREX_SESSION_SECRET_ENV: () => CREX_SESSION_SECRET_ENV,
|
|
42
47
|
CategoryModelFields: () => CategoryModelFields,
|
|
43
48
|
CategoryModelFieldsAll: () => CategoryModelFieldsAll,
|
|
44
49
|
ComponentModelFields: () => ComponentModelFields,
|
|
@@ -47,7 +52,7 @@ __export(index_exports, {
|
|
|
47
52
|
ContentLifeCycleStatusModelFieldsAll: () => ContentLifeCycleStatusModelFieldsAll,
|
|
48
53
|
ContentLifeCycleStatusValueModelFields: () => ContentLifeCycleStatusValueModelFields,
|
|
49
54
|
ContentLifeCycleStatusValueModelFieldsAll: () => ContentLifeCycleStatusValueModelFieldsAll,
|
|
50
|
-
|
|
55
|
+
DEFAULT_COOKIE_MAX_AGE_SECONDS: () => DEFAULT_COOKIE_MAX_AGE_SECONDS,
|
|
51
56
|
DEFAULT_ICON: () => DEFAULT_ICON,
|
|
52
57
|
DEFAULT_LANG: () => DEFAULT_LANG,
|
|
53
58
|
DEVICE_OPTIONS: () => DEVICE_OPTIONS,
|
|
@@ -83,6 +88,8 @@ __export(index_exports, {
|
|
|
83
88
|
GMP_CHAT_SESSION_STORAGE_KEY: () => GMP_CHAT_SESSION_STORAGE_KEY,
|
|
84
89
|
GMP_TILES_RENDERER: () => GMP_TILES_RENDERER,
|
|
85
90
|
ICONS_BY_FILE_EXTENSION: () => ICONS_BY_FILE_EXTENSION,
|
|
91
|
+
IMAGE_PROXY_ROUTE: () => IMAGE_PROXY_ROUTE,
|
|
92
|
+
IMAGE_PROXY_SRC_PARAM: () => IMAGE_PROXY_SRC_PARAM,
|
|
86
93
|
IdentityDomainModelFields: () => IdentityDomainModelFields,
|
|
87
94
|
IdentityDomainModelFieldsAll: () => IdentityDomainModelFieldsAll,
|
|
88
95
|
IdentityModelFields: () => IdentityModelFields,
|
|
@@ -113,10 +120,14 @@ __export(index_exports, {
|
|
|
113
120
|
InformationTypeModelFieldsAll: () => InformationTypeModelFieldsAll,
|
|
114
121
|
InformationUnitModelFields: () => InformationUnitModelFields,
|
|
115
122
|
InformationUnitModelFieldsAll: () => InformationUnitModelFieldsAll,
|
|
116
|
-
|
|
123
|
+
LEGACY_AUTH_COOKIE_PREFIXES: () => LEGACY_AUTH_COOKIE_PREFIXES,
|
|
124
|
+
LEGACY_TOKEN_COOKIE_NAME: () => LEGACY_TOKEN_COOKIE_NAME,
|
|
125
|
+
LOGOUT_REQUEST_HEADER: () => LOGOUT_REQUEST_HEADER,
|
|
117
126
|
LOG_CATEGORIES: () => LOG_CATEGORIES,
|
|
118
127
|
LOG_LEVELS: () => LOG_LEVELS,
|
|
119
128
|
MARKER_COLORS: () => MARKER_COLORS,
|
|
129
|
+
OIDC_HTTP_TIMEOUT_MS: () => OIDC_HTTP_TIMEOUT_MS,
|
|
130
|
+
OIDC_PROMPTS: () => OIDC_PROMPTS,
|
|
120
131
|
OPERATOR_OPTIONS: () => OPERATOR_OPTIONS,
|
|
121
132
|
OwlClassModelFields: () => OwlClassModelFields,
|
|
122
133
|
OwlClassModelFieldsAll: () => OwlClassModelFieldsAll,
|
|
@@ -166,6 +177,9 @@ __export(index_exports, {
|
|
|
166
177
|
QualificationRoleModelFieldsAll: () => QualificationRoleModelFieldsAll,
|
|
167
178
|
QualificationSkillLevelModelFields: () => QualificationSkillLevelModelFields,
|
|
168
179
|
QualificationSkillLevelModelFieldsAll: () => QualificationSkillLevelModelFieldsAll,
|
|
180
|
+
REFRESH_FAIL_COOKIE_NAME: () => REFRESH_FAIL_COOKIE_NAME,
|
|
181
|
+
REFRESH_FAIL_LIMIT: () => REFRESH_FAIL_LIMIT,
|
|
182
|
+
REFRESH_LIFETIME_FALLBACK_SECONDS: () => REFRESH_LIFETIME_FALLBACK_SECONDS,
|
|
169
183
|
RENDITION_LINK_RELS: () => RENDITION_LINK_RELS,
|
|
170
184
|
RESULT_TYPES: () => RESULT_TYPES,
|
|
171
185
|
RESULT_VIEW_STYLES: () => RESULT_VIEW_STYLES,
|
|
@@ -175,7 +189,14 @@ __export(index_exports, {
|
|
|
175
189
|
RenditionSelectorModelFieldsAll: () => RenditionSelectorModelFieldsAll,
|
|
176
190
|
SDK_CONFIG_KEY: () => SDK_CONFIG_KEY,
|
|
177
191
|
SEARCH_SETTINGS_COOKIE_NAME: () => SEARCH_SETTINGS_COOKIE_NAME,
|
|
178
|
-
|
|
192
|
+
SESSION_COOKIE_CHUNK_SIZE: () => SESSION_COOKIE_CHUNK_SIZE,
|
|
193
|
+
SESSION_COOKIE_MAX_CHUNKS: () => SESSION_COOKIE_MAX_CHUNKS,
|
|
194
|
+
SESSION_COOKIE_NAME: () => SESSION_COOKIE_NAME,
|
|
195
|
+
SESSION_PAYLOAD_VERSION: () => SESSION_PAYLOAD_VERSION,
|
|
196
|
+
SESSION_REFRESH_ERROR: () => SESSION_REFRESH_ERROR,
|
|
197
|
+
SESSION_REFRESH_SKEW_SECONDS: () => SESSION_REFRESH_SKEW_SECONDS,
|
|
198
|
+
SILENT_REAUTH_ATTEMPTED_KEY: () => SILENT_REAUTH_ATTEMPTED_KEY,
|
|
199
|
+
SILENT_REAUTH_INFLIGHT_KEY: () => SILENT_REAUTH_INFLIGHT_KEY,
|
|
179
200
|
SupplyConsumableModelFields: () => SupplyConsumableModelFields,
|
|
180
201
|
SupplyConsumableModelFieldsAll: () => SupplyConsumableModelFieldsAll,
|
|
181
202
|
SupplyHardwareToolModelFields: () => SupplyHardwareToolModelFields,
|
|
@@ -189,6 +210,7 @@ __export(index_exports, {
|
|
|
189
210
|
SupplySparePartModelFields: () => SupplySparePartModelFields,
|
|
190
211
|
SupplySparePartModelFieldsAll: () => SupplySparePartModelFieldsAll,
|
|
191
212
|
TOC_SCROLL_HISTORY_STATE_KEY: () => TOC_SCROLL_HISTORY_STATE_KEY,
|
|
213
|
+
TOKEN_ENDPOINT_TIMEOUT_MS: () => TOKEN_ENDPOINT_TIMEOUT_MS,
|
|
192
214
|
TOKEN_SOURCES: () => TOKEN_SOURCES,
|
|
193
215
|
TOPIC: () => TOPIC,
|
|
194
216
|
TOPICS_TYPE_AND_LINK: () => TOPICS_TYPE_AND_LINK,
|
|
@@ -1645,7 +1667,7 @@ var FILES_EXTENSIONS = {
|
|
|
1645
1667
|
PDF: "application/pdf",
|
|
1646
1668
|
HTML: "text/html"
|
|
1647
1669
|
};
|
|
1648
|
-
var
|
|
1670
|
+
var DEFAULT_COOKIE_MAX_AGE_SECONDS = 30 * 24 * 60 * 60;
|
|
1649
1671
|
var ICONS_BY_FILE_EXTENSION = {
|
|
1650
1672
|
"application/pdf": "FaFilePdf"
|
|
1651
1673
|
};
|
|
@@ -1654,15 +1676,60 @@ var RENDITION_LINK_RELS = {
|
|
|
1654
1676
|
VIEW: "view",
|
|
1655
1677
|
DOWNLOAD: "download"
|
|
1656
1678
|
};
|
|
1657
|
-
var CREX_TOKEN_HEADER_KEY = "crex-token";
|
|
1658
1679
|
var CHAT_MCP_REQUIRED_SCOPES = [
|
|
1659
1680
|
"crex.ids.chat.use",
|
|
1660
1681
|
"crex.ids.mcp.use"
|
|
1661
1682
|
];
|
|
1662
1683
|
var POST_LOGOUT_RETURN_TO_KEY = "crex-post-logout-return-to";
|
|
1663
|
-
var
|
|
1664
|
-
var
|
|
1665
|
-
var
|
|
1684
|
+
var CREX_SESSION_SECRET_ENV = "CREX_SESSION_SECRET";
|
|
1685
|
+
var SESSION_COOKIE_NAME = "crex-session";
|
|
1686
|
+
var SESSION_COOKIE_CHUNK_SIZE = 3400;
|
|
1687
|
+
var SESSION_COOKIE_MAX_CHUNKS = 3;
|
|
1688
|
+
var SESSION_PAYLOAD_VERSION = 1;
|
|
1689
|
+
var REFRESH_FAIL_COOKIE_NAME = "crex-refresh-fail";
|
|
1690
|
+
var REFRESH_FAIL_LIMIT = 2;
|
|
1691
|
+
var AUTH_TRANSACTION_COOKIE_NAME = "crex-auth-tx";
|
|
1692
|
+
var AUTH_TRANSACTION_MAX_AGE_SECONDS = 10 * 60;
|
|
1693
|
+
var SESSION_REFRESH_SKEW_SECONDS = 60;
|
|
1694
|
+
var ACCESS_TOKEN_MIN_TTL_SECONDS = 5;
|
|
1695
|
+
var REFRESH_LIFETIME_FALLBACK_SECONDS = 30 * 24 * 60 * 60;
|
|
1696
|
+
var TOKEN_ENDPOINT_TIMEOUT_MS = 5e3;
|
|
1697
|
+
var OIDC_HTTP_TIMEOUT_MS = 1e4;
|
|
1698
|
+
var AUTH_ROUTES = {
|
|
1699
|
+
LOGIN: "/api/auth/login",
|
|
1700
|
+
CALLBACK: "/api/auth/callback/crex",
|
|
1701
|
+
LOGOUT: "/api/auth/logout",
|
|
1702
|
+
SESSION: "/api/auth/session",
|
|
1703
|
+
BACKCHANNEL_LOGOUT: "/api/auth/backchannel-logout",
|
|
1704
|
+
ERROR_PAGE: "/auth/error"
|
|
1705
|
+
};
|
|
1706
|
+
var AUTH_QUERY_PARAMS = {
|
|
1707
|
+
RETURN_TO: "returnTo",
|
|
1708
|
+
PROMPT: "prompt",
|
|
1709
|
+
ERROR: "error"
|
|
1710
|
+
};
|
|
1711
|
+
var OIDC_PROMPTS = {
|
|
1712
|
+
LOGIN: "login",
|
|
1713
|
+
NONE: "none"
|
|
1714
|
+
};
|
|
1715
|
+
var LOGOUT_REQUEST_HEADER = "x-crex-logout";
|
|
1716
|
+
var AUTH_ERROR_CODES = {
|
|
1717
|
+
CONFIGURATION: "Configuration",
|
|
1718
|
+
ACCESS_DENIED: "AccessDenied",
|
|
1719
|
+
OAUTH_SIGNIN: "OAuthSignin",
|
|
1720
|
+
OAUTH_CALLBACK: "OAuthCallback",
|
|
1721
|
+
CALLBACK: "Callback",
|
|
1722
|
+
DEFAULT: "Default"
|
|
1723
|
+
};
|
|
1724
|
+
var SESSION_REFRESH_ERROR = "RefreshAccessTokenError";
|
|
1725
|
+
var SILENT_REAUTH_ATTEMPTED_KEY = "crex-silent-reauth-attempted";
|
|
1726
|
+
var SILENT_REAUTH_INFLIGHT_KEY = "crex-silent-reauth-inflight";
|
|
1727
|
+
var LEGACY_AUTH_COOKIE_PREFIXES = [
|
|
1728
|
+
"next-auth.",
|
|
1729
|
+
"__Secure-next-auth.",
|
|
1730
|
+
"__Host-next-auth."
|
|
1731
|
+
];
|
|
1732
|
+
var LEGACY_TOKEN_COOKIE_NAME = "crex-token";
|
|
1666
1733
|
var GMP_TILES_RENDERER = "GMPTilesRenderer";
|
|
1667
1734
|
var GMP_CHAT_SESSION_STORAGE_KEY = "c-rex-gmp-chat-session-v1";
|
|
1668
1735
|
var GMP_CHAT_SESSION_SNAPSHOT_VERSION = 1;
|
|
@@ -1681,6 +1748,8 @@ var PULSE_DELIVERY_CHANNELS = {
|
|
|
1681
1748
|
EMAIL: "email"
|
|
1682
1749
|
};
|
|
1683
1750
|
var CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM = "frage";
|
|
1751
|
+
var IMAGE_PROXY_ROUTE = "/api/images";
|
|
1752
|
+
var IMAGE_PROXY_SRC_PARAM = "src";
|
|
1684
1753
|
var WILD_CARD_OPTIONS = {
|
|
1685
1754
|
BOTH: "BOTH",
|
|
1686
1755
|
END: "END",
|
|
@@ -1726,16 +1795,21 @@ var MARKER_COLORS = [
|
|
|
1726
1795
|
];
|
|
1727
1796
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1728
1797
|
0 && (module.exports = {
|
|
1798
|
+
ACCESS_TOKEN_MIN_TTL_SECONDS,
|
|
1729
1799
|
ALL,
|
|
1730
1800
|
API,
|
|
1731
1801
|
ARTICLE_PAGE_LAYOUT,
|
|
1802
|
+
AUTH_ERROR_CODES,
|
|
1803
|
+
AUTH_QUERY_PARAMS,
|
|
1804
|
+
AUTH_ROUTES,
|
|
1805
|
+
AUTH_TRANSACTION_COOKIE_NAME,
|
|
1806
|
+
AUTH_TRANSACTION_MAX_AGE_SECONDS,
|
|
1732
1807
|
AdministrativeMetadataModelFields,
|
|
1733
1808
|
AdministrativeMetadataModelFieldsAll,
|
|
1734
1809
|
AuditStateModelFields,
|
|
1735
1810
|
AuditStateModelFieldsAll,
|
|
1736
1811
|
AuthStateModelFields,
|
|
1737
1812
|
AuthStateModelFieldsAll,
|
|
1738
|
-
BACKCHANNEL_LOGOUT_EVENT_URI,
|
|
1739
1813
|
BLOG_TYPE_AND_LINK,
|
|
1740
1814
|
BREAKPOINTS,
|
|
1741
1815
|
CHAT_MCP_REQUIRED_SCOPES,
|
|
@@ -1744,7 +1818,7 @@ var MARKER_COLORS = [
|
|
|
1744
1818
|
CONTEXTUAL_EXTERNAL_LINK_CONTEXT_PARAM,
|
|
1745
1819
|
CREX_DEFAULT_LANGUAGE_ENV,
|
|
1746
1820
|
CREX_GLOBAL_RESTRICTION_ENV,
|
|
1747
|
-
|
|
1821
|
+
CREX_SESSION_SECRET_ENV,
|
|
1748
1822
|
CategoryModelFields,
|
|
1749
1823
|
CategoryModelFieldsAll,
|
|
1750
1824
|
ComponentModelFields,
|
|
@@ -1753,7 +1827,7 @@ var MARKER_COLORS = [
|
|
|
1753
1827
|
ContentLifeCycleStatusModelFieldsAll,
|
|
1754
1828
|
ContentLifeCycleStatusValueModelFields,
|
|
1755
1829
|
ContentLifeCycleStatusValueModelFieldsAll,
|
|
1756
|
-
|
|
1830
|
+
DEFAULT_COOKIE_MAX_AGE_SECONDS,
|
|
1757
1831
|
DEFAULT_ICON,
|
|
1758
1832
|
DEFAULT_LANG,
|
|
1759
1833
|
DEVICE_OPTIONS,
|
|
@@ -1789,6 +1863,8 @@ var MARKER_COLORS = [
|
|
|
1789
1863
|
GMP_CHAT_SESSION_STORAGE_KEY,
|
|
1790
1864
|
GMP_TILES_RENDERER,
|
|
1791
1865
|
ICONS_BY_FILE_EXTENSION,
|
|
1866
|
+
IMAGE_PROXY_ROUTE,
|
|
1867
|
+
IMAGE_PROXY_SRC_PARAM,
|
|
1792
1868
|
IdentityDomainModelFields,
|
|
1793
1869
|
IdentityDomainModelFieldsAll,
|
|
1794
1870
|
IdentityModelFields,
|
|
@@ -1819,10 +1895,14 @@ var MARKER_COLORS = [
|
|
|
1819
1895
|
InformationTypeModelFieldsAll,
|
|
1820
1896
|
InformationUnitModelFields,
|
|
1821
1897
|
InformationUnitModelFieldsAll,
|
|
1822
|
-
|
|
1898
|
+
LEGACY_AUTH_COOKIE_PREFIXES,
|
|
1899
|
+
LEGACY_TOKEN_COOKIE_NAME,
|
|
1900
|
+
LOGOUT_REQUEST_HEADER,
|
|
1823
1901
|
LOG_CATEGORIES,
|
|
1824
1902
|
LOG_LEVELS,
|
|
1825
1903
|
MARKER_COLORS,
|
|
1904
|
+
OIDC_HTTP_TIMEOUT_MS,
|
|
1905
|
+
OIDC_PROMPTS,
|
|
1826
1906
|
OPERATOR_OPTIONS,
|
|
1827
1907
|
OwlClassModelFields,
|
|
1828
1908
|
OwlClassModelFieldsAll,
|
|
@@ -1872,6 +1952,9 @@ var MARKER_COLORS = [
|
|
|
1872
1952
|
QualificationRoleModelFieldsAll,
|
|
1873
1953
|
QualificationSkillLevelModelFields,
|
|
1874
1954
|
QualificationSkillLevelModelFieldsAll,
|
|
1955
|
+
REFRESH_FAIL_COOKIE_NAME,
|
|
1956
|
+
REFRESH_FAIL_LIMIT,
|
|
1957
|
+
REFRESH_LIFETIME_FALLBACK_SECONDS,
|
|
1875
1958
|
RENDITION_LINK_RELS,
|
|
1876
1959
|
RESULT_TYPES,
|
|
1877
1960
|
RESULT_VIEW_STYLES,
|
|
@@ -1881,7 +1964,14 @@ var MARKER_COLORS = [
|
|
|
1881
1964
|
RenditionSelectorModelFieldsAll,
|
|
1882
1965
|
SDK_CONFIG_KEY,
|
|
1883
1966
|
SEARCH_SETTINGS_COOKIE_NAME,
|
|
1884
|
-
|
|
1967
|
+
SESSION_COOKIE_CHUNK_SIZE,
|
|
1968
|
+
SESSION_COOKIE_MAX_CHUNKS,
|
|
1969
|
+
SESSION_COOKIE_NAME,
|
|
1970
|
+
SESSION_PAYLOAD_VERSION,
|
|
1971
|
+
SESSION_REFRESH_ERROR,
|
|
1972
|
+
SESSION_REFRESH_SKEW_SECONDS,
|
|
1973
|
+
SILENT_REAUTH_ATTEMPTED_KEY,
|
|
1974
|
+
SILENT_REAUTH_INFLIGHT_KEY,
|
|
1885
1975
|
SupplyConsumableModelFields,
|
|
1886
1976
|
SupplyConsumableModelFieldsAll,
|
|
1887
1977
|
SupplyHardwareToolModelFields,
|
|
@@ -1895,6 +1985,7 @@ var MARKER_COLORS = [
|
|
|
1895
1985
|
SupplySparePartModelFields,
|
|
1896
1986
|
SupplySparePartModelFieldsAll,
|
|
1897
1987
|
TOC_SCROLL_HISTORY_STATE_KEY,
|
|
1988
|
+
TOKEN_ENDPOINT_TIMEOUT_MS,
|
|
1898
1989
|
TOKEN_SOURCES,
|
|
1899
1990
|
TOPIC,
|
|
1900
1991
|
TOPICS_TYPE_AND_LINK,
|